bc-dgx7.85: B7e-suitemap — The inside of an existing suite — its fixtures - #768
Open
mordam wants to merge 8 commits into
Open
bc-dgx7.85: B7e-suitemap — The inside of an existing suite — its fixtures#768mordam wants to merge 8 commits into
mordam wants to merge 8 commits into
Conversation
Given a suite path (or --for <file>, resolved through lib/affected.js), prints its imports from the module under test, its file-local fixture/loader helpers with signatures and return shapes, and every named check in order under its section divider — the three things five sessions each read several hundred lines by hand to find before adding a check to a suite that already existed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Owner
Author
|
A beadcause worker opened this and does not merge its own work. It is on the merge queue as bc-qigvf. |
…-dgx785 # Conflicts: # lib/toolbelt.js
Contributor
|
beadcause-resolver: stood down — worktree-b7e-suitemap-dgx785 is locked by another resolver on this same PR (reason "resolver pid 71366 #768", pid live in ps). Did not touch the tree, did not unlock, took no lock of my own. |
Owner
Author
|
The beadcause merge queue tried to merge this and could not: it has been tried 3 times and stopped at the same place each time. the branch still conflicts with |
…-dgx785 # Conflicts: # lib/grants.js # lib/toolbelt.js
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.
Adds
b7e-suitemap(bin/b7e-suitemap, lib/suitemap.js, test/suitemap.mjs): given anexisting test suite, print what it imports from the module under test, its file-local
fixture/loader helpers (with signature and, for a loader that returns an object, the
keys it hands back), and every named check in source order under its section divider.
--for <file>resolves the suite through lib/affected.js first. This is bc-dgx7.85'sown session-audit finding: five sessions each added a check to a suite that already
existed and each read several hundred lines of it by hand — sed slices, greps for
anchor strings, Reads at guessed line numbers — to learn the same three things.
The parse is a real acorn AST walk (matching lib/already.js and lib/imports.js's own
reasoning: a name is a binding and a call is a call, not a string a regex might also
match inside a comment), not a regex over the source text.
One thing worth flagging: lib/affected.js's own text-based matching cannot see the
fs.readFileSync(PUBLIC('report.js'))helper-call convention a suite uses to vm-loadthe module it tests — the literal is split across two calls, so
test/reporter.mjsreaches
findAffected's candidate list only as a weak directory-walker.--forresolution parses every candidate with the same acorn walk and lets an actual
vm-source/dynamic/static import of the target override that ranking; this is
new logic in lib/suitemap.js, not a change to lib/affected.js itself, so it doesn't
touch b7e-affected's own behavior or its suite. Both concrete cases in the bead's
acceptance criteria (test/homing.mjs's anchor strings, and --for public/report.js
naming load/fire and the acceptance-criteria section of test/reporter.mjs) are
asserted against this repo's real suites, not just fabricated fixtures.
Registered per the five-file b7e checklist: package.json + package-lock.json bin maps
(alphabetical), lib/grants.js (
read) and lib/toolbelt.js's DEFAULT_TOOL_LIST(append), and a README section after b7e-harness's. Merged origin/main in
(bc-dgx7.82's b7e-propagated landed while this was in flight and touches the same five
files — resolved clean, additively, as that family always does) and re-ran the
affected suites and this suite's own 28 checks afterward.
Tests: node test/suitemap.mjs (28/28); node bin/b7e-affected against the diff → 59 narrowed suites all green via node, plus scripts/land-check.mjs (timed out at 120s in a batch runner but passes at 0 exit on its own); node scripts/checks.mjs — 55/58 browser checks green, 3 pre-existing failures (advocatespane-check, historypane-check, phone-check) not in the affected-suite list and unrelated to this diff (pane/phone rendering, one needs a live daemon with beads); node test/lockfile.mjs green before and after merging origin/main
Files changed — 8 files · +1131 −0 · against `main`
Opened by a beadcause worker session on bc-dgx7.85 — b7e-suitemap — The inside of an existing suite — its fixtures, what it imports from the file under test, and where a new check goes. It merges itself once the checks report; merging is what closes the bead. If this is still open, something stopped that, and the reason is on bc-dgx7.85 and in Adam's inbox.
bead: bc-dgx7.85