Skip to content

fix: human smoke confirmation gate (land-and-deploy CI tiers + canary all-green path) - #2580

Closed
redle82 wants to merge 2 commits into
garrytan:mainfrom
goldmonkey-studio:feat/land-and-deploy-ci-tiers-and-manual-gate
Closed

redle82 wants to merge 2 commits into
garrytan:mainfrom
goldmonkey-studio:feat/land-and-deploy-ci-tiers-and-manual-gate

Conversation

@redle82

@redle82 redle82 commented Aug 15, 2026 •

Copy link
Copy Markdown

Summary

Two related fixes, both pointed at the same root cause: a skill reports
"done"/"healthy" without a human ever actually looking at the outcome,
which is worse than no report at all — it looks finished when it isn't, so
more work stacks on top of something never really closed.

/land-and-deploy (4 fixes)

  • Step 2a — CI tiers. Resolve required checks from branch protection
    (gh api .../branches/{base}/protection) instead of treating every check
    gh pr checks reports as equally blocking. Repos that run a fast
    required tier plus a slower advisory/extended tier no longer wait on the
    advisory tier to gate the merge. Falls back to the old all-checks
    behavior if the API call fails.
  • Step 2b — budget-exhaustion detection. A required check can come back
    FAILING because the code broke, or because CI ran out of budget/minutes
    and the job never really executed. Detects the signature (0 steps, run
    completes in seconds instead of its normal duration) and offers to run
    an equivalent local CI script instead of reporting a red X that means
    nothing as a real code failure.
  • Step 3.5c-bis — project-required PR report. If a project documents a
    mandatory PR report/checklist format (in CLAUDE.md or CONTRIBUTING.md),
    verify it's present and complete before recommending merge.
  • Step 7a — human smoke gate (the core fix). After the automated
    canary passes, open the live URL for the user and wait for an explicit
    reply before marking the deploy VERIFIED. Step 9's verdict now
    distinguishes DEPLOYED AND VERIFIED (human confirmed) from DEPLOYED (AUTOMATED CHECKS ONLY — AWAITING HUMAN SMOKE TEST).

/canary (1 fix, same pattern)

Canary's alert path already routes through AskUserQuestion — but the
quiet, all-green path (nothing broke across the whole monitoring window,
the most common outcome) never puts the live page in front of anyone.
Phase 6 now opens the URL and asks for explicit pass/fail after
monitoring completes; Phase 7's baseline-update offer is gated on that
confirmation so an unconfirmed all-clear can't quietly become the new
reference point other runs compare against.

Audit of the rest

Before scoping the second fix to canary, I grepped all ~53 skill templates
for the pattern (automated verdict of HEALTHY/VERIFIED/PASSED with no
human-confirmation gate on the all-green path) and read the real
candidates: qa, design-review, ios-design-review, ios-qa,
benchmark. None share this gap — they already report per-item evidence
(verified/best-effort/reverted/deferred with before/after screenshots per
issue, or objective metrics like FCP/LCP/bundle-size) instead of a single
global "it works in production" claim a human never checked. Applying the
same patch there would be forcing a fix onto a shape that doesn't have the
problem.

All four /land-and-deploy fixes and the /canary fix fall back cleanly
to prior behavior when the relevant signal isn't available (no branch
protection, no documented PR checklist, non-interactive/spawned sessions
where nobody can reply).

Test plan

  • bun run gen:skill-docs regenerates both SKILL.md files from the
    edited .tmpls cleanly
  • bun run gen:skill-docs --dry-run reports FRESH on every file,
    exit 0 (the exact check .github/workflows/skill-docs.yml runs)
  • bun test (tier 1, full suite): 1148 pass / 6 fail — all 6
    confirmed pre-existing by stashing each patch and re-running against
    clean main (gbrain sandbox-PATH issues + a pre-existing
    package.json/VERSION mismatch on main, unrelated to this diff)
  • Targeted runs after each commit: land-and-deploy-postfail.test.ts,
    skill-parser.test.ts, skill-validation.test.ts,
    gen-skill-docs.test.ts, skill-size-budget.test.ts — same 1
    pre-existing failure, zero new failures from either patch
  • Tier 2/3 evals (E2E, LLM-judge) not run — no ANTHROPIC_API_KEY
    configured in this environment; flagging for maintainer review since
    CONTRIBUTING.md recommends them for skill-behavior changes

🤖 Generated with Claude Code

…ire human smoke confirmation

Four related fixes to /land-and-deploy's merge/verify loop, aimed at a
recurring failure pattern: tasks that report as done without a human ever
actually looking at the result, causing more work to stack on top of an
unfinished task.

- Step 2a: resolve required checks from branch protection
  (`gh api .../branches/{base}/protection`) instead of treating every check
  `gh pr checks` reports as equally blocking. Repos that run a fast required
  tier plus a slower advisory tier no longer wait on the advisory tier to
  gate the merge. Falls back to old all-checks behavior if the API call
  fails (no admin read / no branch protection configured).

- Step 2b: recognize the CI-budget-exhaustion signature (0 steps, run
  completes in seconds instead of its normal duration) before reporting a
  required check as a real code failure. Offers to run an equivalent local
  CI script instead of blocking on a red X that never actually executed.

- Step 3.5c-bis: if a project documents a mandatory PR report/checklist
  format (in CLAUDE.md or CONTRIBUTING.md), verify it's present and
  complete before recommending merge, same tiering as the existing
  warning/blocker system.

- Step 7a (the core fix): after the automated canary passes, open the live
  URL for the user and wait for an explicit human reply before marking the
  deploy VERIFIED. A green automated check is not the same thing as a human
  confirming the change works — reporting "healthy" from a script alone is
  a worse failure mode than no report, because it looks finished when
  nobody actually looked. Step 9's verdict now distinguishes DEPLOYED AND
  VERIFIED (human confirmed) from DEPLOYED (AUTOMATED CHECKS ONLY —
  AWAITING HUMAN SMOKE TEST).

Tested: bun test 1148 pass / 6 fail (all 6 pre-existing on clean main,
unrelated to this diff — confirmed by stashing the patch and re-running).
bun run gen:skill-docs --dry-run reports FRESH on all files, exit 0.
@trunk-io

trunk-io Bot commented Aug 15, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

Same root cause as land-and-deploy's Step 7a: canary's alert path already
routes through AskUserQuestion (Phase 5), but the most common outcome —
nothing broke across the whole monitoring window — never puts the live page
in front of a human. Phase 6 prints "VERDICT: DEPLOY IS HEALTHY" straight
from automated checks, and Phase 7 offers to promote that unconfirmed state
into the new baseline other runs compare against.

Phase 6 now opens the live URL and asks for an explicit pass/fail after
monitoring completes, distinguishing `Human smoke: CONFIRMED` from
`Human smoke: AWAITING` in the report and JSONL log — matching the verdict
vocabulary land-and-deploy's Step 9 already uses. Phase 7's baseline-update
offer is gated on CONFIRMED so an unconfirmed all-clear can't quietly become
the new reference point.

Part of the same fix wave as garrytan#2580 (land-and-deploy). Scoped this one to
canary only after auditing the other ~50 skills for the same pattern
(automated verdict of HEALTHY/VERIFIED with no human-confirmation gate on
the quiet all-green path) — qa, design-review, ios-design-review, ios-qa,
and benchmark all already report per-item evidence (verified/best-effort/
reverted/deferred, or objective metrics) rather than a global "it works in
prod" claim, so they don't share this specific gap.

Tested: bun run gen:skill-docs --dry-run reports FRESH, exit 0. Targeted
bun test (skill-parser, skill-validation, gen-skill-docs, skill-size-budget):
757 pass / 1 fail, the fail is the same pre-existing package.json/VERSION
mismatch already on main, unrelated to this diff.
@redle82 redle82 changed the title fix(land-and-deploy): CI tiers, budget-exhaustion detection, and human smoke gate fix: human smoke confirmation gate (land-and-deploy CI tiers + canary all-green path) Aug 15, 2026
@redle82

redle82 commented Aug 15, 2026

Copy link
Copy Markdown
Author

Bumping this — it's been open ~24h with no CI run yet (fork PRs need a maintainer approval to trigger Actions, which I don't have). Happy to address any feedback once it runs. In the meantime, applied the same patch locally in ~/.claude/skills/gstack to confirm the human-gate behavior works as expected on /land-and-deploy and /canary.

@capy-ai

capy-ai Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Thank you for this, @redle82, and for the work that went into it. We reviewed it against current main and decided not to take it: A mandatory human wait breaks spawned and headless deploy runs, and main already separates required from advisory checks; if wanted, offer it as an opt-in config flag later. Closing it with thanks; if the underlying problem still bites you, an issue describing it is very welcome.

@capy-ai capy-ai Bot closed this Oct 8, 2026
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.

1 participant