Skip to content

Hold idle and the Stop hook to one set of owed moves, and read the layer's registry once - #1221

Merged
max-sixty merged 4 commits into
mainfrom
consolidate-blocking-obligations
Sep 26, 2026
Merged

max-sixty merged 4 commits into
mainfrom
consolidate-blocking-obligations

Conversation

@max-sixty

@max-sixty max-sixty commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner

leaf status idle and the Stop hook each decided which acknowledged user
moves still block the agent, and only the hook knew the two moves another
turn answers: one a Codex carrier queued for a later turn (#459), and a
turn answer the open turn has finished, which a live carrier commits once
the turn ends (#1080). So a turn that queued a batch could end but was
refused leaf status idle over the same move.

activity.blocking_obligations(state, carried=) is now the one rule, read
by both; session-lifetime.md states it once. The prompt hook opens
activity.acknowledged_obligations, the queued ones included, as before.

Two registry readings vendoring.py restated now come from
registry/storage.py:

  • The recorded $layer.packages a bare leaf page init re-vendors with is
    read through layer_packages, whose check layer_metadata shares, rather
    than a copy of that rule with its own message. It reads the file as JSON
    and checks only the packages, so a page whose other $layer fields or
    registry entries are broken can still be re-vendored, which is the remedy
    layer_metadata's errors name
    (test_a_bare_re_vendor_replaces_a_broken_vendored_registry).
  • The candidate vocabulary page init checks a re-vendor against is
    composed by compose_candidate(page_dir, layer, widgets), the function
    read_page_registry composes the vendored layer with, rather than a
    second composition over the incoming layer.

session._page_stamp is renamed _page_reading_or_none: it wraps
page_reading, and presence._page_stamp is a different stamp.

Behaviour that moved:

  • leaf status idle accepts a page whose only owed move is queued for a
    later turn, and (with a live carrier) one whose turn answer the open turn
    has finished (test_idle_and_the_stop_hook_hold_the_agent_to_the_same_moves).
  • A malformed $layer.packages on re-init reports the registry reader's
    message.
  • test_a_completed_stream_answers_its_event_even_when_the_reply_address_differs
    asserts through blocking_obligations, including the dead-carrier case.

🤖 Generated with Claude Code

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

`leaf status idle` and the Stop hook each decided which acknowledged user
moves still block the agent, and only the hook knew the two moves another
turn answers: one a Codex carrier queued for a later turn (#459), and a
`turn` answer the open turn has finished, which a live carrier commits once
the turn ends (#1080). So a turn that queued a batch could end but was
refused `leaf status idle` over the same move.

`activity.blocking_obligations(state, carried=)` is now the one rule, read
by both; `session-lifetime.md` states it once. The prompt hook opens
`activity.acknowledged_obligations`, the queued ones included, as before.

The recorded `$layer.packages` a bare `leaf page init` re-vendors with is
read through `registry.storage.layer_packages`, which `layer_metadata` also
uses, rather than a copy of that rule with its own message. It reads only
the packages, so a page whose other `$layer` fields are broken can still be
re-vendored, which is the remedy `layer_metadata`'s errors name.

`session._page_stamp` is renamed `_page_reading_or_none`: it wraps
`page_reading`, and `presence._page_stamp` is a different stamp.

Behaviour that moved:
- `leaf status idle` accepts a page whose only owed move is queued for a
  later turn, and (with a live carrier) one whose turn answer the open turn
  has finished (`test_idle_and_the_stop_hook_hold_the_agent_to_the_same_moves`).
- A malformed `$layer.packages` on re-init reports the registry reader's
  message.
- `test_a_completed_stream_answers_its_event_even_when_the_reply_address_differs`
  asserts through `blocking_obligations`, including the dead-carrier case.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
leaf-agent previously approved these changes Sep 26, 2026
max-sixty and others added 2 commits September 26, 2026 09:54
`page init` checked a re-vendor against the incoming layer with its own
composition of the page's declarations and widgets, beside
`registry.storage.read_page_registry`'s. Both now call
`registry.storage.compose_candidate(page_dir, layer, widgets)`, and
`widget_paths` lists a directory's widget modules for both.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty max-sixty changed the title Hold idle and the Stop hook to one set of owed moves Hold idle and the Stop hook to one set of owed moves, and read the layer's registry once Sep 26, 2026

@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.

A bare re-vendor now refuses a broken registry entry that the re-vendor would replace.

`layer_packages` read registry.json through `read_registry_declarations`,
which refuses a malformed entry, so a bare `leaf page init` could not
replace the broken vendored registry it exists to repair. It now reads the
file as JSON and applies only the packages rule.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit fe84f87 into main Sep 26, 2026
5 checks passed
@max-sixty
max-sixty deleted the consolidate-blocking-obligations branch September 26, 2026 17:25
max-sixty added a commit that referenced this pull request Sep 27, 2026
The concept survey's drifted duplicates now each have one owner
(#1214–#1221, #1223, #1228, #1231, #1235, #1244, #1245, #1247, #1250,
#1251, #1254, #1260), so the survey note never lands. What it found and
nobody has taken becomes `TODO.md` entries:

- **Shared definitions** (new section under Next): re-addressing
resource references in one pass instead of `http.py`'s regex scopers and
three head composers; `tests/render_harness.py` `told()` beside
`pageReadiness`'s `data` and `log` stages (#1250), which answer the same
question; Python still naming a thread's identity a root
(`thread_roots`, `FrozenThreadReading.roots`) now that the runtime keys
threads on the served `id` (#1260).
- **Requests**: the existing "Decide whether requests earn their weight"
entry now says kept requests need one owner for seat availability, which
four runtime modules restate.
- **Implementation candidates**: the unresolved-gesture ledger as one
state machine, deferred until a change has to touch it, since nothing
there has drifted and it is the hottest race path.

The survey's small undrifted items and its list of deliberate splits are
dropped: none has drifted, and the splits are intended.

🤖 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]>
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