Repository navigation
Publish an explainer of the event log at /event-log/ - #1091
Merged
Merged
Conversation
Since #1078 moved lf-activity's wording to the server, GestureWords named an element only from the gesture's document, so a pick of an option the user added read as its minted id ("You chose “ship-option-8ed2…”"). GestureWords now reads each `creates` action's words once and uses them wherever a gesture names that child: `name` for the history row, and `says` for deliveries and the transcript, where the created child now stands in for its enclosing widget. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A product page explaining how widget verbs become log records and how the fold turns them into state: the layers, lf-options' declaration with notes, a log captured from the page's own specimen, the three ways an action is taken back, agent-written verbs, and the change feed. A live specimen with an lf-activity feed lets the reader produce the same log. Two tests keep it from drifting: one replays the captured commands through the append door on the specimen's markup and requires the stored records to match what the page shows, printing the records to paste when they do not; the other holds the annotated declaration to lf-options' registry entry and the verb table to every declared x-state verb. How it works and Extending link to it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
reviewed
Sep 24, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The new created-child wording can misstate what an earlier gesture named when an option ID is reused. It also reports raw Markdown where the option displays formatted words. The explainer points readers to the contract file for external data values. Details are inline.
GestureWords kept one id→words map for the whole log, so an id an undone add freed and a later add reused gave its later words to earlier gestures, and it read the raw detail text, so an inline-Markdown option showed its syntax. A gesture now reads the latest creating action at or before it, through `passages.created_words`, which applies the child's `x-text-format` as an added child renders it. The version gate's echo check reads the same helper, and the history's add row goes through the same reading. The event-log page now names `data/<source>.json` as where an external source's value lives. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Sep 24, 2026
max-sixty
added a commit
that referenced
this pull request
Sep 24, 2026
…its explainer role (#1095) Refinements from a review of #1075 (`leaf events --follow`) and #1091 (the event-log explainer). **The follower ends when its log is replaced.** - Before this, `follow_events` kept its byte offset across an inode change. A log renamed into place stalled the follower silently, and a longer replacement would have been printed from the middle under the wrong seqs. - It now remembers the inode of the file it first opened. It ends with the existing `<log> is gone` error (exit 1) when the inode changes, when the file is shorter than what was read, or when the file vanishes between the stat and the open. - `test_events_follow_ends_when_its_log_is_replaced` covers it and times out without the guard. **Startup skips parsing what `--after` excludes.** The lines at or before `--after` are counted, not parsed. With `--after 199999` on a log of 200k events, the first event arrives in 0.04 s at 82 MB, down from 0.43 s at 390 MB. **`events.md`.** - "Following the log" moves after the paragraph on dependency identities and `meaning.creates`, which #1075 had cut off from Admission. - It drops the "public format" promise, which AGENTS.md "Stage" contradicts, and keeps the rule that a reader drops fields and kinds it does not recognise. - It states the exit-1 case. **Page tests.** - The captured log's `lf-note` anchors are now derived from the record layout and compared with the page. When regenerated records shift lines, the test fails and prints the values to use. - The verb-table test now compares the Unit and Record columns as well as tag and verb. **Page prose.** - The reports and follow sections are cut to one sentence of mechanism each, plus a link to the rule, so they no longer copy `packages.md` and `events.md`. - The eyebrow says "how it works". - The Layers table no longer uses "envelope". It names what the door adds, and it lists the log's kinds by group. **Tests.** Everyday suite: 1359 passed. `scripts/site.py` builds 84 pages. `leaf version check --render` is clean in light and dark. 🤖 Generated with [Claude Code](https://claude.com/claude-code) > _This was written by Claude Code on behalf of max-sixty_ Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Sep 24, 2026
…rb's writer once (#1101) This finishes cut-overs that #1076, #1082 and #1091 left half done, as found in a review of those PRs. **`meaning.scope` replaces `meaning.document`.** - Before, "document" named two shapes: the stored `"page" | "thread"` and the `{kind, revision}` identity that requests, lifecycle seats and the runtime use. - Admission now stores `meaning.scope`. - One helper, `events.document_identity(scope, revision)`, builds the identity. `event_document`, admission's request check and the served request readings all use it. The two direct reads of `meaning["document"]` now go through it too. - *Contract:* the `$events` meaning schemas and `handling` `when` clauses, `events.md`, the seed logs, three snapshots and the delivery sample in `how-it-works.html` are updated. Each snapshot diff is only the rename. **One word for deferred payloads.** The contract already said `records.deferred`. The door and the API now say it too: - `data_fragment` → `deferred_value`; - `/api/data` → `/api/deferred`; - `loadDataFragment` → `loadDeferred`; - the error strings; - `packages.md` and `page-storage.md`. **The writer is resolved once.** - In Python, `state_specs(entry, writer=…)` filters by writer, and `verb_writer(spec)` answers for one verb. The five call sites that restated "absent means user" use them. - In the browser, `registry.adoptRegistry()` sets `writer` on every `x-state` verb when the vocabulary arrives, so `stateSpecs`, widgets and the command hub read one value. **Created children.** - `gesture_words` and the version gate take a created child's tag from `meaning.creates` rather than re-deriving it. - `passages.shown_words` is now the one reading of a created child's `x-text-format`, used by passage capture, the gate and gesture wording. **`example_data.captured_value`** refuses a `lines` range on a `unified-diff` capture instead of silently ignoring it. **The event-log page.** Its captured records are regenerated for `scope`, the note anchors follow them, and the note on `meaning` names `scope`. **Tests.** Everyday suite on the merge with main: 1364 passed, and one failure under parallel load that passed alone. `npm run test:runtime`: 91. `check:browser` clean; `test:browser` 64. A nightly subset over diff, data, deferred, request, receipt, create, writer and report passed 303. 🤖 Generated with [Claude Code](https://claude.com/claude-code) > _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.
This adds an explainer of the event log at
docs/event-log.html, published at/event-log/. It shows how a widget's verb becomes a logged event and how the fold turns the log back into state. The markdown contracts stay the rules: the page explains at explainer depth and links toevents.md,packages.md"User state",/registry/#x-stateandlayer-registry.md.Sections.
events.jsonl→ fold).lf-specimenwith an options group and a feed of the specimen's own log, plus a walkthrough: add an option, pick another, presszthree times.lf-optionsdeclaration with notes:x-state, the[widget, unit, verb]coordinate, andx-awaits.answered. A collapsed table lists every declared verb.leaf report, thenleaf events --follow, and how the log differs fromdata.json.The example records come from a real run. I drove the specimen's markup in Chrome and copied the
leaf eventsoutput verbatim. Two tests keep the page from drifting from the code:test_the_event_log_page_shows_the_records_the_door_writesreplays the same commands through the append door. It requires the stored records to equal what the page shows, apart fromidandts. When they differ, it prints the new records ready to paste.test_the_event_log_page_quotes_the_registryholds the annotated declaration tolf-options' registry entry, and the verb table to every declaredx-stateverb.Links.
PRODUCT_ROUTESgains the page, so it is in the sitemap. It is linked the way/registry/is: fromhow-it-works.htmltwice and fromextending.html's reference list. The site nav stays at four entries.Fix found on the way. The feed named a pick of a user-added option by its generated id ("You chose “ship-option-8ed22a9d…”").
GestureWordsonly looked in the document. It now takes a created child's words from the latest action that created it at or before the gesture described, so a reused id never lends later words to an earlier gesture. It reads them throughcreated_words, the one reading of a child'sx-text-formatthat the version gate also uses now, so markdown words read as formatted text. This also fixes deliveries and the transcript. A contract test covers the reuse and markdown cases.Tests. Everyday suite: 1358 passed.
leaf version check --renderpasses in light and dark.scripts/site.pybuilds 84 pages. The page and contract test files pass after the review fixes (302). I didn't run the site through Wrangler.🤖 Generated with Claude Code