Skip to content

verify: enforce live-gate feature selection (#200) - #201

Merged
mergify[bot] merged 1 commit into
mainfrom
feat/200-verify-feature-selection
Oct 16, 2026
Merged

mergify[bot] merged 1 commit into
mainfrom
feat/200-verify-feature-selection

Conversation

@ericlitman

@ericlitman ericlitman commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

verify.sh run now enforces the live-gate feature-selection rule that SKILL.md stated only as prose. Closes #200.

 verify()
   classify(changed files)            # now harness-qualified reach: claude:runner, codex:runner, ...
     Publisher.files                  # flags a manifest whose only change since the merge base is its version
-  selection.features = named         # the classified set was thrown away here
+  refuse named ∉ reach               # names each refused feature and the reachable set
+  count = Σ recipe(feature).length   # printed before any install
+  refuse count > 12 unless --wide "<reason>"
   driver.preflight → prepare → exercise → publish
+                                      # evidence comment: planned sessions, and the wide reason

Evidence

  • Before: verify.sh run accepted any feature list. On 2026-10-16 it started the 1.9.0 release's eight features on release: Open Pstack 1.11.0 with the DeepSeek Harness and Antigravity providers (#198) #199 (30 sessions) until Eric stopped it.
    After (unit, verify.test.ts): the same eight features on release: Open Pstack 1.11.0 with the DeepSeek Harness and Antigravity providers (#198) #199's changed files are refused before preflight or any GitHub write:
    Outside this PR's classified reach: claude:catalog, codex:catalog, claude:setup, codex:setup, claude:runner, codex:runner. Reachable: claude:hook:startup, codex:hook:startup
  • Version-only detection (unit, against a real local repository): a release commit flags all three manifests. An extra changed field, an unchanged or removed version, a rename, a deletion and a mode change are not flagged. A base branch that moved after the merge base does not count as a head change. With the comparison switched to the base tip, the test fails.
  • Limit (unit): 12 planned sessions run. 13 are refused before preflight. 13 with --wide run, and the evidence comment carries the reason on success and on failure.
  • Live (this PR, from candidate head c5841de):
    • Scope refusal: verify.sh run --pr 201 --feature claude:runner --self-test exited 1 before any install. stderr: Outside this PR's classified reach: claude:runner. Reachable: claude:project-skill, codex:project-skill. The head had no live-gate status and the PR no comment afterwards.
    • Live gate: verify.sh run --pr 201 --feature claude:project-skill --feature codex:project-skill --self-test printed Planned headless sessions: 2 (limit 12) before install and passed: evidence comment, live-gate success on c5841de, publisher revision equal to the candidate SHA, the candidate skill loaded and its doctor passed in Claude 2.1.301 and Codex 0.163.0.

Merge Danger

Door: two-way. The verifier is repository-local and not shipped in the plugin; reverting restores the old behavior.

Blast Radius: live-gate runs. A run that names a feature outside its PR's reach, or plans more than 12 sessions without --wide, now stops before install. Agents and the PR bodies that list features must pick from the printed reachable set.

Live gate

Run from a checkout of this PR's head with --self-test, because the PR changes the verifier (AGENTS.md); the publisher revision equals the candidate SHA.

Feature Why
claude:project-skill The changed code is the verifier itself. This case loads the candidate's verify-open-pstack skill in Claude and runs its doctor; the run's own scope, count and limit checks execute on the way.
codex:project-skill The same in Codex.

No plugin path changed, so no plugin feature is reachable; the live run confirms that by refusing claude:runner.

Acceptance criteria

Criterion (#200) Verification
"A PR whose only runtime change is the "version" line of the plugin manifests classifies as an install check: hook:startup in each harness whose manifest changed. Other edits to a shared path keep today's expansion." core.test.ts "a version-only release reaches only the startup hook in both harnesses" (#199's seven files reach exactly claude:hook:startup and codex:hook:startup) and "manifest changes classify as shared runtime unless they only bump the version". verify.test.ts version-only test against a real repository.
"verify.sh run refuses, before any install or GitHub write, a named feature that the PR's classified features do not include. The error names each refused feature and the reachable set." verify.test.ts "a named feature outside the classified reach is refused before preflight or any GitHub write" (exact message, no preflight, prepare, comment or status call). Live: the claude:runner refusal above.
"Before any install, verify.sh run prints the number of headless sessions the named features will start. Above a fixed limit, it refuses unless the operator passes --wide "<reason>". The evidence comment records the reason, so review sees it. The limit is a constant in the verifier, not configuration." SESSION_LIMIT in scripts/verify.ts. verify.test.ts limit test (12 runs, 13 refused, 13 with --wide runs and records the reason). Live: the gate run printed Planned headless sessions: 2 (limit 12) before install, and the evidence comment records Planned sessions: 2 (limit 12).
"Unit tests cover the release case (#199's files reach only hook:startup), a refused out-of-scope feature, and the limit with and without --wide." The tests named above.
"SKILL.md describes the three checks and the --wide flag." SKILL.md lines 28-32 and the Helpers usage line.
"The PR changes the verifier, so its live gate runs from its own candidate head with --self-test, per AGENTS.md." Live gate section above; the evidence comment records publisher revision = candidate SHA.

Gate results

On head c5841de, from the worktree root:

Check Exit Summary
bun run test 0 432 pass, 0 fail
bun run typecheck 0
bun run static 0 verifier suite 166 pass, 0 fail, plus tsc --strict
claude plugin validate plugins/pstack 0 Validation passed

Not verified

  • The limit refusal and --wide have no live run. No open PR reaches more than 12 sessions; this PR reaches 2. The unit tests drive verify() with the real recipe() counts.
  • The CLI's stderr printing of a Refused message is shown live only for the scope refusal.

🤖 Generated with Claude Code

verify.sh run now refuses a named feature outside the PR's classified
reach, prints the planned session count before any install, and refuses
more than 12 sessions without --wide "<reason>", which the evidence
comment records. A manifest change that only bumps the version reaches
hook:startup in that manifest's harness.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mergify

mergify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 All 2 merge protections satisfied — ready to merge.

Show 2 satisfied protections

🟢 Queue ready pull requests

Automatically queue non-draft pull requests targeting main after verify, Unfret, and live-gate pass on the head and every review thread is resolved.

  • #review-threads-unresolved = 0
  • -draft
  • check-success=Unfret
  • check-success=live-gate
  • check-success=verify

🟢 🚦 Auto-queue

When all merge protections are satisfied and these conditions match, this pull request will be queued automatically.

  • -files~=^\.github/
  • base = main

@ericlitman

Copy link
Copy Markdown
Owner Author

Live evidence: Open Pstack

  • Candidate SHA: c5841de6b6fd43309b61a646c12df01ee6a4bb6d
  • Base SHA: 3b8dae6d77dede924c367079418ea1551b469295
  • Result: PASSED — named features verified
  • Self-test: completed in both harnesses
  • Planned sessions: 2 (limit 12)
  • Publisher revision: c5841de6b6fd43309b61a646c12df01ee6a4bb6d
  • Evidence-set SHA-256: f9509700d4df885b693e919cd3a9b0065f601d7523e2b7700a4d985a9ae3f8e3
  • Installation (claude): CLI 2.1.301 (Claude Code), plugin 1.11.0, candidate c5841de6b6fd43309b61a646c12df01ee6a4bb6d, tree 76d0e2dfb10694cdf4dbc6b6d2545417e0eabe217383890c73e6b901db9e570e.
  • Installation (codex): CLI codex-cli 0.163.0, plugin 1.11.0, candidate c5841de6b6fd43309b61a646c12df01ee6a4bb6d, tree 76d0e2dfb10694cdf4dbc6b6d2545417e0eabe217383890c73e6b901db9e570e.
  • Observation (claude / project-skill): surface claude -p stream-json with the candidate plugin-dir; action recipe project-skill: doctor; result passed: doctor:exit-0 doctor:skill-loaded doctor:doctor-ran doctor:doctor-canonical-pass; 4 assertions machine-checked; transcript SHA-256 50964c0f73635efc2a604f3205fe5f1d6a1fe9130a98c41e97a8a5e64f308c89; artifact-set SHA-256 b95dd3ae1467c171aeada423e258431f03878743ef270fb51efd0228482831a7.
  • Observation (codex / project-skill): surface codex exec --json with the run-owned candidate installation; action recipe project-skill: doctor; result passed: doctor:exit-0 doctor:skill-loaded doctor:doctor-ran doctor:doctor-canonical-pass; 4 assertions machine-checked; transcript SHA-256 f6a4116e894d9a550aef343ebf4b2e80b8c85149429c1099c6fba842c9d11596; artifact-set SHA-256 652950e645562dc1e060164a1fe6ab8be86f844d86239431b0c907fdfe050a3f.
  • Policy: every new head requires a fresh run; this verifier does not change PR state, queue, or merge.

@greptile-apps

greptile-apps Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileTier: plus

[High impact] The changes appear safe to merge; no blocking defect was found.

Summary

verify.sh run now restricts named features to the PR's classified reach and requires --wide above 12 planned sessions.

  • Changed paths now show which Claude and Codex checks they can reach.
  • The verifier rejects feature choices outside a pull request’s classified reach.
  • Runs above 12 sessions need a reason before they start.

Reviews (1) · Last reviewed commit: "verify: enforce live-gate feature select..." · Reviewed by Greptile

@unfret-eal

unfret-eal Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

✅ No blocking findings

Walkthrough

This PR makes `verify.sh run` enforce the live-gate feature-selection rules that `SKILL.md` previously stated only in prose. Before any install or GitHub write, the verifier now does three things. It refuses named features outside the PR's classified reach. It prints the number of headless sessions the run will start. It refuses runs over 12 sessions unless the operator passes `--wide "&lt;reason&gt;"`, and the evidence comment records that reason. Classification now returns harness-qualified features, and a manifest change that only bumps its version narrows to `hook:startup` in that harness. The PR adds unit tests for these paths; the live scope refusal and gate run are listed by the author as still pending.

Area What changes
Classification `classify` now emits `&lt;harness&gt;:&lt;feature&gt;` entries. A shared-path edit also reaches `hook:startup` in both harnesses and Claude's `agent-preload:poteto-agent`. poteto-mode's `SKILL.md` also reaches that agent. Version-only manifest changes reach only `hook:startup`.
Version-only detection The publisher compares each manifest at the merge base and the head via `git ls-tree`/`cat-file`. It flags `versionOnly` when the mode matches, both sides parse as JSON objects, and only version strings differ. Renames, deletions, mode changes and extra field edits are not flagged.
Run gating `verify()` stores the run's features in a new `receipt.runFeatures`. It throws a new `Refused` error for out-of-scope features and for over-limit runs without `--wide`, before preflight. It sums recipe session counts, including runner routes, against `SESSION_LIMIT = 12`. The CLI prints `Refused` messages on stderr.
CLI and evidence Adds a `--wide` option for `run` only. It is validated as nonblank printable ASCII, at most 160 characters, without backticks or angle brackets. The evidence comment now lists planned sessions and the wide reason on both success and failure.
Docs and tests Updates `SKILL.md` and `features/README.md` to describe the checks and the version-only rule. Adds tests for #199's release files, out-of-scope refusal, the limit with and without `--wide`, and version-only detection against a real local repository. Existing tests are updated to use harness-qualified features.
Details
Lane / stage Model Effort Outcome Duration
broad-gpt-5.6-sol-xhigh / review openai/gpt-5.6-sol → gpt-5.6-sol · primary xhigh succeeded 8 min 37 s
broad-opus-5.5-max / review anthropic/claude-opus-5-5 → claude-opus-5-5 · primary max succeeded 7 min 56 s
focal-gpt-5.6-sol-xhigh copy / review openai/gpt-6.1-sol → gpt-6.1-sol · primary xhigh succeeded 5 min 27 s
focal-gpt-5.6-sol-xhigh copy 2 / review openai/gpt-6.1-sol → gpt-6.1-sol · primary xhigh succeeded 5 min 20 s

First review of this pull request.
4 reviewers finished.
Commit c5841de.
Check run.
Run: GET /unfret/run/panel:c5841de6b6fd43309b61a646c12df01ee6a4bb6d:mAQ8uR7nz2J:S8lwlyYltew.

@unfret review · @unfret status · @unfret help

@unfret-eal unfret-eal Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No blocking findings
Check

@mergify

mergify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-16 16:51 UTC · Rule: default · triggered by merge protections
  • ✅ Checks skipped · PR is already up-to-date
  • ✅ Merged — 2026-10-16 16:52 UTC · at 4e6d9714f5b1e2afd83619c5a946645eaf26340b · merge

This pull request spent 14 seconds in the queue, including 3 seconds running CI.

Required conditions to merge

@mergify
mergify Bot merged commit 4e6d971 into main Oct 16, 2026
7 checks passed
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.

verify.sh run: enforce live-gate feature selection instead of trusting the named list

1 participant