Skip to content

fix(ci): exact-head UI milestone should refresh Required Merge Gate without redundant rerun #823

Closed

Description

@masarray

Observed 2026-11-19 during G-MV28 #821

Exact-head ui workflow_dispatch run #44517325783 completed SUCCESS and its full Chromium /preview/ job passed. Fast UI and Fast Native also passed on PR head 740c5a89cb35e2f7cbd9be27b41ef4ccfdae4fbb, but ArSonMix / Required CI Merge Gate remained pending (GitHub 405 on protected merge). The completed manual run's REST payload associated pull_requests: [821]; however its workflow_run publisher #44518834443 logged no {"kind":"published"...} line: the incoming workflow_run event lacks the PR number even though the actual run is associated with it.

script/required_pr_merge_gate.mjs currently looks up an empty run's source-SHA PR association only when event.workflow_run.event==="pull_request". Manually dispatched UI jobs use event==="workflow_dispatch", so the event may silently do nothing. We recovered without bypassing checks by rerunning only the already successful exact-head Fast UI job (attempt 2 of #44517083135), which triggered an associated pull_request workflow_run event; required status then turned success, allowing normal squash merge #821.

Proposed narrowly scoped correction

In the trusted main-owned status publisher, when a completed workflow_run is the approved full UI workflow (workflowPath(...) + event === "workflow_dispatch") with an exact 40-hex source SHA and no PR number, resolve the associated open PRs via GitHub's commit→PR association, then recompute all scoped lane status from official job reads. Never infer trust from title alone; never mark success from the manual run alone, never loosen exact-SHA, source-workflow, target-main or failure handling. Add regression tests for missing event PR association, unrelated/manual workflow, stale SHA, duplicate/missing jobs and a fully green required lane. Keep existing ui dispatch semantics and CI economy.

No GUI/PCM behavior affected. This issue is a future CI reliability fix, not authorization to waive the Required Merge Gate.

Activity

  1. masarray commented on Nov 20, 2026

    @masarray
    OwnerAuthor

    Fixed in protected merged PR #839 (8eadca7eaed397f8e81ce2944fbcb703dcc156d1). Reproduced live on INT-1A #836: exact-head full Chromium 44677094222 + FAT 44677134203 both SUCCESS but required status remained pending: uiFull/nativeFull not dispatched; one repeat of already-green fast UI job was necessary solely to publish the green gate. Trusted scripts/required_pr_merge_gate.mjs now recognizes completed owner-approved manual ui-smoke.yml workflow_run with missing PR association, verifies current exact SHA and open PR against GitHub commit->PR readback, and recomputes all real scoped lane statuses. Unit tests cover real positive, malformed/stale PR, wrong repo/base, duplicate, unrelated/manual native workflow and fail-closed cases. PR #839 CI source-contract tests PASS and Required Merge Gate SUCCESS; no audio or UI surface changed. Workload before: 1 unnecessary quick rerun; expected after: 0 for this known missing-association event. Real workflow-run behavior remains subject to future observation; this closes the reproduced root cause without claiming hardware or app CPU improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions