Skip to content

perf(cli): a kept entry checks what each probe returned, not the probed file's stamp - #11805

Merged
josephfarina merged 14 commits into
mainfrom
speed/probe-stamps
Nov 15, 2026
Merged

josephfarina merged 14 commits into
mainfrom
speed/probe-stamps

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A kept entry is used again only while everything its gather read is unchanged. The read record kept a full stamp (size, times, inode) for every path the run touched, including paths it only checked for (fs.existsSync) or only resolved (fs.realpathSync). Those calls return only whether the path is there, or the path it resolves to, so an edit to such a file made every kept entry recorded after the check miss, though nothing it returned changed. This change records what each call returned:

  • foundation/fs/read-record.mjs, in an exact run (the kept gathers' record):
    • existsSync records whether the path is there (present, or - when absent), all it returns.
    • realpathSync records what it answered: the path the program's own lookup returned (real: and the path), or - when it threw, on the path's own key. It costs no call of its own. A check runs the same lookup again (the unwrapped fs.realpathSync), so links and letter case agree with the record. A file written in place, or replaced by a save that renames a new file over it, keeps the answer; a link re-pointed at the path or anywhere above it, a removed target, or a folder moved and linked again changes it. Both kinds of save are common: many agent file tools and sed -i replace the file; Node's writeFileSync, Python's open('w'), shell redirects and cp write in place. fs.realpathSync.native and the async forms are not wrapped, as on main; the one runtime call of the native form (theme build's path comparison) runs in no kept gather.
    • One state per path, the fullest a call gave: present, then a lookup's answer, then a folder's probe state or a full stamp. A path that is looked up and also read, listed or statted keeps that call's stamp, as main records it. Most looked-up paths are modules the run then loads, so they cost no more to check than on main. A folder's stamp is its own stat (inode and times), so a link re-pointed between two version folders with the same listing still shows.
    • A file looked up and then read keeps only its full stamp, as on main: a link moved to another version folder that holds the same file through a hard link keeps that stamp. What a gather works out from the file's bytes stays right, since the bytes are the same. A test checks that no kept value names the real path of such a file without a state of a folder below the link.
    • Reads, listings, statSync, lstatSync, openSync and accessSync keep the full stamp, as before. (accessSync answers by the file's mode too.)
    • A path first only checked for, or only resolved, then statted, read or opened, is checked by the later call's state from then on. Merged records keep the fuller state, never the other way (keepState).
  • foundation/fs/gather-cache.mjs:
    • A module the run loads, or a package folder it looks up, after only checking for it, is checked by its full stamp or lookup state.
    • An entry builds on another that holds only that a path is there, or where it resolves, where the run read more of that path (holdsIn). The new entry stores the fuller state itself. Before, the base was refused and the new entry stored every state alone.
  • foundation/integrations/pack-state.mjs: the integration checks ask npm in a child process which files a package packs, and npm reads the ignore files there, where the record does not see it. In a package with no files field the checks look for each ignore file before they ask npm; they now stat it, so a kept check is checked by the file's stamp, not only by whether it is there. In a package with a files field the checks ask npm without looking for ignore files, as on main.

Each place where code inside a kept gather checks for a path and then uses its content was audited for a channel the record does not see:

  • npm's ignore files, as above.
  • Module loads, which the load hook stamps.
  • The agent-docs git check-ignore call, which runs in no kept gather.

test/packed-gather-cache.replacements.test.mjs checks every stored entry: each lookup's answer is the one the lookup gives now, and a value that names the real path of a file the entry read through a link holds a state of a folder at or below that link (a planted value without one fails).

Evidence

Warm wall time, base (main) and change interleaved, median of the paired difference (95% CI). Each measured call runs in a fresh per-user folder after one warm-up call, in two projects with large TypeScript integrations installed with npm: one integration with its full dependency tree, and eight integrations.

  • One integration, n=15: docs theme +3.0 [−2.0, +9.4], template dashboard +1.9 [−1.6, +7.9], component Button −0.1 [−4.6, +5.9], theme list +2.4 [+1.2, +5.4], search button +3.6 [−7.3, +11.2] ms.
  • Eight integrations, n=15: docs theme +13 [−4, +19], template dashboard +2.9 [−7.5, +6.4], component Button −2.0 [−10.6, +6.8], theme list −4.7 [−13.9, +2.3], search button +4.6 [−6.5, +12.0] ms. A CPU profile of docs theme there (14 runs each) gives the same total, 603.8 ms on both sides: a lookup costs no call of its own.
  • The 50-case command battery (n=5, warm, one shared per-user folder), in a project with one integration and in a Core-only project: weighted +0.2% and −0.4%, with the same stdout, stderr and exit code for every case.
  • What it makes possible. With the open theme-facts change on top (it works Core's facts out before the build reads the theme), theme build of a theme with tokens only, right after an edit to it, n=11, each of three edits in a row:
    • edits written in place: −108 [−115, −96], −106 [−115, −103], −111 [−125, −103] ms;
    • edits saved as a new file renamed over the theme: −115 [−136, −107], −117 [−129, −96], −109 [−125, −96] ms;
    • the next build of the unchanged theme: −91 and −99 ms.
  • Identity: every timed run printed the same output as main. A doctor replay (56 calls: forms, flags and fixture states) gives the same output in both projects.

Speed bar exception

The project's speed bar for this kind of change is a weighted battery within ±0.3% of main and every measured command within ±1%. On the reviewers' quietest machine this change reads +0.33% on the battery for a project with one large integration, and theme list +9 ms (+2.2%) there (+0.6 to +0.8% on two other machines); every other battery and command is inside the bar. The reviewing lead cleared it as a declared exception, not the author, because in a project with a large integration:

  • Gain, with the theme-facts change on top: each theme build after the first is about 106 ms faster; at worst, the first build pays about 35 ms for the facts store.
  • Cost: theme list is about 9 ms slower, and other calls carry the battery residual (0.3 to 0.5%).

Tests

  • foundation/fs/read-record.test.mjs, rows for an exact run:
    • an existence check keeps an edit and sees a removal; a path found absent appearing;
    • a path read, statted or opened after an existence check is checked by its stamp; a stamp read first is kept;
    • a same-size rewrite that keeps the time;
    • a real-path lookup is recorded by the program's own answer, with no call of its own; it sees a re-pointed link and a removed target, and keeps an edit of the target;
    • a link re-pointed between two checks in one process, at the last part and on the way; a folder link looked up by a URL that ends in a separator, re-pointed;
    • a file that one store hard-links into two version folders, moving between them, when it was only looked up, and when it was looked up, read and its folder listed;
    • a real-path lookup of a file keeps a write in place and a save that renames a new file over it;
    • a lookup of a path that becomes an entry of another kind keeps its answer, while a reader of it sees the change;
    • a folder link resolved and listed, re-pointed between two version folders with the same listing;
    • a path looked up then read records one stat, the read's;
    • one state per path, in every order: present, a lookup's answer, a stamp;
    • keepState keeps the stamp over an existence check, in both orders.
  • foundation/fs/gather-cache.test.mjs: a module loaded after an existence check is noted by its stamp.
  • foundation/fs/gather-cache.deps.test.mjs: an entry builds on one that only checked for, or only looked up, a file it read. An edit that keeps the file gathers again only the entry that read it.
  • api/integration/example-checks.test.mjs: an ignore file npm reads is recorded by its stamp, so an edit that keeps it there shows.
  • test/packed-gather-cache.replacements.test.mjs: an entry stores no state its base stores, and stores a path its base holds only as there, or by a lookup's answer, when it read more of it; the two checks of every stored entry above.
  • Every row above fails against the code before this change, or with its part of the change undone.
  • The CLI suite passes, apart from 13 theme-editor tests that fail the same way on main in the test environment.

Scope

No output, flag or JSON shape changes.

@vercel

vercel Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 15, 2026 10:45am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 15, 2026
@astracat-bot

astracat-bot Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 15, 2026, 10:51 AM UTC

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: the presence and real-path records work as described and the new tests pass, but one merge path still loses a content stamp, so a kept result can go stale.

Blocking:

  • A value reused through reusedWhileUnchanged is merged into the enclosing run with if (!seen.has(file)) (packages/cli/foundation/fs/read-record.mjs:416-419), so a file that run first only checked for stays recorded as present, and a kept gather stored in that run is returned unchanged after the file is edited; merge the reused record through keepState and add a test where an exact run checks for a file, reuses a value that read it, and must then see an edit.
  • One shared path: keepState (read-record.mjs:364-373) owns the rule that a fuller state replaces present, but the module-load hook (gather-cache.mjs:420-423) and noteLookups (gather-cache.mjs:482-485) copy it inline while reusedWhileUnchanged has none, so have every merge site call the one rule and delete the copies.

The stale case needs a value loaded by an earlier call in the same process, as in a long-running host of the CLI, where loaders such as the search catalog and Core docs are reused across calls. Once the first fix lands, the changeset's "checked by its stamp, as before" and "Output does not change" hold again.

Claims and files checked

Review mode: full; reason: no-earlier-review

Claims:

  • Kept data is checked against what each check returned: verified (read-record.mjs:44-92), except the reused-value merge (blocking finding 1).
  • An existence check is kept by presence and a real-path lookup by the resolved path, through the native lookup: verified (read-record.mjs:255-287; new rows in read-record.test.mjs).
  • An edit to a file only checked for or only resolved no longer forces a new gather: verified (read-record.test.mjs, gather-cache.deps.test.mjs).
  • A file whose content any kept step read is still checked by its stamp: false at this head (blocking finding 1).
  • Output does not change; no flag or JSON shape changes: flags and JSON verified (no command doc changed); output false in the stale case (blocking finding 1).
  • Reads, listings, stat, lstat, open and access keep their earlier stamps: verified (read-record.mjs:149-154, :238-247).
  • A path checked for and then statted, read or opened is checked by the later state, and merged records keep the fuller state: verified (read-record.mjs:53-61, :364-373), but not every merge site uses that rule (blocking finding 2).
  • A module loaded or a package folder looked up after an existence check is checked by its stamp: verified (gather-cache.mjs:418-423, :482-485; gather-cache.test.mjs).
  • A new entry can build on one that holds only presence and stores the fuller state itself: verified (gather-cache.mjs:795-820; gather-cache.deps.test.mjs, packed-gather-cache.replacements.test.mjs).
  • Integration checks stat each ignore file npm reads: verified (validate-contributions.mjs:1213-1237); the new row fails with that part reverted.
  • The search-catalog generator compares records through recordedPath(): verified (generate-search-catalog.mjs:86-91).
  • Every check-then-use channel inside a kept gather was audited: false, the reused in-process value is missed (blocking finding 1); the listed channels (npm ignore files, module loads, the agent-docs ignore query outside kept gathers) verified.
  • No runtime code reads through fs.promises or streams: verified for the CLI's runtime sources.
  • Each new test row fails before the change or with its part undone: six rows fail on the base; the ignore-file row fails with its part undone; the other rows were not mutation-tested.
  • Timing, replay and full-suite results: not reproduced; the CLI's fs, search, scripts and packed replacement tests pass on this head.

Files:

  • .changeset/probe-stamps.md: two statements are false until finding 1 is fixed.
  • packages/cli/foundation/fs/read-record.mjs: findings 1 and 2.
  • packages/cli/foundation/fs/gather-cache.mjs: finding 2.
  • packages/cli/foundation/integrations/validate-contributions.mjs: clear.
  • packages/cli/scripts/generate-search-catalog.mjs: clear.
  • packages/cli/foundation/fs/read-record.test.mjs: clear; the fix adds the reused-value row here.
  • packages/cli/foundation/fs/gather-cache.test.mjs: clear.
  • packages/cli/foundation/fs/gather-cache.deps.test.mjs: clear.
  • packages/cli/api/integration/example-checks.test.mjs: clear.
  • packages/cli/test/packed-gather-cache.replacements.test.mjs: clear.

Automated review (maintainer link)

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · ac56204

Storybook · Sandbox · built from this PR's head

Package size: @astryxdesign/cli 4.70 MB packed (+3.2 kB); no new dependencies.

Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.


Generated by PR Enrichment workflow | View full report

@josephfarina

Copy link
Copy Markdown
Contributor Author

Fixed in 21f8e8e: a reused value's record now merges into the enclosing run through recordStates, so it goes through keepState, and a file the run first only checked for takes the stamp the reused value read. The module-load hook and the package lookups call keepState too. It now takes the state as a function, asked only when the rule could keep it, so a repeated lookup costs no extra stat. The inline copies are gone. New rows: an exact run checks for a file, reuses a value that read it, and sees an edit (fails with the old merge); and keepState asks for a state only when it could keep it.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: one issue remains in how a kept existence check reaches an in-process loader's record. The two issues from the last review are fixed.

  • Miss: in packages/cli/foundation/fs/read-record.mjs:62-63, note() keeps a present state that a kept gather handed to a reusedWhileUnchanged loader's own (non-exact) record when that loader then reads the file, so after an edit a long-running host keeps answering with the old content and an enclosing kept gather stores it in astryx/catalogs; route that branch through keepState(seen, file, () => (state ??= stateOf(file)), true) and add a test row for this sequence.

The rest of the change matches the kept-catalog rule in spec:AST-081 FR7, and the latest commit's two new rows fail without it.

Claims and files checked

Review mode: incremental; reason: none

  • Claim: in an exact run an existence check records only whether the path is there: verified (read-record.mjs:149-154, :255-261).
  • Claim: a real-path lookup records the path it resolves to under a key of its own, checked with the native lookup: verified (read-record.mjs:47, :131-141, :275-287).
  • Claim: reads, listings, stats, opens and access checks keep the full stamp: verified (read-record.mjs:149-154, :238-247).
  • Claim: a path first only checked for, then statted, read or opened, is checked by the later state: verified in an exact run (read-record.mjs:53-60); false in a loader's own record (:62-63), the finding above.
  • Claim: merged records keep the fuller state, never the other way: verified at every merge site (read-record.mjs:367-385, :427; gather-cache.mjs:681, :911).
  • Claim: a module load or package lookup after a check is checked by its stamp or lookup state: verified (gather-cache.mjs:419, :478).
  • Claim: an entry may build on one that holds only presence and stores the fuller state itself: verified (gather-cache.mjs:790-813, gather-cache.deps.test.mjs).
  • Claim: the integration checks stat each ignore file npm reads: verified (validate-contributions.mjs:1213-1219, :1237; the new row in example-checks.test.mjs).
  • Claim: the search-catalog generator compares paths through the key mapping: verified (generate-search-catalog.mjs:86-91).
  • Claim: no runtime code reads through promise or stream file APIs: verified (no such read in the CLI's runtime code).
  • Claim: the agent-docs ignore check runs in no kept gather: not traced to every caller.
  • Claim: the timing results: not reproduced; they support only the motivation.
  • Claim: each new row fails without its part of the change: verified for the latest commit's two rows; the earlier rows as checked in the last review.
  • Changeset: a file whose content a kept step read is checked by its stamp, and output does not change: false through the finding above.
  • File .changeset/probe-stamps.md: two statements false through the finding above.
  • File packages/cli/foundation/fs/read-record.mjs: the finding above.
  • File packages/cli/foundation/fs/gather-cache.mjs: clear.
  • File packages/cli/foundation/integrations/validate-contributions.mjs: clear.
  • File packages/cli/scripts/generate-search-catalog.mjs: clear.
  • File packages/cli/foundation/fs/read-record.test.mjs: clear; a row for the finding is missing.
  • File packages/cli/foundation/fs/gather-cache.test.mjs: clear.
  • File packages/cli/foundation/fs/gather-cache.deps.test.mjs: clear.
  • File packages/cli/api/integration/example-checks.test.mjs: clear.
  • File packages/cli/test/packed-gather-cache.replacements.test.mjs: clear.

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

Fixed in 15a3244: the non-exact branch of note() now goes through keepState(seen, file, () => (state ??= stateOf(file)), true), as suggested. A present state that a kept entry handed into a loader's own record gives way to the stamp of the loader's read. The exact branch's upgrade goes through keepState too, so every place that adds a state to a record now uses the one rule. New row: a loader's record that has present handed in, then reads the file, sees the edit. It fails with the old branch.

# Conflicts:
#	packages/cli/foundation/integrations/validate-contributions.mjs

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: one new issue in the real-path check the latest commit added; the issue from the last review is fixed.

  • In packages/cli/foundation/fs/read-record.mjs:291-303, realPathState records a lookup given a folder URL ending in / (such as new URL('./assets/', import.meta.url)) by the link's own path, because lstat of link/ follows the link, so re-pointing that link leaves a kept value in use; resolve the whole path when it ends in a separator (file.endsWith(path.sep)) and add a test row for that lookup.

The rest of the change matches the kept-catalog rule in spec:AST-081 FR7, and the new loader row fails without its fix. The description still names validate-contributions.mjs for the ignore-file stat; after the merge with main that change lives in pack-state.mjs.

Claims and files checked

Review mode: incremental; reason: none

  • Claim: in an exact run an existence check records only whether the path is there: verified (read-record.mjs:152-157, :261-267).
  • Claim: a real-path lookup records the path it resolves to under a key of its own, checked with the native lookup: verified for string paths (read-record.mjs:47, :287-326); false for a folder URL ending in /, the finding above.
  • Claim: reads, listings, stats, opens and access checks keep the full stamp: verified (read-record.mjs:152-157, :244-253).
  • Claim: a path first only checked for, then statted, read or opened, is checked by the later state: verified (read-record.mjs:50-67).
  • Claim: merged records keep the fuller state, never the other way: verified at every site (read-record.mjs:63-67, :389-395, :410-428, :470; gather-cache.mjs:419, :478, :685).
  • Claim: a module load or package lookup after a check is checked by its stamp or lookup state: verified (gather-cache.mjs:419, :478; gather-cache.test.mjs:209).
  • Claim: an entry may build on one that holds only presence and stores the fuller state itself: verified (gather-cache.mjs:780-817; gather-cache.deps.test.mjs:180).
  • Claim: the integration checks stat each ignore file npm reads: verified, now in pack-state.mjs:91-117, which the checks import (example-checks.test.mjs:699).
  • Claim: the search-catalog generator compares paths through the key mapping: verified (generate-search-catalog.mjs:86-87).
  • Claim: no other check-then-use inside a kept gather escapes the record (npm's ignore files, module loads, the agent-docs ignore query): verified, including the code merged in from main; the agent-docs ignore query is reached only from agent-doc writes.
  • Claim: no runtime code reads through promise or stream file APIs: verified.
  • Claim: the timing results: not reproduced; they support only the motivation.
  • Claim: each listed test row fails before the change or with its part undone: verified for the latest loader row; the three new real-path rows guard the new lookup and pass with the previous one.
  • Claim: the CLI suite passes apart from theme-editor tests that fail on main: consistent with CI, which passes at this head.
  • Claim: no output, flag or JSON shape changes: verified, apart from the stale answer the finding above allows.
  • Changeset: a real-path lookup is checked by the path it resolves to: false for a folder URL ending in /, the finding above.
  • Changeset: a file whose content a kept step read, and an ignore file npm reads, are checked by their stamp, and output does not change: verified (read-record.mjs:63-67; example-checks.test.mjs:699).
  • File .changeset/probe-stamps.md: one statement false through the finding above.
  • File packages/cli/foundation/fs/read-record.mjs: the finding above.
  • File packages/cli/foundation/fs/gather-cache.mjs: clear.
  • File packages/cli/foundation/integrations/pack-state.mjs: clear.
  • File packages/cli/scripts/generate-search-catalog.mjs: clear.
  • File packages/cli/foundation/fs/read-record.test.mjs: clear; a row for the finding is missing.
  • File packages/cli/foundation/fs/gather-cache.test.mjs: clear.
  • File packages/cli/foundation/fs/gather-cache.deps.test.mjs: clear.
  • File packages/cli/api/integration/example-checks.test.mjs: clear.
  • File packages/cli/test/packed-gather-cache.replacements.test.mjs: clear.

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

Fixed in 6fec3fa: a real-path lookup of a path ending in a separator (a folder URL) is resolved whole, because lstat follows a link in its last part. New row: a folder link looked up by such a URL, re-pointed, misses (it fails without the fix). The description now names pack-state.mjs for the ignore-file stat. The same head also records real-path lookups with one folder lookup per folder per run (a per-run memo, never used by a check).

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: one claim in the description needs correcting. The code issue from the last review is fixed, and this one needs no code change.

  • The description says that on a case-insensitive disk the real-path stamp keeps the case it was given, like the program's own lookup, but only its last part does: the folder part comes from fs.realpathSync.native (packages/cli/foundation/fs/read-record.mjs:329, :345), which is realpath(3) and returns the disk's case, so please reword that sentence (for example: the stamp keeps the given case for the last part only, a record and its check compute it alike, and a case-only folder rename makes a kept entry gather once more).

The rest of the change matches the kept-catalog rule in spec:AST-081 FR7, the new separator row fails without its fix, and CI passes at this head.

Claims and files checked

Review mode: incremental; reason: none

  • Claim: an existence check records only whether the path is there: verified (read-record.mjs:89-90, :284-290; read-record.test.mjs:168, :177).
  • Claim: a real-path lookup records where the path resolves under a key of its own, mapped back by recordedPath(): verified (read-record.mjs:47, :157-167).
  • Claim: the real-path state changes whenever the lookup could resolve the path elsewhere: verified (read-record.test.mjs:222, :236, :291, :311, :327).
  • Claim: a link, the root or a path ending in a separator is resolved whole with the native lookup, with the program's own lookup as the fallback: verified (read-record.mjs:324-325, :343-355; read-record.test.mjs:245, :311).
  • Claim: any other path is its folder's resolved path with its name, one lstat per path and one folder lookup per check or per run: verified (read-record.mjs:104-118, :316-332, :383).
  • Claim: a file replaced whole or a reused inode keeps the state, and content is checked by its read stamp: verified (read-record.test.mjs:343, :352).
  • Claim: on a case-insensitive disk the stamp keeps the given case, like the program's lookup: false for folder parts, the finding above.
  • Claim: reads, listings, stats, opens and access checks keep the full stamp, as before: verified (read-record.mjs:175-180, :267-276).
  • Claim: a path first only checked for, then statted, read or opened, takes the later state, and merges keep the fuller state: verified (read-record.mjs:52-66, :439-457; read-record.test.mjs:186, :202, :424).
  • Claim: a module load or package lookup after a check is checked by its stamp or lookup state: verified (gather-cache.mjs:419, :478; gather-cache.test.mjs:209).
  • Claim: an entry may build on one that holds only presence and stores the fuller state itself: verified (gather-cache.mjs:780-817; gather-cache.deps.test.mjs:180).
  • Claim: the integration checks stat each ignore file npm reads: verified (pack-state.mjs:91-117; example-checks.test.mjs:699).
  • Claim: the search-catalog generator compares paths through recordedPath(): verified (generate-search-catalog.mjs:57, :86-91).
  • Claim: no other check-then-use inside a kept gather escapes the record (npm's ignore files, module loads, the agent-docs ignore query): verified; the ignore query (agent-docs.mjs:1005) is unchanged and runs in no kept gather.
  • Claim: no runtime code reads through promise or stream file APIs: verified.
  • Claim: the timing and replay results: not reproduced; they support only the motivation.
  • Claim: each listed test row fails before the change or with its part undone: verified for the separator row, which fails with the previous head's code; the other real-path rows expect what the base's stamp would contradict.
  • Claim: the CLI suite passes apart from known theme-editor failures: consistent; the 35 test files run for this review pass, and CI's test jobs pass.
  • Claim: no output, flag or JSON shape changes: verified.
  • Changeset: kept data is checked against what each check returned, an existence check by presence and a real-path lookup by where it resolves: verified (read-record.mjs:85-96).
  • Changeset: an edit to a file only checked for or resolved keeps kept data, read files and npm's ignore files stay checked by stamp, and output does not change: verified (read-record.test.mjs:168, :222; example-checks.test.mjs:699).
  • File .changeset/probe-stamps.md: clear.
  • File packages/cli/foundation/fs/read-record.mjs: clear; the description misstates its case behaviour (finding above).
  • File packages/cli/foundation/fs/gather-cache.mjs: clear.
  • File packages/cli/foundation/integrations/pack-state.mjs: clear.
  • File packages/cli/scripts/generate-search-catalog.mjs: clear.
  • File packages/cli/foundation/fs/read-record.test.mjs: clear.
  • File packages/cli/foundation/fs/gather-cache.test.mjs: clear.
  • File packages/cli/foundation/fs/gather-cache.deps.test.mjs: clear.
  • File packages/cli/api/integration/example-checks.test.mjs: clear.
  • File packages/cli/test/packed-gather-cache.replacements.test.mjs: clear.

Automated review (maintainer link)

…e path's own key, below a stat's or a read's state

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not finished on this head yet.

The description's case-insensitive sentence now matches the code, and the latest change (one state per path, with the real-path state on the path's own key) matches the kept-catalog rule; its new test rows fail without their part of the change. Two small non-blocking notes are inline: a stale JSDoc line in read-record.mjs and a stale test title in read-record.test.mjs.

Claims and files checked

Review mode: incremental; reason: none

  • Claim: an existence check records only whether the path is there: verified (read-record.mjs:286-292; read-record.test.mjs:168, :177).
  • Claim: a real-path lookup records where the path resolves, on the path's own key, and that state changes whenever the lookup could resolve the path elsewhere: verified (read-record.mjs:90-93, :314-335; read-record.test.mjs:222, :291, :327).
  • Claim: a link, the root or a path ending in a separator is resolved whole with the native lookup, and the program's own lookup answers where the native one fails for a reason other than a missing path: verified (read-record.mjs:326-327, :345-357; read-record.test.mjs:245, :311).
  • Claim: any other path is its folder's resolved path with its own name, from one lstat and one folder lookup per check or per run: verified (read-record.mjs:99-119, :318, :329-334, :384-391).
  • Claim: a file replaced whole, or a reused inode, keeps the state by design: verified (read-record.test.mjs:343).
  • Claim: on a case-insensitive disk the stamp keeps the given case for its last part only, and a case-only folder rename makes a kept entry gather once more: verified (read-record.mjs:331, :334, :347).
  • Claim: one state per path, the fullest a call gave, so a path both resolved and read, listed or statted keeps that call's stamp: verified (read-record.mjs:442-490; read-record.test.mjs:424, :444).
  • Claim: most resolved paths are modules the run then loads, so they cost no more to check than before: not reproduced; it supports only the motivation.
  • Claim: a folder's stamp is its own stat, so a link re-pointed between two version folders with the same listing still shows: verified (read-record.test.mjs:424).
  • Claim: a file's stamp follows its inode, so a link re-pointed to a hard link of the same file keeps it, as on main: verified (read-record.mjs:246-254; main records a real-path lookup by the same stamp).
  • Claim: no kept value embeds a resolved file path, and resolved folders hold the files they list: verified at the kept-gather call sites read (validate-contributions.mjs:373-374, prop-drift.mjs:228, the doctor stylesheet resolution); not every real-path call site in the CLI was traced.
  • Claim: reads, listings, stats, opens and access checks keep the full stamp, as before: verified (read-record.mjs:177-182, :269-278); a folder's stat keeps its folder identity, as before.
  • Claim: a path first only checked for or resolved, then statted, read or opened, takes the later call's state, and merged records keep the fuller state: verified (read-record.mjs:51-61, :421-449; read-record.test.mjs:186, :363, :383, :472).
  • Claim: a module the run loads, or a package folder it looks up, after only checking for it is checked by its stamp or lookup state: verified (gather-cache.mjs:420, :479; gather-cache.test.mjs:210).
  • Claim: an entry may build on one that holds only presence or a resolved path, and stores the fuller state itself: verified (gather-cache.mjs:795-821; gather-cache.deps.test.mjs:192).
  • Claim: the integration checks stat each ignore file npm reads: verified (pack-state.mjs:91-98, :115; example-checks.test.mjs:699).
  • Claim: every check-then-use inside a kept gather was audited (npm's ignore files, module loads, the agent-docs ignore query), and no runtime code reads through promise or stream file APIs: verified; the only stream read is in a test proof script.
  • Claim: the timing and output-identity results: not reproduced; they support only the motivation.
  • Claim: each listed test row fails before the change or with its part undone: consistent; 11 rows fail on main, and the ignore-file, folder-link, resolved-entry and separator rows each fail with their part undone; the remaining rows guard the new states and were not undone one by one.
  • Claim: the CLI suite passes apart from known theme-editor failures: consistent; the 35 test files run for this review pass, and CI's node test shards were still running.
  • Claim: no output, flag or JSON shape changes: verified (no command doc, output or codec change).
  • Changeset: kept data is checked against what each check returned, an existence check by presence and a real-path lookup by where it resolves: verified (read-record.mjs:84-97).
  • Changeset: an edit to a file only checked for or resolved keeps kept data, while read files and npm's ignore files stay checked by stamp, and output does not change: verified (read-record.test.mjs:168, :444; example-checks.test.mjs:699).
  • File .changeset/probe-stamps.md: clear.
  • File packages/cli/foundation/fs/read-record.mjs: clear; one non-blocking JSDoc note (inline).
  • File packages/cli/foundation/fs/gather-cache.mjs: clear.
  • File packages/cli/foundation/integrations/pack-state.mjs: clear.
  • File packages/cli/foundation/fs/read-record.test.mjs: clear; one non-blocking test-title note (inline).
  • File packages/cli/foundation/fs/gather-cache.test.mjs: clear.
  • File packages/cli/foundation/fs/gather-cache.deps.test.mjs: clear.
  • File packages/cli/api/integration/example-checks.test.mjs: clear.
  • File packages/cli/test/packed-gather-cache.replacements.test.mjs: clear.

Automated review (maintainer link)

… up then read records the stat the lookup took

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

The latest commits build a looked-up path's stamp from the lookup's own lstat, which records the path's full stamp from the run's first touch, as main does, with one stat fewer, and fix the JSDoc line and test title noted last time. No finding remains, and the new row that counts the stat fails without the change.

Claims and files checked

Review mode: incremental; reason: none

  • Claim: an existence check records only whether the path is there: verified (read-record.mjs:95-96, :319-325; read-record.test.mjs:168, :177).
  • Claim: a real-path lookup records where the path resolves, on the path's own key, in a state that changes whenever the lookup could resolve it elsewhere: verified (read-record.mjs:97-101, :349-371; read-record.test.mjs:222, :291, :327).
  • Claim: a link, the root or a path ending in a separator is resolved whole with the native lookup, and the program's own lookup answers where the native one fails for a reason other than a missing path: verified (read-record.mjs:361-363, :381-393; read-record.test.mjs:245, :311).
  • Claim: any other path is its folder's resolved path with its own name, from one lstat and one folder lookup shared per check or per run: verified (read-record.mjs:117-131, :364-370, :420-427).
  • Claim: a file replaced whole, or a reused inode, keeps the state by design: verified (read-record.test.mjs:343).
  • Claim: on a case-insensitive disk the stamp keeps the given case for its last part only, the folder part comes from the native lookup, and a case-only folder rename makes a kept entry gather once more: verified from the code (read-record.mjs:367, :383).
  • Claim: one state per path, the fullest a call gave, so a path resolved and also read, listed or statted keeps that call's full stamp, as main records it: verified (read-record.mjs:478-541; read-record.test.mjs:390, :482); the stamp now comes from the lookup's own stat, taken at the run's first touch as main's probe stamp is (read-record.mjs:91-94, :102-106; read-record.test.mjs:352).
  • Claim: most resolved paths are modules the run then loads, so they cost no more to check than on main: consistent; a loaded module keeps the load's full stamp (gather-cache.mjs:420), which a check reads with one stat as on main; not measured.
  • Claim: a folder's stamp is its own stat, so a link re-pointed between two version folders with the same listing still shows: verified (read-record.test.mjs:462).
  • Claim: a file's stamp follows its inode, so a link re-pointed to a hard link of the same file keeps it, as on main: verified (read-record.mjs:291-293; main records the same size, times and inode).
  • Claim: no kept value embeds a resolved file path, and resolved folders hold the files they list: verified at the kept-gather call sites read earlier, which this head does not change; not every real-path call site in the CLI was traced.
  • Claim: reads, listings, stats, lstats, opens and access checks keep the full stamp, as before, access answering by mode too: verified (read-record.mjs:102-106, :201-206, :302-311).
  • Claim: a path first only checked for or resolved, then statted, read or opened, takes the later call's state, and merged records keep the fuller state: verified (read-record.mjs:44-72, :457-541; read-record.test.mjs:186, :401, :421, :510).
  • Claim: a module the run loads, or a package folder it looks up, after only checking for it is checked by its stamp or lookup state: verified (gather-cache.mjs:420, :479; gather-cache.test.mjs:210).
  • Claim: an entry may build on one that holds only presence or a resolved path, and stores the fuller state itself: verified (gather-cache.mjs:781-821; gather-cache.deps.test.mjs:192; packed-gather-cache.replacements.test.mjs:288-306).
  • Claim: the integration checks stat each ignore file npm reads: verified (pack-state.mjs:91-98, :115; example-checks.test.mjs:699).
  • Claim: every check-then-use inside a kept gather was audited, and no runtime code reads through promise or stream file APIs: verified earlier; the code outside read-record.mjs and its test is unchanged since.
  • Claim: the timing and output-identity results: not reproduced; they support only the motivation.
  • Claim: each listed test row fails before the change or with its part undone: consistent; 11 rows failed on main and four parts undone broke their rows earlier, and the new stat-count row fails with the previous head's code.
  • Claim: the CLI suite passes apart from known theme-editor failures: consistent; the touched test files pass here, and CI's test jobs pass at this head.
  • Claim: no output, flag or JSON shape changes: verified (no command doc, output or codec change).
  • Changeset: kept data is checked against what each check returned, an existence check by presence and a real-path lookup by where it resolves: verified (read-record.mjs:89-106).
  • Changeset: an edit to a file only checked for or resolved keeps kept data, while read files and npm's ignore files stay checked by stamp, and output does not change: verified (read-record.test.mjs:168, :482; example-checks.test.mjs:699).
  • File .changeset/probe-stamps.md: clear.
  • File packages/cli/foundation/fs/read-record.mjs: clear.
  • File packages/cli/foundation/fs/gather-cache.mjs: clear.
  • File packages/cli/foundation/integrations/pack-state.mjs: clear.
  • File packages/cli/foundation/fs/read-record.test.mjs: clear.
  • File packages/cli/foundation/fs/gather-cache.test.mjs: clear.
  • File packages/cli/foundation/fs/gather-cache.deps.test.mjs: clear.
  • File packages/cli/api/integration/example-checks.test.mjs: clear.
  • File packages/cli/test/packed-gather-cache.replacements.test.mjs: clear.

Automated review (maintainer link)

…in, its name and kind; a link keeps where it resolves

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: one claim no longer matches the code after the latest commit.

The new folder-identity state for real-path lookups works as its tests describe; the release note and two comments still describe the earlier resolved-path state.

  • Regression: the changeset says a real-path lookup is checked "by the path it resolves to", and lookupState's comment says its state "changes whenever the lookup could resolve the path elsewhere", but a non-link path now records its folder's identity, so moving that folder (or one above it) and re-pointing a link to the new place leaves the record unchanged while realpathSync returns a new path, as on main; please reword both (for example "a real-path lookup by the folder it finds the path in, its name and kind; a link by where it resolves") and fix the replacements guard's comment, which says the covering folder stamp still changes although the guard also accepts a folder stat or a listed subfolder that do not change.

Non-blocking: the broken-birth-time row breaks the birth time only at the check, so it still passes with the full-stamp fallback removed, and note repeats weak's test inline (inline comments).

Claims and files checked

Review mode: incremental; reason: none

  • Claim: on main the record keeps a full stamp for paths a run only checked for or only resolved: verified (main's exact-run probe stamp).
  • Claim: an existence check records only whether the path is there: verified (read-record.mjs:348-355; read-record.test.mjs:168, :177).
  • Claim: a real-path lookup records a state that changes whenever the lookup could resolve the path elsewhere: false; a folder moved with a link re-pointed to it keeps the state while the answer changes (read-record.mjs:399-406), as the description itself says later.
  • Claim: a link, the root or a path ending in a separator is resolved whole with the native lookup, falling back to the program's own: verified (read-record.mjs:396-398, :451-463; read-record.test.mjs:245, :311).
  • Claim: any other path records the found folder's device, inode and birth time, its name and kind, with one lstat per path and one stat per folder per check or run: verified (read-record.mjs:384-431, :487-494; gather-cache.mjs:616-621).
  • Claim: the state changes when a link above moves to another folder, the folder is made anew, the last part becomes a link, or the entry goes or changes kind: verified (read-record.test.mjs:222, :291, :399, :432).
  • Claim: a write in place, or a save that renames a new file over it, keeps the state: verified (read-record.test.mjs:420).
  • Claim: a link moved between two version folders that hard-link one file changes the folder part: verified (read-record.test.mjs:327-342).
  • Claim: a missing or impossible birth time falls back to the folder's full stamp: verified in code (read-record.mjs:424-426); its test row passes without the fallback.
  • Claim: a moved folder with a re-pointed link keeps the found folder's identity, and main's file stamp misses it too: verified (the same probe keeps the record on this head and on main).
  • Claim: every kept value that holds a resolved path also holds the folder it lists through the link, and a test guards that: partly false; the guard also accepts a folder stat or a listed subfolder, which do not see the move (packed-gather-cache.replacements.test.mjs:192-214).
  • Claim: one state per path, the fullest a call gave, and a path looked up and then read, listed or statted keeps that call's stamp, from the lookup's lstat: verified (read-record.mjs:524-617; read-record.test.mjs:442, :572).
  • Claim: most looked-up paths are modules the run then loads, so they cost no more to check than on main: not measured.
  • Claim: reads, listings, stats, lstats, opens and access checks keep the full stamp as before: verified (read-record.mjs:234-239, :91-106).
  • Claim: a path first only checked for or resolved, then statted, read or opened, takes the later call's state, and merges keep the fuller state: verified (read-record.mjs:44-75, :552-617; read-record.test.mjs:186, :491, :511, :613).
  • Claim: a module loaded, or a package folder looked up, after only an existence check is checked by its stamp or lookup state: verified (gather-cache.mjs:421, :480; gather-cache.test.mjs:210).
  • Claim: an entry may build on one that holds only presence or a lookup state where the run read more, and stores the fuller state itself: verified (gather-cache.mjs:782-821; gather-cache.deps.test.mjs:192).
  • Claim: the integration checks stat each ignore file npm reads: verified (pack-state.mjs:91-97, :115; example-checks.test.mjs:699).
  • Claim: check-then-use inside kept gathers was audited (npm's ignore files, module loads, a git ignore check that runs in no kept gather): verified earlier; that code is unchanged since.
  • Claim: the places where a kept value holds a resolved path were audited for a covering listing (doc compiler inputs, doctor's theme wiring, stylesheet resolution, module resolution): the sites exist (doc-compiler/inputs.mjs:331, doctor/_adapter.mjs:353, :407; gather-cache.mjs:480); how far such a listing covers a move is what the guard claim above overstates.
  • Claim: no runtime code reads through promise or stream file APIs: verified (the one stream read is in a test helper).
  • Claim: a run holds a lookup's stat only until a read or stat of the path uses it: verified (read-record.mjs:154-159).
  • Claim: the timing and output-identity results: not reproduced; they support only the motivation.
  • Claim: each listed test row fails before the change or with its part undone: consistent; 11 rows failed on main earlier, and five of the rows the latest commit adds or changes fail on the previous head (its hard-link rows pass there, since the earlier state already saw that move).
  • Claim: the CLI suite passes apart from known theme-editor failures: consistent; the touched test files pass here.
  • Claim: no output, flag or JSON shape changes: verified (no command doc, output or codec change).
  • Changeset: kept data is checked against what each check returned, and an existence check by whether the file is still there: verified (read-record.mjs:348-355).
  • Changeset: a real-path lookup is checked by the path it resolves to: false since the latest commit (read-record.mjs:399-406); see the finding above.
  • Changeset: an edit to a file only checked for or resolved no longer forces the kept data to be worked out again, read files and npm's ignore files stay checked by stamp, and output does not change: verified (read-record.test.mjs:168, :420; example-checks.test.mjs:699).
  • File .changeset/probe-stamps.md: finding (real-path sentence).
  • File packages/cli/foundation/fs/read-record.mjs: finding (lookupState comment); non-blocking note (inline weak copies).
  • File packages/cli/foundation/fs/gather-cache.mjs: clear.
  • File packages/cli/foundation/integrations/pack-state.mjs: clear.
  • File packages/cli/foundation/fs/read-record.test.mjs: non-blocking note (broken-birth-time row).
  • File packages/cli/foundation/fs/gather-cache.test.mjs: clear.
  • File packages/cli/foundation/fs/gather-cache.deps.test.mjs: clear.
  • File packages/cli/api/integration/example-checks.test.mjs: clear.
  • File packages/cli/test/packed-gather-cache.replacements.test.mjs: finding (guard comment).

Automated review (maintainer link)

Comment thread .changeset/probe-stamps.md Resolved
…checks; the broken birth-time row breaks it from the start

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not finished on this head yet.

The latest commit makes the release note, the lookup state's comment and the replacements guard's comment say what a real-path lookup's state checks, and the broken-birth-time test now fails without the full-stamp fallback. No blocking findings remain.

Claims and files checked

Review mode: incremental; reason: none

  • Claim: on main the record keeps a full stamp for paths a run only checked for or only resolved: verified (main's exact-run probe stamp).
  • Claim: an existence check records only whether the path is there: verified (read-record.mjs:348-354; read-record.test.mjs:168, :177).
  • Claim: a real-path lookup records a state that changes when the lookup can find the path elsewhere, with one named exception: verified (read-record.mjs:386-409; the exception at :372-374).
  • Claim: a link, the root or a path ending in a separator is resolved whole with the native lookup, falling back to the program's own: verified (read-record.mjs:398-400, :453-465; read-record.test.mjs:222, :245, :311).
  • Claim: any other path records the found folder's device, inode and birth time, its name and kind, with one lstat per path and one stat per folder per check or run: verified (read-record.mjs:401-408, :421-433, :489-496; gather-cache.mjs:602-622).
  • Claim: the state changes when a link above moves, the folder is made anew, the last part becomes a link, or the entry goes or changes kind: verified (read-record.test.mjs:222, :291, :405, :442).
  • Claim: a write in place, or a save that renames a new file over it, keeps the state: verified (read-record.test.mjs:430).
  • Claim: a link moved between two version folders that hard-link one file changes the folder part: verified (read-record.test.mjs:327-359).
  • Claim: a missing or impossible birth time falls back to the folder's full stamp: verified (read-record.mjs:426-428; read-record.test.mjs:415 fails without it).
  • Claim: a moved folder with a re-pointed link keeps the found folder's identity, and main's file stamp misses it too: verified (the lookup code is unchanged since a probe showed both keep the record).
  • Claim: every kept value that holds a resolved path also holds the folder it lists through the link, and a test checks a listing or a stat at or below the link: verified as worded (packed-gather-cache.replacements.test.mjs:189-217; the audited sites exist, such as doc-compiler/inputs.mjs:331).
  • Claim: one state per path, the fullest a call gave, and a path looked up then read, listed or statted keeps that call's stamp from the lookup's lstat: verified (read-record.mjs:141-159, :526-619; read-record.test.mjs:452, :582).
  • Claim: most looked-up paths are modules the run then loads, so they cost no more to check: not measured.
  • Claim: reads, listings, stats, lstats, opens and access checks keep the full stamp: verified (read-record.mjs:91-107, :234-239).
  • Claim: a path first only checked for or resolved, then statted, read or opened, takes the later call's state, and merges keep the fuller state: verified (read-record.mjs:44-75, :554-619; read-record.test.mjs:186, :501, :521, :623).
  • Claim: a module loaded, or a package folder looked up, after only an existence check is checked by its stamp or lookup state: verified (gather-cache.mjs:421, :480; gather-cache.test.mjs:209).
  • Claim: an entry may build on one that holds only presence or a lookup state where the run read more, and stores the fuller state itself: verified (gather-cache.mjs:782-821; gather-cache.deps.test.mjs:180).
  • Claim: the integration checks stat each ignore file npm reads: verified (pack-state.mjs:91-115; example-checks.test.mjs:699).
  • Claim: check-then-use inside kept gathers was audited (npm's ignore files, module loads, a git ignore check outside kept gathers): verified; that code is unchanged since it was checked.
  • Claim: no runtime code reads through promise or stream file APIs: verified (the one stream read is in a test helper).
  • Claim: a run holds a lookup's stat only until a read or stat uses it: verified (read-record.mjs:154-159).
  • Claim: the timing and output-identity results: not reproduced; they support only the motivation.
  • Claim: each listed test row fails before the change or with its part undone: consistent (rows failed on main in an earlier check; the broken-birth-time row fails without the fallback).
  • Claim: the CLI suite passes apart from known theme-editor failures: consistent; the touched test files pass.
  • Claim: no output, flag or JSON shape changes: verified (no command doc, output or codec change).
  • Changeset: kept data is checked against what each check returned, and an existence check by whether the file is still there: verified (read-record.mjs:348-354).
  • Changeset: a real-path lookup is checked by the folder it finds the path in, the name and what it is, or for a link by where it resolves: verified (read-record.mjs:398-408).
  • Changeset: an edit to a file only checked for or resolved no longer forces the kept data to be worked out again, read files and npm's ignore files stay checked by stamp, and output does not change: verified (read-record.test.mjs:168, :430; example-checks.test.mjs:699).
  • File .changeset/probe-stamps.md: clear.
  • File packages/cli/foundation/fs/read-record.mjs: clear.
  • File packages/cli/foundation/fs/gather-cache.mjs: clear.
  • File packages/cli/foundation/integrations/pack-state.mjs: clear.
  • File packages/cli/foundation/fs/read-record.test.mjs: clear.
  • File packages/cli/foundation/fs/gather-cache.test.mjs: clear.
  • File packages/cli/foundation/fs/gather-cache.deps.test.mjs: clear.
  • File packages/cli/api/integration/example-checks.test.mjs: clear.
  • File packages/cli/test/packed-gather-cache.replacements.test.mjs: clear.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: one claim in the release note and the description is broader than what the code covers.

  • Miss: .changeset/probe-stamps.md (and the description's pack-state.mjs bullet) says every ignore file npm reads while a check asks what a package packs is checked by its stamp, but in a package with a files field packState asks npm without statting any ignore file (pack-state.mjs:284-287), so an edit to a nested .npmignore that npm honors leaves a kept contribution check in use; narrow both sentences to the package-without-files case, or stat the path's ignore files whenever npm is asked and add a files-field test beside the new ignore-file test.

Otherwise the presence and real-path records match the description, and the new tests fail on main and pass here. One small, non-blocking cleanup: packed-gather-cache.replacements.test.mjs:453 still accepts the removed in: state.

Claims and files checked

Review mode: full; reason: over-500-lines

  • Claim: on main the record stamps every file a run only checked for or only resolved: verified for files (main's exact-run probe stamp; folders kept their identity).
  • Claim: an existence check records only whether the path is there: verified (read-record.mjs:98-99, :286-292; read-record.test.mjs:168, :177).
  • Claim: a real-path lookup records the program's own answer on the path's own key, or absent when it threw, with no call of its own: verified (read-record.mjs:220-230; read-record.test.mjs:245, :277).
  • Claim: a check repeats the same unwrapped lookup, so links and letter case agree with the record: verified (read-record.mjs:186, :301-307).
  • Claim: a write in place or a rename-over save keeps the answer, while a re-pointed link, a removed target or a folder moved and linked again changes it: verified (read-record.test.mjs:364, :294, :236; a probe for the moved folder).
  • Claim: the native and async lookups stay unwrapped, as on main: verified (read-record.mjs:119-128, :232); the one runtime use of the native form running in no kept gather: not traced (unwrapped on both sides).
  • Claim: one state per path, the fullest a call gave, and a path looked up and also read, listed or statted keeps that call's stamp: verified (read-record.mjs:392-457; read-record.test.mjs:392, :522).
  • Claim: most looked-up paths are modules the run then loads, so they cost no more to check: not measured (a module loaded by the path it was looked up by takes the load's stamp, gather-cache.mjs:420).
  • Claim: a folder's stamp is its own stat, so a link re-pointed between two folders with the same listing shows: verified (read-record.test.mjs:502).
  • Claim: a file looked up and then read keeps only its stamp, as on main, and a test checks values that name a real path for a folder state below the link: verified (packed-gather-cache.replacements.test.mjs:292, :438).
  • Claim: reads, listings, stats, lstats, opens and access checks keep the full stamp, as before: verified (read-record.mjs:94-105, :173-178).
  • Claim: a path first only checked for or resolved, then statted, read or opened, takes the later call's state, and merged records keep the fuller one: verified (read-record.mjs:52-61, :364-376; read-record.test.mjs:186, :441, :461, :563).
  • Claim: a module loaded, or a package folder looked up, after only an existence check is checked by its stamp or lookup state: verified (gather-cache.mjs:420, :479; gather-cache.test.mjs:209).
  • Claim: an entry may build on one that holds only presence or a lookup where the run read more, and stores the fuller state itself: verified (gather-cache.mjs:793-817; gather-cache.deps.test.mjs:180).
  • Claim: the integration checks stat each ignore file npm reads, so a kept check sees it edited: false with a files field (pack-state.mjs:284-287; a probe), verified without one (example-checks.test.mjs:699).
  • Claim: check-then-use sites inside kept gathers were audited (npm's ignore files, module loads, a git ignore check outside kept gathers): consistent (no runtime promise or stream reads; the git check runs only from init).
  • Claim: a replacements test checks every stored lookup answer and every value that names a real path: verified (packed-gather-cache.replacements.test.mjs:437-438).
  • Claim: the warm timings, the CPU profile and the identical-output replay: not reproduced.
  • Claim: each listed row fails before the change or with its part undone: consistent (12 rows fail on main; the ignore-file row fails with its part undone).
  • Claim: the CLI suite passes apart from theme-editor tests that also fail on main: not reproduced here; the touched test files pass and CI passed on this head.
  • Claim: no output, flag or JSON shape changes: verified (no command doc, codec or printer change).
  • Changeset: kept data is checked against what each check returned, an existence check by presence and a real-path lookup by the path it answered: verified (read-record.mjs:94-105).
  • Changeset: an edit to a file only checked for or resolved no longer forces the kept data to be worked out again: verified (gather-cache.deps.test.mjs:180).
  • Changeset: a file a kept step read is checked by its stamp, as before: verified (read-record.mjs:96-97).
  • Changeset: an ignore file npm reads when a check asks what a package packs is checked by its stamp: false with a files field (pack-state.mjs:284-287; a probe).
  • Changeset: output does not change: verified.
  • File .changeset/probe-stamps.md: blocking finding (the ignore-file sentence).
  • File packages/cli/foundation/fs/read-record.mjs: clear.
  • File packages/cli/foundation/fs/gather-cache.mjs: clear.
  • File packages/cli/foundation/integrations/pack-state.mjs: clear for its change; the files-field case is behind the finding above.
  • File packages/cli/foundation/fs/read-record.test.mjs: clear.
  • File packages/cli/foundation/fs/gather-cache.test.mjs: clear.
  • File packages/cli/foundation/fs/gather-cache.deps.test.mjs: clear.
  • File packages/cli/api/integration/example-checks.test.mjs: clear.
  • File packages/cli/test/packed-gather-cache.replacements.test.mjs: non-blocking note (line 453 accepts the removed in: state).

Automated review (maintainer link)

Comment thread .changeset/probe-stamps.md Resolved
…the base-state check accepts only present or a lookup's answer

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not finished on this head yet.

The release note and the description now describe the ignore-file coverage the code gives, and the base-state test guard accepts only the states this change writes, so the last review's points are resolved. Nothing else needs to change.

Claims and files checked

Review mode: incremental; reason: none

  • Claim: On main the record stamps every file a run only checked for or only resolved: verified (main's exact-run probe stamp; folders keep their identity).
  • Claim: An existence check records only whether the path is there: verified (read-record.mjs:94-99, :286-292; read-record.test.mjs:168, :177).
  • Claim: A real-path lookup records the program's own answer on the path's own key, or absent when it threw, with no call of its own: verified (read-record.mjs:204-230; read-record.test.mjs:245, :277).
  • Claim: A check repeats the same unwrapped lookup, so links and letter case agree with the record: verified (read-record.mjs:301-307, :316-317).
  • Claim: A write in place or a rename-over save keeps the answer, while a re-pointed link, a removed target or a folder moved and linked again changes it: verified (read-record.test.mjs:364, :294, :236; a moved folder changes the answer the state holds).
  • Claim: Which tools save in place and which rename over: context, not checked.
  • Claim: The native and async lookups stay unwrapped, as on main, and the one runtime use of the native form runs in no kept gather: verified (read-record.mjs:119-128; theme/build/build.mjs:334 is reached from theme build, pack-check, theme-edit and doctor's app-theme check, which runs outside its kept checks).
  • Claim: One state per path, the fullest a call gave, and a path looked up and also read, listed or statted keeps that call's stamp: verified (read-record.mjs:392-457; read-record.test.mjs:392, :522).
  • Claim: Most looked-up paths are modules the run then loads, so they cost no more to check: not measured (a module loaded by the path it was looked up by takes the load's stamp, gather-cache.mjs:420).
  • Claim: A folder's stamp is its own stat, so a link re-pointed between two folders with the same listing shows: verified (read-record.test.mjs:502).
  • Claim: A file looked up and then read keeps only its stamp, as on main, and a test checks values that name a real path for a folder state below the link: verified (packed-gather-cache.replacements.test.mjs:292, :438).
  • Claim: Reads, listings, stats, lstats, opens and access checks keep the full stamp, as before: verified (read-record.mjs:173-178, :94-104).
  • Claim: A path first only checked for or resolved, then statted, read or opened, takes the later call's state, and merged records keep the fuller one: verified (read-record.mjs:46-75, :364-376; read-record.test.mjs:186, :441, :461, :563).
  • Claim: A module loaded, or a package folder looked up, after only an existence check is checked by its stamp or lookup state: verified (gather-cache.mjs:420, :479; gather-cache.test.mjs:209).
  • Claim: An entry may build on one that holds only presence or a lookup where the run read more, and stores the fuller state itself: verified (gather-cache.mjs:779-817; gather-cache.deps.test.mjs:180).
  • Claim: With no files field the checks now stat each ignore file they look for before asking npm; with a files field they ask npm without looking, as on main: verified (pack-state.mjs:91-118, :284-287; example-checks.test.mjs:699).
  • Claim: Check-then-use sites inside kept gathers were audited (npm's ignore files, module loads, a git ignore check outside kept gathers): consistent (the git check is reached only from init and upgrade paths).
  • Claim: A replacements test checks every stored lookup answer and every value that names a real path: verified (packed-gather-cache.replacements.test.mjs:437-438).
  • Claim: The warm timings, the CPU profile, the battery, the theme-build gains and the identical-output replay: not reproduced.
  • Claim: Each listed test row fails before the change or with its part undone: consistent (the new rows fail on main; the ignore-file row fails with its part undone).
  • Claim: The CLI suite passes apart from theme-editor tests that also fail on main: not reproduced; the touched test files pass at this head.
  • Claim: No output, flag or JSON shape changes: verified (no command doc, codec or printer change).
  • Changeset: Kept data is checked against what each check returned: an existence check by presence, a real-path lookup by the path it answered: verified (read-record.mjs:94-104).
  • Changeset: An edit to a file only checked for or resolved no longer forces the kept data to be worked out again: verified (gather-cache.deps.test.mjs:180).
  • Changeset: A file a kept step read is checked by its stamp, as before, and so is an ignore file a check looks for before it asks npm: verified (read-record.mjs:96-97, pack-state.mjs:91-118, :284).
  • Changeset: Output does not change: verified.
  • File .changeset/probe-stamps.md: clear (the ignore-file sentence now matches the code).
  • File packages/cli/foundation/fs/read-record.mjs: clear.
  • File packages/cli/foundation/fs/gather-cache.mjs: clear.
  • File packages/cli/foundation/integrations/pack-state.mjs: clear.
  • File packages/cli/foundation/fs/read-record.test.mjs: clear.
  • File packages/cli/foundation/fs/gather-cache.test.mjs: clear.
  • File packages/cli/foundation/fs/gather-cache.deps.test.mjs: clear.
  • File packages/cli/api/integration/example-checks.test.mjs: clear.
  • File packages/cli/test/packed-gather-cache.replacements.test.mjs: clear (the base-state guard now accepts only present or a lookup's answer).

Automated review (maintainer link)

@josephfarina
josephfarina merged commit 17f7ffc into main Nov 15, 2026
84 checks passed
@github-actions
github-actions Bot deleted the speed/probe-stamps branch November 16, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — ac562048 Deployed Nov 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant