feat(register): a decided title, and an org-profile that stops lying
Three changes at the register/engine boundary, all agreed with org-ops after census 05 and all about a check missing a place to record a legitimate exception. `titles`: an optional per-repo README title. Set, the H1 matches it and is OK; unset, the WARN stands as before. A human title was already this engine's stated position and rds-v1's prescription, but a decided YES had nowhere to live, so the same 6 WARNs were reported three censuses running and would have been reported forever. Five registered, each H1 read from the repo rather than copied from the census; `ai-psychosis` deliberately left out so the one repo where a reader cannot connect title to name stands alone. Measured across 21 local clones: 6 WARN before, 1 after, nothing else moved. `readme_desc_match: false` on the org-profile class: for an ordinary repo the README opening and the forge description describe the same subject and equality is right; for this class they do not — the README is the org's landing page, the forge text describes the repo. The equality is what does not apply, not either text. Class data, not a hardcoded name, and the exemption is RECORDED as an OK naming its reason, not dropped. `.profile` went ERROR to 0 ERROR / 0 WARN; the same README under a plugin class is still an ERROR. `engineCommit`: the version names a file, only the sha names the code. A sweep stamped 18 files 0.4.0 while four carried a 0.5.0-only finding — feature and version bump are two commits, so the stamp lied without being broken. Present-and-null when underivable, never absent: an absent key means an older engine, null means this one ran without a HEAD to read. 135 to 147 tests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NELsvPY5gnJjN3esdhWYWC
This commit is contained in:
parent
a7276e6f78
commit
5884a64e54
8 changed files with 358 additions and 27 deletions
27
CLAUDE.md
27
CLAUDE.md
|
|
@ -93,13 +93,38 @@ would recreate, in data, exactly the drift this plugin exists to remove.
|
|||
- **A repo's name is its remote, not its directory.** `catalog/` holds
|
||||
`ktg-plugin-marketplace`. The basename left it unregistered with zero checks
|
||||
run, against the one repo every catalog rule depends on.
|
||||
- **A decision needs somewhere to live, or the gate repeats itself forever.**
|
||||
The engine already held that a human README title is the operator's call —
|
||||
and still warned about it every round, because a YES could not be recorded.
|
||||
Six warnings, unchanged across censuses 05, 06 and 07. `titles` in the
|
||||
register is that record: set, the H1 matching it is `OK`; unset, the `WARN`
|
||||
stands. What the gate must never do is make "we decided this" and "nobody
|
||||
looked" the same output. The wanted side effect is exposure, not silence —
|
||||
`ai-psychosis` is deliberately unregistered so it stands alone.
|
||||
- **An exemption is a finding, not a deletion.** `readme_desc_match: false`
|
||||
turns off README-DESC equality for a class, and the check still emits an `OK`
|
||||
naming why. An exception nobody can see reads exactly like a check that
|
||||
silently stopped running.
|
||||
- **Class rules live in the register, never as a class name in the engine.**
|
||||
The `org-profile` exemption is a flag on the class, not `if (klass ===
|
||||
'org-profile')`. Per-repo copies of a rule are the drift this plugin exists
|
||||
to remove; a class name hardcoded in a classifier is the same defect one
|
||||
level up.
|
||||
- **The version names a file; only the sha names the code.** `engineVersion`
|
||||
was added because a stale cache served an old engine silently — but a feature
|
||||
and its version bump are two commits, so a worktree carries new behaviour
|
||||
under the old number for a window. Measured: a sweep stamped 18 raw files
|
||||
`0.4.0`, four of them holding findings from a check that only exists in
|
||||
`0.5.0`. `engineCommit` closes that, derived from the same checkout with no
|
||||
network call. It is present-and-`null` when underivable, never absent — an
|
||||
absent key means an older engine, `null` means this one ran without a HEAD.
|
||||
- **No hook until the rule is precise.** A blocking gate that fails a correct
|
||||
repository is the mechanism that gets gates switched off.
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
npm test # 135 tests
|
||||
npm test # 147 tests
|
||||
node scripts/repo-standard-check.mjs --dir "$PWD" # gate one repo
|
||||
node scripts/repo-standard-check.mjs --offline # no network call
|
||||
node scripts/repo-standard-check.mjs --json # machine output
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue