REVIEW.md: Haut table conditions (canonical locks, consents, hooks) and the limits of the calibration script (#476) #499

Merged
maximus merged 4 commits from issue-476-review-haut-conditions into main 2026-10-25 21:46:54 +00:00

4 commits

Author SHA1 Message Date
le king fu
ae4b4124c9 docs(review): say what the lock row loosens (#476)
All checks were successful
PR Check — Frontend / frontend (pull_request) Successful in 2m14s
The canonical-form condition tightens the lock row, but no longer counts
an origin that becomes canonical (a crate brought back from a git source
to the crates.io index), which the host-or-scheme condition counted. The
rule of the last paragraph of "Calibration" asks to say what a loosened
condition protected: nothing that the canonical form does not guarantee,
no entry of either lock being off that form today, and an entry that
leaves it entering only through a high PR from now on.

Found by the self-review of the PR.

Resolves #476

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 22:04:55 -04:00
le king fu
c9e184df8f test(scripts): probe the comment definition and the remaining new rules (#476)
All checks were successful
PR Check — Frontend / frontend (pull_request) Successful in 2m17s
COMMENT_PROBES pin meaningful() extension by extension, as REVIEW.md
defines a comment: // in .rs, .ts, .tsx and .js, with #[...], // @ts- and
/// <reference read as code; # in .toml, .yml and .sh, with a #! shebang
read as code; no comment in .json or .md, nor a // line in .yml. No rule
of the script reads every changed line of a .ts, .js, .sh or .md file, so
PROBES alone could not see those branches.

Three more PROBES: a second fetchPrice( call inside PriceFetchControl.tsx
stays normal (the one caller is excluded), and a fetch to an absolute URL
added to DownloadLatestButton.tsx is high (is_test() no longer skips a
shipped file whose name holds "test").

Resolves #476

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 21:53:57 -04:00
le king fu
8f8ee40f83 docs(review): define comments, canonical lock origins, both consents (#476)
In the Niveaux section of REVIEW.md:
- a "commentaire" is defined by file extension, as the script reads it,
  and the lib.rs and Cargo.toml/package.json rows are judged "hors
  commentaires";
- the lock row names the canonical forms: the crates.io index for a
  Cargo source, the registry tarball of the key's name and version for an
  npm resolved;
- the "code livré" row names both consents (prices; Feedback Hub, in
  openFeedback of LogViewerCard.tsx and FeedbackConsentDialog.tsx) and the
  one caller of prices.fetchPrice, and its Journal parenthesis refers to
  the zone rules instead of listing them;
- the .claude/settings.json, .mcp.json row says that a file they make the
  agents run is high too, without a pattern of its own;
- the calibration note says what the script approximates, that a PR's
  level is read here and never in its output, what the probes cover, and
  what "hors commentaires" loosens. The replay gives the same level and
  the same triggers for each of the 52 PRs (3/28/8, 6/34/12).

Resolves #476

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 21:51:41 -04:00
le king fu
628864937f fix(scripts): read comments by extension, lock origins by canonical form (#476)
meaningful() now depends on the file extension: in .rs, .ts, .tsx and .js
only a line that starts with // is a comment (// @ts- and /// <reference
stay code, and so do #[ and #!); in .toml, .yml and .sh a # line, except a
#! shebang; nothing in .json, .md or any other file. The old rule took any
# or // line of any file for a comment, so an attribute added to lib.rs
came out normal.

A lock origin is judged on its canonical form instead of its host: a
Cargo source other than the crates.io index, or an npm resolved other than
https://registry.npmjs.org/<name>/-/<short name>-<version>.tgz for the key
and version that package-lock.json gives at the PR head (read from the
API only when the diff adds a resolved line). A tarball of another package
on registry.npmjs.org, or another index on github.com, used to pass.

CONSENT_FILES adds the Feedback Hub consent (LogViewerCard.tsx,
FeedbackConsentDialog.tsx), and a fetchPrice( added outside
PriceFetchControl.tsx and the tests is high. is_test() replaces the
substring match on "test", which also skipped DownloadLatestButton.tsx.

PROBES take the hunks of a synthetic diff: one probe per "toujours"
pattern that no PR of #344-#452 exercises, an attribute and a comment
added to lib.rs, both lock origins and a canonical bump, both new consent
files, a new fetchPrice caller and a test that calls it. A lock probe's
hunk covers the whole file, its post-image being the lock at the head.
The docstring lists what the script does not model, and says that a PR's
level is read in REVIEW.md, never in its output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 21:51:27 -04:00