feat(engine): RELEASE-CURRENT — the version page a stranger actually reads
A release is not a ref, so `git ls-remote` cannot answer this one. It is therefore the third API call per invocation, and the only new one the acquisition model adds. Both sides come from the forge, never the clone: comparing a local tag to a published release would report portfolio-optimiser as stale when the real defect is a tag that was never pushed — REMOTE-SYNC's subject, not this one. Measured across all 22 registered repos before the rule was locked: 4 have no tags, 2 tag without ever publishing a release, 11 are current, 5 lag. Those 2 are why zero releases is an OK and not a finding — nothing in a repo says which of the two legitimate conventions it follows, the same measurement that rejected VERSION-DRIFT. Lagging is a WARN because the remedy is safe, and because this repo is the org's worst offender: an ERROR would have let the gate settle an operator question by exiting 1 on its own author. The shell that produced that baseline sorted tags lexically and put v0.9.0 above v0.10.0 — the exact defect compareTags exists to fix, reproduced in the tool meant to validate it. Recorded as an invariant: derive "newest" with the engine's own comparator or the measurement is fiction. CLAUDE.md's API-call count moves from two to three in this same commit; that line has now gone stale twice. The unmarked "429 at ~40" figure is marked unusable — its endpoint class was never recorded, and org-ops measured ~110 raw reads at 0.4s with zero 429 the same day. 205 tests (was 196). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WWc4piM4QW6Jxfky2Rw4Z8
This commit is contained in:
parent
067ab0528d
commit
a563035feb
4 changed files with 275 additions and 9 deletions
49
CLAUDE.md
49
CLAUDE.md
|
|
@ -101,12 +101,16 @@ would recreate, in data, exactly the drift this plugin exists to remove.
|
|||
- **Three outcomes on references.** "No match" and "match on a known non-repo"
|
||||
must stay distinct findings. Collapsing them hides real loss inside correct
|
||||
text — the exact defect class this gate exists to catch.
|
||||
- **Two API calls per invocation, anonymous, with 429 retry.** The org listing
|
||||
- **Three API calls per invocation, anonymous, with 429 retry.** The org listing
|
||||
(description + topics) is one; the catalog's `marketplace.json` for
|
||||
INSTALL-TRUTH is the other (added after this used to say "one call" — that
|
||||
INSTALL-TRUTH is the second (added after this used to say "one call" — that
|
||||
line went stale and stayed stale until a 13-repo shell loop trusted it and
|
||||
tripped the rate limiter at 26 requests). Both go through `fetchWithRetry`,
|
||||
which retries HTTP 429 rather than silently reporting SKIP. Both are
|
||||
tripped the rate limiter at 26 requests); the repo's releases listing for
|
||||
`RELEASE-CURRENT` is the third, and is the only subject the cheaper git
|
||||
channel cannot cover, because a release is not a ref. This count is the line
|
||||
that has now gone stale twice — it is updated in the SAME commit as the check
|
||||
that changes it, never afterwards. All go through `fetchWithRetry`,
|
||||
which retries HTTP 429 rather than silently reporting SKIP. All are
|
||||
anonymous — no token, confirmed no different with one — so the gate works
|
||||
for any reader, not only someone holding one. A sweep across every repo
|
||||
still does not belong here: it needs the listing fetched once, not once per
|
||||
|
|
@ -126,7 +130,15 @@ would recreate, in data, exactly the drift this plugin exists to remove.
|
|||
**Burst is not the only way in** (2026-08-12): a *steady* 1 request/second
|
||||
tripped 429 at around request 40, so pacing alone does not buy immunity —
|
||||
only a smaller total does. Recovery measured at 35s drain plus 3s pacing:
|
||||
12/12 through.
|
||||
12/12 through. **That ~40 is unmarked and cannot be quoted as a forge
|
||||
number**: the run did not record which endpoint class it hit, and org-ops
|
||||
measured ~110 sequential `/raw/branch/main/` reads at 0.4s with zero 429 the
|
||||
same day. Either they are two different limiters — the likelier reading —
|
||||
or the ~40 is wrong, and nothing in the note distinguishes those. The one
|
||||
API-axis figure this repo can stand behind: 22 sequential `/api/v1/` calls
|
||||
at 2s pacing, anonymous, zero 429 (the `RELEASE-CURRENT` baseline run). That
|
||||
is below the suspected knee, so it bounds nothing — it is a floor, not a
|
||||
ceiling. Every future measurement records its endpoint class.
|
||||
- **Two acquisition channels, and refs are not one of the API calls.** Four
|
||||
queued checks need state the local clone does not have, and answering the
|
||||
mechanism question once is the point — asked per check, it gets four
|
||||
|
|
@ -145,6 +157,31 @@ would recreate, in data, exactly the drift this plugin exists to remove.
|
|||
block locally, while the forge's "Verified" badge needs a key registered
|
||||
there — so `TAG-SIGNED` answers *is it signed*, never *does the forge vouch
|
||||
for it*.
|
||||
- **A stale release page is a WARN, and "no releases" is not a finding at all.**
|
||||
`RELEASE-CURRENT` compares the newest release the forge publishes against the
|
||||
newest tag the forge lists — both sides from the FORGE, never the clone.
|
||||
Comparing a local tag against a published release would report
|
||||
portfolio-optimiser as stale when the real defect is a tag that was never
|
||||
pushed (v1.0.0 local, v0.1.0 published) — REMOTE-SYNC's subject, not this
|
||||
one. Measured across all 22 registered repos (2026-08-12): 4 have no tags,
|
||||
2 tag without ever publishing a release, 11 are current, 5 lag. Those 2 —
|
||||
`ktg-plugin-marketplace` and `llm-security-commons` — are why zero releases
|
||||
is an `OK` (`RELEASE-TAGS-ONLY`) and not a finding: nothing in a repo says
|
||||
which of the two legitimate conventions it follows, which is the measurement
|
||||
that rejected `VERSION-DRIFT` one check over. Lagging is a `WARN` because
|
||||
the remedy is safe — publishing a release for a tag that already exists
|
||||
moves no published ref, unlike the remedy `TAG-ANNOTATED` has to withhold.
|
||||
It is also `WARN` because this repo is the worst offender in the org
|
||||
(v0.9.0 tagged, v0.3.0 published), and an `ERROR` would have let the gate
|
||||
decide an operator question — whether this org publishes releases at all —
|
||||
by exiting 1 on its own author.
|
||||
- **Version order, in the measurement as well as in the code.** The shell that
|
||||
measured this check's baseline sorted tags with `sort -t. -k1,1V` and put
|
||||
`v0.9.0` above `v0.10.0` — the exact defect `compareTags` already exists to
|
||||
fix, reproduced in the tool that was supposed to validate it. It named
|
||||
`repo-mailbox`'s newest tag as v0.9.0 when it is v0.21.0. A baseline derived
|
||||
with different ordering than the rule cannot validate the rule. Derive
|
||||
"newest" with the engine's own comparator, or the measurement is fiction.
|
||||
- **Codepoints, not bytes, not UTF-16 units.** Use `[...s].length`. An em-dash
|
||||
exposes only the byte layer; astral characters expose the rest.
|
||||
- **The reader decides a link's level, not just what is required.** Root
|
||||
|
|
@ -225,7 +262,7 @@ would recreate, in data, exactly the drift this plugin exists to remove.
|
|||
## Commands
|
||||
|
||||
```bash
|
||||
npm test # 196 tests
|
||||
npm test # 205 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