Repository navigation
✨ Complete native GitHub queue CI and policy integration - #15853
Conversation
Signed-off-by: Andy Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
|
CI iteration: the initial release-line guard correctly required classification of native-queue-policy.yml; fixed in 13abae8. The regression job then exposed Node missing on lean self-hosted runners; setup-node is now pinned to the existing repository action/version. Focused policy suite now has 15 passing cases, including pagination and gate changes during final re-reads. Latest-head CI is pending; no merge or activation performed. |
Latest implementation handoff (not activation approval)Head: Latest-head CI evidence:
The first iteration caught the new workflow's missing release-line classification and missing Node on lean self-hosted runners; both were fixed in later signed commits. Latest-head CI is NOT yet green. No local Go tests/build/vet/lint or docs guards were run. Focused local results: 15 Node policy cases, 3 parsed-YAML contracts, freshness writer mock suite, actionlint, JS syntax and Go formatting passed. The exact live GraphQL membership query also validates against GitHub with no schema errors; v5 currently returns Owner prerequisites are spelled out in |
3d1006d
ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blockedHive flagged this PR (author @clubanderson, head
Hive did not add the |
Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
|
Parent-authorized dependency integration: performed exactly one v5 base sync after #15836 merged. Current DCO-signed integration head is Failure-driven correction 1 in this follow-up: the regression runner had Node after setup-node, but neither PyYAML nor pip. Replaced the pip-only fallback with this repository's existing apt/python3-yaml setup. This is an actual CI-log-driven correction, not a speculative dependency installation. Latest integration-head CI must now finish; older-head verdicts are not readiness evidence. The parent is independently reviewing immutable head |
Signed-off-by: Andy Anderson <andy@clubanderson.com>
|
Requested review delta is pushed at Focused validation passed: 18 Node behavioral cases, 4 parsed-workflow contracts, freshness writer mock suite, actionlint and diff checks. The delta is ready for the parent's affected-scope re-review. Latest-head CI is not yet asserted green. Merged #15836 ( |
4509bd8
ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blockedHive flagged this PR (author @clubanderson, head
Hive did not add the |
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. @clubanderson this PR is held at Why:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. Review findings from This PR edits CI permissions and a Trust-surface changes
One behaviour worth knowing — Author is the repository owner and the body records owner authorization for a guarded squash. I have not approved or changed anything; the trust decision belongs to a person. Review findings from Style re-review at 1. -// .github/scripts/native-queue-tracker.test.cjs
+// src/pkg/dashboard/stage_tracker_native_queue.test.js
-vm.runInContext(fs.readFileSync(path.join(__dirname,
- '../../src/pkg/dashboard/static-src/js/tracker-native-queue.js'), 'utf8'), context);
+vm.runInContext(fs.readFileSync(path.join(__dirname,
+ 'static-src/js/tracker-native-queue.js'), 'utf8'), context);2. and Advisory (no change requested): Prior intent-alignment note (undeclared Review findings from Correctness re-review of delta 1. Ruleset-only branches never get a CI verdict —
(and 2. Advisory — unsynchronized config read from the new goroutine. Previous intent-alignment note ( |
Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
There was a problem hiding this comment.
Decision needed: @hanthor should decide whether the CI trust-surface changes in this PR (new pull_request_target workflow native-queue-policy.yml, merge_group triggers on v2-ci/v2-tests/go-security-analysis, removal of the dependabot exclusion from pr-verifier.yml, and moving issues:write from workflow-level to per-job in v2-tests.yml) are acceptable to land now while test/coverage/dashboard shards are red on this head.
Routing to a human rather than judging: this PR edits .github/workflows/* and CI permissions, which is a trust surface the hive does not decide. Facts I verified at ad7ba52 against merge-base bc6cbce:
What changed on the trust surface
.github/workflows/native-queue-policy.yml(new) —pull_request_targeton v5/v6 plusmerge_group. Permissions are read-only (contents/pull-requests/checks/actions: read), it checks outbase_sha/pull_request.base.shawithpersist-credentials: false, and runs only.github/scripts/native-queue-policy.cjsfrom that trusted ref. Candidate code is never executed. Bounded wait is 90×15s ≈ 22.5 min inside a 25 min job timeout..github/workflows/pr-verifier.yml:19—if: github.actor != 'dependabot[bot]'removed. Coherent withnative-queue-policy.cjs:10, which listsverify PR contentsas required evidence for every queue member; with the exclusion kept, dependabot PRs could never satisfy the gate..github/workflows/v2-tests.yml:53— workflow-levelissues: writedropped; the three jobs that use it now declare it themselves (patch-coverage:2468,create-issue-on-failure:2509,create-issues-on-flakes:2567). Net permission reduction for the other jobs.v2-tests.yml:2459-2497— the advisory patch-coverage step becomes its own job that runspatch-coverage.shfrom a base-sha checkout (.coverage-tools/) rather than the PR head.required-context-scope.outputs.run-tests(:214) and thetest-shard-*artifacts (:523, :816, :1077, :1593) it depends on exist.merge_group: checks_requestedadded tov2-ci.yml,v2-tests.yml,go-security-analysis.yml;coveragejob condition extended tomerge_group.
Go side (read, no defect found): config.go:8384-8397 BaseSet() lower-cases repo and keeps branch case; automerge_native_queue.go:76-78 baseAllowed is checked in both nativeQueueEnabled and tryNativeQueue, and nil Bases preserves the previous all-bases behaviour, so existing YAML users are unaffected. Wired in main_sweeps.go:858.
Author/role: @clubanderson is listed under approvers in OWNERS, so the author already holds the role these changes assume. The body states the owner authorised a guarded squash and that no runtime enablement or GitHub rule/variable changes were performed.
CI state on this head: test, coverage, test (dashboard 4/4) and test (dashboard shuffle 1/3) report FAILURE. I did not fetch the logs (API budget exhausted this kick), so I cannot say whether the failures come from this diff; please check before merging.
I have not approved, requested changes, or altered anything.
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
…etion Signed-off-by: Andy Anderson <andy@clubanderson.com> # Conflicts: # src/pkg/dashboard/static-src/html/tracker.html # src/pkg/dashboard/static-src/js/tracker-filter-render.js # src/pkg/dashboard/static-src/manifest.txt # src/pkg/dashboard/static/index.html
Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
There was a problem hiding this comment.
Correctness re-review (delta ad7ba52 → a226e8e; also skimmed the later head 9262016)
Prior correctness finding — still present (in-scope): .github/scripts/pr-auto-update.sh:113 — queue_owned=$(native_queue_owns_freshness "$number") under set -euo pipefail (line 8). When native_queue_owns_freshness returns 1 (GraphQL error or baseRefName/isMergeQueueEnabled unreadable, lines 45–50) the assignment fails and the whole run aborts: no summary row is written and every remaining open PR is left un-updated, not just the one whose queue state could not be read. Fail-closed per PR is the stated intent (line 37–38); fail-closed per run is wider than that.
if ! queue_owned=$(native_queue_owns_freshness "$number"); then
add_row "$number" "$title" 'skipped' 'queue detection unavailable; refusing branch update'
probe_failures=$((probe_failures + 1))
continue
fi
(initialise probe_failures=0 near the top and exit 1 after the summary is emitted if it is non-zero, so the failure is still surfaced.)
New in the delta
-
src/pkg/github/native_queue_observation.go:211—known := err == nilafterGetRequiredStatusChecks. For a base protected only by rulesets (no classic protection) that endpoint returns 404 "Branch not protected", which is an answer (no classic contexts), not an unreadable policy. Becauseknownis never recovered later,nativeObservationChecks(line 311–323) forces every candidate toci: "unknown"and the rail prints "(required policy unavailable)" permanently — even though the rules endpoint read fine. Suggest treating 404 as known-empty, mirroringbranch_exists.go:26:classic, classicResp, err := c.client.Repositories.GetRequiredStatusChecks(ctx, owner, repo, base) known := err == nil || (classicResp != nil && classicResp.StatusCode == http.StatusNotFound) -
src/pkg/github/native_queue_observation.go:305— commit-status contexts are recorded asStatus="completed"withConclusion=latestStatus.GetState(). The Status API state"pending"therefore matches thecompleted && != successbranch at line 311 and the candidate is reportedblockedinstead ofpending. Fix: only mark completed for terminal states.check.Status, check.Conclusion, check.URL = "completed", latestStatus.GetState(), latestStatus.GetTargetURL() if latestStatus.GetState() == "pending" { check.Status, check.Conclusion = "in_progress", "" }
Checked and fine in the delta: ReconcileNativeQueues lock discipline and copy-on-read in stageTrackerNativeQueues (no shared-slice escape to the JSON encoder); the eval-cycle goroutine uses the long-lived loop ctx (run_loop_deps.go → b.ctx), so the 45 s probe is not cut off at cycle end.
Limit: test (rest 2/4) is failing on the current head 9262016 and I could not retrieve its log; please confirm it is unrelated to pkg/dashboard/pkg/github.
— hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88
Signed-off-by: Andy Anderson <andy@clubanderson.com>
There was a problem hiding this comment.
HUMAN DECISION NEEDED — @clubanderson: accept the new pull_request_target workflow (native-queue-policy.yml) and the removal of the dependabot[bot] guard on the required verify PR contents job? Both still present at 9262016.
Security delta re-review (ad7ba52 → 9262016; PR head has since moved to 44e12bd, which only renames forgequeue→forgestate and reflows the same code).
Prior security findings at the new head:
.github/workflows/native-queue-policy.yml:4newpull_request_targettrigger — still present. Mitigations are real (read-onlypermissions:L10-14, checkout ofbase.shawithpersist-credentials: falseL28-33,ubuntu-latest), so this is an acceptance decision, not a defect..github/workflows/pr-verifier.yml:19if: github.actor != 'dependabot[bot]'guard removed — still present, still undeclared in the PR body..github/workflows/v2-tests.yml:2468/2509/2567issues: writeon patch-coverage jobs — still present.
New code in the delta — no new findings:
src/pkg/dashboard/api_github_webhook.go:108observeNativeQueueEventruns only after HMAC verification (L77) andKnownRepo(L104); it only mutates an in-memory hint/outcome cache, no API or merge side effect.src/pkg/github/native_queue_observation.gois read-only: parameterized GraphQL (L53-57),url.PathEscape(base)on the rules path (L228), candidate refs gated togh-readonly-queue/<base>/(L108,L124).src/pkg/dashboard/static-src/js/tracker-native-queue.jsescapes every observation field viaesc()and only emitshttps:links (L11-17).
— hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88
…etion Signed-off-by: Andy Anderson <andy@clubanderson.com> # Conflicts: # src/pkg/dashboard/webstatic/style_ratchet_test.go
There was a problem hiding this comment.
HUMAN DECISION NEEDED — @clubanderson: confirm that running the pull_request_target PR Verifier on Dependabot PRs (guard removed in .github/workflows/pr-verifier.yml) is intended and acceptable, since the PR body does not declare it.
Intent-alignment delta re-review of ad7ba52…44e12bd (43 files; 20 of them are the #15910/v5 source-merge, not PR-owned).
Still present (in-scope, carried from previous review): .github/workflows/pr-verifier.yml:19 drops if: github.actor != 'dependabot[bot]'. The rationale exists only inside the diff — src/docs/native-merge-queue.md ("Dependabot runs that same trusted PR-target verifier rather than skipping it") and .github/scripts/native-queue-policy.test.cjs ("Dependabot PR-target events require an actual successful verifier…") — but the PR body's Summary never mentions a workflow-trigger change. Because this widens which actors run a pull_request_target job with checks: write on the self-hosted pool (pr-verifier.yml:11-22), it should be stated explicitly. Suggested remediation (either):
## Summary
+- Run the PR Verifier on Dependabot PRs too (remove the `github.actor != 'dependabot[bot]'` skip in `.github/workflows/pr-verifier.yml`) so the native-queue policy gate never sees a skipped required proof.or restore the guard and have the policy gate treat Dependabot PRs as out of pilot scope.
Delta checked and consistent with the body: background-only refresh with 3-min cadence / in-flight guard / 45s budget (src/pkg/dashboard/stage_tracker_native_queue.go:16-22,59-63,96), 32-scope cache + 32 receipts + 16 hints bounds (:156-166,195-197,239-247), merged receipt only for a previously observed exact head (:262-280), skipped not treated as success (src/pkg/github/native_queue_observation.go:314-317), no fetch/XHR in tracker-native-queue.js, eval-cycle hook uses the long-lived b.ctx (src/cmd/hive/main_eval_cycle.go:942-948).
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
|
Source-only merge verified: 6c45a1c at 2026-10-31T01:53:17Z, guarded against tested head 3b4b793. Final premerge CI: all 11 required checks SUCCESS; 63 applicable check successes, 15 legitimate scope-skips, zero failing/pending CI. All 18 latest workflow/event runs terminal success/scope-skip, including ARM64 images. Tide was a pending merge-controller context, not a CI test; owner-authorized admin squash preserved DCO. Evidence: tests, build, analysis, images, native regressions. Settings → Features → Auto-Merge → Native GitHub merge queue: enabled=false, skip_current_base_gate=false, TTL=30m; owner Settings activation requires explicit repository/base scopes. Activity Tracker has a distinct native rail with bounded ForgeState observations, actual entry order/state/age, exact candidate-SHA CI, proven-or-unknown members and supported lifecycle receipts, separate from preparation/pipeline rows. No deployment, runtime enablement, variable or branch-rule migration performed. Operator prerequisites remain: deploy/verify included dependencies; App read permissions and authenticated group/PR delivery; real trusted-base native-queue-policy proof; staged 12-check then atomic equivalent seven-context/rule migration; MERGE, concurrency/group-size 1 pilot; matching scoped freshness ownership and Hive activation. Follow the canonical rollout/rollback runbook. #15836, #15781 and #15910 are source-integrated, not outstanding code dependencies. |
Summary
Run build/tests/coverage/security on
merge_groupsynthetic SHAs, without PR-only scope shortcuts or cross-candidate cancellation.Add owned
native-queue-policy: trusted-base validator consumes exact-head evidence from every live queue member, pins DCO App 1861 and Actions App 15368/workflow provenance, checks ancestry/holds/reviews, and fails closed. It never forges external DCO statuses.Explicit repo#base opt-in plus live queue detection suppresses the external post-merge/incident refresh writer; direct mode stays intact.
Expose owner-only native queue enable/disable, exact repo/base allow-lists, freshness opt-in and TTL in Settings → Features → Auto-Merge, default OFF, with server validation and persistence-failure rollback; document exact seven-check equivalent binding migration, MERGE-only attribution-safe pilot, activation/rollback and capability progression.
Add a distinct Activity Tracker native rail backed by provider-neutral cached observations: actual queue positions/states/age, exact synthetic candidate CI, proven-or-unknown full-head membership, partial/stale/unavailable diagnostics and bounded signed lifecycle receipts. No per-render network calls, fabricated ETA, duplicate preparation rail or merge writer.
Authority and dependencies
Owner explicitly authorized a guarded source squash merge after exact-head full applicable CI succeeds. Deployment, runtime enablement and GitHub rule/variable changes remain operator-only and have not been performed.
Parent-owned #15836 (conventional coordinated refresh) is merged and integrated from fresh v5; #15781 is source-merged at
e2d2a4c11and integrated for release-freeze/human-path withdrawal; deployment remains unverified. Neither branch/commit is bundled or modified. #15831 is not duplicated. Existing return-to-author repair remains authoritative. Long-term integration-aware multi-agent orchestration is planned, not implemented here.The five PR-only contexts remain logical requirements through an owned evidence gate; six real build/security contexts remain required on PR and group. Exact manual App-bound context mapping and no-gap activation sequencing are in
src/docs/native-merge-queue.md#pilot-rollout. No live protection is weakened. Initial group size/concurrency 1; owner-controlled multi-member live validation is required before expansion. FIFO head-of-line and post-validation mutation races are documented, not claimed solved.Validation and review
Self-reviewed for provider provenance, missing/pending/failed/tampered evidence, exact head membership, credential boundaries, freshness writers and conservative defaults. No additional agents.
Passed locally (per task's permitted focused JS/config validation):
node --test .github/scripts/native-queue-policy.test.cjs .github/scripts/native-queue-settings.test.cjs .github/scripts/native-queue-tracker.test.cjs— 26 behavioral casesbash .github/scripts/test_pr-auto-update.sh— existing push/incident plus native opt-in/detection/failure casespython3 .github/scripts/test-native-queue-workflows.py— 4 workflow contractsgit diff --check, changed-Gogofmt -lNo local Go tests/build/vet/lint/docs guards run. CI is the Go verdict; do not infer green before latest-head runs complete. The new PR-target policy workflow cannot run from a trusted v5 base until it lands; its behavior is covered in this PR's unprivileged regression workflow. A real App enqueue/group run and required-check migration are deliberately owner-only rollout prerequisites, not already-proven readiness.
Settings completion
Owner-only
PUT /api/config/auto-mergenow persists partialnative_merge_queueupdates, validates explicit owner/repo and case-sensitive owner/repo#base scope before enabling, and restores policy on persistence failure. Scope restricts both enqueue and current-base bypass. Existing YAML empty-list compatibility is preserved; Settings activation requires explicit scope. Both enabled and skip_current_base_gate default false; TTL defaults 30m. No live queue/config/rule changes performed. Go API/scope regressions run in CI only.Tracker/backend completion
Read-only
forgestate.QueueObservationis projected asintegration_queues. The existing governor cycle refreshes up to two scopes every three minutes with a 45-second background budget; the UI only renders cached evidence. Bounds are 100 entries/runs, four candidate cards, eight member ancestry checks/card, 16 event hints and 32 in-memory receipts. Unknown or stale evidence is explicit; signed group base + live chain + every exact-head ancestry + unchanged ref are required before members are called proven. Required policy must be readable from classic protection and applicable rules; exact-SHA checks respect producer bindings and do not accept skipped as success. Complete entry snapshots can prove removal, never its cause. Only an authenticated merged-PR receipt for a previously observed exact queued/member head is merged. Delivery/restart gaps remain explicit. No runtime/rule changes.Latest pushed tracker head:
44e12bd82832676563c5fb52bbc9dcdee2933a24; exact-head CI is under bounded observation, not yet claimed green. Prior-head Settings parity failure was traced to the missing YAML help path for the real base control and corrected without weakening its guard. Preparation UI #15910 is source-merged at30fc020734214df0fa0ccd038c397761ab7f9a02and composed in this exact head: both rails/hooks/modules preserved, generated SPA regenerated; 41 combined native/preparation Node cases pass. CI-reported client-field/citation issues are corrected, with a 32-scope cache bound; latest full CI is still under observation, not claimed green.CI follow-through: actual architecture/style guard failures were corrected by routing neutral observations through the existing ForgeState seam and using existing spacing/radius tokens. Import-count/allowlist guards were not increased; style cleanup baselines were tightened downward as required. Current head is still under full CI observation, not claimed green.