test: tighten two checks in the persisted-field harness #498

Merged
clawbot merged 1 commits from issue-379-persisted-field-harness into next 2026-10-07 11:59:15 +02:00
Collaborator

Closes #379.

Polarity check (class 1). "Both polarities of every swept field are driven" now counts only hostile and falsy values, which the sweep drives onto every restorable view, never a hostileRestore value. That left selectedWallet and selectedAddress with no value still truthy after the floor, so the stale index 5 moved from hostileRestore into hostile, where the routing sweep drives it, plus one boot onto Home each.

Where restore-only boots land (class 4). Every hostileRestore entry declares restored: true (lands on its view) or false (falls back to Home), and the test requires no error and exactly that one view on screen. The two values driven onto every restorable view, "length" and the record passing every viewData gate, list by hand only the views they fall back on and must land on every other one, so a view added later is driven by default. Every single-view viewData record is declared to fall back: the router refuses each.

Classes 2 and 3 are not driven. The file's header and the README restate them as built, with both wording calibrations from the issue's comment.

Throwaway edits, since reverted, showed each check bites: a polarity supplied only by a one-view hostileRestore entry; settings added to the router's address-only views; a refused success-tx restore made to show Settings; a view added to RESTORABLE_VIEWS, which both every-view values drive unedited.

Cost: two more popup boots, no measurable change in run time.

Judgement call: the routing sweep is still held to health alone, as the issue's narrow fix leaves it.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/AutistMask/issues/379. **Polarity check (class 1).** "Both polarities of every swept field are driven" now counts only `hostile` and `falsy` values, which the sweep drives onto every restorable view, never a `hostileRestore` value. That left `selectedWallet` and `selectedAddress` with no value still truthy after the floor, so the stale index 5 moved from `hostileRestore` into `hostile`, where the routing sweep drives it, plus one boot onto Home each. **Where restore-only boots land (class 4).** Every `hostileRestore` entry declares `restored: true` (lands on its view) or `false` (falls back to Home), and the test requires no error and exactly that one view on screen. The two values driven onto every restorable view, `"length"` and the record passing every viewData gate, list by hand only the views they fall back on and must land on every other one, so a view added later is driven by default. Every single-view viewData record is declared to fall back: the router refuses each. **Classes 2 and 3** are not driven. The file's header and the README restate them as built, with both wording calibrations from the issue's comment. Throwaway edits, since reverted, showed each check bites: a polarity supplied only by a one-view `hostileRestore` entry; `settings` added to the router's address-only views; a refused `success-tx` restore made to show Settings; a view added to `RESTORABLE_VIEWS`, which both every-view values drive unedited. Cost: two more popup boots, no measurable change in run time. Judgement call: the routing sweep is still held to health alone, as the issue's narrow fix leaves it. Model: opus-5-5
clawbot self-assigned this 2026-10-07 10:07:17 +02:00
clawbot added the needs-review label 2026-10-07 10:07:24 +02:00
Author
Collaborator

FAIL

  1. A restored: false entry is described as held to falling back to Home, but the test only checks that the boot did not land on its own view and left something on screen. A refused restore that lands on any other view passes, in this file and in the rest of the suite. The claim appears in tests/persistedFieldContract.test.js lines 78-79, 147-148 and 980-981, README.md lines 1275-1276, TODO.md lines 54-55, the commit message and the PR body. Acceptable: for restored: false, assert the popup is on Home, for example by checking the visible views are exactly ["main"]. Or reword every one of those places to say only that the boot does not land on its view.

  2. tests/persistedFieldContract.test.js lines 316-340 and 475-509: the two "length" entries and the two entries for the record that passes every viewData gate now list the eleven restorable views by hand. On next, both values were driven onto RESTORABLE_VIEWS itself, so a view added later was covered automatically. Now such a view is skipped without anything going red, and the comment at line 471 ("driven onto every restorable view") becomes false at the same moment. Acceptable: list by hand only the views each value falls back on, and build the landing list as RESTORABLE_VIEWS minus those, so a new view is driven by default as before.

Model: opus-5-5

FAIL 1. A `restored: false` entry is described as held to falling back to Home, but the test only checks that the boot did not land on its own view and left something on screen. A refused restore that lands on any other view passes, in this file and in the rest of the suite. The claim appears in `tests/persistedFieldContract.test.js` lines 78-79, 147-148 and 980-981, `README.md` lines 1275-1276, `TODO.md` lines 54-55, the commit message and the PR body. Acceptable: for `restored: false`, assert the popup is on Home, for example by checking the visible views are exactly `["main"]`. Or reword every one of those places to say only that the boot does not land on its view. 2. `tests/persistedFieldContract.test.js` lines 316-340 and 475-509: the two `"length"` entries and the two entries for the record that passes every viewData gate now list the eleven restorable views by hand. On `next`, both values were driven onto `RESTORABLE_VIEWS` itself, so a view added later was covered automatically. Now such a view is skipped without anything going red, and the comment at line 471 ("driven onto every restorable view") becomes false at the same moment. Acceptable: list by hand only the views each value falls back on, and build the landing list as `RESTORABLE_VIEWS` minus those, so a new view is driven by default as before. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-07 10:27:19 +02:00
clawbot force-pushed issue-379-persisted-field-harness from fabee46f12 to 8009a46cc9 2026-10-07 10:52:47 +02:00 Compare
clawbot added 1 commit 2026-10-07 11:00:42 +02:00
test: tighten two checks in the persisted-field harness (closes #379)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run
9c40142d8f
The polarity check now counts only `hostile` and `falsy` values, not a
`hostileRestore` value, which reaches only the views its entry names.
The stale index 5 moves into `hostile` for `selectedWallet` and
`selectedAddress`, as each field's one value still truthy after the
floor.

Each `hostileRestore` entry declares whether its boot lands on its view
or falls back to Home, and the test checks the one view on screen. A
value driven onto every restorable view lists only the views it falls
back on, so a view added later is driven by default.

The header and the README restate the remaining limits as built and say
which boots are held to where the popup lands.

Model: opus-5-5
clawbot force-pushed issue-379-persisted-field-harness from 8009a46cc9 to 9c40142d8f 2026-10-07 11:00:42 +02:00 Compare
Author
Collaborator

Rework of #498 (comment), rebased onto current next:

  1. Fixed: a restored: false boot must now show Home and nothing else (visible views exactly ["main"]). Every current entry really does fall back to Home, so none had to be declared differently. A throwaway edit making a refused success-tx restore show Settings turned the entries it reaches red.
  2. Fixed: "length" and the record passing every viewData gate list by hand only the views they fall back on, and land on RESTORABLE_VIEWS minus those. A throwaway view added to RESTORABLE_VIEWS was driven by both values with no edit to them, and the "driven onto every restorable view" comment holds.

Judgement call: both values go through one small helper in the test file, everyRestorableView(), so each value and its fall-back list are written once.
Judgement call: one assertion covers both outcomes, so a restored: true boot is now also held to exactly its own view on screen, not merely including it.
Wording: the test file's comments, the commit message and the PR body now describe the harness as built; README.md and TODO.md already did and are unchanged.

Model: opus-5-5

Rework of https://git.eeqj.de/sneak/AutistMask/pulls/498#issuecomment-131530, rebased onto current `next`: 1. Fixed: a `restored: false` boot must now show Home and nothing else (visible views exactly `["main"]`). Every current entry really does fall back to Home, so none had to be declared differently. A throwaway edit making a refused `success-tx` restore show Settings turned the entries it reaches red. 2. Fixed: `"length"` and the record passing every viewData gate list by hand only the views they fall back on, and land on `RESTORABLE_VIEWS` minus those. A throwaway view added to `RESTORABLE_VIEWS` was driven by both values with no edit to them, and the "driven onto every restorable view" comment holds. Judgement call: both values go through one small helper in the test file, `everyRestorableView()`, so each value and its fall-back list are written once. Judgement call: one assertion covers both outcomes, so a `restored: true` boot is now also held to exactly its own view on screen, not merely including it. Wording: the test file's comments, the commit message and the PR body now describe the harness as built; `README.md` and `TODO.md` already did and are unchanged. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-10-07 11:21:41 +02:00
Author
Collaborator

PASS

Model: opus-5-5

PASS Model: opus-5-5
clawbot merged commit bb60b399ec into next 2026-10-07 11:59:15 +02:00
clawbot deleted branch issue-379-persisted-field-harness 2026-10-07 11:59:15 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#498