Repository navigation
fix(skills): the finish line rust-conventions names, and the two steps it forgot - #692
Merged
Merged
Conversation
…s it forgot `make check` has been `fmt + lint + doc + entities-check + skills-check + test` for a while. The skill whose first claim is that `make check` is the finish line said `fmt + lint + entities-check + test`, and then spent a paragraph in the body and a numbered class in `references/gates.md` explaining that `cargo doc` is *not* in `make check` and must be run separately. Its eval gave a session credit for repeating that. Nothing went red, because prose and a Makefile cannot disagree loudly. So the step list is no longer prose. `gen_rust_gates` derives it from the `check:` target's prerequisites and each one's recipe, and the same block carries the size of the `ER_TEST_PG_DSN` tier — which the reference put at "roughly thirty" test files while 52 of them read that variable. The clippy allow-list gets the same treatment: `gen_crate_map` now pairs every `= "allow"` in `[workspace.lints.clippy]` with the comment above it, so the reason is Cargo.toml's own words and an allow added without a comment appears here as a blank cell. That needed one comment in `rust/Cargo.toml`, where five style allows were sitting under the doc-lint comment and would have inherited a reason that is not theirs. The body keeps only the two allows that protect correctness rather than taste (`float_cmp`, `unreadable_literal`), because those read like bugs to anyone meeting them cold. Three smaller things the same read turned up: - The description now routes to `ci-and-supply-chain`. That skill already said "for local gates see rust-conventions"; this one claimed "when adding a dependency" and named nobody, so it won the trigger on a dependency bump that is red on an advisory and had nothing to say about it. New eval scenario 6 is that prompt. - The `duckdb`/`arrow`/`datafusion` pin reasoning was stated twice, in the body and in `crate-map.md`, with neither marked canonical. The body keeps it; the reference points at it and adds only what the body cannot know. - `errors.md` dropped the anyhow-vs-thiserror table, which restated both crates' own documentation, and keeps the repo-specific half: anything reaching an exit code or an HTTP status is a `thiserror` enum because `er-errors` is that taxonomy. `crate-map.md` gains the `## Contents` a growing generated block needs before it crosses 100 lines, and `gates.md` is registered in `generated_files` so the drift check owns its new block. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
athvin
force-pushed
the
fix/rust-conventions-finish-line
branch
from
November 6, 2026 05:19
f5911c0 to
681525b
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]>
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.
/skill-audit rust-conventionsfound two stale facts and three economy/routingdefects. This fixes all five and derives the two that drifted.
The finding that matters
make checkisfmt + lint + doc + entities-check + skills-check + test. Theskill whose headline claim is that
make checkis the finish line saidfmt + lint + entities-check + test, then spent a body paragraph and anumbered class in
references/gates.mdexplaining thatcargo docis not inmake checkand has to be run separately — and its eval gave a session creditfor repeating that. Nothing was red, because prose and a Makefile cannot
disagree loudly.
The step list is no longer prose.
gen_rust_gatesderives it from thecheck:target's prerequisites and each recipe, and the same block carries the size of
the
ER_TEST_PG_DSNtier, which the reference put at "roughly thirty" testfiles while 52 read that variable.
Same treatment for the clippy allow-list
gen_crate_mapnow pairs every= "allow"in[workspace.lints.clippy]withthe comment above it, so the reason is
Cargo.toml's own words and an allowadded without one shows up as a blank cell. That needed one comment in
rust/Cargo.toml: five style allows sat under the doc-lint comment and wouldhave inherited a reason that is not theirs. The body keeps only the two allows
that protect correctness rather than taste (
float_cmp,unreadable_literal) — the two that read like bugs to anyone meeting them cold.Three smaller ones
ci-and-supply-chainalready said "for local gates seerust-conventions"; this skill claimed "when adding a dependency" and named
nobody, so it won the trigger on a bump that is red on an advisory and had
nothing to say about it. Description tail added, plus eval scenario 6 posing
exactly that prompt.
duckdb/arrow/datafusionpin reasoning was stated inthe body and again in
crate-map.mdwith neither canonical. The body keepsit; the reference points at it and adds only what the body cannot know
(
datafusionis iner-sql-check's manifest, so it is absent from thegenerated pin block).
errors.mddropped the anyhow-vs-thiserror table, which restatedboth crates' own documentation, and kept the repo-specific half.
Verification
bash scripts/skills-check.sh all→ exit 0, 23 skills, 12 generated filescurrent.
check:target and the drift check went to exit 1 with
FAIL generated skill references are stale, diffing therust-gatesblock.Makefile restored, block regenerated.
bash scripts/ci/skills-check-test.sh→ 5 passed, 0 failed.make checkwas not run locally: the only non-skill change is one commentline in
rust/Cargo.toml, and a cold worktree build costs an hour and ~33GBfor it. The
rustjobs on this PR are the gate for that line.🤖 Generated with Claude Code