Repository navigation
Replace delivery recovery caveats with receipt and ownership guarantees - #2248
Conversation
Use maintained dependencies for established capabilities, including prototypes, while retaining native platform and standard-library reuse. Keep browser builds in Leaf's development and release pipeline so consumers receive ready assets.
leaf-agent
left a comment
There was a problem hiding this comment.
The test landing gate is red at 136e195. The wait change leaves several existing interaction tests calling leaf wait <page> as their implicit claim; the new command correctly reports that this session no longer owns those pages. The real CLI walkthrough in test_each_case_of_an_event_is_told_what_the_snapshot_shows reproduces this locally. Those fixtures need an explicit claim before the wait while retaining the new observation-without-acquisition coverage.
The gate also fails test_archived_abandonment_recovers_a_late_final_from_paginated_history: it still expects a plain Offering to survive abandon_uncertain_delivery, but this diff now abandons it. The test needs to exercise the intended starting-offer recovery path under the new transition. The changed hook and harness text also leaves recorded snapshots stale. Failing test job.
CI test gate failed on the reviewed commit; interaction tests and snapshots need updating for the new delivery contract.
Named waits observe existing ownership, so delivery fixtures now claim at their acquisition boundary. Keep explicit no-acquisition coverage and exercise archived recovery after an uncertain provider start. Refresh the changed receipt and Stop protocol snapshots.
…fix stale facts the prose survey found (#2329) Gives the user's input and the agent's reports one name each, **update** and **report**, and fixes stale facts and broken sentences that a repository-wide prose survey found. **User input is an update.** The glossary and UI already called the user's input an update, but agent-facing text, code and the site had drifted to "move" (and the site to "feedback"), so one reference said "delivered updates" and "user move" for the same thing. Shipped instructions, the delivery `handling` text in `registry.json`, CLI and hook output, docstrings, sidecar contracts, runtime comments and `docs/how-it-works.html` now say "update"; where a sentence is about a widget's input it says "action", after the event kind. Identifiers follow: `delivery_owed_updates`, `active_updates`, workflows' `page_action`/`thread_action`. The `q` walk labels a widget handed back to the user "Update" rather than "Move". "Move" stays where it means relocation (board cards, focus, anchors, geometry). The glossary's Update row names move, feedback and input-as-a-count-noun as rejected synonyms. **Worker and agent reports are reports.** Code also called the agent's and workers' reports "updates", the same word as the user's input. They are now reports throughout: `runtime/updates.js` → `runtime/reports.js`, `updateSequence`/`watchUpdates` → `reportSequence`/`watchReports` (exported from `widget-api.js`), the served view field `updates` → `reports`, the x-state flag `update: true` → `report: true`, and the recorded `meaning.state.update` key → `meaning.state.report`. A report outranked by a newer one has disposition `outranked` (was `standing`, a word the glossary reserves for the user's position). The agent's narration is a "progress message" (`threads.md` "Progress messages", the fold label "Previous progress messages"). Visible labels: the Page Map kind "Reported state", lf-activity's "Show N new", the Atlas "Show latest". The committed example and fixture logs carrying the recorded key are regenerated; page logs written before this change are not migrated (AGENTS.md, Stage). **Stale facts and broken sentences**, each checked against the code: - `harness-claude-code.md` and `harness-pi.md`: the sentence about a large delivery's `leaf delivery read` pointer was ungrammatical. - `page-storage.md` named the delivery format `leaf-delivery-v3`; it is `delivery.DELIVERY_FORMAT` (v5). `docs/how-it-works.html` now says the envelope's `format` field names its version rather than copying the number. - `tests/AGENTS.md` cited a nonexistent `version check --render` command and an old Node floor. - `assets/AGENTS.md` had the boot order backwards (`prepaint.js` runs before `bootstrap.js`), a wrong overlay path, and a paragraph repeated 25 lines later. - `module-authoring.md` still said playback keeps `requestAnimationFrame`, contradicting its own `nextAnimation` rule, and listed two durations `widget-api.js` does not export. - `leaf page claim --help` described pre-#2248 `leaf wait`. - `docs/how-it-works.html` claimed to list every command family but omitted `leaf file bind`. - `event-batches.md` dropped a duplicate `answer` bullet and a tagline whose literal reading is false; `conversation-loop.md` is retitled "Conversation loop"; smaller fixes in `evals/README.md`, `page-checkpoints.md`, package instructions, `notes/agent-usability-evals.md` and `examples/triage-board.html`. Regtest snapshots for delivery and acknowledgement text are re-recorded for the new wording; `docs/registry.html` and the example 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]>
Leaf could mark pointer input picked up before the reader received it, take ownership during an ordinary wait, and lose a rejected automatic final after the provider turn ended. Stop recovery also depended on output the reader might no longer have.
Delivery reads now provide bounded, lossless parts and an explicit acknowledgement. Waiting observes ownership; claiming is explicit. Stop recovery carries immutable input and response references, and rejected automatic finals return the diagnostic through the existing delivery path while retaining the original obligation and acquisition. Late callbacks and correction retries cannot take over successor work.
The harness contracts use the same receipt and ownership rules.
event-batches.mdis 44 lines shorter, and one existing eval now exercises complete reading and observation without acquisition.Validation: focused real CLI, hook, queue adapter, App Server reconnect, hosted correction, ownership-transfer and lifecycle regressions; snapshots and pre-commit checks.