@vibelord/lanes 1.7.4 → 1.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/payload/lanes/VERSION +1 -1
- package/payload/lanes/bin/lanes +31 -7
- package/payload/lanes/bin-rs/BINARIES.json +1 -1
- package/payload/lanes/container/lane-mcp +17 -14
- package/payload/lanes/container/lane_core.py +13 -7
- package/payload/lanes/docs/ARCHITECTURE.md +29 -7
- package/payload/lanes/docs/RUNBOOK.md +165 -29
- package/payload/lanes/docs/USERGUIDE.md +71 -3
- package/payload/lanes/install/host-install.sh +21 -1
- package/payload/lanes/libexec/adopt.py +49 -10
- package/payload/lanes/libexec/attach.py +35 -5
- package/payload/lanes/libexec/doctor_lanes2.py +113 -42
- package/payload/lanes/libexec/gc_unregistered.py +407 -0
- package/payload/lanes/libexec/lanes_lib.py +13 -4
- package/payload/lanes/libexec/native_bin.py +12 -10
- package/payload/lanes/libexec/session_actions.py +85 -7
- package/payload/lanes/libexec/update.py +34 -7
- package/payload/lanes/systemd/lanes-gc.service +1 -1
- package/payload/lanes/systemd/lanes-gc.timer +14 -3
- package/payload/lanes/web/Caddyfile +11 -0
- package/payload/lanes/web/README.md +123 -2
- package/payload/lanes/web/inbox.js +1140 -0
- package/payload/lanes/web/mobile.js +20 -26
- package/payload/manifest.json +3 -3
package/package.json
CHANGED
package/payload/lanes/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.7.
|
|
1
|
+
1.7.5
|
package/payload/lanes/bin/lanes
CHANGED
|
@@ -275,10 +275,20 @@
|
|
|
275
275
|
--write into a --container whose home the agent could not read from this account (uid
|
|
276
276
|
not 1000, or a home volume not owned by 1000) is refused with the reason
|
|
277
277
|
lanes invariant save|check snapshot / verify every live pane's pid and window size
|
|
278
|
-
lanes gc
|
|
278
|
+
lanes gc [--unregistered [--write] [--board B]]
|
|
279
|
+
truncate oversized zmx logs, drop stale dynamic resolve files, prune old staged trees:
|
|
279
280
|
each pkg root keeps its 3 newest and every tree current, current.previous, this
|
|
280
281
|
lanes, a view layout, a running daemon's run record or a process of this account
|
|
281
|
-
uses (none pruned when /proc cannot be read); `pruned <tree>` / `kept <tree>: <why
|
|
282
|
+
uses (none pruned when /proc cannot be read); `pruned <tree>` / `kept <tree>: <why>`.
|
|
283
|
+
Then, only with site.conf LANES_GC_UNREGISTERED=1, the --unregistered sweep with
|
|
284
|
+
--write. --unregistered alone: one line per unregistered tmux session (statusd's
|
|
285
|
+
rows; never a registered lane), `reap: <why>` only on evidence that nothing runs —
|
|
286
|
+
agent status `shell`, or no agent and a bare shell, quiet for LANES_GC_IDLE_S (default
|
|
287
|
+
21600 s), no client or viewer, observed, local, and a probe of every pane (each dead,
|
|
288
|
+
or a bare shell with no process under it) — and `keep: <why>` for every other one
|
|
289
|
+
(`runs vim`, `agent done`, …); --write ends each reap through the guarded idle close,
|
|
290
|
+
only if tmux still sees it detached, ungrouped and idle on every window
|
|
291
|
+
(libexec/gc_unregistered.py)
|
|
282
292
|
lanes sockets [check|repair] lanes that run but cannot be reached: tmux servers whose socket file was deleted
|
|
283
293
|
(someone emptied the container's /tmp); repair = tmux's SIGUSR1, nothing restarts
|
|
284
294
|
lanes pressure host memory / io pressure, swap, per-container memory and /tmp use — plain files and
|
|
@@ -349,6 +359,9 @@
|
|
|
349
359
|
the lane addresses (⚠ boards without a coordinator, ✗ two lanes on one address, ⚠ the
|
|
350
360
|
fleet admin unset or naming no lane, ⚠ `addresses` keys naming no terminal, and per
|
|
351
361
|
container how many Claude lanes' session names are their addresses),
|
|
362
|
+
the unregistered sweep (one line: site.conf's LANES_GC_UNREGISTERED and LANES_GC_IDLE_S,
|
|
363
|
+
the last write run of `lanes gc --unregistered`; ⚠ a floor it refuses, or a LANES_GC_
|
|
364
|
+
line with a comment, quote or space after its value, named),
|
|
352
365
|
any record left in the retired legacy-sessions/ directory, the devices without an owner
|
|
353
366
|
(each keeps its look to itself: `lanes device claim`), and the browser/phone half:
|
|
354
367
|
lanes-web / lanes-mobile units (⚠ not enabled, ✗ enabled but not running), the login-token
|
|
@@ -874,9 +887,9 @@ def hold_sessions(stack, timeout, doing):
|
|
|
874
887
|
|
|
875
888
|
|
|
876
889
|
# The web front's own path roots (web/Caddyfile): a view session is served at /<device>, so a device of one of these
|
|
877
|
-
# names would sit on a route a service owns — the enrolment service (/enrol/*), the docs service (/lanes-docs/*)
|
|
878
|
-
#
|
|
879
|
-
RESERVED_DEVICES = ('enrol', 'lanes-assets', 'lanes-docs')
|
|
890
|
+
# names would sit on a route a service owns — the enrolment service (/enrol/*), the docs service (/lanes-docs/*), the
|
|
891
|
+
# shell's assets (/lanes-assets/*) and the connector webhooks (/lanes-hooks/*). Casefolded: Caddy's matcher ignores case.
|
|
892
|
+
RESERVED_DEVICES = ('enrol', 'lanes-assets', 'lanes-docs', 'lanes-hooks')
|
|
880
893
|
|
|
881
894
|
|
|
882
895
|
def device_name(value):
|
|
@@ -3706,7 +3719,15 @@ def cmd_cursor_commit(args):
|
|
|
3706
3719
|
return cursor_commit.run(args)
|
|
3707
3720
|
|
|
3708
3721
|
|
|
3709
|
-
def cmd_gc(
|
|
3722
|
+
def cmd_gc(args):
|
|
3723
|
+
"""`lanes gc`: the daily housekeeping (lanes-gc.timer), then the unregistered sweep when site.conf enables it;
|
|
3724
|
+
`lanes gc --unregistered [--write] [--board B]`: that sweep alone (libexec/gc_unregistered.py)."""
|
|
3725
|
+
sweep = libexec_module('gc_unregistered')
|
|
3726
|
+
if args:
|
|
3727
|
+
given, values = flag_args(args, sweep.USAGE, flags=('--unregistered', '--write'), values=('--board',))
|
|
3728
|
+
if '--unregistered' not in given:
|
|
3729
|
+
raise L.LanesError(sweep.USAGE)
|
|
3730
|
+
return sweep.sweep('--write' in given, values.get('--board'))
|
|
3710
3731
|
limit = 5 * 1024 * 1024
|
|
3711
3732
|
for link in sorted((Path.home() / '.lz').glob('*')):
|
|
3712
3733
|
for log in (link / 's' / 'logs').glob('*.log'):
|
|
@@ -3736,7 +3757,7 @@ def cmd_gc(_args):
|
|
|
3736
3757
|
stale.unlink()
|
|
3737
3758
|
print(f'removed stale {stale.name}')
|
|
3738
3759
|
gc_trees()
|
|
3739
|
-
return 0
|
|
3760
|
+
return sweep.daily() # silent and 0 unless site.conf LANES_GC_UNREGISTERED=1
|
|
3740
3761
|
|
|
3741
3762
|
|
|
3742
3763
|
# ------------------------------------------------------------------ staged trees (plan W9 U4, LNS-92)
|
|
@@ -5558,6 +5579,9 @@ def cmd_doctor(_args):
|
|
|
5558
5579
|
str(states) + (f'; {stale} shown with their last known state (tmux server did not answer)' if stale else ''))
|
|
5559
5580
|
# The harness mix (W12): which agent each lane runs, as statusd observed it; information only.
|
|
5560
5581
|
print(f' {harness_line(status)[1]}')
|
|
5582
|
+
# The unregistered sweep (`lanes gc --unregistered`): site.conf's switch and floor, the last write run.
|
|
5583
|
+
mark, text = libexec_module('gc_unregistered').doctor_line()
|
|
5584
|
+
print(f'{mark or " "} {text}')
|
|
5561
5585
|
# One bounded process-table sweep serves both checks; the cgroup of the few tmux servers is a plain file read.
|
|
5562
5586
|
rc, table, _err = L.run_bounded(['ps', '-eo', 'pid=,comm=,args='], 10)
|
|
5563
5587
|
coexist = (L.STATE / 'flags/coexist').exists()
|
|
@@ -371,6 +371,10 @@ PROJECT_ARG = {'type': 'string', 'pattern': PROJECT_ID_PATTERN, 'maxLength': 128
|
|
|
371
371
|
ITEM_ARG = {'type': 'string', 'pattern': PROJECT_ID_PATTERN, 'maxLength': 128,
|
|
372
372
|
'description': 'The work item id, as lanes_work_list answers it.'}
|
|
373
373
|
COUNTER_ARG = {'type': 'integer', 'minimum': 1, 'maximum': C.PROJECT_COUNTER_MAX}
|
|
374
|
+
REQUEST_ARG = {'type': 'string', 'pattern': PROJECT_ID_PATTERN, 'maxLength': 128,
|
|
375
|
+
'description': 'An id of your choosing for this change, e.g. "req-2026-11-01-a"; send the same id '
|
|
376
|
+
'again when you retry it, and a retry after a lost answer returns the original result '
|
|
377
|
+
'instead of a conflict.'}
|
|
374
378
|
PROJECTS_NOTE = ('Until the host\'s project store is active this answers projects_unavailable with the request it '
|
|
375
379
|
'would send: nothing is claimed, released or recorded.')
|
|
376
380
|
PROJECT_TOOLS = (
|
|
@@ -390,33 +394,32 @@ PROJECT_TOOLS = (
|
|
|
390
394
|
'Claim one ready work item for the responsibility this agent\'s lane holds, at the item revision '
|
|
391
395
|
'lanes_work_list answered: one claimant wins and every other is refused; the answer is the claim\'s epoch, '
|
|
392
396
|
'which every later change of the claim presents. ' + PROJECTS_NOTE,
|
|
393
|
-
{'project': PROJECT_ARG, 'item': ITEM_ARG,
|
|
397
|
+
{'project': PROJECT_ARG, 'request': REQUEST_ARG, 'item': ITEM_ARG,
|
|
394
398
|
'revision': dict(COUNTER_ARG, description='The item revision you read (lanes_work_list `revision`).'),
|
|
395
399
|
'lease_s': {'type': 'integer', 'minimum': C.LEASE_MIN_S, 'maximum': C.LEASE_MAX_S,
|
|
396
400
|
'default': C.LEASE_DEFAULT_S,
|
|
397
401
|
'description': f'The ownership lease in seconds, {C.LEASE_MIN_S}–{C.LEASE_MAX_S} '
|
|
398
402
|
f'(default {C.LEASE_DEFAULT_S}); renewing it is not progress.'}},
|
|
399
|
-
required=('project', 'item', 'revision'), hints=_writes(False, False)),
|
|
403
|
+
required=('project', 'request', 'item', 'revision'), hints=_writes(False, False)),
|
|
400
404
|
_tool('lanes_work_release', 'Release a claim',
|
|
401
|
-
'Give up a claim this agent\'s responsibility holds,
|
|
402
|
-
'
|
|
403
|
-
{'project': PROJECT_ARG, 'item': ITEM_ARG,
|
|
404
|
-
'epoch': dict(COUNTER_ARG, description='The claim epoch lanes_work_claim answered.'),
|
|
405
|
-
|
|
406
|
-
required=('project', 'item', 'epoch', 'revision'), hints=_writes(False, False)),
|
|
405
|
+
'Give up a claim this agent\'s responsibility holds, named by its epoch: the item reopens for others. A '
|
|
406
|
+
'stale epoch releases nothing. ' + PROJECTS_NOTE,
|
|
407
|
+
{'project': PROJECT_ARG, 'request': REQUEST_ARG, 'item': ITEM_ARG,
|
|
408
|
+
'epoch': dict(COUNTER_ARG, description='The claim epoch lanes_work_claim answered.')},
|
|
409
|
+
required=('project', 'request', 'item', 'epoch'), hints=_writes(False, False)),
|
|
407
410
|
_tool('lanes_checkpoint', 'Record a checkpoint',
|
|
408
|
-
'Record a checkpoint for the responsibility this agent\'s lane holds: the host takes its live claims
|
|
409
|
-
'
|
|
410
|
-
'
|
|
411
|
-
+ PROJECTS_NOTE,
|
|
412
|
-
{'project': PROJECT_ARG,
|
|
411
|
+
'Record a checkpoint for the responsibility this agent\'s lane holds: the host takes its live claims, the '
|
|
412
|
+
'current mandate revision and the obligations still unresolved (effects in flight, role mail not yet '
|
|
413
|
+
'delivered) from its own records, with your one-line note and next useful action, so a replacement session '
|
|
414
|
+
'reconciles it before acting. A checkpoint never authorizes replaying a call. ' + PROJECTS_NOTE,
|
|
415
|
+
{'project': PROJECT_ARG, 'request': REQUEST_ARG,
|
|
413
416
|
'checkpoint': {'type': 'string', 'pattern': PROJECT_ID_PATTERN, 'maxLength': 128,
|
|
414
417
|
'description': 'A new checkpoint id of your choosing, e.g. "cp-2026-11-01-a".'},
|
|
415
418
|
'note': {'type': 'string', 'maxLength': C.PROJECT_TEXT_MAX,
|
|
416
419
|
'description': 'What holds now, in a sentence or two.'},
|
|
417
420
|
'next_action': {'type': 'string', 'maxLength': C.PROJECT_TEXT_MAX,
|
|
418
421
|
'description': 'The next useful action.'}},
|
|
419
|
-
required=('project', 'checkpoint'), hints=_writes(False, False)),
|
|
422
|
+
required=('project', 'request', 'checkpoint'), hints=_writes(False, False)),
|
|
420
423
|
)
|
|
421
424
|
PROJECT_TOOL_BY_NAME = {tool['name']: tool for tool in PROJECT_TOOLS}
|
|
422
425
|
PROJECT_OPS = {'lanes_work_list': 'work_list', 'lanes_work_claim': 'work_claim',
|
|
@@ -3846,17 +3846,19 @@ PROJECT_REQUEST = 'lanes.project-request.v1'
|
|
|
3846
3846
|
PROJECT_ID_RE = re.compile(r'[A-Za-z0-9_][A-Za-z0-9_.:-]{0,127}') # lanes-core's project-domain id grammar
|
|
3847
3847
|
WORK_CURSOR_RE = re.compile(r'[0-9]{10}:[0-9]{20}:[A-Za-z0-9_][A-Za-z0-9_.:-]{0,127}') # the ready view's cursor
|
|
3848
3848
|
PROJECT_COUNTER_MAX = (1 << 53) - 1 # lanes-core COUNTER_MAX: revisions and epochs
|
|
3849
|
-
WORK_LIMIT_MAX, WORK_LIMIT_DEFAULT =
|
|
3849
|
+
WORK_LIMIT_MAX, WORK_LIMIT_DEFAULT = 500, 100 # one page of the ready view (the store's page bounds)
|
|
3850
3850
|
LEASE_MIN_S, LEASE_MAX_S, LEASE_DEFAULT_S = 60, 7 * 24 * 3600, 1800 # lanes-runtime LEASE_MAX_MS is 7 days
|
|
3851
3851
|
PROJECT_TEXT_MAX = 2048 # lanes-runtime TEXT_MAX (bytes, UTF-8)
|
|
3852
|
-
# Every key a request may carry, in its one order (lanes-runtime's AgentRequest field order).
|
|
3853
|
-
|
|
3854
|
-
|
|
3852
|
+
# Every key a request may carry, in its one order (lanes-runtime's AgentRequest field order). Every write carries
|
|
3853
|
+
# `request`, the agent's idempotency key for that change (the operation-id grammar): a retry after a lost answer sends
|
|
3854
|
+
# the same id and gets the original result, never a conflict. A release names its claim by the epoch alone.
|
|
3855
|
+
PROJECT_KEYS = ('schema', 'op', 'lane', 'request', 'project', 'item', 'revision', 'epoch', 'lease_s', 'after',
|
|
3856
|
+
'limit', 'checkpoint', 'note', 'next_action')
|
|
3855
3857
|
PROJECT_OPS = { # op -> (required arguments, optional arguments)
|
|
3856
3858
|
'work_list': (('project',), ('after', 'limit')),
|
|
3857
|
-
'work_claim': (('project', 'item', 'revision'), ('lease_s',)),
|
|
3858
|
-
'work_release': (('project', '
|
|
3859
|
-
'checkpoint': (('project', 'checkpoint'), ('note', 'next_action')),
|
|
3859
|
+
'work_claim': (('project', 'request', 'item', 'revision'), ('lease_s',)),
|
|
3860
|
+
'work_release': (('project', 'request', 'item', 'epoch'), ()),
|
|
3861
|
+
'checkpoint': (('project', 'request', 'checkpoint'), ('note', 'next_action')),
|
|
3860
3862
|
}
|
|
3861
3863
|
PROJECTS_PICKUP = 'lanes-runtime project store' # who would take the request (named in the refusal)
|
|
3862
3864
|
|
|
@@ -3880,6 +3882,10 @@ def _project_value(key, value):
|
|
|
3880
3882
|
if not isinstance(value, str) or not PROJECT_ID_RE.fullmatch(value):
|
|
3881
3883
|
raise bad('is not a project id (letters, digits, _ . : -; at most 128, not starting with . : -)')
|
|
3882
3884
|
return value
|
|
3885
|
+
if key == 'request':
|
|
3886
|
+
if not isinstance(value, str) or not PROJECT_ID_RE.fullmatch(value):
|
|
3887
|
+
raise bad('is not a request id (letters, digits, _ . : -; at most 128, not starting with . : -)')
|
|
3888
|
+
return value
|
|
3883
3889
|
if key == 'after':
|
|
3884
3890
|
if not isinstance(value, str) or not WORK_CURSOR_RE.fullmatch(value):
|
|
3885
3891
|
raise bad('is not a cursor lanes_work_list answered')
|
|
@@ -562,7 +562,17 @@ file in operator backups; deleting derived state does not delete registrations.
|
|
|
562
562
|
|
|
563
563
|
Explicit **New +** starts a detached tmux shell inside the workspace container on its dedicated
|
|
564
564
|
`lanes-shells-<workspace>` socket. Reopening only attaches. Explicit **×** closes an unregistered session after
|
|
565
|
-
rechecking its session ID and creation time and refusing registered lanes; affected viewers become empty.
|
|
565
|
+
rechecking its session ID and creation time and refusing registered lanes; affected viewers become empty. The opt-in
|
|
566
|
+
daily sweep (`lanes gc --unregistered`, `libexec/gc_unregistered.py`) ends sessions through this same close in its
|
|
567
|
+
guarded idle mode (`close_idle_session`, BEY-7156), only on positive evidence that nothing runs:
|
|
568
|
+
agent status `shell`, or no agent and a bare shell (`agent_state.SHELL_COMMANDS`), or a dead pane — quiet for
|
|
569
|
+
`LANES_GC_IDLE_S`, no client or view, observed, local route — each judged again from a fresh `status.json` and a live
|
|
570
|
+
probe of every pane (`list-panes -s`: each dead, or a bare shell with no process under it) just before. Every other
|
|
571
|
+
agent status (errored, done, needs_input, needs_approval, working, idle, unknown) keeps the session. The unattended
|
|
572
|
+
close refuses while a `view-…` member shows the session, kills no view, and folds `#{==:#{session_attached},0}` into the
|
|
573
|
+
same in-tmux condition as the creation time. The GC wrapper also rechecks cached policy and pane evidence under
|
|
574
|
+
the registry lock, and the final tmux predicate requires no session group and positive, old activity on every
|
|
575
|
+
window. New clients, groups or output after the last probe refuse the close. The explicit human close is unchanged.
|
|
566
576
|
The tmux close condition is checked inside the server, protecting a replacement created between observation
|
|
567
577
|
and the action. `user-sessions/` stores display metadata (and `handback/` the board and id of a session unregistered
|
|
568
578
|
while it ran); `status.json` and `resolve.dynamic/` are projections.
|
|
@@ -852,6 +862,14 @@ No tool exists for these. An agent that needs one asks a person; a refusal's `hu
|
|
|
852
862
|
|
|
853
863
|
- **Ending or closing a lane**, its session or its jobs (`x` in the sidebar for an unregistered session,
|
|
854
864
|
`lane kill <id> --yes` in the container). `lanes_unregister` removes a declaration and leaves the session running.
|
|
865
|
+
Ending stays a person's call; the one standing instruction is the operator's, opt-in per site: with site.conf
|
|
866
|
+
`LANES_GC_UNREGISTERED=1` the host's daily `lanes gc` (midnight) ends unregistered sessions (including a lane a
|
|
867
|
+
person unregistered while it ran) only on positive evidence that nothing runs in them — agent status `shell`, or no
|
|
868
|
+
agent and a bare shell, confirmed just before the close by a probe of every pane (each dead, or a bare shell with no
|
|
869
|
+
process under it); quiet with no output for `LANES_GC_IDLE_S` (default 6 h), no client or viewer, observed and
|
|
870
|
+
reached through a local route — through the sidebar's own close in its unattended mode (no view, and the kill
|
|
871
|
+
refused inside tmux while a client is attached), and keeps every other one, every harness prompt included (RUNBOOK
|
|
872
|
+
"Daily cleanup of unregistered terminals"). A registered lane is never one, and no agent tool starts it.
|
|
855
873
|
- **Interrupting** an agent. `lanes_send` types printable text only (no Ctrl-C, Esc, newline or tab) and refuses a
|
|
856
874
|
lane whose agent is working (`agent_working`) unless forced.
|
|
857
875
|
- **Answering an approval** prompt. `lanes_send` refuses a lane whose agent waits for an approval
|
|
@@ -1049,14 +1067,18 @@ checkpoint store the host runtime keeps (`crates/lanes-runtime/src/project`, not
|
|
|
1049
1067
|
`lanes-runtime`'s `project::requests` decodes: the shared fixture
|
|
1050
1068
|
`crates/lanes-runtime/src/project/testdata/agent-requests.json`) and, until a transport carries it to the host
|
|
1051
1069
|
(integration gate I1), answers `projects_unavailable` with that request. No request names a responsibility: the host
|
|
1052
|
-
derives it from the authenticated lane.
|
|
1070
|
+
derives it from the authenticated lane. Every write carries `request`, the agent's idempotency key for that change
|
|
1071
|
+
(the operation-id grammar, at most 128 bytes): a retry after a lost answer sends the same id and gets the original
|
|
1072
|
+
result (a claim's token, marked replayed), never a conflict; the host scopes the id to the lane. A release names its
|
|
1073
|
+
claim by the epoch alone (the live epoch is the fence; no tool answers an item revision after a claim). Pages follow
|
|
1074
|
+
the store's bounds (100 by default, at most 500).
|
|
1053
1075
|
|
|
1054
1076
|
| Tool | Effect | Request (`op`) | Host operation once served |
|
|
1055
1077
|
| --- | --- | --- | --- |
|
|
1056
|
-
| `lanes_work_list` | read | `work_list`: `project`, `after` (a cursor), `limit` 1–
|
|
1057
|
-
| `lanes_work_claim` | write | `work_claim`: `project`, `item`, `revision` (the one read), `lease_s` 60–604800 (default 1800) | `ProjectService::claim`: one winner, the next claim epoch |
|
|
1058
|
-
| `lanes_work_release` | write | `work_release`: `
|
|
1059
|
-
| `lanes_checkpoint` | write | `checkpoint`: `project`, `checkpoint`, `note`, `next_action` (2,048 bytes each) | `ProjectService::record_checkpoint`: claims and
|
|
1078
|
+
| `lanes_work_list` | read | `work_list`: `project`, `after` (a cursor), `limit` 1–500 (default 100) | `ProjectService::ready_work`: eligible items in ready order, ineligible counts by reason |
|
|
1079
|
+
| `lanes_work_claim` | write | `work_claim`: `request`, `project`, `item`, `revision` (the one read), `lease_s` 60–604800 (default 1800) | `ProjectService::claim`: one winner, the next claim epoch; the same `request` again answers its token |
|
|
1080
|
+
| `lanes_work_release` | write | `work_release`: `request`, `project`, `item`, `epoch` | `ProjectService::release` at the stored revision: a stale epoch releases nothing |
|
|
1081
|
+
| `lanes_checkpoint` | write | `checkpoint`: `request`, `project`, `checkpoint`, `note`, `next_action` (2,048 bytes each) | `ProjectService::record_checkpoint`: claims, mandate and the unresolved obligations (in-flight effects, undelivered role mail) from the host's own records |
|
|
1060
1082
|
|
|
1061
1083
|
`test_lane_mcp_project` holds the listing (frozen without the switch, exactly these four appended with it), the
|
|
1062
1084
|
refusals and the requests to the fixture; `lanes-runtime`'s `project::tests::requests` decodes the same fixture.
|
|
@@ -1213,7 +1235,7 @@ routes go to services of their own, each bound to the tailnet login Serve inject
|
|
|
1213
1235
|
| anything else | Zellij web 127.0.0.1:8082 | site-wide |
|
|
1214
1236
|
|
|
1215
1237
|
A view session is served at `/<device>`, so `bin/lanes` `device_name` refuses the service roots as device names
|
|
1216
|
-
(`enrol`, `lanes-docs`, `lanes-assets`, casefolded). Caddy sorts the routes before it runs them: a single-path `handle`
|
|
1238
|
+
(`enrol`, `lanes-docs`, `lanes-assets`, `lanes-hooks`, casefolded). Caddy sorts the routes before it runs them: a single-path `handle`
|
|
1217
1239
|
goes ahead of another only when that one has a single path too (DEF-1872), so the vendor route stays with the
|
|
1218
1240
|
single-path routes above the named-matcher ones; its order is proven on a model of that sort
|
|
1219
1241
|
(`test_docs_assets.VendorRoute`), not on a running Caddy (DEF-1871, open until the RUNBOOK's operator check).
|
|
@@ -385,7 +385,9 @@ lanes studio-host re-key --yes after the owner revoked the Host: a new mac
|
|
|
385
385
|
waiting for the terminal:
|
|
386
386
|
- **Shed and repaint (a slow terminal).** When more than 1 MiB (`LANES_DISPLAY_BACKLOG_BYTES`) would be waiting,
|
|
387
387
|
the oldest output is dropped until half of it is left, and the cut is marked for the terminal (CAN plus the end of a
|
|
388
|
-
synchronized update, so a sequence cut in two cannot swallow what follows).
|
|
388
|
+
synchronized update, so a sequence cut in two cannot swallow what follows). The first retained escape is found
|
|
389
|
+
across queued read chunks within a 64 KiB scan, so a short read cannot preserve a broken prefix (BEY-7148).
|
|
390
|
+
Without an escape in that window, plain output is retained. Once everything kept has reached the
|
|
389
391
|
terminal, the supervisor asks Zellij for a full repaint: the client's size goes to one row less and, 0.1 s later,
|
|
390
392
|
back (Zellij 0.45.1 repaints only on a size it has not seen; with no gap between the two it repaints nothing). At
|
|
391
393
|
most one repaint a second. The panes are one row shorter for that 0.1 s, so a lane's program also sees a resize.
|
|
@@ -409,7 +411,7 @@ lanes studio-host re-key --yes after the owner revoked the Host: a new mac
|
|
|
409
411
|
re-reads registries every 2 minutes and the sidebar follows. The zellij layout is never edited live. A sync that
|
|
410
412
|
finds nothing new leaves `registry.json` (and its `generated_at`) untouched and only records the time in
|
|
411
413
|
`registry.synced`; the unit is bounded at `TimeoutStartSec=120`.
|
|
412
|
-
- **`lanes gc` (
|
|
414
|
+
- **`lanes gc` (`lanes-gc.timer`, daily at midnight):** truncates zmx logs over 5 MB and removes a `resolve.dynamic/<id>` file
|
|
413
415
|
only when that id is in none of `status.json`'s `lanes`, `unregistered` or `zmx` AND the file is over an hour old.
|
|
414
416
|
statusd lists every `unregistered` and `zmx` row id under `lanes` as well; reading the other two keys is a
|
|
415
417
|
defence, not a second source. The mtime alone is no liveness signal: an unregistered session's file is rewritten only when its target or name
|
|
@@ -423,6 +425,8 @@ lanes studio-host re-key --yes after the owner revoked the Host: a new mac
|
|
|
423
425
|
`.pruning-<version>-…` before it is removed, so a removal cut short never leaves a half tree under its version name;
|
|
424
426
|
the next run removes the rest. `kept <tree>: <why>` says what holds an old tree (`process <pid> uses it`: look at that
|
|
425
427
|
process; `the view layout of <device> names it`: `lanes rebuild <device>` moves the view to `current`).
|
|
428
|
+
Last, only on a site whose `site.conf` opts in, it ends the unregistered sessions in which nothing runs
|
|
429
|
+
([Daily cleanup of unregistered terminals](#daily-cleanup-of-unregistered-terminals-opt-in-lanes-gc---unregistered)).
|
|
426
430
|
- **What a container sees of its own lanes (`~/.lz/status.json`, LNS-32):** statusd writes each container's slice of
|
|
427
431
|
`status.json` into that container's `~/.lz` (only where `~/.lz/bin/lane` is installed), on a change and at least
|
|
428
432
|
every 15 s. Inside the container, `python3 -c 'import json,time; d=json.load(open("/home/coder/.lz/status.json"));
|
|
@@ -2595,7 +2599,7 @@ CSP: pages `default-src 'none'; style-src 'self' 'unsafe-inline'; script-src 'se
|
|
|
2595
2599
|
`sandbox allow-scripts`, everything else `default-src 'none'; sandbox`.
|
|
2596
2600
|
Links and assets in a page are relative (`docs.css`, `d/<id>`), so the pages work under the stripped prefix; open the
|
|
2597
2601
|
index as `/lanes-docs/` with the slash (`/lanes-docs` alone is the page route a device of that name would have, which
|
|
2598
|
-
is why `lanes-docs`, `lanes-assets` and `enrol` are not device names). An upload goes through `uploads.receive` (W5):
|
|
2602
|
+
is why `lanes-docs`, `lanes-assets`, `lanes-hooks` and `enrol` are not device names). An upload goes through `uploads.receive` (W5):
|
|
2599
2603
|
it lands in the lane's workspace's `uploads/` (`<folder>/uploads/<name>`, `-1` on a collision, exactly as `lanes
|
|
2600
2604
|
upload` lands one) and `docs_store.intake` (`source` `web`, kind by extension, `for` and `by` the uploader) takes the
|
|
2601
2605
|
same bytes into the person's store; the receipt's `landed` is the in-container path to tell the agent. The drop area is
|
|
@@ -2977,6 +2981,89 @@ signature: without `strict` (and without `**kwargs`) it makes the older call and
|
|
|
2977
2981
|
on one address then refuse, as before 1.7.0, instead of being listed — and `lanes doctor` prints the same as a `⚠`.
|
|
2978
2982
|
The hook's fix is to forward keyword arguments (`def build_registry(previous=None, **kw)`), after which nothing is said.
|
|
2979
2983
|
|
|
2984
|
+
## Daily cleanup of unregistered terminals (opt-in, `lanes gc --unregistered`)
|
|
2985
|
+
|
|
2986
|
+
Operator ask 2026-11-02: "garbage collection on unregistered lanes daily at midnight unless they are running live".
|
|
2987
|
+
Ending a session stays a person's call everywhere else; this is the operator's standing instruction for one site, off
|
|
2988
|
+
until `site.conf` says otherwise (`libexec/gc_unregistered.py`; DM-LANES-SITE, DM-LANES-GC-UNREGISTERED).
|
|
2989
|
+
|
|
2990
|
+
| Setting | File | Default |
|
|
2991
|
+
| --- | --- | --- |
|
|
2992
|
+
| `LANES_GC_UNREGISTERED=1` — the daily `lanes gc` ends the unregistered sessions in which nothing runs (any other value, or none: off) | `~/.config/lanes/site.conf` | off |
|
|
2993
|
+
| `LANES_GC_IDLE_S=<seconds>` — how long a session must have shown no output; a value under 3600 or not a whole number is refused (`lanes doctor` ⚠, the sweep ends nothing) | `~/.config/lanes/site.conf` | 21600 (6 h) |
|
|
2994
|
+
|
|
2995
|
+
Each is `KEY=VALUE` alone on its line (`lanes_lib.SITE_LINE`), a comment on a line of its own. A line naming a
|
|
2996
|
+
`LANES_GC_` key that SITE_LINE does not admit — a trailing comment, quotes, a space after the value, a leading blank —
|
|
2997
|
+
is refused, never read as unset (which would leave the switch silently off or the floor silently 6 h): the sweep ends
|
|
2998
|
+
nothing (one line, `gc unregistered: site.conf line … is refused: …; nothing was ended`, naming it; `lanes gc
|
|
2999
|
+
--unregistered` refuses alike) and `lanes doctor` prints the same line with `⚠`, whatever the switch says. A line that
|
|
3000
|
+
starts with `#` names nothing.
|
|
3001
|
+
|
|
3002
|
+
**The timer.** `lanes-gc.timer` runs `lanes gc` at midnight, host time (`OnCalendar=*-*-* 00:00:00`,
|
|
3003
|
+
`RandomizedDelaySec=300`, `Persistent=true`: a midnight the host was off for runs once at the next boot). Every server
|
|
3004
|
+
install and update renders the unit again; the update's post-commit runs `systemctl --user daemon-reload` and, when the
|
|
3005
|
+
new tree's `systemd/lanes-gc.timer` text differs from the tree before, `systemctl --user try-restart lanes-gc.timer`
|
|
3006
|
+
right after it (the step `try-restart lanes-gc.timer`: the new schedule is armed at once, not after the old one fires;
|
|
3007
|
+
a timer the operator stopped stays stopped). So a host updated from a release whose timer was boot-relative
|
|
3008
|
+
(`OnBootSec=10min`, `OnUnitActiveSec=1d`) moves to midnight at that update; `systemctl --user list-timers
|
|
3009
|
+
lanes-gc.timer` shows the next run. [inferred, not measured here: systemd schedules a `Persistent=` calendar timer from
|
|
3010
|
+
its last trigger, which on such a host lies before the last midnight, so one `lanes gc` may run at the update itself:
|
|
3011
|
+
its housekeeping is idempotent, and its sweep ends only what one at midnight would.] `lanes gc` does its other
|
|
3012
|
+
housekeeping first, then the sweep, in write mode, only with the switch on (off, it prints nothing about it).
|
|
3013
|
+
|
|
3014
|
+
**What it reads and what it ends.** Only `status.json`'s `unregistered` rows (statusd's tmux sessions no registry
|
|
3015
|
+
declares — unregistered, including a lane a person unregistered while it ran): a registered lane is never one. The
|
|
3016
|
+
rule (review of PR #750): a session is ended only on **positive evidence that nothing runs in it** — (1) its agent's
|
|
3017
|
+
status is `shell` (the harness ended into its shell), or it has no agent and its pane's command is a bare shell
|
|
3018
|
+
(`agent_state.SHELL_COMMANDS`; a login shell's `-bash` and a path normalised), or its pane is dead; and (2) just before
|
|
3019
|
+
the close, a live probe of every pane of every window (`tmux list-panes -s -t =<session>: -F
|
|
3020
|
+
'#{pane_current_command}\t#{pane_dead}\t#{pane_pid}'` through `L.tmux_probe`) shows each pane dead, or a bare shell
|
|
3021
|
+
with no process under it (the container's `/proc`, as statusd's `pane_has_child`: lanes start harnesses as `bash -c
|
|
3022
|
+
'<harness> …'`, so tmux names the shell while the harness runs under it). Every other agent — errored, done,
|
|
3023
|
+
needs_input, needs_approval, working, idle, or a status the sweep does not know — keeps the session. One line per
|
|
3024
|
+
session, `<verdict>: <reason> — <id> (<container> <socket>/<session>)`; the first reason found, in this order, keeps
|
|
3025
|
+
it:
|
|
3026
|
+
|
|
3027
|
+
| Line | When |
|
|
3028
|
+
| --- | --- |
|
|
3029
|
+
| `keep: not closable (…)` | no closable tmux row (a retired legacy shell) |
|
|
3030
|
+
| `keep: behind guest:<alias> (its guest sweeps)` | its container is behind a guest (Federation, below): an aggregator never ends a guest's session; the guest's own Lanes does, under its own site.conf |
|
|
3031
|
+
| `keep: not typed here (…)` | no local write route: reached only through a `tmux_probe` hook, or not at all |
|
|
3032
|
+
| `keep: unobserved (…)` | `status.json` older than 30 s (`is lanes-statusd running?`), no row, a `stale` row (its tmux server did not answer), state `unknown`, a row without its client counts, or (no agent) a row that names no pane command |
|
|
3033
|
+
| `keep: attached` / `keep: viewers N` | a terminal is attached, or N sessions (a Studio browser's `view-…`) view it |
|
|
3034
|
+
| `keep: agent <status>` | an agent whose status is not `shell`: `errored`, `done`, `needs_input`, `needs_approval`, `working`, `idle`, … (every harness prompt is live) |
|
|
3035
|
+
| `keep: runs <command>` | no agent, and the pane's command is no bare shell (`vim`, `python3`, `ssh`, `tail`) |
|
|
3036
|
+
| `keep: active <age> ago` | state `active`, or the last output (`activity`, the newest `window_activity`) newer than `LANES_GC_IDLE_S` |
|
|
3037
|
+
| `keep: state <state>` | any state but `quiet` or `dead` |
|
|
3038
|
+
| `keep: no output time` | the row has no `activity`: fail closed |
|
|
3039
|
+
| `keep: runs <command>` (probe) | another pane of the session runs it — a Claude in window 1 behind window 0's bash |
|
|
3040
|
+
| `keep: runs a process under <shell>` (probe) | a live bare-shell pane has a child process |
|
|
3041
|
+
| `keep: panes not checked (…)` (probe) | the probe did not answer `ok`, listed no pane or a line it cannot read, or a pane's children could not be read |
|
|
3042
|
+
| `reap: idle <age>, <what>, no client` | everything else; `<what>` is `agent shell`, `pane dead` or `no agent` |
|
|
3043
|
+
|
|
3044
|
+
The dry run probes the panes of each `reap` candidate too (read-only), so its lines say what a write would do. A `reap`
|
|
3045
|
+
session is ended only with `--write` (the timer's run, or `lanes gc --unregistered --write` by hand, which works with
|
|
3046
|
+
the switch off too: a person typed it), and only after its row is read again from a fresh `status.json`, judged again
|
|
3047
|
+
(`keep: attached (since the listing)` when someone attached meanwhile) and its panes probed once more. The end is
|
|
3048
|
+
`session_actions.close_idle_session` (BEY-7156): it rechecks cached eligibility and every pane's process evidence
|
|
3049
|
+
under the registry lock. The final `if-shell -F` predicate inside tmux requires the exact identity, no client or
|
|
3050
|
+
session group, and positive, old activity on every window. A new client, view or output refuses the close even
|
|
3051
|
+
before statusd catches up. GC never kills a viewer. The sidebar's explicit human close is unchanged. Never a bare
|
|
3052
|
+
`tmux kill-session`, never docker.
|
|
3053
|
+
|
|
3054
|
+
**The journal.** Under the timer the lines go to `journalctl --user -u lanes-gc.service`: `ended: idle 7h, no agent, no
|
|
3055
|
+
client — <id> (…)` for each session ended, `not ended: <why> — <id> (…)` when the close refused (a session that
|
|
3056
|
+
changed, a view, a client that attached, a grouped stranger, a slow tmux), then `gc unregistered: ended N, not ended N,
|
|
3057
|
+
kept N`. A write run is recorded in `~/.local/state/lanes/gc-unregistered.json` with `by`: `timer` when systemd started
|
|
3058
|
+
the process (it sets `INVOCATION_ID` for every unit it runs), else `hand`. `lanes doctor` prints one information line
|
|
3059
|
+
from it and site.conf: `gc unregistered: off (LANES_GC_UNREGISTERED unset)` or `gc unregistered: on, idle ≥ 6h, last
|
|
3060
|
+
sweep 2026-11-02 00:03 UTC: ended 1` (`(by hand)` after the time for a run by hand); `⚠` for a refused
|
|
3061
|
+
`LANES_GC_IDLE_S`, or for a refused `LANES_GC_` line, named.
|
|
3062
|
+
|
|
3063
|
+
**Before switching it on.** Run the dry run, `lanes gc --unregistered` (optionally `--board <board>`), and read every
|
|
3064
|
+
`reap` line: each is a session that will be ended at the next midnight. Register anything worth keeping (`a` in the
|
|
3065
|
+
sidebar, `lanes register`).
|
|
3066
|
+
|
|
2980
3067
|
## Federation: lanes-site/1 (guests behind a forced-command key)
|
|
2981
3068
|
|
|
2982
3069
|
Plan row H1 (BEY-6899, BEY-6912; Lanes2 architecture §3.32 and §7.5; DM-LANES-SITE-ADAPTER). A host whose boards
|
|
@@ -3060,6 +3147,21 @@ resent — or a lane that is no tmux lane). `lanes names sync --write` into a gu
|
|
|
3060
3147
|
exit 1: lanes-site/1 v1 carries no rename; run it on the guest. A stopped local container stays
|
|
3061
3148
|
`container <name> is not running`.
|
|
3062
3149
|
|
|
3150
|
+
**Updating an aggregator (BEY-7140).** A host whose boards all run behind guests has no local container to ship a
|
|
3151
|
+
contract to, and may have no docker daemon of its own for its Lanes user. Two things follow for `--update-only`:
|
|
3152
|
+
the Throttle daemon's container (site.conf's `LANES_THROTTLE_CONTAINER`, else the Throttle tab's) is skipped by the
|
|
3153
|
+
post-commit when its route — its containers.json record, else the catalog board that names it — is `guest:<alias>`
|
|
3154
|
+
(`WARN install-container <c> (skipped: runs behind guest:<alias>: that guest ships its own contract (lanes-site/1))`,
|
|
3155
|
+
a warning, the record `ok`; docker is not asked about it), and a refused `docker info` in the preflight does not stop
|
|
3156
|
+
the update when `lanes sync` recorded no local container with a home volume (`WARN docker info was refused; no local
|
|
3157
|
+
container is recorded (an aggregator): the update goes on without it`). A recorded inspect error or malformed
|
|
3158
|
+
container row refuses this exception: unknown custody is not a missing local container. The daemon post-commit step
|
|
3159
|
+
also retains an unanswered inspect as unknown, rather than skipping it as gone. A full install, and an update of a
|
|
3160
|
+
host with a local container recorded, still refuse there. `lanes doctor`'s `✗ write transport for <c>` says which remedy applies:
|
|
3161
|
+
`catalog.json names no "transport" for its board` when a board names the container, `no catalog.json board names it`
|
|
3162
|
+
when none does (a registry a runtime hook built from a guest's lanes: give it a board whose manifest names it, with a
|
|
3163
|
+
`"transport"`).
|
|
3164
|
+
|
|
3063
3165
|
**The site hook.** `lanes doctor` prints a site hook that replaced `lanes_lib.build_registry` without `strict`
|
|
3064
3166
|
(`site_hook_old()`, BEY-6912) as a `⚠` until the O-3 installed witness (W20) — never by release count; site.conf
|
|
3065
3167
|
`LANES_SITE_HOOK=refuse` refuses it now (`✗`, exit status 1). The fix is the hook's: forward keyword arguments, or
|
|
@@ -3085,7 +3187,7 @@ precedence). No release ships a native binary yet, nothing reads a flag yet, and
|
|
|
3085
3187
|
one. Measured on the dev container only; no reference machine has run a native component.
|
|
3086
3188
|
|
|
3087
3189
|
**Flags.** One `site.conf` line per component (`~/.config/lanes/site.conf`, the same `LANES_<KEY>=<value>` grammar as
|
|
3088
|
-
the site facts), AR §7.3's components:
|
|
3190
|
+
the site facts), AR §7.3's components and the first-party routes:
|
|
3089
3191
|
|
|
3090
3192
|
| Key | Native binary | Round 1 |
|
|
3091
3193
|
| --- | --- | --- |
|
|
@@ -3095,6 +3197,7 @@ the site facts), AR §7.3's components:
|
|
|
3095
3197
|
| `LANES_RS_SIGNAL` | `lanes-hook` (the hook emitter behind `lane-signal`) | `on` admitted for a verified binary; container install is a later round |
|
|
3096
3198
|
| `LANES_RS_MCP`, `LANES_RS_AGENTD` | none yet: no lanes crate declares one | refused `binary_absent` |
|
|
3097
3199
|
| `LANES_RS_STATUSD`, `VISIBILITY`, `NOTIFY`, `ECONOMY`, `SYNC`, `SITE`, `STORE` | none: duties of the host coordinator, which the throttle-rc Studio Host composes | refused `host_composed`: one host owner per state root, no second daemon beside the Studio host (RT §3.2); the cutover fence (lane H3) activates them in that composition |
|
|
3200
|
+
| `LANES_RS_ROUTES` | none: the first-party docs and enrolment routes in Rust (RT §12.4, lanes2 Round 2 R2-ROUTES; `crates/lanes-runtime/src/http/`), a host duty the throttle-rc Studio Host composes | refused `host_composed` like the duties above; the Rust routes read only the flag files `native.routes` / `native.routes.shadow`, never this line, so `lanes-docsd` and `lanes-enrold` keep answering |
|
|
3098
3201
|
|
|
3099
3202
|
Values are `off` (the default, also for a missing line), `shadow` and `on`. Any other value reads as `off`, and a
|
|
3100
3203
|
`LANES_RS_<X>` that names no component above is ignored (`LANES_RS_MCP_EXCLUDE` is a setting, not a component).
|
|
@@ -3278,32 +3381,46 @@ paused just before its commit).
|
|
|
3278
3381
|
|
|
3279
3382
|
Plan slice R2-DOCTOR (lanes2 Round 2, BEY-6988; the Rust runtime specification §16.3, the Lanes–Throttle integration
|
|
3280
3383
|
contract §11; DM-LANES2-RT16-SIGNALS). A Lanes 2.0 host keeps one bounded metrics registry
|
|
3281
|
-
(`crates/lanes-runtime/src/signals/`) over every Round-1/2 subsystem: RT 14.1 ready-to-dispatch
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3384
|
+
(`crates/lanes-runtime/src/signals/`) over every Round-1/2 subsystem: the dispatch loop (RT 14.1 ready-to-dispatch
|
|
3385
|
+
queue ages, outbound waits apart from time behind a peer that does not read, endpoint blockage, age breaches, input
|
|
3386
|
+
stalls, replay gaps, undeliverable answers), permits (live workers apart from waiting callers, refusals, retained
|
|
3387
|
+
bytes, helpers, survivors, unsettled effects), admission refusals, group bytes and the peak resync allocation, the
|
|
3388
|
+
store (mailbox, its own quota, the essential room left, WAL, checkpoints, storage faults, busy groups, the outbox and
|
|
3389
|
+
its oldest entry, the slowest durable acceptance), ingress pressure and fairness, fallback spool collection, hook
|
|
3390
|
+
health records, delivery receipts, effect phases and recovery, the lane sequencer (partial navigation versus uncertain
|
|
3391
|
+
submission, final-check refusals, fences), cutover phases, capacity freshness, protocol negotiation, projection
|
|
3392
|
+
streams and resyncs, directory and inventory freshness, holder reconnects, the host process's RSS, threads and
|
|
3393
|
+
descriptors, adapter subprocess launches and client frame times. The signal set, each signal's kind, unit, closed
|
|
3394
|
+
label set, delay origin, threshold rule and declared unavailable reasons are
|
|
3287
3395
|
`docs/contracts/lanes2/manifests/signals.json`; the host resolves the thresholds from its own resource manifest
|
|
3288
|
-
(`resources.<profile>.json`, the G2 admission limits
|
|
3289
|
-
budgets)
|
|
3290
|
-
every 10 s.
|
|
3396
|
+
(`resources.<profile>.json`, the G2 admission limits, group peaks and RSS envelope), `benchmark.json` (RT 14.1 maxima,
|
|
3397
|
+
RT 15.3 budgets and frame budgets) and, for the store's quota, the store's own configuration, and exports
|
|
3398
|
+
`$LANES_STATE/signals/lanes2.json` (`lanes2.signals.snapshot/2`) change-only, rewritten at least every 10 s.
|
|
3291
3399
|
|
|
3292
3400
|
**What doctor prints.** Nothing until that file exists: no host composes the registry before integration gate I1, so
|
|
3293
3401
|
today's `lanes doctor` output is unchanged. Once a host exports it, doctor adds after the release checks: a header (the
|
|
3294
|
-
host instance, lanes-runtime version, profile and manifest revisions), `✓ lanes2
|
|
3295
|
-
is older than 30 s: the host stopped exporting and the values shown are its
|
|
3296
|
-
for each RT 16.3 origin (client rendering, Lanes queueing, storage, holder,
|
|
3297
|
-
and the signals that put it there, one `facets:` line (resources, custody, owner
|
|
3298
|
-
signal: `✗` past an alert bound (doctor exits 1), `⚠` past a warning bound
|
|
3299
|
-
|
|
3300
|
-
(`
|
|
3301
|
-
|
|
3302
|
-
|
|
3402
|
+
host instance, lanes-runtime version, source revision, installed version, profile and manifest revisions), `✓ lanes2
|
|
3403
|
+
signals snapshot fresh` (or `✗` when it is older than 30 s: the host stopped exporting and the values shown are its
|
|
3404
|
+
last), one `delay origin:` line naming, for each RT 16.3 origin (client rendering, Lanes queueing, storage, holder,
|
|
3405
|
+
network, native harness), its state and the signals that put it there, one `facets:` line (resources, custody, owner
|
|
3406
|
+
sources), then exactly one line per signal: `✗` past an alert bound (doctor exits 1), `⚠` past a warning bound or for
|
|
3407
|
+
a signal the host did not sample, an information line otherwise. A counter shows its total and its increase in the
|
|
3408
|
+
window (`lifecycle 2, +0`), and its bound applies to the increase: a fault that has stopped repeating stops warning in
|
|
3409
|
+
the next window. An origin reads `incomplete` when one of its signals is unobserved (for instance client rendering
|
|
3410
|
+
while no terminal client reports frame times, or Lanes queueing while connections are live, because a running
|
|
3411
|
+
connection's queue ages are not observable until it ends), never `ok`. A signal without a value reads
|
|
3412
|
+
`unavailable (<reason>)`, never zero: `capacity.*` without a capacity source (`owner_contract_inactive`), `client.*`
|
|
3413
|
+
while no client reports frames (`no_client_frame_report`), an empty window (`no_samples`), a refused store read
|
|
3414
|
+
(`store_reader_refused`, with `store.reader_refused` as a warning), and measurements no owner takes yet
|
|
3415
|
+
(`no_input_timing`, `no_ingress_timing`, `no_hook_exit_report`, `no_lock_timing`, `no_open_index_counter`). A snapshot
|
|
3416
|
+
that cannot be read or lacks a field is one `✗ lanes2 signals snapshot readable` line, and doctor goes on to its later
|
|
3417
|
+
checks. No lane, operation or prompt identity and no terminal content is ever in the file.
|
|
3303
3418
|
|
|
3304
3419
|
**Reading it by hand.** `python3 libexec/doctor_lanes2.py [--snapshot PATH] [--now-ms MS]` prints the same lines (exit 1
|
|
3305
|
-
when one is `✗`, 0 with no snapshot). The
|
|
3306
|
-
|
|
3420
|
+
when one is `✗`, 0 with no snapshot). The file is self-describing (every signal carries its doctor phrase, unit, kind,
|
|
3421
|
+
origin, state and reason, every label its value, increase and resolved bounds), so a reader needs no manifest; a
|
|
3422
|
+
Throttle monitor tab on the same host may read it, but none does yet, and a reader on another host has no transport to
|
|
3423
|
+
it.
|
|
3307
3424
|
|
|
3308
3425
|
## Lanes 2.0 adoption (`libexec/adopt.py`; `lanes update` carries it; every flag off)
|
|
3309
3426
|
|
|
@@ -3320,8 +3437,10 @@ listing every domain whose record it read back from disk; a domain it could not
|
|
|
3320
3437
|
code and never reported adopted.
|
|
3321
3438
|
|
|
3322
3439
|
What it never does: write `flags/native.*` or site.conf's `LANES_RS_*` (lane H2; every component stays off), import
|
|
3323
|
-
legacy data (a domain's records move only through its cutover fence), start a unit or run a Rust binary.
|
|
3324
|
-
|
|
3440
|
+
legacy data (a domain's records move only through its cutover fence), start a unit or run a Rust binary. A Rust host
|
|
3441
|
+
that recovers serves per domain: it checks the record of every domain it serves and writes, or dispatches, only in the
|
|
3442
|
+
domains whose record names it as the admitting owner; a write to a table of any other domain is refused before the
|
|
3443
|
+
store sees it. While every record names `lanes-py`, it comes up fenced and read-only (`owned_elsewhere`).
|
|
3325
3444
|
|
|
3326
3445
|
**Check it.** `lanes doctor` prints, after the update line, one information line (when, which release, the store, the
|
|
3327
3446
|
flags) and one line per domain: `✓` adopted (phase, owner, epoch, where the 1.x owner keeps it), `⚠` not adopted
|
|
@@ -3330,7 +3449,24 @@ flags) and one line per domain: `✓` adopted (phase, owner, epoch, where the 1.
|
|
|
3330
3449
|
(the next update adopts it again). Nothing is printed before the first adoption. `python3 libexec/adopt.py status
|
|
3331
3450
|
[--json]` exits 0 only when every domain is adopted and its record verifies.
|
|
3332
3451
|
|
|
3333
|
-
**The update step.** Exit
|
|
3334
|
-
`update/last.json`, never a `partial` update; `lanes doctor` names the domain.
|
|
3335
|
-
|
|
3452
|
+
**The update step.** Exit 3 (a domain refused, for example a malformed record) and 4 (an I/O failure) are warnings in
|
|
3453
|
+
`update/last.json`, never a `partial` update; `lanes doctor` names the domain. Any other exit is a failure (`partial`),
|
|
3454
|
+
1 included: the adopter never exits 1 itself, so 1 is Python's own status for a crash (a broken tree, a failed import),
|
|
3455
|
+
and a crash is never recorded as a warning. A damaged `lanes2/adoption.json` (a field of the wrong type) is one `✗` line
|
|
3456
|
+
in `lanes doctor`, never a doctor crash. Run it by hand with the same command; it is idempotent and rewrites nothing
|
|
3457
|
+
that is already in place. A rollback to a tree without `libexec/adopt.py` runs no
|
|
3336
3458
|
such step and leaves the records as they are (a `shadow` record owned by `lanes-py` is what no record means).
|
|
3459
|
+
|
|
3460
|
+
|
|
3461
|
+
**Malformed adoption metadata (BEY-7110).** Doctor and status validate the receipt's v1 version, field types, UTF-8
|
|
3462
|
+
encodability of consumed strings and unique domain/refusal lists before using them. Reads are bounded to 64 KiB plus
|
|
3463
|
+
one overflow byte. A malformed,
|
|
3464
|
+
oversized or deeply nested receipt produces one `✗` diagnostic (status exits 3); it cannot suppress the rest of doctor
|
|
3465
|
+
with a type or Unicode encoding error. The next ordinary update rewrites the adoption receipt while preserving
|
|
3466
|
+
existing cutover records.
|
|
3467
|
+
|
|
3468
|
+
**Unwired Rust recovery boundaries (BEY-7111/BEY-7112).** A retained draft can be discarded and retained again with
|
|
3469
|
+
identical text; each new transition binds the observed workspace revision, while a lost reply retries its original
|
|
3470
|
+
key. Draft rows never enqueue a message. Notification routing sends only from a newly committed claim: a replayed or
|
|
3471
|
+
uncertain claim stays held as `sending`/unknown and is never permission to send again. This also applies to overlapping
|
|
3472
|
+
quiet-hours summaries. These modules remain unwired; the installed Python notification service is unchanged.
|