Skip to content

Add pnpm verify, a Definition of Done, and CI - #2

Merged
gnapse merged 2 commits into
mainfrom
agents/1-verify
Oct 26, 2026
Merged

gnapse merged 2 commits into
mainfrom
agents/1-verify

Conversation

@gnapse

@gnapse gnapse commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Stack, 1 of 4. Merge in order: this one, then #3, #4, #5.

What it adds

  • pnpm verify (scripts/verify.mjs) runs every check, in about 7 seconds warm: both TypeScript projects, vitest, the web build, and cargo fmt, clippy and tests. It records a hash of the tree only when every check passes and no file changed during the run. A failed run forgets the earlier pass. A docs-only change needs no run; a change to .github/ alone is never recorded.
  • A Done section in CLAUDE.md: what done means, run pnpm verify, never weaken a check, say what wasn't verified.
  • CI (.github/workflows/verify.yml): pnpm verify on macOS for pushes to main and pull requests. Actions are pinned by commit. It's a signal, not a gate: main has no branch protection.
  • docs/agents.md, which grows with each PR in the stack.
  • A first, format-only commit runs rustfmt on ai.rs and lib.rs, so cargo fmt --check can be a step.

Evidence

  • A bug planted for each check (types, config types, tests, web build, rust format, lint, tests, and a stray .only) failed exactly that check and recorded nothing.
  • It passed on a leaf edit, a shared module, a root config change, a linked worktree, and a copy with no main. An untracked file with a type error failed it.
  • 12 tests in scripts/verify.test.mjs run copies of the scripts in throwaway repositories. Each was seen failing against a planted bug. They also pass with git's hook variables pointing at a decoy repo, which stays untouched.

Not verified

  • This workflow on a real runner: this PR is its first run.
  • Whether the latest stable Clippy adds lints. CI doesn't pin Rust.

Known limits

An edit made and undone during a run goes unseen. Verify checks files on disk, not what is staged, so a partial stage can commit a tree that was never checked; CI catches it after the push. A .skip passes.

cargo fmt --check failed on 8 spots in ai.rs and lib.rs. This commit
only reformats them, so the next one can add the check to
pnpm verify.
pnpm verify runs every check: both TypeScript projects, vitest, the
web build, and cargo fmt, clippy, and tests. It takes about 5 seconds
warm. It records a hash of the tree in .git/undertext/ only when
every check passes and no file changed during the run, so a later
hook can tell whether a change was verified. A docs-only change
needs no run. A change to CI files alone is never recorded.

- CLAUDE.md says what done means and to run pnpm verify.
- .github/workflows/verify.yml runs it on macOS for pushes to main
  and pull requests. The actions are pinned by commit.
- docs/agents.md says what is checked, what is only asked, and the
  known limits.
- scripts/verify.test.mjs runs copies of the scripts in throwaway
  repositories.
- .gitignore now covers .claude/settings.local.json. Claude Code
  writes it, and a change to it would void a pass.
@gnapse gnapse closed this Oct 25, 2026
@gnapse gnapse reopened this Oct 25, 2026
@gnapse gnapse closed this Oct 25, 2026
@gnapse gnapse reopened this Oct 25, 2026
@gnapse gnapse closed this Oct 26, 2026
@gnapse gnapse reopened this Oct 26, 2026
@gnapse
gnapse merged commit 9ad77e7 into main Oct 26, 2026
1 check passed
@gnapse
gnapse deleted the agents/1-verify branch October 26, 2026 15:21
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