# #1220 red/green evidence: every new unit test file, seen RED with the change reverted or stubbed and GREEN as committed. # Generated by mutating one rule at a time in the worktree and restoring it from the commit after the run. === M1: the entry walk's #1220 change reverted (v2/entry-basis.ts as on origin/staging) $ node --import tsx --test src/lib/portfolio/v2/prewindow-entry-basis.test.ts src/lib/portfolio/prewindow-entry-read.test.ts --- RED (mutation applied), exit 1 ok 1 - A1 found: At entry is the fill's gap, Held since the fill's date, Dislocation PnL today's gap less the entry gap not ok 2 - A1b the identity holds on the found holding against the engine's own bookings ok 3 - A2 the dashes: a transfer in keeps the predates dash; a lookup limit says which, with the age only where established ok 4 - A3 a stored set that no longer explains the opening is ignored: the row keeps its dash ok 5 - A4 with and without the found set: every chart point of both lines, Net asset value and the ledger the Activity reads are identical ok 6 - A5 a wrap's source leg is in the entry walk only: no row, no total, no engine span of its own ok 7 - the loader tolerates the tables' absence and an unreadable read; the seam is a no-op without sets not ok 8 - E1 a found entry: the span opens on its birth, not on the opening; nothing is a first observation ok 9 - E2 a blend with an estimated slice is estimated not ok 10 - E3 the identity holds EXACTLY with a found entry, an opening gap and an in-window top-up all non-zero and distinct ok 11 - E4 a found trade receipt takes the trade branch: no group, the paid asset contributes nothing ok 12 - E5 a wrap's source walked to its birth carries its date and basis into the holding through the link ok 13 - E6 an in-window move onward carries the found entry, not a first observation # tests 13 # pass 10 # fail 3 --- GREEN (as committed), exit 0 ok 1 - A1 found: At entry is the fill's gap, Held since the fill's date, Dislocation PnL today's gap less the entry gap ok 2 - A1b the identity holds on the found holding against the engine's own bookings ok 3 - A2 the dashes: a transfer in keeps the predates dash; a lookup limit says which, with the age only where established ok 4 - A3 a stored set that no longer explains the opening is ignored: the row keeps its dash ok 5 - A4 with and without the found set: every chart point of both lines, Net asset value and the ledger the Activity reads are identical ok 6 - A5 a wrap's source leg is in the entry walk only: no row, no total, no engine span of its own ok 7 - the loader tolerates the tables' absence and an unreadable read; the seam is a no-op without sets ok 8 - E1 a found entry: the span opens on its birth, not on the opening; nothing is a first observation ok 9 - E2 a blend with an estimated slice is estimated ok 10 - E3 the identity holds EXACTLY with a found entry, an opening gap and an in-window top-up all non-zero and distinct ok 11 - E4 a found trade receipt takes the trade branch: no group, the paid asset contributes nothing ok 12 - E5 a wrap's source walked to its birth carries its date and basis into the holding through the link ok 13 - E6 an in-window move onward carries the found entry, not a first observation # tests 13 # pass 13 # fail 0 === M2: the writer reads an inflow with nothing paid as a purchase (no unknown source) $ node --import tsx --test src/lib/portfolio/prewindow-entry-receipts.test.ts --- RED (mutation applied), exit 1 ok 1 - walkBack: the holding is born at the newest transfer before which it held exactly zero ok 2 - walkBack: a balance that would go below zero is a history the transfers do not explain; too few transfers is open not ok 3 - classifyInflow: a wrap, a trade, a purchase, ether, and nothing paid ok 4 - W1 found: wstETH bought with ETH 60 days before the window, untouched: one trade receipt, read from the fill, born at it ok 5 - W1b the received leg is valued exactly as the in-window swap matcher's row of the same trade (R3) not ok 6 - W2 10% received by a plain transfer: all or nothing, nothing stored, the dash stays ok 7 - W3 the birth beyond the lookback: nothing stored, the verdict names the cap; the call cap the same way ok 8 - W4 transfers that do not reconcile with the opening: not explained, nothing stored ok 9 - W5 a wrap is followed to its source's birth, on a leg of its own linked to the holding ok 10 - W10 the cost shape: 4 log calls per 100,000 blocks walked whatever the number of holdings, plus a receipt per acquisition ok 11 - W6 the replay stores a byte-identical set, and a settled set is kept with zero archive reads and zero valuation ok 12 - W6b a found set is NOT walked again when a later build raises a cap; a cap verdict is ok 13 - W7 a transient failure in the middle of the wallet's walk writes nothing: EVERY holding keeps its prior rows ok 14 - W8 an opening that moved is walked again and replaced; a holding that left scope is cleared ok 15 - W9 a box without the tables stores nothing and reads nothing ok 16 - only a holding with a redemption value of its own is walked (par tokens have no gap to enter at) # tests 16 # pass 14 # fail 2 --- GREEN (as committed), exit 0 ok 1 - walkBack: the holding is born at the newest transfer before which it held exactly zero ok 2 - walkBack: a balance that would go below zero is a history the transfers do not explain; too few transfers is open ok 3 - classifyInflow: a wrap, a trade, a purchase, ether, and nothing paid ok 4 - W1 found: wstETH bought with ETH 60 days before the window, untouched: one trade receipt, read from the fill, born at it ok 5 - W1b the received leg is valued exactly as the in-window swap matcher's row of the same trade (R3) ok 6 - W2 10% received by a plain transfer: all or nothing, nothing stored, the dash stays ok 7 - W3 the birth beyond the lookback: nothing stored, the verdict names the cap; the call cap the same way ok 8 - W4 transfers that do not reconcile with the opening: not explained, nothing stored ok 9 - W5 a wrap is followed to its source's birth, on a leg of its own linked to the holding ok 10 - W10 the cost shape: 4 log calls per 100,000 blocks walked whatever the number of holdings, plus a receipt per acquisition ok 11 - W6 the replay stores a byte-identical set, and a settled set is kept with zero archive reads and zero valuation ok 12 - W6b a found set is NOT walked again when a later build raises a cap; a cap verdict is ok 13 - W7 a transient failure in the middle of the wallet's walk writes nothing: EVERY holding keeps its prior rows ok 14 - W8 an opening that moved is walked again and replaced; a holding that left scope is cleared ok 15 - W9 a box without the tables stores nothing and reads nothing ok 16 - only a holding with a redemption value of its own is walked (par tokens have no gap to enter at) # tests 16 # pass 16 # fail 0 === M3: the keep rule removed: every build walks every holding again $ node --import tsx --test src/lib/portfolio/prewindow-entry-receipts.test.ts --- RED (mutation applied), exit 1 ok 1 - walkBack: the holding is born at the newest transfer before which it held exactly zero ok 2 - walkBack: a balance that would go below zero is a history the transfers do not explain; too few transfers is open ok 3 - classifyInflow: a wrap, a trade, a purchase, ether, and nothing paid ok 4 - W1 found: wstETH bought with ETH 60 days before the window, untouched: one trade receipt, read from the fill, born at it ok 5 - W1b the received leg is valued exactly as the in-window swap matcher's row of the same trade (R3) ok 6 - W2 10% received by a plain transfer: all or nothing, nothing stored, the dash stays ok 7 - W3 the birth beyond the lookback: nothing stored, the verdict names the cap; the call cap the same way ok 8 - W4 transfers that do not reconcile with the opening: not explained, nothing stored ok 9 - W5 a wrap is followed to its source's birth, on a leg of its own linked to the holding ok 10 - W10 the cost shape: 4 log calls per 100,000 blocks walked whatever the number of holdings, plus a receipt per acquisition not ok 11 - W6 the replay stores a byte-identical set, and a settled set is kept with zero archive reads and zero valuation not ok 12 - W6b a found set is NOT walked again when a later build raises a cap; a cap verdict is ok 13 - W7 a transient failure in the middle of the wallet's walk writes nothing: EVERY holding keeps its prior rows ok 14 - W8 an opening that moved is walked again and replaced; a holding that left scope is cleared ok 15 - W9 a box without the tables stores nothing and reads nothing ok 16 - only a holding with a redemption value of its own is walked (par tokens have no gap to enter at) # tests 16 # pass 14 # fail 2 --- GREEN (as committed), exit 0 ok 1 - walkBack: the holding is born at the newest transfer before which it held exactly zero ok 2 - walkBack: a balance that would go below zero is a history the transfers do not explain; too few transfers is open ok 3 - classifyInflow: a wrap, a trade, a purchase, ether, and nothing paid ok 4 - W1 found: wstETH bought with ETH 60 days before the window, untouched: one trade receipt, read from the fill, born at it ok 5 - W1b the received leg is valued exactly as the in-window swap matcher's row of the same trade (R3) ok 6 - W2 10% received by a plain transfer: all or nothing, nothing stored, the dash stays ok 7 - W3 the birth beyond the lookback: nothing stored, the verdict names the cap; the call cap the same way ok 8 - W4 transfers that do not reconcile with the opening: not explained, nothing stored ok 9 - W5 a wrap is followed to its source's birth, on a leg of its own linked to the holding ok 10 - W10 the cost shape: 4 log calls per 100,000 blocks walked whatever the number of holdings, plus a receipt per acquisition ok 11 - W6 the replay stores a byte-identical set, and a settled set is kept with zero archive reads and zero valuation ok 12 - W6b a found set is NOT walked again when a later build raises a cap; a cap verdict is ok 13 - W7 a transient failure in the middle of the wallet's walk writes nothing: EVERY holding keeps its prior rows ok 14 - W8 an opening that moved is walked again and replaced; a holding that left scope is cleared ok 15 - W9 a box without the tables stores nothing and reads nothing ok 16 - only a holding with a redemption value of its own is walked (par tokens have no gap to enter at) # tests 16 # pass 16 # fail 0 === M4: a found set walked again when a cap is raised $ node --import tsx --test src/lib/portfolio/prewindow-entry-receipts.test.ts --- RED (mutation applied), exit 1 ok 1 - walkBack: the holding is born at the newest transfer before which it held exactly zero ok 2 - walkBack: a balance that would go below zero is a history the transfers do not explain; too few transfers is open ok 3 - classifyInflow: a wrap, a trade, a purchase, ether, and nothing paid ok 4 - W1 found: wstETH bought with ETH 60 days before the window, untouched: one trade receipt, read from the fill, born at it ok 5 - W1b the received leg is valued exactly as the in-window swap matcher's row of the same trade (R3) ok 6 - W2 10% received by a plain transfer: all or nothing, nothing stored, the dash stays ok 7 - W3 the birth beyond the lookback: nothing stored, the verdict names the cap; the call cap the same way ok 8 - W4 transfers that do not reconcile with the opening: not explained, nothing stored ok 9 - W5 a wrap is followed to its source's birth, on a leg of its own linked to the holding ok 10 - W10 the cost shape: 4 log calls per 100,000 blocks walked whatever the number of holdings, plus a receipt per acquisition ok 11 - W6 the replay stores a byte-identical set, and a settled set is kept with zero archive reads and zero valuation not ok 12 - W6b a found set is NOT walked again when a later build raises a cap; a cap verdict is ok 13 - W7 a transient failure in the middle of the wallet's walk writes nothing: EVERY holding keeps its prior rows ok 14 - W8 an opening that moved is walked again and replaced; a holding that left scope is cleared ok 15 - W9 a box without the tables stores nothing and reads nothing ok 16 - only a holding with a redemption value of its own is walked (par tokens have no gap to enter at) # tests 16 # pass 15 # fail 1 --- GREEN (as committed), exit 0 ok 1 - walkBack: the holding is born at the newest transfer before which it held exactly zero ok 2 - walkBack: a balance that would go below zero is a history the transfers do not explain; too few transfers is open ok 3 - classifyInflow: a wrap, a trade, a purchase, ether, and nothing paid ok 4 - W1 found: wstETH bought with ETH 60 days before the window, untouched: one trade receipt, read from the fill, born at it ok 5 - W1b the received leg is valued exactly as the in-window swap matcher's row of the same trade (R3) ok 6 - W2 10% received by a plain transfer: all or nothing, nothing stored, the dash stays ok 7 - W3 the birth beyond the lookback: nothing stored, the verdict names the cap; the call cap the same way ok 8 - W4 transfers that do not reconcile with the opening: not explained, nothing stored ok 9 - W5 a wrap is followed to its source's birth, on a leg of its own linked to the holding ok 10 - W10 the cost shape: 4 log calls per 100,000 blocks walked whatever the number of holdings, plus a receipt per acquisition ok 11 - W6 the replay stores a byte-identical set, and a settled set is kept with zero archive reads and zero valuation ok 12 - W6b a found set is NOT walked again when a later build raises a cap; a cap verdict is ok 13 - W7 a transient failure in the middle of the wallet's walk writes nothing: EVERY holding keeps its prior rows ok 14 - W8 an opening that moved is walked again and replaced; a holding that left scope is cleared ok 15 - W9 a box without the tables stores nothing and reads nothing ok 16 - only a holding with a redemption value of its own is walked (par tokens have no gap to enter at) # tests 16 # pass 16 # fail 0 === M5: a failed log query read as the end of the history (writes a cap verdict) instead of a transient failure $ node --import tsx --test src/lib/portfolio/prewindow-entry-receipts.test.ts --- RED (mutation applied), exit 1 ok 1 - walkBack: the holding is born at the newest transfer before which it held exactly zero ok 2 - walkBack: a balance that would go below zero is a history the transfers do not explain; too few transfers is open ok 3 - classifyInflow: a wrap, a trade, a purchase, ether, and nothing paid ok 4 - W1 found: wstETH bought with ETH 60 days before the window, untouched: one trade receipt, read from the fill, born at it ok 5 - W1b the received leg is valued exactly as the in-window swap matcher's row of the same trade (R3) ok 6 - W2 10% received by a plain transfer: all or nothing, nothing stored, the dash stays ok 7 - W3 the birth beyond the lookback: nothing stored, the verdict names the cap; the call cap the same way ok 8 - W4 transfers that do not reconcile with the opening: not explained, nothing stored ok 9 - W5 a wrap is followed to its source's birth, on a leg of its own linked to the holding ok 10 - W10 the cost shape: 4 log calls per 100,000 blocks walked whatever the number of holdings, plus a receipt per acquisition ok 11 - W6 the replay stores a byte-identical set, and a settled set is kept with zero archive reads and zero valuation ok 12 - W6b a found set is NOT walked again when a later build raises a cap; a cap verdict is not ok 13 - W7 a transient failure in the middle of the wallet's walk writes nothing: EVERY holding keeps its prior rows ok 14 - W8 an opening that moved is walked again and replaced; a holding that left scope is cleared ok 15 - W9 a box without the tables stores nothing and reads nothing ok 16 - only a holding with a redemption value of its own is walked (par tokens have no gap to enter at) # tests 16 # pass 15 # fail 1 --- GREEN (as committed), exit 0 ok 1 - walkBack: the holding is born at the newest transfer before which it held exactly zero ok 2 - walkBack: a balance that would go below zero is a history the transfers do not explain; too few transfers is open ok 3 - classifyInflow: a wrap, a trade, a purchase, ether, and nothing paid ok 4 - W1 found: wstETH bought with ETH 60 days before the window, untouched: one trade receipt, read from the fill, born at it ok 5 - W1b the received leg is valued exactly as the in-window swap matcher's row of the same trade (R3) ok 6 - W2 10% received by a plain transfer: all or nothing, nothing stored, the dash stays ok 7 - W3 the birth beyond the lookback: nothing stored, the verdict names the cap; the call cap the same way ok 8 - W4 transfers that do not reconcile with the opening: not explained, nothing stored ok 9 - W5 a wrap is followed to its source's birth, on a leg of its own linked to the holding ok 10 - W10 the cost shape: 4 log calls per 100,000 blocks walked whatever the number of holdings, plus a receipt per acquisition ok 11 - W6 the replay stores a byte-identical set, and a settled set is kept with zero archive reads and zero valuation ok 12 - W6b a found set is NOT walked again when a later build raises a cap; a cap verdict is ok 13 - W7 a transient failure in the middle of the wallet's walk writes nothing: EVERY holding keeps its prior rows ok 14 - W8 an opening that moved is walked again and replaced; a holding that left scope is cleared ok 15 - W9 a box without the tables stores nothing and reads nothing ok 16 - only a holding with a redemption value of its own is walked (par tokens have no gap to enter at) # tests 16 # pass 16 # fail 0 === M6: the read seam attaches nothing (withPrewindowEntries returns the corpus unchanged) $ node --import tsx --test src/lib/portfolio/prewindow-entry-read.test.ts --- RED (mutation applied), exit 1 not ok 1 - A1 found: At entry is the fill's gap, Held since the fill's date, Dislocation PnL today's gap less the entry gap not ok 2 - A1b the identity holds on the found holding against the engine's own bookings ok 3 - A2 the dashes: a transfer in keeps the predates dash; a lookup limit says which, with the age only where established ok 4 - A3 a stored set that no longer explains the opening is ignored: the row keeps its dash not ok 5 - A4 with and without the found set: every chart point of both lines, Net asset value and the ledger the Activity reads are identical not ok 6 - A5 a wrap's source leg is in the entry walk only: no row, no total, no engine span of its own ok 7 - the loader tolerates the tables' absence and an unreadable read; the seam is a no-op without sets # tests 7 # pass 3 # fail 4 --- GREEN (as committed), exit 0 ok 1 - A1 found: At entry is the fill's gap, Held since the fill's date, Dislocation PnL today's gap less the entry gap ok 2 - A1b the identity holds on the found holding against the engine's own bookings ok 3 - A2 the dashes: a transfer in keeps the predates dash; a lookup limit says which, with the age only where established ok 4 - A3 a stored set that no longer explains the opening is ignored: the row keeps its dash ok 5 - A4 with and without the found set: every chart point of both lines, Net asset value and the ledger the Activity reads are identical ok 6 - A5 a wrap's source leg is in the entry walk only: no row, no total, no engine span of its own ok 7 - the loader tolerates the tables' absence and an unreadable read; the seam is a no-op without sets # tests 7 # pass 7 # fail 0 === M7: the dash's lookup-limit note never served $ node --import tsx --test src/lib/portfolio/prewindow-entry-read.test.ts --- RED (mutation applied), exit 1 ok 1 - A1 found: At entry is the fill's gap, Held since the fill's date, Dislocation PnL today's gap less the entry gap ok 2 - A1b the identity holds on the found holding against the engine's own bookings not ok 3 - A2 the dashes: a transfer in keeps the predates dash; a lookup limit says which, with the age only where established ok 4 - A3 a stored set that no longer explains the opening is ignored: the row keeps its dash ok 5 - A4 with and without the found set: every chart point of both lines, Net asset value and the ledger the Activity reads are identical ok 6 - A5 a wrap's source leg is in the entry walk only: no row, no total, no engine span of its own ok 7 - the loader tolerates the tables' absence and an unreadable read; the seam is a no-op without sets # tests 7 # pass 6 # fail 1 --- GREEN (as committed), exit 0 ok 1 - A1 found: At entry is the fill's gap, Held since the fill's date, Dislocation PnL today's gap less the entry gap ok 2 - A1b the identity holds on the found holding against the engine's own bookings ok 3 - A2 the dashes: a transfer in keeps the predates dash; a lookup limit says which, with the age only where established ok 4 - A3 a stored set that no longer explains the opening is ignored: the row keeps its dash ok 5 - A4 with and without the found set: every chart point of both lines, Net asset value and the ledger the Activity reads are identical ok 6 - A5 a wrap's source leg is in the entry walk only: no row, no total, no engine span of its own ok 7 - the loader tolerates the tables' absence and an unreadable read; the seam is a no-op without sets # tests 7 # pass 7 # fail 0 === M8: the loader drops the trade mark of a found trade receipt (it would be read as a carried rotation) $ node --import tsx --test src/lib/portfolio/prewindow-entry-read.test.ts --- RED (mutation applied), exit 1 not ok 1 - A1 found: At entry is the fill's gap, Held since the fill's date, Dislocation PnL today's gap less the entry gap ok 2 - A1b the identity holds on the found holding against the engine's own bookings ok 3 - A2 the dashes: a transfer in keeps the predates dash; a lookup limit says which, with the age only where established ok 4 - A3 a stored set that no longer explains the opening is ignored: the row keeps its dash ok 5 - A4 with and without the found set: every chart point of both lines, Net asset value and the ledger the Activity reads are identical not ok 6 - A5 a wrap's source leg is in the entry walk only: no row, no total, no engine span of its own ok 7 - the loader tolerates the tables' absence and an unreadable read; the seam is a no-op without sets # tests 7 # pass 5 # fail 2 --- GREEN (as committed), exit 0 ok 1 - A1 found: At entry is the fill's gap, Held since the fill's date, Dislocation PnL today's gap less the entry gap ok 2 - A1b the identity holds on the found holding against the engine's own bookings ok 3 - A2 the dashes: a transfer in keeps the predates dash; a lookup limit says which, with the age only where established ok 4 - A3 a stored set that no longer explains the opening is ignored: the row keeps its dash ok 5 - A4 with and without the found set: every chart point of both lines, Net asset value and the ledger the Activity reads are identical ok 6 - A5 a wrap's source leg is in the entry walk only: no row, no total, no engine span of its own ok 7 - the loader tolerates the tables' absence and an unreadable read; the seam is a no-op without sets # tests 7 # pass 7 # fail 0 === M9: a planted reader of the receipts in the engine $ node --import tsx --test src/lib/portfolio/prewindow-entry-guard.test.ts --- RED (mutation applied), exit 1 not ok 1 - only the writer, the read side, the entry walk's corpus and the user-data tooling name the pre-window entry receipts ok 2 - inside the page's builder, the field is read by the entry walk's corpus and the dash's note, and nowhere else # tests 2 # pass 1 # fail 1 --- GREEN (as committed), exit 0 ok 1 - only the writer, the read side, the entry walk's corpus and the user-data tooling name the pre-window entry receipts ok 2 - inside the page's builder, the field is read by the entry walk's corpus and the dash's note, and nowhere else # tests 2 # pass 2 # fail 0 === M10: the two tables dropped from the staging scrub's one TRUNCATE (scrub-staging.test.ts, changed) $ node --import tsx --test scripts/ops/scrub-staging.test.ts --- RED (mutation applied), exit 1 ok 1 - account activity identities, raw events and summaries are scrubbed and leak-checked together ok 2 - scrub + leak check both cover the repartition ASIDE tables ok 3 - the relations migration 095 dropped are named by NEITHER list not ok 4 - scrub covers every table the leak check verifies (a leak check cannot outrun the scrub) not ok 5 - the canonical user-data tables are still all in ONE truncate statement ok 6 - migration 067 renames aside to exactly the name the scrub lists ok 7 - migration 067 carries the WHOLE index set onto the new parent, and frees the old names ok 8 - migration 067's month arithmetic is UTC-explicit, matching the runtime helper ok 9 - migration 072 is DESTRUCTIVE-tagged on line 1 (never auto-applies on a deploy) ok 10 - migration 072 renames aside to exactly the name the scrub lists ok 11 - migration 072 partitions BY HASH (wallet) with a documented modulus, and keeps the PK verbatim ok 12 - migration 072 carries the WHOLE index set onto the new parent, and frees the old names ok 13 - migration 072 keeps the CHECK constraint names VERBATIM, so a later widening still finds them ok 14 - migration 072 asserts its OWN partition set rather than trusting the loop ok 15 - migration 082 creates an accounts-FK table, and the scrub + leak check both carry it ok 16 - the scrub and the user wipe delete the SAME per-wallet cursor prefixes ok 17 - every CODE-HEADER copy of the wipe-on-reset prefix set stays in step with the statement ok 18 - the user wipe drives its DELETE and its survivor report off ONE list ok 19 - the user wipe clears the derivation queue the scrub truncates, for every wallet no account holds ok 20 - the user wipe refuses a running ledger worker, by the worker's own lock, before it reads anything ok 21 - a partial delete selects every per-wallet record by the wallet's own segment of the scope ok 22 - 082 and 083 carry neither migration-runner tag anywhere, prose included ok 23 - 082 splits the raw_events CHECK swap and leaves the VALIDATE to its own later file ok 24 - 082 widens the snapshot CHECKs under BOTH generations of their names ok 25 - 082 asserts its own partition set, before anything depends on it ok 26 - 083 records the re-book reconstruction it cannot recover twice ok 27 - 083's re-book rows record the repair that already ran, not surviving BTC-unit values ok 28 - the scrub deletes wallet-token coverage rows, scoped to the stream and never the table ok 29 - the reseed leak-checks the wallet-token coverage rows, and only those ok 30 - the second per-wallet family, the native-ether feed's rows, is scrubbed and leak-checked too, and its marker kept (issue \#966) ok 31 - the rollout-marker convention is SCOPED in both copies, and every stream is classified # tests 31 # pass 29 # fail 2 --- GREEN (as committed), exit 0 ok 1 - account activity identities, raw events and summaries are scrubbed and leak-checked together ok 2 - scrub + leak check both cover the repartition ASIDE tables ok 3 - the relations migration 095 dropped are named by NEITHER list ok 4 - scrub covers every table the leak check verifies (a leak check cannot outrun the scrub) ok 5 - the canonical user-data tables are still all in ONE truncate statement ok 6 - migration 067 renames aside to exactly the name the scrub lists ok 7 - migration 067 carries the WHOLE index set onto the new parent, and frees the old names ok 8 - migration 067's month arithmetic is UTC-explicit, matching the runtime helper ok 9 - migration 072 is DESTRUCTIVE-tagged on line 1 (never auto-applies on a deploy) ok 10 - migration 072 renames aside to exactly the name the scrub lists ok 11 - migration 072 partitions BY HASH (wallet) with a documented modulus, and keeps the PK verbatim ok 12 - migration 072 carries the WHOLE index set onto the new parent, and frees the old names ok 13 - migration 072 keeps the CHECK constraint names VERBATIM, so a later widening still finds them ok 14 - migration 072 asserts its OWN partition set rather than trusting the loop ok 15 - migration 082 creates an accounts-FK table, and the scrub + leak check both carry it ok 16 - the scrub and the user wipe delete the SAME per-wallet cursor prefixes ok 17 - every CODE-HEADER copy of the wipe-on-reset prefix set stays in step with the statement ok 18 - the user wipe drives its DELETE and its survivor report off ONE list ok 19 - the user wipe clears the derivation queue the scrub truncates, for every wallet no account holds ok 20 - the user wipe refuses a running ledger worker, by the worker's own lock, before it reads anything ok 21 - a partial delete selects every per-wallet record by the wallet's own segment of the scope ok 22 - 082 and 083 carry neither migration-runner tag anywhere, prose included ok 23 - 082 splits the raw_events CHECK swap and leaves the VALIDATE to its own later file ok 24 - 082 widens the snapshot CHECKs under BOTH generations of their names ok 25 - 082 asserts its own partition set, before anything depends on it ok 26 - 083 records the re-book reconstruction it cannot recover twice ok 27 - 083's re-book rows record the repair that already ran, not surviving BTC-unit values ok 28 - the scrub deletes wallet-token coverage rows, scoped to the stream and never the table ok 29 - the reseed leak-checks the wallet-token coverage rows, and only those ok 30 - the second per-wallet family, the native-ether feed's rows, is scrubbed and leak-checked too, and its marker kept (issue \#966) ok 31 - the rollout-marker convention is SCOPED in both copies, and every stream is classified # tests 31 # pass 31 # fail 0 # ── REVIEW ROUND 1 (head after 0409322) ── === R1-B1: the deadline as a transient failure again (nothing written), not a cap $ node --import tsx --test --test-name-pattern="W7b" src/lib/portfolio/prewindow-entry-receipts.test.ts --- RED (mutation applied), exit 1 not ok 1 - W7b the deadline is a cap: a holding found before it is kept, every holding still open gets beyond-time # tests 1 # pass 0 # fail 1 --- GREEN (as committed), exit 0 ok 1 - W7b the deadline is a cap: a holding found before it is kept, every holding still open gets beyond-time # tests 1 # pass 1 # fail 0 === R1-B2: the acquisitions cap stored as a call-cap hit $ node --import tsx --test --test-name-pattern="W3c" src/lib/portfolio/prewindow-entry-receipts.test.ts --- RED (mutation applied), exit 1 not ok 1 - W3c more acquisitions than the cap: its own verdict, beyond-acquisitions, not a call-cap hit # tests 1 # pass 0 # fail 1 --- GREEN (as committed), exit 0 ok 1 - W3c more acquisitions than the cap: its own verdict, beyond-acquisitions, not a call-cap hit # tests 1 # pass 1 # fail 0 === R1-keep: a cap verdict walked again whenever any cap is raised, and beyond-time never retried $ node --import tsx --test --test-name-pattern="the keep rule" src/lib/portfolio/prewindow-entry-receipts.test.ts --- RED (mutation applied), exit 1 not ok 1 - the keep rule: each cap verdict stands until ITS cap is raised; beyond-time also until the retry period passes # tests 1 # pass 0 # fail 1 --- GREEN (as committed), exit 0 ok 1 - the keep rule: each cap verdict stands until ITS cap is raised; beyond-time also until the retry period passes # tests 1 # pass 1 # fail 0 === R1-M2w: the walk skips outflows (a pre-window sale is not read) $ node --import tsx --test --test-name-pattern="W11" src/lib/portfolio/prewindow-entry-receipts.test.ts --- RED (mutation applied), exit 1 not ok 1 - W11 a partial sale before the window: the purchase and the sale, the sale an unlinked reduction with no value # tests 1 # pass 0 # fail 1 --- GREEN (as committed), exit 0 ok 1 - W11 a partial sale before the window: the purchase and the sale, the sale an unlinked reduction with no value # tests 1 # pass 1 # fail 0 === R1-M2b: the receipts inside the law's endpoint netted again (beforeLaw removed) $ node --import tsx --test --test-name-pattern="E[78]" src/lib/portfolio/v2/prewindow-entry-basis.test.ts --- RED (mutation applied), exit 1 not ok 1 - E7 a partial sale before the window: the surviving share of the purchase's gap, dated at the purchase, identity exact not ok 2 - E8 two purchases blended before the window, one read from the fill and one estimated: the average entry, estimated, identity exact # tests 2 # pass 0 # fail 2 --- GREEN (as committed), exit 0 ok 1 - E7 a partial sale before the window: the surviving share of the purchase's gap, dated at the purchase, identity exact ok 2 - E8 two purchases blended before the window, one read from the fill and one estimated: the average entry, estimated, identity exact # tests 2 # pass 2 # fail 0 === R1-M2r: the read seam attaches nothing (served partial-sale entry) $ node --import tsx --test --test-name-pattern="A1c" src/lib/portfolio/prewindow-entry-read.test.ts --- RED (mutation applied), exit 1 not ok 1 - A1c a partial sale before the window: At entry is the surviving 70% of the purchase's gap, dated at the purchase # tests 1 # pass 0 # fail 1 --- GREEN (as committed), exit 0 ok 1 - A1c a partial sale before the window: At entry is the surviving 70% of the purchase's gap, dated at the purchase # tests 1 # pass 1 # fail 0 === R1-m1: an adjustment at or below the opening's block admitted $ node --import tsx --test --test-name-pattern="A3b" src/lib/portfolio/prewindow-entry-read.test.ts --- RED (mutation applied), exit 1 not ok 1 - A3b a set is not attached where anything but the opening sits at or below its block (an adjustment included) # tests 1 # pass 0 # fail 1 --- GREEN (as committed), exit 0 ok 1 - A3b a set is not attached where anything but the opening sits at or below its block (an adjustment included) # tests 1 # pass 1 # fail 0 === R1-B2r: the no-age note only for the call and wrap limits $ node --import tsx --test --test-name-pattern="A2" src/lib/portfolio/prewindow-entry-read.test.ts --- RED (mutation applied), exit 1 not ok 1 - A2 the dashes: a transfer in keeps the predates dash; a lookup limit says which, with the age only where established # tests 1 # pass 0 # fail 1 --- GREEN (as committed), exit 0 ok 1 - A2 the dashes: a transfer in keeps the predates dash; a lookup limit says which, with the age only where established # tests 1 # pass 1 # fail 0