Repository navigation
sminos plane: mark the rows off the live chain in DX4 (7.179.0) - #239
Merged
Merged
Conversation
The desk drew every row a transcript holds, so a prompt sent again after an Esc showed twice and a steer under an undone turn showed as read. The engine reads only the chain from the leaf; each subscription now follows its transcript's chain (Chain: built with the index, then fed each row as it is released) and marks what is off it: `offChain` on the snapshot and every `rows` page, and on a `row` that took rows off (with `onChain` for rows it put back). A tool result joins while its issuing assistant is on the chain, so parallel results and rows delivered between a call and its result stay on; any other row not parented on the leaf starts a branch.
…per row Review of 9a2c1b0: a branch running back through rows another branch took off restored only its own ancestry, leaving off the response's other calls and their results, which the engine's loader recovers with any one of them; and a cascade of waiting rows could report a row off, on, and off again. The rejoin now recovers each rejoined row's response siblings and results, and `add` reports each row's net move once, in the order it first moved.
…written Re-review of d291ea0: recovered response rows were appended after the rest of the rejoined ancestry, so a later branch cut at a recovered result left the turn after it on the chain. The rejoined set now joins in file order, as its rows first stood.
…on that waits for the branch)
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.
The desk drew every row a transcript holds, in file order, so it drew dead branches: the owner's prompt sent again after an Esc showed as two bubbles, and a steer appended under a turn an Esc or a /rewind undid showed as if the session had read it. The engine reads only the chain from the transcript's leaf; the machine holds the whole file, so the session plane now marks the rows off that chain in DX4 (the general fix MAWS's tech-debt row for DC9 named).
What changes
skills/sminos/scripts/sminos_plane.py: aChainper transcript follows the engine's writes row by row and knows which rows are on the live chain. Each transcript's shared chain is fed with its index on the worker; a build hands the subscription a copy as of its offset, and the subscription feeds it each row as it releases it, so every mark is read off the subscription's own chain in message order.DX4, additive (an older desk ignores the fields and keeps working):
snapshot:offChain: string[], the uuids among itsrowsoff the chain (always present, possibly empty).rowspage:offChain: string[], the same for the page's rows (marked on the uplink's thread from the subscription's chain, so a page never contradicts arowsent before it).row:offChain?: string[]andonChain?: string[], present only when non-empty: the rows this row took off the chain (the rows a branch it starts left behind, oldest first, and itself when it is written off the chain) and the rows it put back on.The chain rules (the engine's, 2.1.300)
A row's parent is normally the leaf. A tool result names its issuing assistant (
sourceToolAssistantUUID), so parallel calls' results, and anything delivered between a call and its result (a steer, a task notification), sit off the leaf's ancestry while the engine holds them: a tool result joins while its assistant is on the chain and moves nothing else. Any other row whose parent is not the leaf starts a branch: the rows after the branch point go off, except a tool result whose assistant stays on and an assistant of a response that does (the loader'satorecovery); rows a branch had taken off come back if a new branch runs through them. A tool result whose assistant is off is off too. A row whose parent is not placed yet waits (the engine writes a child a few ms before its parent around a session's start); a null parent (a compaction's boundary) continues the chain, so pre-compaction history stays drawn. Progress rows pass through; a main transcript's sidechain rows are never marked.Checked against 1,500 transcripts on this machine (667k rows, 2.6 µs a row): 870 branches took 9,987 rows off, every one a re-sent prompt, a /rewind, or a response the engine dropped when a message reached its turn; after each file's last compaction the final chain equals the engine loader's reconstruction (ancestry, response-group recovery, tails, leaf descendants) except one deliberate divergence: a plain user row delivered between a call and its result stays on (the live engine read it; the loader drops it on resume).
Tests
tests/sminos/test_session_plane.py:ChainRules(a re-sent prompt, a steer that stays on through its turn and goes off with it, parallel results kept, a dropped response, rows ahead of their parent, compaction, a late result of an undone call, a branch back, progress and sidechain rows, an independent copy) andOffChainthrough a subscription (snapshot and pages marking an undone turn, a rewound prompt beside parallel results, a live rewind whose re-sent prompt carries the retraction through the bridge's release order, rows past the cut carrying their own marks, an agent's transcript). All fail on main. Full sminos suite 1928/1928 locally; ci-gate GREEN on 686cf6e (https://github.com/SSFSKIM/doperpowers/actions/runs/39124943916).Review
doperpowers:reviewer-medium, three bounded rounds. Round 1 found two real defects in rejoin paths (a branch running back through rows another branch took off restored only its own ancestry, not the response's other calls and results the loader recovers; a waiting-row cascade could report intermediate moves): fixed in d291ea0, each pinned by its reproduction. Round 2 found the recovered rows rejoining out of order: fixed in 3e64f1d (they rejoin in file order), pinned. Round 3: no material findings. No branch has ever put rows back on across the 1,500 local transcripts, so those paths are rare.Known gaps (docs/doperpowers/TECH-DEBT.md)
restore). The only trace, a zero-leaf explicitlast-prompt, names no cut.No bridge change: the mod's row notices carry no parent, and need not, since the plane reads each row's
parentUuidfrom disk and releases a row only once it is there.The desk side is MAWS's PR (see there).