Repository navigation
Finish the conversation naming cutover: Ask field, host receipts, failure route - #1010
Merged
Merged
Conversation
…lure route Asks now carry `conversation` from their producer in `asks.py`, so the key translation in `agent_state` is gone and the browser wire Ask, `AskRecord`, and packages.md use the same name. A host that gives up on a request built its failed receipt by hand beside `cmd_receipt`, because that writer bundled CLI concerns (text argument, session identity, its own transaction) with the event shape. Both now build the event through `requests.receipt_event`, and the host passes its `failure` code, which the registry admits on a failed, agent-authored receipt. A host failed receipt is now distinguishable from the agent's own. The Worker's failure door `/_leaf/agent/reply` is `/_leaf/agent/fail`, across the Worker, the website adapter, and their tests and README. Behavior moved in tests: the hosted turn-failure case asserts the receipt's `failure`, and the Worker failure cases pin the route URL. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Sep 23, 2026
max-sixty
added a commit
that referenced
this pull request
Sep 23, 2026
`test_opening_threads_acknowledges_the_first_visible_answer` failed once on #1010's first CI attempt with no `read` event in the log. The cause is the harness wait, not the runtime. `round_trip` treated a trip as over once the outbox held no attempt. Some posts skip the outbox: a bookkeeping event such as `read` (#987, `delivery.js`), the page's own `error` report, and a media upload (`layer-client.js`). So `sending` around a gesture whose event is a read returned as soon as the read's POST went out, and the log read behind it raced the server's append. Holding the read's POST for 300ms reproduces the CI failure every time (`IndexError` on `_read_events(...)[-1]`). 80 copies under `-n 12` did not reproduce it on a Mac. - `round_trip` also requires every issued post to have ended (`acked == sends`), through a `heard_back` predicate on one ledger reading. The outbox condition still covers a failed post that the page will retry. - The read-state test holds the read before the server appends it, so every run hits this timing. While the read is held, it asserts that the ledger does not yet count as heard back. With the old predicate, that assertion fails on every run. - Three paint-failure tests (`test_a_failed_ask_banner_paint…`, `test_a_failed_ask_list_paint…`, `test_a_failed_thread_list_update_retries…`) held `/api/event` and released only the first request. The page's own `error` report of the injected failure was also held and never ended. The stricter `round_trip` exposed this. Those tests now wait with `holding` for both requests, then release both. `traffic.js`'s header, the `round_trip` comment, and `tests/AGENTS.md` now describe the wait as both conditions and list the posts that skip the outbox. > _This was written by Claude Code on behalf of max-sixty_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Sep 26, 2026
…af thread` (#1193) Leaf used two words for one thing: `conversation` named the data (ids, the delivery envelope, Ask records, `leaf conversation …`, `conversation.py`, `runtime/conversation/`), and `thread` named the UI (the Threads panel, thread cards, help text). This settles on **thread** everywhere. It reverses the direction #1010 took; the user chose it. ### Commands `leaf comment`, `leaf reply`, `leaf edit`, `leaf resolve` and the `leaf conversation` group become one group: | Was | Now | |---|---| | `leaf comment` | `leaf thread open` | | `leaf reply` / `edit` / `resolve` | `leaf thread reply` / `edit` / `resolve` | | `leaf conversation read` / `title` / `summarize` | `leaf thread read` / `title` / `summarize` | | `leaf events --conversation` | `leaf events --thread` | Arguments and behaviour are unchanged, and the old names have no alias. ### Data and code - **Keys:** the `conversation` field becomes `thread` (summary and title events, Ask records, page-state entries). The envelope's `conversations` becomes `threads`, and the subject, workflow and update-target kind `"conversation"` becomes `"thread"`. `browser.conversation` becomes `browser.thread`, and the event kind `conversation_title` becomes `thread_title`. - **Registry and CSS:** `x-conversation` becomes `x-thread-seat`, because `x-thread-surface` already exists. `.lf-conversation*` becomes `.lf-thread-seat` / `.lf-page-thread*`, because `.lf-thread*` is the panel's. - **Modules:** `leaf/conversation.py` → `leaf/thread.py`, `served_state/conversation.py` → `served_state/thread.py`, `assets/runtime/conversation/` → `assets/runtime/thread/`, and `references/conversation-threads.md` → `references/threads.md`. Tests are renamed to match. - **Name collisions:** four places would have put the new name on an existing `thread` name in the same scope. They are renamed: `workflows.canonical_workflows`, `semantic-news.js`, `thread/presentation.js` and `application.ts`. ### Kept on purpose `references/conversation-loop.md` keeps its name, because it covers the whole agent–user loop (banner, status, handoff), not threads. The remaining hits are plain English about an agent's chat, Codex's own context, or vendored third-party text. ### Checks - The everyday suite passes, as do the runtime folds (125), `check:browser` and `test:browser` (64), and the nightly render files the rename touches (about 1,680 tests). - One nightly render-gate test (`test_the_render_gate_holds_a_settled_slot_to_the_logs_decision`) fails on main as well. - Snapshots and the corpus are regenerated. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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.
Finishes the conversation naming cutover in three places where the old name or shape was still in use.
Asks carry
conversation.asks.pyproduced athreadkey, andagent_staterenamed it toconversationfor the agent while the browser readthread. Now the producer writesconversationand the rename is deleted. The browser wire Ask,AskRecord, the runtime readers (semantic-news.js,asks/view.js), and thewatchAsksrecord inpackages.mduse the same key, and the browser runtime bundle is rebuilt.Host failed receipts carry
failure.cmd_receiptdid three jobs: it read the CLI text argument, stamped the session identity, and opened its own transaction around building the event. The host's_fail_page_answerneeds its own identity and a recheck under the lock, so it could not callcmd_receiptand built the receipt dict by hand withoutfailure. That made a host failed receipt look the same as an agent-written one. Both writers now build the event throughrequests.receipt_event, and the host passes its code. The registry allowsfailureonly on a failed receipt with authoragent.events.md,workflows.py, and the Worker README no longer say a receipt has no field for the code.The Worker's failure route is
/_leaf/agent/fail. It was/_leaf/agent/reply, though it writes whatever failure the move's answer takes, not only a reply. The rename coversworker/src,worker/server.py, their tests, and the README.Test changes: the hosted turn-failure case now asserts the receipt's
failure, and the Worker's two failure cases check the route URL.The frozen-markup document kind
{"kind": "thread"}in eventmeaningand widget descriptors was left alone. It names a document, not a subject. The runtime'sthreadnaming for the Threads panel was also left alone, since that is the glossary's UI term.🤖 Generated with Claude Code