Skip to content

fix(governance): bound current-head branch update cadence #500

Description

@seonghobae

Problem

The central PR review merge scheduler currently limits OpenCode/Strix dispatches but does not limit update-branch mutations. On 2026-07-13 one cadence updated many pg-erd-cloud PR branches in one sweep, invalidating prior current-head evidence and launching a large duplicate check queue before the first approved dependency PR could merge.

A second current-head hazard exists in the Noema review gate: it trusts the GraphQL review commit oid without checking an explicit Head SHA embedded in the OpenCode review body. GitHub can surface a review commit oid as the updated branch head while the review body still proves an older head, so that approval must not authorize the secondary gate.

Acceptance criteria

  • Add a bounded branch-update budget per scheduler run; default to one update and support an explicit unlimited mode.
  • Keep inspecting every PR and log each deferred update with the concrete budget reason.
  • Preserve current-head cancellation and expected_head_sha guards.
  • Require an explicit OpenCode Head SHA in a review body, when present, to match the live PR head before Noema treats it as current approval or current changes requested.
  • Add regression tests for both hazards and expose the branch-update limit in the reusable and organization sweep workflow.
  • Verify the full test suite, actionlint, security checks, all review threads/comments, and Medium-or-higher code-scanning alerts before merge.

Operating note

Codex started this Ops item at 2026-07-13T09:52:30+09:00. This is one coherent central-governance increment under ContextualWisdomLab/naruon#974 and Project #1; it does not alter the product roadmap phases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions