Repository navigation
fix(skills): close out the rust-conventions audit — and gate the table that drifted while we were in there - #703
Merged
Merged
Conversation
athvin
force-pushed
the
fix/rust-conventions-followups
branch
from
November 6, 2026 06:40
b8cccde to
1962597
Compare
athvin
added a commit
that referenced
this pull request
Nov 6, 2026
…e deleted live work (#716) * docs: entities/*.yaml matches nothing — the layout is entities/*/entity.yaml Nine tracked files told the reader that `er-entity gen` and `er-entity verify` work from `entities/*.yaml`. That glob expands to zero files: every declaration is `entities/<name>/entity.yaml`, 49 of them. Anyone who trusted the literal got an empty expansion and no error, in CLAUDE.md, CONTRIBUTING.md, the Makefile comment, rust.yml's `entities` job comment, the design doc's layer diagram and its CLI block, the eslint ignore comment, and the generated crate's manifest header. It was shorthand everywhere rather than a typo in one place, which is why it survived: no single site looked wrong, and nothing executes a comment. The decision to rewrite all nine rather than leave them is deliberate — a path in prose that resolves to nothing is the same defect as a stale count, and this repo does not keep those. Each file was rewritten with its match count asserted before and after (9 replaced, 0 remaining) rather than by a blind pass over the tree. Verified beyond the grep, because this touches four languages' worth of comment syntax: `make -n entities-check` still prints its recipe, rust.yml still loads as YAML with 16 jobs, `er-entities/Cargo.toml` still parses as TOML, `frontend/eslint.config.mjs` passes `node --check`, the mermaid fences are still balanced with the label intact, and `skills-check all` is green (CLAUDE.md is a splice target, so an edit outside its generated block has to stay outside it). One instance is deliberately left: `rust-conventions/evals.md` is fixed on the branch for #703 and touching it here would conflict. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix(worktrees): the lsof guard misses most live sessions, and the disk claim was wrong Two claims in the worktree procedure did not survive being measured against a clone with 19 worktrees open. **`lsof -a -p <pid> -d cwd` does not find a live session.** It is proof of attachment when it hits and proves nothing when it misses, because the dominant pattern here is a session whose cwd is the PRIMARY checkout driving its worktree with `git -C <path>` — no descriptor in that directory, nothing for `lsof` to see. Measured: 15 of 19 worktrees had a commit land in the previous 22 minutes while only 7 were any process's cwd. One committed 12 seconds before the audit evaluated it as unattached, and another moved its HEAD between two commands of the same run. A session following the old procedure literally would have deleted work in progress. What catches those is local git activity — the per-worktree `index` and `logs/HEAD` mtime — plus HEAD resampled at the end of the audit. **"Each worktree carries its own rust/target, at tens of gigabytes" is false** as a general claim, and it was the stated reason the prune is non-negotiable. A worktree only grows a target once something in it compiles; a skills or docs session that never runs `make check` stays near a gigabyte. Measured: 83GB across all 19, concentrated in a single 24GB outlier, most carrying no target at all — while the primary checkout's own target was 132GB, larger than every worktree combined. The worktree count is a poor proxy for the disk problem. `scripts/worktree-audit.sh` turns the four guards into one read-only command. It prints KEEP with reasons or REMOVABLE with the removal line, and never removes anything: a wrong removal costs another session's unpushed work, which is not a cost a script should be allowed to pay alone. Three things learned building it, each now a comment at the site: - A plain `git status` REFRESHES THE INDEX, so the dirty check overwrote the mtime the activity check then read, stamping every worktree "active 0m ago". `git --no-optional-locks status` is the fix. The audit was perturbing exactly what it measured. - The age of the commit HEAD points at is not liveness. A worktree cut from a week-old commit is brand new; one cut from a commit that landed a minute ago may be abandoned. - `/usr/bin/env bash` on this machine is 3.2.57, where `mapfile`, `EPOCHSECONDS` and `declare -A` are runtime failures that `bash -n` does not catch. No other script here uses them either. Verified by discrimination, not just by it running: a synthetic worktree at the merged #692 squash commit — clean, backdated activity — is reported REMOVABLE with its removal command, while all 19 live worktrees report KEEP with specific reasons. Deriving the primary checkout from `--git-common-dir` rather than the script's own location was needed for that: run from inside a worktree, the earlier version excluded itself and offered the primary checkout for removal. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: bmoore813 <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
`run_regen` wires 13 generators; the table in the standard listed 12. `post-merge-surface` — the `land-pr` reference that set-differences every workflow's triggers down to the ones no pull request can pre-test — was added with that skill and never reached the table, and nothing noticed because the table is hand-maintained prose. The "three of these are set differences" sentence was wrong for the same reason: `post-merge-surface` is a fourth. Rephrased without the count, since a count in prose here is the defect this document spends a section warning about. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…y wired The previous commit fixed one missing row by hand, which leaves the mechanism that produced it intact: the generator table in docs/agent-skills.md is a hand-maintained list of something code owns, and this repo's whole answer to that shape is to derive it. `skills-check.sh generators` extracts the id set from the `splice` calls in `run_regen`, extracts it from the table, and set-differences both ways: - wired but unlisted — what `post-merge-surface` was - listed but unwired — a row left behind when a generator is retired, which reads as documentation of something that no longer runs The "Derived from" column stays prose deliberately. What a generator derives and *why* is the part worth reading and the part no script can write; only the id set is derivable, so only the id set is asserted. Observed failing before being trusted, in both directions: deleting the `post-merge-surface` row fails with that id named, and adding a `ghost-generator` row fails with the opposite message. Also proved the extractor cannot fail open — an empty wired set is its own error rather than a vacuous pass. Runs in `lint` and `all`, so it needs no toolchain and reports on a `.claude`-only PR, same as `overrides`. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
`entities/*.yaml` matches zero files — the layout is `entities/<name>/entity.yaml`, 49 of them. The body was rewritten to say `entities/` and the eval beside it was not, so scenario 1 asked a session to justify `entities-check` with a path that does not exist. Scoped deliberately to this file. The same shorthand sits in nine other tracked places (the design doc, CONTRIBUTING.md, rust.yml, the Makefile, an `er-entities/Cargo.toml` comment, the eslint config), where it reads as established shorthand for "the entity YAMLs" rather than a typo — rewriting those would put a comment-only change through the full Rust and frontend gates and is not this change's business. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…e gate could not see it #706 landed the missing `post-merge-surface` row while this branch was open carrying the same fix, so rebasing produced two rows for one generator with different "Derived from" prose. Kept the derivation-shaped wording, because the set-difference paragraph above the table now cites `post-merge-surface` by name and only that wording supports the claim. The rebase merged cleanly and `make skills-check` stayed green through it, which is the part worth fixing: `generator_table_ids` ran `sort -u` before the set comparison, so a duplicate row was deduplicated out of existence on its way to the diff. The gate this branch adds was built to catch a hand-maintained table disagreeing with the code, and a table that says two different things about one generator is that same defect — it just arrives by concurrent PR rather than by omission. So the ids are now extracted twice: deduplicated for the set comparison, and raw for a `uniq -d` pass. Observed failing before being trusted, per docs/frontend-testing.md — reintroducing the duplicate row fails `skills-check.sh generators` with exit 1 and names the id. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
athvin
force-pushed
the
fix/rust-conventions-followups
branch
from
November 6, 2026 06:43
1962597 to
947a3b8
Compare
This was referenced Nov 6, 2026
athvin
added a commit
that referenced
this pull request
Nov 6, 2026
…ve known about (#717) `agent skills (lint + drift)` fails on `main`: FAIL generators: `description-budget` is wired into run_regen but absent from the generator table in docs/agent-skills.md Neither pull request was wrong on its own, and neither could have caught this. #713 wired a sixteenth generator, `description-budget`, and added its block to this document. #703 added the gate asserting that every generator `run_regen` splices has a row in the generator table — against a copy of the table that predated #713. They were merged fifteen seconds apart, each green against a base that did not contain the other, and the squash was textually clean because the two edits land in different sections of the same file. This is the `strict: false` hazard with the smallest possible diff: a gate whose whole purpose is catching a hand-maintained table that disagrees with the code, red because the table disagrees with code that arrived while the gate was in flight. The merge bus exists to prove a combination green and was not used here. Adds the missing row. Verified by running `make skills-check` against `origin/main` directly rather than reading a merge conclusion — the required check reports under the `rust` workflow, whose run for each intermediate merge SHA in the burst was cancelled by the next merge. Co-authored-by: bmoore813 <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
athvin
added a commit
that referenced
this pull request
Nov 6, 2026
…ds (#725) #713 wired the description-budget generator; #703 added the gate that set-differences wired generators against the standard's table. Each was green against a base without the other (main is strict:false), so the combination fails `skills-check generators` on every PR — the skills job runs unconditionally. One row closes it. Co-authored-by: bmoore813 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-ups after #692 merged. One commit per item.
First, a correction to the premise I was handed: #692 landed all seven audit
findings, so there was no deferred list. What was actually open was the main
loop, an unrun eval set, and the possibility that the staleness I fixed in one
skill existed elsewhere. Two of those turned out to be non-issues, and saying so
is the point — the third found a real drift.
What changed
1.
post-merge-surfacewas missing from the generator table (ec1ed1fc)run_regenwires 13 generators;docs/agent-skills.mddocumented 12. Theland-prreference generator was added with that skill and never reached thetable. The "three of these are set differences" sentence was wrong for the same
reason — it is a fourth — so that sentence lost its count.
2. Gated the table against the generators actually wired (
e527f947)Fixing one row by hand leaves the mechanism intact, and this repo's answer to a
hand-maintained list of something code owns is to derive it.
skills-check.sh generatorsset-differences thespliceids against the tablein both directions: wired-but-unlisted (what this was) and listed-but-unwired (a
row left behind when a generator is retired, which reads as documentation of
something that no longer runs). The "Derived from" column stays prose on
purpose — what a generator derives and why is the part worth reading and the
part no script can write.
3. An eval asserted a glob that matches nothing (
b8cccde9)entities/*.yamlmatches zero files; the layout isentities/<name>/entity.yaml.#692 rewrote the body to say
entities/and left the eval beside it, soscenario 1 asked a session to justify
entities-checkwith a path that does notexist.
Deliberately not done
entities/*.yaml. The same shorthand sits in nine othertracked files (the design doc,
CONTRIBUTING.md,rust.yml, theMakefile,an
er-entities/Cargo.tomlcomment, the eslint config). There it reads asestablished shorthand rather than a typo, and rewriting it would put a
comment-only change through the full Rust and frontend gates.
make checkclaim elsewhere — there is no elsewhere.git grepover the tracked tree finds the old composition and the "cargo docis not in make check" claim only in my own history comment and my own eval
must-not. fix(skills): the finish line rust-conventions names, and the two steps it forgot #692 fixed all of it.
body; see Verification.
Verification
skills-check.sh all→ exit 0 (23 skills, 13 generators, 12 generated filescurrent).
scripts/ci/skills-check-test.sh→ 5 passed.bash -nclean.deleting the
post-merge-surfacerow fails naming that id; adding aghost-generatorrow fails with the opposite message. The extractor alsocannot fail open — an empty wired set is its own error, not a vacuous pass.
both generated blocks are present, and every token an eval
Mustdepends on(
skills-check,--document-private-items,errfmt::chain,ER_MAIL_BACKEND=log,ci-and-supply-chain,float_cmp,set_var, …) is inthe shipped content. The one thing a same-session check cannot measure is
selection — whether the skill fires unprompted and an adjacent skill does
not — which the standard says needs a fresh session.
rust/,frontend/orinfra/is touched, so those gates arenot implicated; the always-on
skillsjob is the one that matters here.Also closed from #692:
mainsettled green on08622516, which containse7918ad3. Therustrun on my own merge commit concludedcancelledwithzero jobs — displaced while pending, since only one run may queue per
concurrency group and a sibling PR merged behind it. Not a failure, and it never
needed a rerun.
🤖 Generated with Claude Code