Skip to content

feat(formal-verification): add the specify refresh action - #16913

Merged
kyle-sexton merged 4 commits into
mainfrom
feat/formal-verification-specify-refresh
Nov 17, 2026
Merged

kyle-sexton merged 4 commits into
mainfrom
feat/formal-verification-specify-refresh

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: #15775

Summary

Adds /formal-verification:specify refresh: it brings each formal-<area> check back in line with code changed since its sync commit and says whether a failure is drift in the verification or a bug in the code. This is the build half of #15775; the dogfood follows in its own pull request.

Fix

  • refresh finds checks by what they do, runs each unchanged, reads and classifies every change to covered code, updates the verification from the code in a throwaway worktree, reruns it with a seeded break, and ends each check in sync, updated, bug or blocked.
  • A property changes only on a person's yes. Unattended, refresh writes only for a check that ends in sync or updated with its seeded break caught, and files a bug only when its counterexample was replayed against the real code.
  • The contract check's stale-coverage line now names /formal-verification:specify refresh, and the autonomy routines catalog gains a formal-verification-upkeep row with no routine file.

Decisions the issue left to planning:

  • Outcome line: Check <id> (<folder>): <outcome>. The folder is named because a check id is unique only within one sync.yaml.
  • The refresh pull request body is built from that folder's part of the report.
  • --convert <skill-dir> names a verification skill outside the contract to convert, attended only.

Verification

  • node --test plugins/formal-verification/scripts/check.test.mjs: 50 pass, 0 fail.
  • check.mjs on this repository: 2 formal-area skills, 0 failures, 0 warnings.
  • validate-cases.py plugins/formal-verification/evals: 0 FAIL, five new sp-refresh-* cases.

Left out: claude plugin eval on the new cases, and any run of the installed refresh action; the dogfood pull request exercises it.

Related

Remaining

  • The dogfood: a deliberate change to code this repository's first formal-<area> skill covers, classified and refreshed by /formal-verification:specify refresh.

🤖 Generated with Claude Code

/formal-verification:specify refresh brings each formal-<area> check
back in line with code changed since its sync commit, keeping every
step of pstack's maintain-formal-verification-skill, and ends each
check in sync, updated, bug or blocked. Steps 2 to 5 run in a
throwaway worktree; a property change waits for a person's yes; a
replayed bug goes to /bugs:write and /work-items:track add; the commit
holds the verification alone, on a ticket branch or through one
upkeep pull request, and a detached HEAD off the tip commits nothing.

The contract check's stale-coverage line now names refresh, and the
autonomy routines catalog gains a formal-verification-upkeep row with
no routine file.

Refs: #15775

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 17, 2026 18:36
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T18:38:26.601580Z 91c2d75 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 91c2d75104

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…anch provenance in refresh

On a ticket branch the scratch worktree now takes the ticket's own
verification files, the refreshed verification is committed there before
the seeded break so the break can be dropped without losing it, and a
check run at the ticket's HEAD leaves the sync commit and seeded_break
unmoved.

Co-Authored-By: Claude Fable 5.2 <[email protected]>

@github-actions github-actions 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.

claude-review: 3 inline finding(s) on fdde3ff2681c97c3716d99a2381c38c32ca257fe; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 6323e41ff3c2a195014c4e25d7ef493a4294214d: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Code review (incremental, ef1ef06..6323e41)

Scope: one file, plugins/formal-verification/skills/specify/reference/refresh.md. One hunk rewrites the Commit bullet for "a folder's own upkeep branch, checked out in the person's working tree". I read the whole hunk, along with the rest of the file's Before the pass, Pass and Commit sections for context.

What changed: the bullet now does things in this order:

  1. It reads the guard first, over the whole working tree (git status --porcelain), and writes nothing when the guard prints anything.
  2. It merges the tip, never as a rebase. If git refuses the merge, it runs git merge --abort and leaves the folder's checks blocked with git's stderr line.
  3. It writes, commits and pushes.

This fixes both failure modes this lane raised at ef1ef06 (original line 184):

  • Conflict: a merge left mid-way in the person's tree now has an abort and a blocked outcome. This matches the worktree bullet below it.
  • Dirty tree: the guard now runs before the merge, so the person's branch can no longer move while nothing gets written.

Widening the guard to the whole tree is stricter than the ticket bullet's path-scoped guard. That fits here, because the merge touches more than the verification paths. After a clean guard, any refused merge is a conflict that leaves MERGE_HEAD behind, so git merge --abort applies. The owner's thread on this point is marked lines changed since resolution: no at this head, and I found no new problem on these lines.

Closing issue: the PR context lists no closing issue, only Refs: #15775. There are no acceptance criteria to check.

Loosened checks: none. The change makes a guard stricter.

Spend: none.

Loosened-check verdict: fail (default, no wrapper value given); patterns: 0

Verifier dropped 0 of 0 candidates.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 6323e41ff3c2a195014c4e25d7ef493a4294214d: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Security review (incremental, blocking only): no security issues found

This review covers only what changed since ef1ef060: one hunk in plugins/formal-verification/skills/specify/reference/refresh.md, which I read in full. This lane already reviewed an earlier head, so it reports only CRITICAL and IMPORTANT findings.

What I checked

  • Upkeep-branch bullet, new order. The pass works in the person's own checkout of formal-verification-upkeep/<folder>. It now runs the guard first, over the whole working tree with git status --porcelain, and writes nothing if that prints anything. Only then does it merge the tip, and it never rebases. If git refuses the merge, it runs git merge --abort and marks the folder's checks blocked with git's stderr line.
    • This is stricter than before. Previously the guard covered only <paths> and ran after the merge.
    • A dirty tree now leaves the person's branch untouched.
    • A merge conflict can no longer leave their tree half-merged while writes go on.
    • The push target is still the same upkeep branch, so no new write scope is added.
  • Trust controls, manifests and instruction surface. This push touches no trusted-actor list, token request, kill switch, merge hold, .github/actions/** file or plugin manifest. No standing instruction is removed or softened, because the only rule that changed got stricter. So I did not need to check the instruction exception register for this hunk.
  • PR context, settled threads and prior findings. This hunk applies the fix from the settled thread on the upkeep-branch bullet: guard before merge, and abort a refused merge. The diff matches the owner's stated resolution, and I am not raising that point again. The only earlier finding from this lane is a summary comment with no findings, so nothing is repeated here.

Spend: nothing in this change starts spending.

critical-findings: 0

… work in refresh

A pass started on a folder's own upkeep branch now has a commit rule,
the scratch commit before a seeded break allows an empty tree, and the
write guard treats untracked files under the staged paths as the
caller's work.

Co-Authored-By: Claude Fable 5.2 <[email protected]>

@github-actions github-actions 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.

claude-review: 1 inline finding(s) on ef1ef06095724f6dda56306b1545f525c5331a74; the summary is in this lane's pull request comment.

claude-lane: claude-review

…p branch

Refresh now reads the working-tree guard before it merges the tip into
a checked-out upkeep branch, and aborts a refused merge and blocks the
folder's checks instead of writing into a conflicted tree.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-refine/fix-docs
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 44184031587

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit 35e8a21 Nov 17, 2026
51 checks passed
@kyle-sexton
kyle-sexton deleted the feat/formal-verification-specify-refresh branch November 17, 2026 22:09
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant