Skip to content

Read the joined-turn test's reply draft from stream.json - #3431

Closed
max-sixty wants to merge 2 commits into
mainfrom
agent-a505a170aacb394ae
Closed

max-sixty wants to merge 2 commits into
mainfrom
agent-a505a170aacb394ae

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Main's test job fails in tests/model/test_codex_app_server.py::test_a_turn_that_shares_a_user_message_leaves_the_delivery_owed (all four cases) and lint flags F821 write_record (run).

The cause is a semantic conflict: #3380 landed from a base older than #3383 and #3384. Its new test still read and aged the reply draft in status.json, which #3384 moved to stream.json (hence KeyError: 'status.json'), relied on a write_record import the file never had, and sent a turn/started without the status field #3383's schema check requires (the teardown errors).

The test now reads and ages the draft in stream.json and sends a schema-valid turn/started. Its assertions are unchanged, so it still checks what #3380 protects: a delivery turn that shares a user message holds its reservation mid-turn with nothing owed at Stop (also after a dropped connection and an aged draft), posts none of the shared answer, and leaves the update owed (interrupted) or offered again as a correction (completed). With codex._user_input stubbed to False, all four cases fail.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 2 commits October 20, 2026 22:30
#3380 landed from a base older than #3383 and #3384, so its new test
still read and aged the reply draft in `status.json`, which #3384 moved
to `stream.json`, never imported `write_record`, and sent a
`turn/started` without the `status` #3383's schema check requires.
The test now reads and ages the draft in `stream.json` and sends a
schema-valid `turn/started`; its assertions are unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#3427 already contains the same repair to tests/model/test_codex_app_server.py (the only difference is object-key order in the mock turn/started payload), and its test check has passed. Keeping both open risks landing the same change twice. I’d close this PR in favor of #3427.

@max-sixty

Copy link
Copy Markdown
Owner Author

Superseded by #3427, which landed the same repair. > This was written by Claude Code on behalf of max-sixty

@max-sixty max-sixty closed this Oct 21, 2026
max-sixty added a commit that referenced this pull request Oct 21, 2026
Keep Web Awesome's controls while removing Leaf-owned integration
machinery. Load its public theme through the existing CSS build, map
Leaf's palette at the document root so upstream derived tokens use it,
and deliver token/part overrides through the existing shared
document/shadow stylesheet. This removes the theme parser, virtual
JavaScript theme module and dynamic stylesheet registry.

Replace the custom transition engine and AST rewriting with a small
guard for the reproduced select reopening race. Tooltip transitions
remain unmodified, preserving the completion events Web Awesome's copy
button consumes. Upstream keeps animation and public API ownership;
unused Boolean cancellation settlement is removed. Keep the existing
documentation-comment patch that prevents reconnecting controls from
accumulating nodes.

Also remove the partial schema-completeness interpreter from
exact-format record reads and unused persisted dependency edges from
revision resources. Current-format malformed records now fail at use
rather than silently reading as absent; resource capture still follows
the full dependency closure.

Validation: browser build and `pnpm run check`; changed-file lint;
focused Python model/process coverage; focused normal/reduced-motion
select reopening, root palette customization, light/dark menu contrast,
typography and focus in the document and declared shadows. An
independent browser task exercised copy and command search. Matched menu
and screenshot-control captures are byte-identical. Vendor/generated
line changes are excluded from maintained-code savings.

The joined-turn Codex fixture failures and its undefined `write_record`
are inherited: the exact failing case reproduces on base `80bb050e3`,
with its original record reader, and appears in [main
CI](https://github.com/max-sixty/leaf/actions/runs/39542395592).
Existing repairs are tracked in
[#3431](#3431) and
[#3427](#3427).

> _This was written by Codex on behalf of max-sixty_
@max-sixty
max-sixty deleted the agent-a505a170aacb394ae branch October 21, 2026 06:27
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.

2 participants