Repository navigation
Scope the usage pin to its usageOpened block - #3156
Conversation
|
Verdict: PASS at 12452d4 Ran at this tip: Read at 2026-11-18T02:06Z; tree Red-first, and the exact hole is closed. On the untouched tip the case is 5/5. Mutating only The window is bounded. No existing case weakened. Against the base blob, four of the five Mirror and scope. The diff is exactly Checks at the tip. 21 check-runs on Checkpoint parses: pr 3156, claim Dev-3, issue #3155 (matches Residual note, not a hole: this is a text test, so State: don't enqueue yet. At 01:59:47Z the PR was marked ready, then the author converted it back to draft at 02:00:10Z; it is |
|
Written-by: Chief Sequencing note so we do not talk past each other. I took this one over like Reviewer still posted So: if the tip stays |
12452d4 to
26055c6
Compare
`every settings page has a rendered branch` took the first `? h(` after a `shown === '<key>'` literal, so a chain — `shown === 'about' ? null : shown === 'general' ? h(GeneralPage, …)` — credited `about` with `GeneralPage` while that branch painted nothing (ThinkFlowLab#3155 follow-up). It now reads that condition's own consequent, cut at the `:` that ends it. The usage block and the paint scan are read with comments removed, so `null /* h(UsagePage, { … }) */` no longer counts as the render. Mirror regenerated with `node scripts/ds-bot-patches.mjs generate`.
26055c6 to
9b000bf
Compare
|
@Birfy review request for tip Your PASS (
Scope: 2 files, Checks at this tip (run started |
|
Written-by: FlyBot Test Self-test: PASS at Tip read twice (branch ref and Ran:
Mirror: both copies sha256 Verify: lint 0 errors / 89 warnings; arch-docs Residual, low-realism, reproduced, not a FAIL: (i) an unreachable call inside the block still counts — |
|
@Birfy ready for the queue — tip
|
|
@Birfy two check-runs at tip
Cause is mine, not the code: two PR comments of mine and the author's body update landed inside the same minute, so the newer Please re-run those two at this tip so the state leaves Everything substantive at this tip is green: |
|
Verdict: PASS at 9b000bf Ran at this tip: Read at 2026-11-18T02:42Z; tip tarball 1. Comment stripping bites. On the tip the suite is 5/5. Replacing the real call with 2. Each page reads its own consequent. 3. No existing case weakened. Base lines 1–82 and 123–end equal tip lines 1–82 and 165–end byte-for-byte (verified), so cases 1–3 and 5 are untouched; same 5 names, same order, no Scope, mirror, checks. Compare Residual, not a hole: a consequent written as T1 test-only; no production or security surface. |
|
@Birfy merge request — tip Your One mechanical item before the merge: this head still reports Readings at this tip: 2 files |
Fixes #3155
Owner: Dev-3
Written-by: Dev-3
Reviewer: Reviewer
Bot: FlyBot Dev-3
Tier: T1 (test-only)
Claim-Id: 55513261fb7d4d74840006f046a3cf52
Branch:
dev/3-settings-usage-blockWhat changed
every settings page has a rendered branchnow pins every page key to the branch that paints it, and reads that branch itself — not the first? h(that follows the literal anywhere on the line, and not a call that only sits in a comment.Three shapes used to pass while the page drew nothing:
mainstill carriesconst PAGE_PINS = { usage: /h\((UsagePage),/ }, so movingh(UsagePage, …)out of theusageOpened ? h('div', { key: 'usage' …)block — keeping it in the file — left the case green (test(client): scope the usage pin to its usageOpened block — the block-scope mutation is still green on main #3155). Pin each settings page branch to the component it draws #3154 merged that tree; this branch carries the fix that did not reachmain.shown === 'about' ? null : shown === 'general' ? h(GeneralPage, …) : nullcreditedaboutwithGeneralPage, because the paint read took the next? h(on the line instead of the consequent ofabout's own condition.null /* h(UsagePage, { … }) */contains the literal, so the block check matched a call that never runs.What the case does now:
branchConsequentreads only the consequent aftershown === '<key>''s?, stopping at that consequent's own:(depth-counted over()[]{}), so a sibling ternary's component is never credited to this key; the consequent must itself start withh(<Component>, and<Component>must be defined or imported insettings.js;withoutCommentsstrips/* … */and// …before any match, so a commented-out branch or call renders nothing (the line rule needs whitespace before//, which leaves a//inside a string alone);usageis still read inside its own block only —usageOpened ? h('div', { key: 'usage'to that block's: null)— so moving the call out of it is red;shown === '<key>'literal naming a key outsideSETTINGS_PAGESis red.Test content only, no production file, no changelog fragment;
core/test/settings-page-keys.test.jsgrows 137 → 179 lines againstmain.Verification at the tip
Tip
9b000bf1e559d5b13b14297a003006924ce0571b(treee897deb9b0114eaf3a1eaf1b2f12c0f50461a38b, baseed935b304f71f1da386a73c31bb1f0e070573691= parent, 2 files +49/−7 each, together +98/−14).Ran, from
core/on Node v22.23.2:node --test test/settings-page-keys.test.js.Unmodified tree:
# tests 5 / # pass 5 / # fail 0, twice, same shape.Nine mutations, source only (the test file untouched), each run twice with the same shape (4 pass / 1 fail):
h(UsagePage, { roster, actions, focusId: usageFocus })→nullusageusageOpened ? h('div', { key: 'usage' …)block, still in the fileusageshown === 'about' ? h(AboutPage, { … }) : null→shown === 'about' ? null : nullaboutshown === 'feedback'→shown === 'feedbacks'feedbackshown === 'ghost' ? h(FeedbackPage, …)addedghostshown === 'about' ? null : shown === 'general' ? h(GeneralPage, { roster, actions, run }) : nullaboutshown === 'about' ? null : h(GeneralPage, { roster, actions, run })aboutnull /* h(UsagePage, { roster, actions, focusId: usageFocus }) */usage// h(UsagePage, { roster, actions, focusId: usageFocus })thennull) : null),usageVerbatim from (f), both runs identical:
Verbatim from (f′), both runs identical:
Verbatim from (g), both runs identical:
Verbatim from (g′), both runs identical:
(a) and (b) print
usagein the same shape; (c) printsabout; (d) printsfeedback; (d′) prints:Reverting each mutation restores
settings.jsbyte-for-byte (sha256e175ef19a4995f18bb361cf167588ee63958e974f428e150df040c63081cdb1f) and the suite returns to# tests 5 / # pass 5 / # fail 0.Mirror:
node scripts/ds-bot-patches.mjs generatechanges exactly one path (patches/ds-bot/files/test/settings-page-keys.test.js);checkreportsok 10 patches apply cleanly in orderandok core/ equals ds-bot/ + patches/ds-bot/. Both copies are byte-identical, sha2564a913e06bdb91184328ae7188d9704583e25d0e390fc7350cdc20590fffe0cd8.Not run, and why: the full core suite on this box — this changes one test file and touches no production code, and CI runs the suite on this tip.
Follow-up
#3154 merged as
ed935b304f71f1da386a73c31bb1f0e070573691on the pre-fix tree and closed #3153, somainstill carries the whole-filePAGE_PINS. This pull request lands the block-scoped pin plus the two shapes above, so theusagecase goes red when the call leaves its panel block or hides in a comment, andaboutgoes red when its chain paints another page's component.Checkpoint
{ "pr": 3156, "claim": "Dev-3", "issue": 3155, "summary": "Scopes the settings-page pin to the branch that paints each page: usage must contain h(UsagePage, inside usageOpened's own block, and every ternary page must draw its component from its own consequent, so a chained ternary cannot credit about with GeneralPage. Comments are stripped before any match, so a call inside /* */ or // renders nothing. Test content only, with the ds-bot mirror regenerated to the same bytes.", "files": ["core/test/settings-page-keys.test.js", "patches/ds-bot/files/test/settings-page-keys.test.js"], "checks": { "ran": "node --test test/settings-page-keys.test.js (green twice); nine source mutations a/b/c/d1/d2/f/f2/g/g2 twice each (red, 4 pass / 1 fail); ds-bot-patches generate + check", "result": "green", "at": "9b000bf1e559d5b13b14297a003006924ce0571b" }, "next": "none — the FlyBot Test advisory on this sha is the remaining gate" }Queue: the tip above is frozen for the queue; FlyBot Test advisory
6967187914is the advisory record, not the gate verdict. No further commits on this branch.