Skip to content

trace: each edge token gets its own file, so an earlier step opens the token then - #44

Merged
endrix merged 1 commit into
mainfrom
fix/edge-token-per-token
Oct 2, 2026
Merged

endrix merged 1 commit into
mainfrom
fix/edge-token-per-token

Conversation

@endrix

@endrix endrix commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

A token that is not a path is written to work/edge-tokens/ for the overlay and the queue trace to point at.

The bug. There was one file per queue (<queue>.json), rewritten by every token. So every step's lastToken for an edge pointed at the same file, and opening it at an earlier step in the IDE's stepper showed the run's final token. Follow-up to #43 and endrix/dialogram#61, which made stepping back redraw the edges.

The fix. Each token now gets its own file, numbered per queue (<queue>__<n>.json, counted in FifoPlan.edge_token_counts). Paths and File tokens are unchanged; they were never copied.

Test. test_the_last_token_at_each_step_is_the_token_then opens each step's last token on an edge and expects [1], [2], [3] in turn. It fails against the previous code. Full suite: 693 passed, 9 skipped.

https://claude.ai/code/session_015VK7fH1c4aKbexnq2QcuKU

…e token then

A token that is not a path is written to `work/edge-tokens/` for the
overlay and the queue trace to point at. There was one file per queue,
rewritten by every token, so every step's last token on an edge pointed
at the same file -- and opening it at an earlier step in the IDE's
stepper showed the run's final token. Each token now gets its own file,
numbered per queue (`<queue>__<n>.json`).

Claude-Session: https://claude.ai/code/session_015VK7fH1c4aKbexnq2QcuKU
@endrix
endrix merged commit 95b190d into main Oct 2, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant