Skip to content

✨ Complete native GitHub queue CI and policy integration - #15853

Merged
clubanderson merged 18 commits into
v5from
feat/native-queue-completion
Oct 31, 2026
Merged

clubanderson merged 18 commits into
v5from
feat/native-queue-completion

Conversation

@clubanderson

@clubanderson clubanderson commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Run build/tests/coverage/security on merge_group synthetic 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 e2d2a4c11 and 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 cases
  • bash .github/scripts/test_pr-auto-update.sh — existing push/incident plus native opt-in/detection/failure cases
  • python3 .github/scripts/test-native-queue-workflows.py — 4 workflow contracts
  • actionlint on owned policy/regression workflows; JS syntax, git diff --check, changed-Go gofmt -l

No 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-merge now persists partial native_merge_queue updates, 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.QueueObservation is projected as integration_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 at 30fc020734214df0fa0ccd038c397761ab7f9a02 and 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.

Signed-off-by: Andy Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates the PR's author has signed the DCO. labels Oct 30, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign danathar for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Oct 30, 2026
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#15871 🐛 fix: stage tracker gives immediate Let-hive-decide feedback and says why a human is wanted same files src/pkg/dashboard/static-src/js/tracker-filter-render.js
src/pkg/dashboard/static/index.html
#15913 ✨ Expose Event triggers in Settings with scoped scanner presets CONFLICT src/docs/api-reference/health-status-events.md
src/docs/api-reference/snapshots-and-style.md
#15890 🐛 dashboard: point operator-reference help marks at the section sub-pages same files src/pkg/dashboard/static-src/js/config-features.js
src/pkg/dashboard/static/index.html
#15849 ✨ Show online ClankeR IDs on the Contributors count pill same files src/docs/api-reference/dashboard-misc.md
src/pkg/dashboard/static/index.html

Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
@clubanderson

Copy link
Copy Markdown
Member Author

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.

@clubanderson

Copy link
Copy Markdown
Member Author

Latest implementation handoff (not activation approval)

Head: 3d1006d08f0264161b7eb418cbf431204ba9cd7a (three DCO-signed commits; isolated worktree clean). Workflow-file push succeeded with stored owner credentials. Self-reviewed; no nested agents. Draft deliberately blocks automatic landing.

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 mergeQueue: null. This is NOT a live group/chain validation. GitHub's real group representation, App-triggered group checks, provider permissions and all-member failure behavior remain owner-controlled pilot verification, not claims established by mocked fixtures.

Owner prerequisites are spelled out in src/docs/native-merge-queue.md#pilot-rollout: #15836 first; #15781 withdrawal guard; trusted-base PR-target policy proof; initially add native policy alongside all eleven checks, then atomically enable MERGE queue and migrate to six real group build/security contexts plus the owned gate (Actions App 15368), retaining external DCO App 1861 as consumed PR-head evidence. Coordinate the exact hivecommons/hive#v5 external-writer variable with Hive's explicit repo allow-list and freshness bypass. Start group size/concurrency 1. No branch rules, runtime settings, repository variables, merges or deployments were changed.

@hivecommons-hive

Copy link
Copy Markdown
Contributor
3d1006d

ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blocked

Hive flagged this PR (author @clubanderson, head 3d1006d08f02) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation — a maintainer should confirm the change is intended before it merges.

  • sensitive_path — changes 7 sensitive path(s) (Touches a sensitive path (OWNERS, workflows, policies, hive config, security docs, …))
    • .github/release-lines.yml
    • .github/workflows/go-security-analysis.yml
    • .github/workflows/native-queue-policy.yml
    • .github/workflows/pr-auto-update-test.yml
    • .github/workflows/pr-auto-update.yml
    • .github/workflows/v2-ci.yml
    • .github/workflows/v2-tests.yml
  • permission_escalation — widens workflow permissions or uses pull_request_target (Widens GitHub Actions permissions or switches to pull_request_target)
    • .github/workflows/native-queue-policy.yml
  • ci_gate_weakening — CI configuration is deleted, softened or has gate checks removed (Disables or softens CI gates (continue-on-error, || true, removed checks))
    • .github/workflows/v2-tests.yml

Hive did not add the sentinel-alert label because this author is trusted. The finding remains recorded for audit and the dashboard Security tab; set sentinel.trusted_authors_block: true to require the blocking label for trusted authors too.

Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
@clubanderson

Copy link
Copy Markdown
Member Author

Parent-authorized dependency integration: performed exactly one v5 base sync after #15836 merged. Current DCO-signed integration head is 0aa97c7d0570c7ddb093ec2c9c486062b20be89e; be04a9cb4cdaac3aefa65b4171d7bcb44d955f37 is an ancestor. No other worktree or #15836 branch was modified. Source availability does not establish runtime rollout.

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 3d1006d08; later deltas are limited to that CI setup fix and this authorized base integration. No new metrics collector, live rule changes, runtime enablement, merges or deployment actions were added.

Signed-off-by: Andy Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Oct 30, 2026
@clubanderson

Copy link
Copy Markdown
Member Author

Requested review delta is pushed at 4509bd888a11a25d90118f5757b635da8aefaf1d (DCO-signed). Accepted Actions evidence now requires matching API-owned suite IDs and exact job/check-run identity in the referenced workflow. Dependabot runs the same trusted PR-target verifier instead of an actor-based skip; skipped policy evidence remains rejected.

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 (be04a9cb4cdaac3aefa65b4171d7bcb44d955f37) remains an ancestor following the single authorized base sync. No subsequent base refresh, collector, issue, rule/settings mutation, merge or deployment was performed.

@hivecommons-hive

Copy link
Copy Markdown
Contributor
4509bd8

ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blocked

Hive flagged this PR (author @clubanderson, head 4509bd888a11) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation — a maintainer should confirm the change is intended before it merges.

  • sensitive_path — changes 8 sensitive path(s) (Touches a sensitive path (OWNERS, workflows, policies, hive config, security docs, …))
    • .github/release-lines.yml
    • .github/workflows/go-security-analysis.yml
    • .github/workflows/native-queue-policy.yml
    • .github/workflows/pr-auto-update-test.yml
    • .github/workflows/pr-auto-update.yml
    • .github/workflows/pr-verifier.yml
    • .github/workflows/v2-ci.yml
    • .github/workflows/v2-tests.yml
  • permission_escalation — widens workflow permissions or uses pull_request_target (Widens GitHub Actions permissions or switches to pull_request_target)
    • .github/workflows/native-queue-policy.yml
  • ci_gate_weakening — CI configuration is deleted, softened or has gate checks removed (Disables or softens CI gates (continue-on-error, || true, removed checks))
    • .github/workflows/pr-auto-update-test.yml
    • .github/workflows/v2-tests.yml

Hive did not add the sentinel-alert label because this author is trusted. The finding remains recorded for audit and the dashboard Security tab; set sentinel.trusted_authors_block: true to require the blocking label for trusted authors too.

@hivecommons-hive

hivecommons-hive Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Why:

  • the branch conflicts with the base and needs a rebase

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 reviewer (folded here because this head already carries its hive review):

This PR edits CI permissions and a pull_request_target trigger, so I am routing it rather than judging it alone. Facts I verified against the v5 tree (merge-base bc6cbce):

Trust-surface changes

  • .github/workflows/native-queue-policy.yml (new) — runs on pull_request_target for v5/v6 with read-only permissions (contents/pull-requests/checks/actions: read), on ubuntu-latest, and checks out github.event.merge_group.base_sha || github.event.pull_request.base.sha with persist-credentials: false (:28-33). Candidate code is never executed; the test and evaluator both come from the base ref. This is the safe shape for pull_request_target.
  • .github/workflows/v2-tests.yml:52-54 — the workflow-level issues: write is removed; a new patch-coverage job (:2461-2468) re-grants contents: read + issues: write scoped to that job, and runs patch-coverage.sh from a second checkout of pull_request.base.sha (:2475-2478, :2496) instead of the PR head. Net effect is narrower write scope and a trusted-base tool. The job gates on needs.required-context-scope.outputs.run-tests, which exists (:209-214).
  • .github/workflows/pr-verifier.yml:19 — if: github.actor != 'dependabot[bot]' is deleted, so "verify PR contents" now runs on dependabot PRs. The PR body does not mention this change; worth a deliberate yes/no since it is a required context on v5.
  • merge_group: checks_requested triggers added to v2-ci.yml, v2-tests.yml, go-security-analysis.yml; coverage job condition extended to merge_group (v2-tests.yml:2008).
  • .github/workflows/pr-auto-update.yml:30-32 — new HIVE_NATIVE_QUEUE_FRESHNESS from vars, consumed by pr-auto-update.sh.

One behaviour worth knowing — .github/scripts/pr-auto-update.sh:113 assigns queue_owned=$(native_queue_owns_freshness "$number") under set -euo pipefail (:8). The function returns 1 on a GraphQL failure or an unparseable reply (:44, :46-49), so one transient API error aborts the whole refresh run for every remaining PR, not just the one being probed. The in-code comment says a failed read "must stop writes", so this looks intended; if per-PR fail-closed was the goal instead, the call site needs || queue_owned=error handling. Flagging, not asserting a defect.

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 reviewer-2 (folded here because this head already carries its hive review):

Style re-review at 44e12bd (delta since ad7ba52, 43 files). The new Go/JS code is readable and well-bounded; two repository-convention issues in the delta, both small and mechanical.

1. tracker-native-queue.js unit test is outside the dashboard JS harness — .github/scripts/native-queue-tracker.test.cjs:1-14
Every other dashboard module test lives in src/pkg/dashboard/*.test.js (24 sibling files, e.g. the new src/pkg/dashboard/stage_tracker_preparation_visual.test.js:3-9 in this same PR), and v2-ci.yml:888 runs node --test src/pkg/dashboard/*.test.js on every PR. The native-queue test instead sits in .github/scripts/ and runs only from pr-auto-update-test.yml:55, a path-filtered workflow (pr-auto-update-test.yml:12,28). A future edit to tracker-filter-render.js, tracker.html, or the esc helper that breaks this rail will not run its test. Suggested fix: move the file to src/pkg/dashboard/stage_tracker_native_queue.test.js, load the source relative to __dirname like its siblings, and drop the three pr-auto-update-test.yml edits.

-// .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. forgestate imported under a second name inside packages that already import it unaliased
src/pkg/dashboard/stage_tracker.go:13, stage_tracker_native_queue.go:12, stage_tracker_native_queue_test.go:12 and src/pkg/github/native_queue_observation.go:12 use forgequeue "github.com/hivecommons/hive/pkg/forgestate", while the same packages reference it as forgestate in src/pkg/dashboard/api_github_webhook.go, open_items.go, status_builder.go, metrics_collector.go and src/pkg/github/advisory_forgestate.go (all unaliased, as is every other import in the repo). Two names for one package in one directory makes grep forgestate.Queue miss the new call sites. Drop the alias:

	"github.com/hivecommons/hive/pkg/forgestate"

and forgequeue. → forgestate. in those four files.

Advisory (no change requested): src/cmd/hive/main_eval_cycle.go:942-948 runs ReconcileNativeQueues in an untracked go func() while the adjacent ReconcileIntegration (:949) is synchronous; the inFlight/interval guard at stage_tracker_native_queue.go:49-55 and the process-scoped b.ctx make this safe, so a one-line comment naming the 45 s budget as the reason would help the next reader.

Prior intent-alignment note (undeclared .github/workflows/pr-verifier.yml dependabot-guard removal) is still in the PR and still absent from the body; not re-filed here.

Review findings from adjudicator-2 (folded here because this head already carries its hive review):

Correctness re-review of delta ad7ba52…44e12bd (reviewed head 44e12bd; the branch has since moved to 3b4b793, which only merges unrelated v5 files). go build of pkg/forgestate, pkg/github, pkg/dashboard, cmd/hive passes at this head; go test is unavailable to me here.

1. Ruleset-only branches never get a CI verdict — src/pkg/github/native_queue_observation.go:234-236

nativeObservationRequired sets known := err == nil from GetRequiredStatusChecks. For a branch protected only by rulesets (no classic protection), GitHub answers 404 Branch not protected, go-github turns every non-2xx into an error, so known is false for the lifetime of the scope even when the /rules/branches/<base> read (lines 254-284) returns a complete required_status_checks rule. nativeObservationChecks then forces state = "unknown" unless a check failed (lines 293-296, 325-327), so the tracker rail can never show passed/pending/blocked for such repos. A 404 here is a definitive "no classic policy", not an unreadable one (403/5xx are). The test table (native_queue_observation_test.go:41-46) only exercises 200 and 403, so this path is uncovered.

	classic, classicResp, err := c.client.Repositories.GetRequiredStatusChecks(ctx, owner, repo, base)
	// 404 means "branch not classically protected": a definitive empty policy,
	// not an unreadable one. Rulesets below still supply the required set.
	known := err == nil || (classicResp != nil && classicResp.StatusCode == http.StatusNotFound)

(and import "net/http"; add a policy-classic-404 mode to the test table that returns 404 from /required_status_checks and a required_status_checks rule from /rules/branches/, expecting passed.)

2. Advisory — unsynchronized config read from the new goroutine. src/cmd/hive/main_eval_cycle.go:942-948 launches ReconcileNativeQueues on a goroutine that reads s.deps.Config.AutoMerge.NativeMergeQueue (slice headers Bases/Repos, stage_tracker_native_queue.go:45-47,65) while handleAutoMergePut assigns the whole struct without a lock (api_config_automerge.go:274). Other cfg.AutoMerge readers already share this pattern on the eval loop, so this is consistent with existing code, but it is a new -race-visible reader; snapshotting the struct once under githubConfigMu at the top of ReconcileNativeQueues would close it.

Previous intent-alignment note (.github/workflows/pr-verifier.yml:19 dependabot guard removal) is still present at this head — the delta does not touch that file.

Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 31, 2026
Signed-off-by: Andy Anderson <andy@clubanderson.com>

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_target on v5/v6 plus merge_group. Permissions are read-only (contents/pull-requests/checks/actions: read), it checks out base_sha/pull_request.base.sha with persist-credentials: false, and runs only .github/scripts/native-queue-policy.cjs from 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 with native-queue-policy.cjs:10, which lists verify PR contents as required evidence for every queue member; with the exclusion kept, dependabot PRs could never satisfy the gate.
  • .github/workflows/v2-tests.yml:53 — workflow-level issues: write dropped; 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 runs patch-coverage.sh from a base-sha checkout (.coverage-tools/) rather than the PR head. required-context-scope.outputs.run-tests (:214) and the test-shard-* artifacts (:523, :816, :1077, :1593) it depends on exist.
  • merge_group: checks_requested added to v2-ci.yml, v2-tests.yml, go-security-analysis.yml; coverage job condition extended to merge_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

@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 31, 2026
…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>

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. src/pkg/github/native_queue_observation.go:211 — known := err == nil after GetRequiredStatusChecks. 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. Because known is never recovered later, nativeObservationChecks (line 311–323) forces every candidate to ci: "unknown" and the rail prints "(required policy unavailable)" permanently — even though the rules endpoint read fine. Suggest treating 404 as known-empty, mirroring branch_exists.go:26:

    	classic, classicResp, err := c.client.Repositories.GetRequiredStatusChecks(ctx, owner, repo, base)
    	known := err == nil || (classicResp != nil && classicResp.StatusCode == http.StatusNotFound)
    
  2. src/pkg/github/native_queue_observation.go:305 — commit-status contexts are recorded as Status="completed" with Conclusion=latestStatus.GetState(). The Status API state "pending" therefore matches the completed && != success branch at line 311 and the candidate is reported blocked instead of pending. 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>
@kubestellar-prow kubestellar-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 31, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:4 new pull_request_target trigger — still present. Mitigations are real (read-only permissions: L10-14, checkout of base.sha with persist-credentials: false L28-33, ubuntu-latest), so this is an acceptance decision, not a defect.
  • .github/workflows/pr-verifier.yml:19 if: github.actor != 'dependabot[bot]' guard removed — still present, still undeclared in the PR body.
  • .github/workflows/v2-tests.yml:2468/2509/2567 issues: write on patch-coverage jobs — still present.

New code in the delta — no new findings:

  • src/pkg/dashboard/api_github_webhook.go:108 observeNativeQueueEvent runs only after HMAC verification (L77) and KnownRepo (L104); it only mutates an in-memory hint/outcome cache, no API or merge side effect.
  • src/pkg/github/native_queue_observation.go is read-only: parameterized GraphQL (L53-57), url.PathEscape(base) on the rules path (L228), candidate refs gated to gh-readonly-queue/<base>/ (L108,L124).
  • src/pkg/dashboard/static-src/js/tracker-native-queue.js escapes every observation field via esc() and only emits https: 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
@kubestellar-prow kubestellar-prow Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 31, 2026
@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 31, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@clubanderson
clubanderson merged commit 6c45a1c into v5 Oct 31, 2026
80 of 82 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the feat/native-queue-completion branch October 31, 2026 01:53
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

@clubanderson

Copy link
Copy Markdown
Member Author

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.

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

Labels

conflicts-with-open-pr Open PR has a merge conflict with another open PR dco-signoff: yes Indicates the PR's author has signed the DCO. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant