Skip to content

ci: auto-approve spec-gardener PRs so they merge without --admin - #842

Merged
Dumbris merged 1 commit into
mainfrom
ci/spec-gardener-auto-approve
Jul 13, 2026
Merged

Dumbris merged 1 commit into
mainfrom
ci/spec-gardener-auto-approve

Conversation

@Dumbris

@Dumbris Dumbris commented Jul 13, 2026

Copy link
Copy Markdown
Member

Problem

The spec-gardener remote agent pushes with the owner's GitHub credentials, so its PRs are authored by Dumbris — a human account. GitHub forbids self-approval and main requires 1 approving review, so every gardener PR (e.g. #824) is structurally unapprovable and sits blocked until someone reaches for gh pr merge --admin. A recurring agent that can only land via bypass trains us to bypass on a schedule.

Fix

github-actions[bot] posts the approving review instead. It's a distinct identity from the PR author, so its approval counts toward required_approving_review_count — the same mechanism dependabot-auto-merge.yml and arm-auto-merge.yml already depend on. No PAT, no new secret, no --admin.

Auto-merge is armed, not forced: GitHub still waits for all required checks. qa-gate is already auto-passed for these PRs by qa-gate-trivial.yml (specs/docs touch no code-bearing path).

Guards

  • Same-repo branches only. github.head_ref is attacker-controlled on fork PRs — anyone can name a fork branch claude/spec-gardener — so the head repo must be this repo, which already implies write access.
  • Diff confined to specs/** and ROADMAP.md (exactly what chore(specs): gardener checkbox sync #824 touched). A gardener PR that reaches into code fails the job loudly and waits for a human.
  • Draft PRs are skipped.

Also adds the path to the table in docs/qa-merge-gate.md.

The spec-gardener remote agent runs under the owner's GitHub account, so its
PRs are authored by a human who cannot approve them — main requires 1 approving
review, leaving every gardener PR blocked until someone bypasses with
`gh pr merge --admin`.

github-actions[bot] now posts the approving review (a distinct identity, counts
toward required_approving_review_count — same mechanism dependabot-auto-merge
and arm-auto-merge already use) and arms auto-merge. Guarded to same-repo
branches named claude/spec-gardener whose diff touches only specs/ and
ROADMAP.md; anything else fails the job for a human to look at.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown
Contributor

📦 Build Artifacts

Workflow Run: View Run
Branch: ci/spec-gardener-auto-approve

Available Artifacts

  • archive-darwin-amd64 (28 MB)
  • archive-darwin-arm64 (25 MB)
  • archive-linux-amd64 (16 MB)
  • archive-linux-arm64 (15 MB)
  • archive-windows-amd64 (28 MB)
  • archive-windows-arm64 (25 MB)
  • frontend-dist-pr (0 MB)
  • installer-dmg-darwin-amd64 (22 MB)
  • installer-dmg-darwin-arm64 (19 MB)

How to Download

Option 1: GitHub Web UI (easiest)

  1. Go to the workflow run page linked above
  2. Scroll to the bottom "Artifacts" section
  3. Click on the artifact you want to download

Option 2: GitHub CLI

gh run download 29223630594 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

@Dumbris
Dumbris merged commit c603654 into main Jul 13, 2026
38 checks passed
Dumbris added a commit that referenced this pull request Aug 31, 2026
…und 3

All four verified against GitHub and the tree before applying.

1. windows-tray: "no Windows-tray PR is open or merged" was false. #74
   ("feature: windows tray support") merged 2025-10-23 and the cross-platform
   Go/systray build still ships on Windows. The claim now scopes to what the
   epic actually tracks — the native WebView2 replacement — for which no PR
   exists and native/windows/ is a README placeholder.

2. analytics-dashboard: "can never tick from code" conflated two things. A
   human can run spec 069's T023 Playwright sweep and tick the box; what can
   never exist is code evidence for it. Reworded so the distinction is explicit.

3. hygiene-spec-gardener: "three gardener runs ... auto-approved by #842" was
   wrong. Only #999 carries a github-actions APPROVED review. #824 has none and
   merged ~24 minutes BEFORE the auto-approve workflow landed; #870 records no
   approving review either.

4. token-bench-public: calling the MCP-specific third "integrated" overstated
   completion. ToolRet and LiveMCPTool are static retrieval/token corpora and
   lap-score is a linter — none is a public agent-loop task suite, which is what
   the task ultimately owes.

Also noted for the record: the linux-arm64 Build Binaries failure on the
previous commit is a flaky test, not a regression from this docs-only change.
TestServiceStartScanDeepOnRunsSourceResolutionAndPass2
(internal/security/scanner) passes locally with -count=3, and two runs of this
same branch four minutes apart — 33360429077 and 33360648947, both docs-only —
disagreed on it.
Dumbris added a commit that referenced this pull request Aug 31, 2026
…ithub warnings (#1136)

* chore(roadmap): truth-sync statuses against code, clear all --check-github warnings

An evidence-based re-derivation of every non-done roadmap.yaml leaf. Each flip
below was verified against the tree, git/gh state and the rendering sites, then
independently re-checked by an adversarial pass; claims that did not survive
that pass were dropped rather than applied.

Statuses that were wrong in the "already shipped" direction:
- upgrade-nudge-delta todo -> done (#1085, closes #1081). The note asserted
  TODO(spec-079/FR-002) markers exist and that the checker calls only
  /releases/latest; both are false. internal/updatecheck/delta.go now computes
  the delta and all six surfaces render it.
- upgrade-nudge epic in_progress -> done (all five tasks now done).
- analytics-dashboard in_progress -> done. Both children shipped; the
  default-landing half is live (router '/' -> Dashboard, guarded by
  dashboard-default-landing.spec.ts). Spec 069's one open task is a local
  Playwright sweep that leaves no artifact and can never tick from code.
- discovery-eval-harness todo -> done. Both halves ship: cmd/scan-eval for
  security recall/FP, and the eval.yml retrieval-d1 gate plus bench/'s own
  RecallAtK/NDCGAtK + recall@5 parity gate for discovery quality.
- hygiene-spec-gardener in_progress -> done (#824, #870, #999, #842). Its
  recorded blocker is cleared: check-spec-evidence.py is on main.

Statuses that were wrong in the "claimed progress it does not have" direction:
- windows-tray and windows-tray-window in_review -> todo. No Windows-tray PR is
  open or merged and native/windows/ is a README placeholder, so "in review"
  pointed at nothing. The section header is renamed to match.
- planning-hygiene todo -> in_progress and action-log-transparency todo ->
  in_progress; both already have done children.

Notes corrected where they would misdirect the next implementer:
- token-bench-harness claimed it absorbs discovery-eval-harness by measuring
  retrieval recall. Recall is already measured, and bench/ already covers token
  counting, encoding arms (incl. direct_deferred), break-even and reporting.
  The note now records what is genuinely open: activity-log session replay,
  measured first-call success/retry rate, and tokens-per-successful-task.
- token-bench-public: the MCP-specific third already ships via spec 083
  (ToolRet, LiveMCPBench snapshot, lap-score); only agent-loop suites remain.

specs/098-tools-preflight/tasks.md: tick T001, T024, T031, each confirmed
against the tree (doc.go states both invariants T001 requires;
toolslist_snapshot_test.go is labelled T024 and green; README carries all three
FR-017 examples). T025/T027/T032/T033 are left unchecked — they are one-time
process acts or did not survive verification.

Deliberately NOT changed: no epics were added for shipped specs (084-100).
roadmap.yaml is the working set by design and ROADMAP.md already renders a
generated per-spec progress table, so absence of an epic is not drift.

scripts/gen-roadmap.py --check-github: 3 warnings -> 0 errors, 0 warnings.

* fix(roadmap): correct six claims flagged by cross-model review

All six findings from the opencode gpt-5.6-sol review were independently
re-verified against the tree before being applied; none were false positives.
(The reviewer's initial claim that spec-gardener-auto-approve.yml is missing
WAS a false positive from its glob tool and it self-corrected — the file exists
at .github/workflows/spec-gardener-auto-approve.yml.)

1. Un-tick specs/098 T024. T024 asks for a golden snapshot test proving
   tools/list is BYTE-IDENTICAL across all three modes. Spec 099 (FR-014/015)
   later converted that test from a no-delta gate into an ENUMERATED-delta gate
   (toolsListAllowedDelta permits describe_tool and quarantine_security to
   move), so at HEAD the test no longer demonstrates the property T024 states.
   It may well have held on 098's own branch, but that is not checkable from
   the tree, and an unverifiable tick is exactly what this PR exists to remove.
   Badge 29/33 -> 28/33.

2. discovery-eval-harness note: drop the "SUPERSEDED — folded into
   token-bench-harness" framing. It contradicted itself once the epic was
   marked done — token-bench-harness is still unbuilt, so nothing could have
   been folded into it. Both halves shipped independently.

3. Same note: the eval.yml retrieval-d1 job is REPORT-ONLY on pull requests
   (continue-on-error, guarding against npx/uvx fetch flake) and blocks only on
   the nightly schedule. Promoting it to PR-blocking is still open (MCP-742).

4. Same note: the SC-003 recall@5 = 0.68 +/- 0.05 parity gate is asserted in
   bench/armindex_test.go, not armindex.go — the latter supplies the production
   index wiring, not the assertion.

5. token-bench-harness note: the literature-derived retry defaults live in
   bench/session.go (armRetryRates, research D8). bench/report.go only renders
   and labels them as estimates. The substantive point stands: retry rates are
   assumed, not observed.

6. token-bench-public note: "CI-wired" overstated the LiveMCPBench snapshot.
   bench.yml's regular job passes only -corpus-v2; the snapshot is runnable via
   -livemcptool but not run in CI, and its loader has no retrieval golden set,
   so it measures token/scale rather than recall. ToolRet does have its own
   bench.yml job.

gen-roadmap.py --check and --check-github both still clean.

* fix(roadmap): tighten two claims from cross-model review round 2

Both findings verified against the tree before applying.

1. The retrieval-D1 blocking scope was stated too narrowly. eval.yml sets
   continue-on-error only for github.event_name == 'pull_request', and the
   workflow triggers on pull_request, workflow_dispatch and schedule — so the
   job is report-only on PRs and BLOCKING on both nightly and manual dispatch
   runs, not "only on the nightly schedule". The note now says so, and records
   that the workflow's own inline comment carries the same omission.

2. discovery-eval-harness is now done but still declared
   depends_on: [token-bench-harness], which is unbuilt — a done node cannot
   depend on an open one, and the edge contradicted the corrected note saying
   both halves shipped independently. Edge removed; the id remains a valid
   depends_on target for anything that needs it.

gen-roadmap.py --check and --check-github both clean.

* fix(roadmap): scope four over-broad claims from cross-model review round 3

All four verified against GitHub and the tree before applying.

1. windows-tray: "no Windows-tray PR is open or merged" was false. #74
   ("feature: windows tray support") merged 2025-10-23 and the cross-platform
   Go/systray build still ships on Windows. The claim now scopes to what the
   epic actually tracks — the native WebView2 replacement — for which no PR
   exists and native/windows/ is a README placeholder.

2. analytics-dashboard: "can never tick from code" conflated two things. A
   human can run spec 069's T023 Playwright sweep and tick the box; what can
   never exist is code evidence for it. Reworded so the distinction is explicit.

3. hygiene-spec-gardener: "three gardener runs ... auto-approved by #842" was
   wrong. Only #999 carries a github-actions APPROVED review. #824 has none and
   merged ~24 minutes BEFORE the auto-approve workflow landed; #870 records no
   approving review either.

4. token-bench-public: calling the MCP-specific third "integrated" overstated
   completion. ToolRet and LiveMCPTool are static retrieval/token corpora and
   lap-score is a linter — none is a public agent-loop task suite, which is what
   the task ultimately owes.

Also noted for the record: the linux-arm64 Build Binaries failure on the
previous commit is a flaky test, not a regression from this docs-only change.
TestServiceStartScanDeepOnRunsSourceResolutionAndPass2
(internal/security/scanner) passes locally with -count=3, and two runs of this
same branch four minutes apart — 33360429077 and 33360648947, both docs-only —
disagreed on it.

* fix(roadmap): ToolRet is not MCP-specific (cross-model review round 4)

Verified: bench/corpusio/toolret.go documents ToolRet as a general
tool-retrieval corpus whose documentation fields are "heterogeneous JSON/text,
NOT MCP input schemas" (Schema stays nil). Grouping it under "the MCP-specific
third" was wrong.

The token-bench-public note now says public corpus/linter groundwork is
integrated while NO public agent-loop task suite is, and names the ToolRet
caveat explicitly so the next implementer does not re-inherit the error.

Round 4 found no other issues; the round-3 windows-tray, analytics T023 and
gardener corrections were all confirmed accurate against GitHub and the tree.

* fix(roadmap): discovery-eval-harness is in_progress, not done (review round 5)

The final review round caught an error in this PR's own flip, and it is the
same failure mode the PR was written to fix: an epic marked done while a
governing FR is unmet.

Spec 065 FR-009 and SC-005 require CI to FAIL on a discovery regression beyond
tolerance. The retrieval-D1 job sets continue-on-error for pull_request (D1
depends on npx/uvx fetches, a known flake source), so on the PR path CI does not
fail — and eval.yml's own comment records the promotion to PR-blocking as still
planned (MCP-742). The HARNESS shipped; the GATE did not.

Reverted to in_progress and added the remaining work as a child task
(discovery-eval-pr-blocking, MCP-742) so the epic's status has something in the
DAG to point at.

The reviewer also read CN-002 (frozen corpus, never live) as violated because D1
boots a live mcpproxy serving seven reference servers. Recorded as a weaker
tension to adjudicate rather than a violation: #931 pinned all seven upstreams
to freeze-era versions and the job gates on the exact corpus ID set, so the
corpus is reproducible in practice. Whether that satisfies CN-002 or a committed
snapshot is required is a judgement for the spec owner.

gen-roadmap.py --check and --check-github both clean (0 errors, 0 warnings).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants