Skip to content

Keep "standing" for where the user is: say in force, current, open or persistent otherwise - #2699

Merged
max-sixty merged 12 commits into
mainfrom
standing-means-where-the-user-is
Oct 13, 2026
Merged

max-sixty merged 12 commits into
mainfrom
standing-means-where-the-user-is

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

In the glossary, Standing means one thing: the user holding a destination or a control inside it (a standing target, ending a standing). Across the tree "standing" was also an ordinary adjective for things that are in force, current, open or lasting ("the standing log", "a standing report", standing_approvals, --standing), which collided with that term. This rewords every such use and renames the identifiers with all their callers, leaving "standing" to mean only where the user is. The glossary gains an In force row and a line saying so.

Replacements, one word per meaning

  • not withdrawn or retracted → in force (InForce, StateProjection.in_force, approvals_in_force, the per-verb inForce); the served field keeps its name stands
  • the latest value or reading → current
  • still owed, or a surface on screen → open / active
  • a server or environment that outlives sessions → persistent (CLI --standing → --persistent, service.json "lifetime": "persistent"); always-present chrome → fixed
  • a preference → lasting; a dispatch → recurring; otherwise existing, present, in place, permanent

Behavior changes

  • leaf server start --persistent replaces --standing, and refusals and the lifetime line say "persistent".
  • One server.read_service(page_dir) now reads service.json for every caller, returning nothing unless the record has its required fields and a lifetime this Leaf knows. A record an older Leaf wrote with "lifetime": "standing" is therefore no service (root AGENTS.md, "Stage"), A server that older Leaf started still holds its lease, so leaf server stop and a re-vendor detect it from the lease, delete the record and wait for it to exit; until then server start refuses as before. A server started persistently before this change is re-served with --persistent.
  • Visible wording: "Current text matches this version", the reaction scope "On a reaction", the margin contribution key "reactions", and the eval surface action-in-force (with its metrics).

Fixes for journey tests main had broken. Editing these test files selects them, and each already failed on main:

The sweep is generated by a script of exact edits plus identifier rules, so a newer main is regenerated rather than conflict-resolved. Root AGENTS.md's maintainer section ("a standing preference", line 13) is unchanged.

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

max-sixty and others added 2 commits October 12, 2026 17:10
The glossary gives "standing" one meaning: the user holding a destination or a
control inside it (a standing target, ending a standing). The tree also used the
word as an ordinary adjective for several other things, which read as the
glossary term. Each of those now has its own word, the same in prose and in
identifiers:

- An event, action, decision, report or reaction no undo withdrew and no note
  retracted: "in force", as AGENTS.md says it ("the events still in force").
  `events.Standing` is `InForce`, `StateProjection.standing` is `in_force`,
  `standing_approvals` is `approvals_in_force`, and the application's per-verb
  `standing` list and a reaction choice's `standing` are `inForce`. The served
  event field keeps its name, `stands`.
- The latest value or reading: "current" (the current log, current state,
  current width, current base).
- Something still owed or held: "open" (an open request or ask,
  `open_reply_reservation`); a surface on screen: "open" (an open drawer, modal
  or panel); an ongoing walk, comparison or narrowing: "active".
- A server, service or environment that outlives sessions: "persistent".
  `leaf server start --standing` is `--persistent`, and service.json records
  `"lifetime": "persistent"`.
- Chrome or a status that stays on screen: "fixed" (`fixedStatusBoxes`, the
  Banner's "fixed chrome row"); a preference or instruction: "lasting"; a
  dispatch or sweep: "recurring".
- A node already there: "existing" or "present"; something a step leaves as it
  was: "in place".

The glossary gains an **In force** entry and says under "Coined terms" that
*standing* means only where the user is.

What a user or agent sees changes in three places: `leaf server start
--persistent`, the reaction scope's title "On a reaction", and the reading
eval's surface "action-in-force". The margin contribution key is "reactions".

Local variables named `standing` that held one of these values are renamed to
what they hold, and the tests whose names used the adjective are renamed with
their references. Spatial and idiomatic uses ("a panel standing over the page",
"standing in for") are not the glossary term's adjective and stay.

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

Every reader of a page's service record now goes through `server.read_service`,
which returns None unless the record has host, bind, port, enabled and lifetime,
and its lifetime is "session" or "persistent". Before, about ten sites read the
raw JSON and compared the lifetime themselves.

Behavior that changes: a record an older Leaf wrote as `"lifetime": "standing"`
used to read as a session server, so `server start --persistent` refused with
"already serving as a session server", a re-vendor treated the page as one that
does not come back, and a new serve rewrote the record as session. Now that record
is no service at all (root AGENTS.md, "Stage"): no running server is reported, a
start binds afresh, and `leaf server stop` deletes the record, which is what makes
a server an older Leaf runs over it exit.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty enabled auto-merge (squash) October 13, 2026 00:12
@max-sixty
max-sixty disabled auto-merge October 13, 2026 00:16
Whether a server runs is the serving lease's to say, not the record's. A server an
older Leaf started over `"lifetime": "standing"` holds the lease while
`read_service` reads its record as absent, and two places decided from the record:

- `restarting_server` (`page init`'s re-vendor) saw no service and left that
  server running through the re-vendor. It now stops it first, and the server
  stays stopped, since there is no lifetime this version could bring it back
  under; the note says how to serve it again.
- `cmd_stop` deleted the record, which ends that server, but reported nothing
  stopped. It now counts a held lease over an unreadable record as a running
  server.

This also corrects the previous commit's message: a start over such a record binds
afresh only once the older server has exited. While it still holds the lease,
`server start` refuses with "another server run is serving …", and `leaf server
stop` (or a re-vendor) is what ends it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty enabled auto-merge (squash) October 13, 2026 00:18

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

The reaction strip no longer removes a selected reaction.

@max-sixty
max-sixty disabled auto-merge October 13, 2026 00:19
The sweep renamed a reaction choice's `standing` to `inForce` where the thread
model writes it and where the strip draws `aria-pressed`, but the strip's press
still read `find(...).standing`, which is now undefined. Pressing a reaction the
user already had therefore asked for it on again, `setReaction` found it already
on, and nothing was sent: a pressed chip could not take its reaction back. The
press reads `inForce` now, and the sweep's rule renames every member read of
`.standing` in the reaction modules rather than only `choice.standing`.

An audit of every property-shaped `standing` left in the tree (member reads,
object keys, destructures, string keys, keyword arguments) found no other read
of a renamed field; the rest are the glossary's sense (focus readings, the
`standing` keyboard scope, `recordPlaces({ standing })`) or test fixtures.

tests/runtime/reaction-strips.test.mjs builds a strip from `tokenChoices` and
presses a chip the user has on and one they don't.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty enabled auto-merge (squash) October 13, 2026 00:22
leaf-agent
leaf-agent previously approved these changes Oct 13, 2026
…sts main had broken

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
leaf-agent previously approved these changes Oct 13, 2026
main gained #2697, #2700 and #2708. The three files that conflicted
(event_contracts.py, findings.py, work.py) take main's content with the
sweep's edits re-applied by .tmp/standing/apply.py; the "not visible under the
page's standing outcomes" message moved from work.py to findings.py, and the
script now edits it there. main added no other non-glossary "standing".

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
leaf-agent previously approved these changes Oct 13, 2026
#2710 moved thread.py's owed-response refusal into a coded finding; the sweep's
`owed` rename now targets that call.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
leaf-agent previously approved these changes Oct 13, 2026
max-sixty and others added 2 commits October 12, 2026 19:24
40c3ca1 (#2649) made decision commands wait for the page's first complete saved
reading: "Decision commands queue while saved state is loading; their owner's
availability still requires a complete reading" (module-authoring.md). The test
held every state read from before the page loaded and then pressed a suggestion's
Accept, which since #2649 stays aria-disabled until a read lands, so the click
timed out. The test was stale, not the runtime: its premise, a decision made
before any complete read, is a state the contract now rules out.

The race it guards still exists one read later. The page now takes its first read
(`CutOff(lets_through=1)`), every later read is held while the accept's send and
the undo are made, and the read that follows holds both. The assertions are
unchanged: replay leaves the authored markup, and the held send's continuation
does not repaint the withdrawn accept. Renamed from
`test_a_first_complete_read_does_not_repaint_an_already_undone_settlement`.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
No conflicts; apply.py has nothing left to apply on the merged tree.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
leaf-agent previously approved these changes Oct 13, 2026
The eight files that conflicted take main's content with the sweep's edits
re-applied by .tmp/standing/apply.py. #2336 re-indented the code under seven
entries; those entries are now line-local, so a fresh run on 4ce9bc2 applies
with no problems. Its new reads of renamed fields follow the rename: lf-suggestion
and lf-options read the application's per-verb `inForce`, and projection.py names
StateProjection's frozenset fields `absorbed` and `in_force` (with "standing" the
merge of frozen publications called `.items()` on a frozenset).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty and others added 2 commits October 12, 2026 20:22
No conflicts, and no new non-glossary "standing"; apply.py has nothing left to
apply on the merged tree.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit bb1aff1 into main Oct 13, 2026
2 checks passed
@max-sixty
max-sixty deleted the standing-means-where-the-user-is branch October 13, 2026 04:24
leaf-agent added a commit that referenced this pull request Oct 13, 2026
The board's old outbox browser case tried to send a widget action before
the first complete saved-state reading. Since #2649, actions
deliberately wait for that reading, so the test timed out before it
could exercise undo. Replace that unreachable setup with a browser check
that board and suggestion controls are unavailable while history is
offline and become available after the first complete read. This
addresses the board failure in [main CI run
38333313254](https://github.com/max-sixty/leaf/actions/runs/38333313254);
#2699 separately repaired the suggestion settlement case.

Both replacement browser cases pass. The existing action-plus-undo check
and #2699's corrected settlement check also pass, so the undo behavior
remains covered.

---------

Co-authored-by: leaf-agent <[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