@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
|
@@ -13,7 +13,9 @@ catalog — a failure there leaves the installed release running as it was. comm
|
|
|
13
13
|
(every unit, `current.previous`, then the flip of `current`; W9 U1). post-commit: this module, run from the tree just
|
|
14
14
|
installed. Its steps run in this order, each whatever the ones before it returned, each bounded by STEP_TIMEOUT seconds
|
|
15
15
|
(its whole process group is stopped when it does not finish):
|
|
16
|
-
systemctl --user daemon-reload ·
|
|
16
|
+
systemctl --user daemon-reload · systemctl --user try-restart lanes-gc.timer, only when the tree before carried another
|
|
17
|
+
systemd/lanes-gc.timer text (GC_TIMER: a new schedule is armed now, not after the old one fires; try-restart leaves a
|
|
18
|
+
timer the operator stopped stopped) · `python3 libexec/native_bin.py verify-tree <tree> --prune-flags` (the step `verify
|
|
17
19
|
bin-rs`: only for a tree that carries Lanes 2.0 native binaries, native_bin.carries_binaries — a tree with no bin-rs/
|
|
18
20
|
or an empty BINARIES.json runs no such step. The tree's own binaries only, never `lanes rs install`'s: host-install.sh
|
|
19
21
|
ran the same check before its commit, so this is the second; a binary whose size or sha256 differs from the list, an
|
|
@@ -35,8 +37,10 @@ installed. Its steps run in this order, each whatever the ones before it returne
|
|
|
35
37
|
a tree that carries libexec/adopt.py, so a rollback to an older tree runs no such step): the Lanes 2.0 store's
|
|
36
38
|
installed adoption, idempotent on every update — each state domain's initial cutover record (shadow, owner lanes-py)
|
|
37
39
|
where none exists, the store's directory and `lanes2/adoption.json`; it never writes a flag, never moves ownership and
|
|
38
|
-
never starts anything (adopt.py). Its exit statuses
|
|
39
|
-
|
|
40
|
+
never starts anything (adopt.py). Its exit statuses 3 (a domain refused, e.g. a malformed record) and 4 (an I/O
|
|
41
|
+
failure) are warnings: `lanes doctor` names the domain, and a partial update would re-run every post-commit step.
|
|
42
|
+
Any other status is a failure, 1 included: the adopter never exits 1 itself, so 1 is Python's own status for a crash
|
|
43
|
+
(an uncaught exception, an import or syntax failure) and is never laundered into a warning.
|
|
40
44
|
Step output goes to the log (`update/last.log`); stdout gets one line per step and a summary, which names the Mermaid
|
|
41
45
|
outcome (`mermaid ok`, `mermaid skipped: <reason>`, …) whenever its step ran.
|
|
42
46
|
|
|
@@ -136,7 +140,11 @@ DOCS_SCRIPT = 'install/enable-docs.sh'
|
|
|
136
140
|
# Lanes 2.0 installed adoption (lanes2 Round 2 S12): libexec/adopt.py of the tree just installed, run last.
|
|
137
141
|
ADOPT_STEP = 'adopt lanes2'
|
|
138
142
|
ADOPT_SCRIPT = 'libexec/adopt.py'
|
|
139
|
-
|
|
143
|
+
# The daily housekeeping timer (lanes-gc.timer moved from boot-relative to midnight, PR #750): try-restarted right after
|
|
144
|
+
# daemon-reload when the update changed its unit text. [inferred, not measured] systemd counts a Persistent= calendar
|
|
145
|
+
# timer from its last trigger, so the run that moves it may fire one `lanes gc` at once.
|
|
146
|
+
GC_TIMER = 'lanes-gc.timer'
|
|
147
|
+
WARN_RC = {'sync': (1,), DOCS_STEP: (1, 3, 124), ADOPT_STEP: (3, 4)}
|
|
140
148
|
# The steps whose outcome the record and the summary name (any status not listed: `failed`).
|
|
141
149
|
STEP_OUTCOMES = {DOCS_STEP: {0: 'ok', 1: 'skipped', 3: 'refused', 124: 'skipped'}}
|
|
142
150
|
REASON_LIMIT = 300 # characters of a step's last line kept as its `reason` (a refusal names two digests)
|
|
@@ -351,10 +359,19 @@ def daemon_gone(state, container, inspect=None):
|
|
|
351
359
|
board container out of the steps for. From what `lanes sync` recorded when it recorded that container (no home
|
|
352
360
|
volume: it said so already), else from ONE docker inspect (`inspect`, default L.containers_info): docker answered it
|
|
353
361
|
does not exist, or it has no home volume. Docker giving no answer says nothing about it: None, and the step runs and
|
|
354
|
-
reports for itself, as a recorded container's does.
|
|
362
|
+
reports for itself, as a recorded container's does. A daemon container behind a guest transport (its record, else
|
|
363
|
+
the catalog) is skipped before any of that: the guest ships its own contract (an aggregator, RUNBOOK "Federation")."""
|
|
355
364
|
document = L.read_json(Path(state) / 'containers.json', {})
|
|
356
|
-
|
|
357
|
-
|
|
365
|
+
recorded = document.get(container) if isinstance(document, dict) else None
|
|
366
|
+
recorded = recorded if isinstance(recorded, dict) else {}
|
|
367
|
+
# Behind a guest (its containers.json record, else the catalog board that names it): the guest's own Lanes ships
|
|
368
|
+
# the contract there (lanes-site/1, RUNBOOK "Federation"); install-container here has no docker for it and would
|
|
369
|
+
# exit 1 on every update of an aggregator, each `partial`. Docker is not asked: it is not this host's container.
|
|
370
|
+
route, _why = L.write_route(container, recorded)
|
|
371
|
+
if route not in (None, L.TRANSPORT_LOCAL, L.TRANSPORT_PROBE):
|
|
372
|
+
return f'runs behind {route}: that guest ships its own contract (lanes-site/1)'
|
|
373
|
+
if recorded:
|
|
374
|
+
return None if recorded.get('home') or recorded.get('error') else 'lanes sync recorded no home volume for it'
|
|
358
375
|
try:
|
|
359
376
|
answers = (L.containers_info if inspect is None else inspect)([container])
|
|
360
377
|
except (L.LanesError, subprocess.SubprocessError, OSError, ValueError):
|
|
@@ -370,6 +387,14 @@ def describe(rc, timeout):
|
|
|
370
387
|
return {124: f'no answer in {timeout:g} s', 127: 'could not start'}.get(rc, f'exit {rc}')
|
|
371
388
|
|
|
372
389
|
|
|
390
|
+
def unit_text(tree, unit):
|
|
391
|
+
"""The text of `tree`'s systemd/<unit> template, or None (no tree, no such file, unreadable)."""
|
|
392
|
+
try:
|
|
393
|
+
return (Path(tree) / 'systemd' / unit).read_text()
|
|
394
|
+
except (OSError, TypeError, UnicodeDecodeError):
|
|
395
|
+
return None
|
|
396
|
+
|
|
397
|
+
|
|
373
398
|
def interrupted_rc(error):
|
|
374
399
|
return error.code if isinstance(error, SystemExit) and isinstance(error.code, int) else 130
|
|
375
400
|
|
|
@@ -417,6 +442,8 @@ def post_commit(tree, state, log, steps=(), before=None, started=None, out=None,
|
|
|
417
442
|
print(f'WARN {name} (skipped: {reason})', file=out, flush=True)
|
|
418
443
|
try:
|
|
419
444
|
step('daemon-reload', [systemctl, '--user', 'daemon-reload'])
|
|
445
|
+
if before is not None and unit_text(before, GC_TIMER) != unit_text(tree, GC_TIMER):
|
|
446
|
+
step('try-restart ' + GC_TIMER, [systemctl, '--user', 'try-restart', GC_TIMER])
|
|
420
447
|
if native_bin.carries_binaries(tree):
|
|
421
448
|
step(BIN_RS_STEP, [sys.executable, str(Path(tree) / 'libexec' / 'native_bin.py'), 'verify-tree',
|
|
422
449
|
str(tree), '--state', str(state), '--prune-flags'])
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[Unit]
|
|
2
|
-
Description=lanes housekeeping (zmx logs never rotate; stale dynamic resolve files; old staged trees)
|
|
2
|
+
Description=lanes housekeeping (zmx logs never rotate; stale dynamic resolve files; old staged trees; unregistered sessions in which nothing runs, where site.conf opts in)
|
|
3
3
|
|
|
4
4
|
[Service]
|
|
5
5
|
Type=oneshot
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
[Unit]
|
|
2
|
-
Description=lanes housekeeping daily
|
|
2
|
+
Description=lanes housekeeping daily at midnight
|
|
3
3
|
|
|
4
4
|
[Timer]
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
# Midnight in the host's time zone (+0-5 min), enabled by every full server install with the other timers. The unit
|
|
6
|
+
# file is re-rendered by every install and update (install/services.py; an update's post-commit runs daemon-reload and,
|
|
7
|
+
# when this file's text changed, `systemctl --user try-restart lanes-gc.timer`), so a host whose timer was the earlier
|
|
8
|
+
# boot-relative one (OnBootSec=10min, OnUnitActiveSec=1d) takes this calendar at its next update. [inferred, not
|
|
9
|
+
# measured: systemd counts a Persistent= calendar timer from its last trigger, which on such a host lies before the
|
|
10
|
+
# last midnight, so the update that moves the schedule may run one `lanes gc` at once; its sweep ends only what a
|
|
11
|
+
# midnight one would.]
|
|
12
|
+
# Persistent= runs a midnight the host missed (off or suspended) once at the next boot, so no OnBootSec= is needed.
|
|
13
|
+
# `lanes gc` also ends the unregistered sessions in which nothing runs, only where site.conf sets LANES_GC_UNREGISTERED=1
|
|
14
|
+
# (RUNBOOK "Daily cleanup of unregistered terminals").
|
|
15
|
+
OnCalendar=*-*-* 00:00:00
|
|
16
|
+
Persistent=true
|
|
17
|
+
RandomizedDelaySec=300
|
|
7
18
|
|
|
8
19
|
[Install]
|
|
9
20
|
WantedBy=timers.target
|
|
@@ -51,6 +51,17 @@ http://:8083 {
|
|
|
51
51
|
trusted_proxies 127.0.0.0/8
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
+
# lanes2 S11 (W29-C): the GitHub and Linear connector webhooks, /lanes-hooks/github and /lanes-hooks/linear
|
|
55
|
+
# (crates/lanes-runtime/src/ingress/connectors.rs verifies each signature and records the delivery; nothing acts
|
|
56
|
+
# inline). The Rust host binds this unix socket from integration gate I1; until then nothing listens and Caddy
|
|
57
|
+
# answers 502. Public delivery needs Funnel on the owner host (operator gate I-W). bin/lanes reserves the root.
|
|
58
|
+
# A body above the ingress bound (1 MiB, MAX_BODY_BYTES) is refused here, before it is buffered.
|
|
59
|
+
handle_path /lanes-hooks/* {
|
|
60
|
+
request_body {
|
|
61
|
+
max_size 1MiB
|
|
62
|
+
}
|
|
63
|
+
reverse_proxy unix/{$LANES_STATE}/run/lanes-connectors.sock
|
|
64
|
+
}
|
|
54
65
|
@backend path /assets/* /ws/* /command/* /info/* /session /session-list
|
|
55
66
|
handle @backend {
|
|
56
67
|
reverse_proxy 127.0.0.1:8082
|
|
@@ -262,16 +262,28 @@ nothing: 4 B less, 24 724 B MEASURED, and the laptop/tablet download 24 724 + 3
|
|
|
262
262
|
ratchet. No cap in `test_web_view` changed. The directory's own files are fetched only when it opens and are bound by
|
|
263
263
|
caps of their own in `tests/unit/test_web_directory.py`.
|
|
264
264
|
|
|
265
|
+
The phone's inbox, schedule and result views (lanes2 Round 2 W30-B, 2026-11-01; [Phone inbox](#phone-inbox-schedule-and-results-lanes2-round-2-w30-b)
|
|
266
|
+
below) put a second on-demand loader into `mobile.js`, again without moving any budget. It needed 216 B (`ops()`, its own
|
|
267
|
+
once flag `o`, its `hashchange` listener) against 23 B of headroom, and paid for them inside the file with equivalent code:
|
|
268
|
+
one `js(src)` for the three script loads (`browser.js`, `directory.js`, `inbox.js`) and the extras branch as one
|
|
269
|
+
statement, one `keep` listener for the three controls that cancel `mousedown`, one `paneAt(position)` for the two pane
|
|
270
|
+
lookups, the two text-size buttons from one `step()`, `currentTab` as an arrow, the login box looked up once and the
|
|
271
|
+
typing capture's style as one string. `mobile.js` MEASURED 24 709 B with `wc -c` (dev-container profile), 38 B under its
|
|
272
|
+
unchanged 24 747 B cap; the laptop/tablet download 24 709 + 3 318 = 28 027 B, under its unchanged ratchet. No cap in
|
|
273
|
+
`test_web_view` changed; `inbox.js` has a row of its own, bound by `tests/unit/test_web_inbox.py` and
|
|
274
|
+
`tests/web/inbox.test.mjs` (`INBOX_JS_CAP` in both, required to agree).
|
|
275
|
+
|
|
265
276
|
| File | Cap | MEASURED (`wc -c`) | Bound by |
|
|
266
277
|
| --- | --- | --- | --- |
|
|
267
|
-
| `mobile.js` | 24 747 B | 24
|
|
278
|
+
| `mobile.js` | 24 747 B | 24 709 B (2026-11-01, W30-B) | spec §8 phone row, `test_web.test_bundle_growth`, `test_web_view` `JS_DOCS` |
|
|
268
279
|
| `mobile.css` | 18 982 B | 18 945 B | spec §8 phone row |
|
|
269
280
|
| `browser.js` | 4 096 B | 3 318 B | `test_web_view.BROWSER_JS_CAP` |
|
|
270
281
|
| `browser.css` | 2 048 B | 1 947 B | `test_web_view.BROWSER_CSS_CAP` |
|
|
271
|
-
| `mobile.js` + `browser.js` | 28 065 B | 28
|
|
282
|
+
| `mobile.js` + `browser.js` | 28 065 B | 28 027 B (2026-11-01, W30-B) | DEF-1569, `LAPTOP_TABLET_JS_RATCHET` |
|
|
272
283
|
| `mobile.css` + `browser.css` | 20 993 B | 20 892 B | DEF-1569's CSS twin, `LAPTOP_TABLET_CSS_CAP` |
|
|
273
284
|
| `directory.js` (on demand) | 60 239 B (exact) | 60 239 B (2026-10-30) | `test_web_directory.DIRECTORY_JS_CAP` |
|
|
274
285
|
| `directory.css` (on demand) | 7 394 B (exact) | 7 394 B (2026-10-30) | `test_web_directory.DIRECTORY_CSS_CAP` |
|
|
286
|
+
| `inbox.js` (on demand) | 72 626 B (exact) | 72 626 B (2026-11-02, review repair after BEY-7130, dev-container) | `test_web_inbox.INBOX_JS_CAP`, `tests/web/inbox.test.mjs` `INBOX_JS_CAP` |
|
|
275
287
|
|
|
276
288
|
## Lane directory (Lanes 2.0, fan-out F3)
|
|
277
289
|
|
|
@@ -379,6 +391,115 @@ items (below).
|
|
|
379
391
|
`tests/web/prove_directory.sh` (budget, timer and loading legs on edited copies, and the suite failing on the tree
|
|
380
392
|
before F3; run in the lane's managed job).
|
|
381
393
|
|
|
394
|
+
## Phone inbox, schedule and results (lanes2 Round 2 W30-B)
|
|
395
|
+
|
|
396
|
+
`inbox.js` shows a phone (and a tablet or desktop page) the same inbox thread, schedule and result records the terminal's
|
|
397
|
+
Operations view lists ([continuous workspace §14](../../docs/superpowers/specs/2026-10-25-lanes-2.0-continuous-workspace.md),
|
|
398
|
+
terminal UX §3; P09-P12). Status: built and tested against the terminal's own fixtures; **not connected** and **no entry
|
|
399
|
+
point yet**. No host serves the inbox or the builds panel to a browser (the gateway delivery is fan-out lane E7's, and the
|
|
400
|
+
S3 inbox and S5 builds documents reach no client before gates I1/I3), so on every host today each view opens and says
|
|
401
|
+
"Not connected"; nothing on the page links to it, so it opens only from a typed fragment or a record link.
|
|
402
|
+
|
|
403
|
+
- **Loaded on demand.** `index.html` never lists it. `mobile.js` appends `/lanes-assets/inbox.js` once (its own flag `o`)
|
|
404
|
+
only when the fragment is exactly `#inbox`, `#schedule` or `#results`, or one of them followed by `=<record id>`, at
|
|
405
|
+
load or on `hashchange`, in all three modes. The script appends `directory.css` and paints with its classes and token
|
|
406
|
+
roles (no colour literal of its own; one small style block of role variables). Everything inside it is one function,
|
|
407
|
+
so a page that opened `#lanes` and then `#inbox` holds both modules without a shared global name.
|
|
408
|
+
- **The same records.** The inbox rules are the terminal's, ported from `crates/lanes-protocol` `inbox.rs` (with S3's
|
|
409
|
+
review fixes, #727) and `crates/lanes-terminal/src/ops/inbox`. There are five views: Needs you, Unread, Waiting,
|
|
410
|
+
Scheduled and History. Membership is decided at the projection's `as_of_unix_ms`: archived threads are History only,
|
|
411
|
+
and snoozed ones are Scheduled only until their time. A lane's needs-input signal with no message is a row of its own
|
|
412
|
+
that reads "no messages yet". The workspace and peer-traffic filters narrow a list and its count together. A view tab
|
|
413
|
+
adds `(+n not shown)` from the page's `omitted_by_view`. The delivery word is the newest entry's `DeliveryState::of`
|
|
414
|
+
(uncertainty first; a socket write is `submitted`, never an acknowledgement), shown with the terminal's no-colour label.
|
|
415
|
+
The strict decode refuses a friendlier word, peer traffic asking for attention, a thread listed twice, a row without
|
|
416
|
+
entries that is not a signal, activity older than the newest entry, and a page or view that leaves out more than it
|
|
417
|
+
says. Text fields follow `lanes-protocol` `Text` (`Label`, `LongText`): non-empty, bounded, and no control character
|
|
418
|
+
but a newline or a tab, so an empty reason or an escape sequence in a subject is refused as the terminal refuses it. A
|
|
419
|
+
thread's page shows each entry with the owner's witness and the Lanes attempt on lines of their own, and it refuses a
|
|
420
|
+
witness on a message the host still holds. The node suite replays S3's shared fixture
|
|
421
|
+
(`crates/lanes-terminal/src/ops/inbox/fixtures/inbox-views.json`, which the terminal's Rust panel tests read). It
|
|
422
|
+
requires every view's thread ids, order and count under every filter, on screen in phone, tablet and desktop. Results are `crates/lanes-terminal/src/ops/builds/records.rs`'s records of the S5 `lanes2.builds-panel/1`
|
|
423
|
+
document: active jobs as builds, then recent jobs as results, the job id as the record id, the owner's state word beside
|
|
424
|
+
the label (`Staged (ready)`, `Timed out (timeout)`), one consequence and the full detail with every action's
|
|
425
|
+
availability, read-only; selection follows the id across a reorder. Under the header come `records.rs`'s lane-wait
|
|
426
|
+
lines (each opens to its detail: the job, the reason, the provenance, the attempt) and the read-only resource lines.
|
|
427
|
+
The panel is decoded field for field as `decode.rs` decodes it (lane waits, resources, an integer exit code, a present
|
|
428
|
+
artifact digest), and a panel observed earlier than the one shown never replaces it.
|
|
429
|
+
- **Pages (P10).** `Next page` sends the terminal's `n` (an `InboxPageRequest` after the owner's `next_page` token, or
|
|
430
|
+
the first page once the last one is shown while threads are left out) and `Load earlier entries` its `e` (an
|
|
431
|
+
`InboxThreadRequest` before the thread's `earlier_page` token). Each answer replaces the page shown; a selection the new
|
|
432
|
+
page does not list goes without a "no longer listed" notice. A source without `readPage`/`readThread` shows both
|
|
433
|
+
unavailable (`page_read_absent`).
|
|
434
|
+
- **Schedule.** Schedules and occurrences have no client read yet (S4: `lanes.api/1` carries no schedule read or command).
|
|
435
|
+
The Schedule view says so — `unavailable (schedule_read_absent)` with its reason — and invents no row; it lists the
|
|
436
|
+
inbox's Scheduled threads (messages held for a trigger, and snoozed threads) under the same filters, the terminal's ids.
|
|
437
|
+
- **Input ownership (E33).** The page never types into the terminal and never focuses the reply field. A reply's field
|
|
438
|
+
opens read-only; only **Type** makes it take text (the person then taps it: the phone's focus guard would refuse a
|
|
439
|
+
programmatic focus anyway), and **Done typing**, Escape, Review, selecting another record or closing gives the input
|
|
440
|
+
back. While the person types, an owner's snapshot or a command's answer is not drawn: redrawing would move the focused
|
|
441
|
+
field out of the page, which blurs it and closes a phone's keyboard. One line, appended outside the field, says that
|
|
442
|
+
updates wait; the next action of the person's draws them. On a tablet or a desktop, opening takes the keyboard into the
|
|
443
|
+
dialog (the selected row, else Close), a redraw keeps it on the same control, Escape closes the dialog (Escape in the
|
|
444
|
+
reply field only ends typing), and closing gives a desktop terminal its keys back, as `directory.js` does. A phone gets
|
|
445
|
+
no programmatic focus.
|
|
446
|
+
- **Composer and thread actions (P11).** Reply, Type, Review, then **Send now** sends the S3 `InboxComposeCommand`:
|
|
447
|
+
`v`, an `operation_id` retained until its outcome is definitive (the only duplicate guard), the exact recipient `to`, the text with its line breaks,
|
|
448
|
+
`reply_to` (the thread, which the host keeps Lanes-local) and `timing: now`. The host lists `send_now` as
|
|
449
|
+
`unqualified` (`human_principal_unavailable`) until the lane bus serves the human principal, and the page shows the
|
|
450
|
+
owner's reason. "After turn" is always shown unavailable, with its M8 reason. Peer traffic is read-only. Mark read and
|
|
451
|
+
unread, Snooze 1 h, Unsnooze, Archive and Unarchive send the S3 `InboxThreadCommand` under an operation id of their
|
|
452
|
+
own. A snooze names its end in `snooze_until_unix_ms`. A read or an archive names the activity the person saw in
|
|
453
|
+
`seen_through_unix_ms` (the row's `activity_unix_ms`), so newer activity stays unread. The rows change only with the
|
|
454
|
+
owner's next snapshot. Only a current snapshot of a connected source authorizes a write; otherwise every write is
|
|
455
|
+
unavailable with a code: `not_connected`, `stale_snapshot`, `peer_traffic_read_only`, or the owner's own availability
|
|
456
|
+
and reason.
|
|
457
|
+
- **Uncertain commands (BEY-7114).** Before dispatch, one exact command is retained in the principal's
|
|
458
|
+
device-local outgoing slot. A transport error or malformed answer is an unknown outcome. Retrying the same intent,
|
|
459
|
+
even after reload or a newer snapshot, sends that retained operation, text, snooze end and seen-through activity;
|
|
460
|
+
a different intent waits for a definitive receipt or refusal. An origin-scoped Web Lock serializes that slot across
|
|
461
|
+
tabs and the holder rereads it before dispatch. Browsers without Web Locks or writable storage refuse to send;
|
|
462
|
+
corrupt retained data holds writes until it is discarded. A receipt means custody, not delivery. The owner must explicitly offer Send now.
|
|
463
|
+
The retained command is shown with what it is and its operation id: **Retry unchanged** resends it whether or not its
|
|
464
|
+
thread is still listed; **Look up outcome** is unavailable (`outcome_lookup_absent`) until the E7 gateway serves an
|
|
465
|
+
operation lookup to the browser; **Discard…** asks for a confirmation, because discarding forgets the owner's only
|
|
466
|
+
duplicate guard, and an unreadable slot can only be discarded. The confirmation binds the exact retained bytes and rechecks them under the Web Lock; a replacement or unreadable storage preserves custody and requires fresh review (BEY-7130). A send still waiting on a replaced source ends as an
|
|
467
|
+
unknown outcome and lets go of the lock. An account change keeps every principal's `outgoing` (below).
|
|
468
|
+
Contract tests use an exclusive-lock stand-in; real browser/gateway acceptance remains owed because the port is unwired.
|
|
469
|
+
- **States.** Not connected, loading, refused, malformed, stale and denied are separate words. A malformed update or a
|
|
470
|
+
refused refresh keeps the last good rows marked stale; a denial removes them; an older revision never refills.
|
|
471
|
+
- **Device-local (F5).** The view, the filter, the selection, the scroll and the reply drafts (at most 32) live in
|
|
472
|
+
`localStorage` under `lanes:inbox:<principal>:<field>`; `outgoing` retains the one unresolved exact command (principal URI-encoded); no write the page sends carries a key of
|
|
473
|
+
F5's `DEVICE_LOCAL_KEYS`. The first principal of a page load purges every other principal's keys; an account change purges
|
|
474
|
+
the previous principal's and clears the screen, including all build/result documents and derived records. Both purges
|
|
475
|
+
keep every principal's `outgoing`: the one unresolved command (its message text included) stays on the device until its
|
|
476
|
+
own principal gets a receipt or a refusal for it or discards it, so an account change never turns its retry into a
|
|
477
|
+
duplicate; another principal is shown none of it.
|
|
478
|
+
- **Record links.** `#inbox=<URI-encoded thread>`, `#schedule=<thread>` and `#results=<job id>` (the record id grammar: 1
|
|
479
|
+
to 128 visible ASCII bytes) open the same record. A link waits while the inbox is incomplete; once complete, a record that
|
|
480
|
+
is not there is said once and forgotten. A link that resolves switches to the inbox view that holds the thread, clears
|
|
481
|
+
(and says so) a filter that hid it, selects it and asks for its entries; `#schedule=` names a scheduled thread only.
|
|
482
|
+
A selection restored on this device also asks for its entries.
|
|
483
|
+
- **Source port** (`window.lanesInboxSource`, or `lanesInbox.connect(source)`; PROVISIONAL, for the E7 gateway):
|
|
484
|
+
`subscribe(onFrame) -> cancel` delivering `{frame: 'inbox', body: InboxProjection}`, `{frame: 'thread', body:
|
|
485
|
+
InboxThread}`, `{frame: 'builds', body: lanes2.builds-panel/1}` and `{frame: 'refused', section: 'inbox'|'builds', body:
|
|
486
|
+
{code, reason}}` (`denied` or `unauthorized` remove the rows); optional `readPage(InboxPageRequest)` and
|
|
487
|
+
`readThread(InboxThreadRequest)` (`{v: 1, thread}` for the newest page, with `before` for an earlier one); `send({kind:
|
|
488
|
+
'inbox_compose'|'inbox_thread', body})` answering a Promise of `{frame: 'receipt'|'refused', body}`. The page makes no
|
|
489
|
+
request of its own and keeps no timer.
|
|
490
|
+
- **Gaps (integrator requests, recorded in the PR).** The S3 inbox documents are not registered in
|
|
491
|
+
`lanes_protocol::schema::documents`, so no generated decoder or schema file exists for them (the page decodes by hand,
|
|
492
|
+
as the terminal does); no Day-0 frame carries the inbox, a thread, the builds panel or a denial; no client read of
|
|
493
|
+
schedules or occurrences exists; no gateway serves the page reads (`readPage`, `readThread`) or an operation-outcome
|
|
494
|
+
lookup to the browser (E7); the parity manifest's E33 row names no new-path test; nothing links to the views yet.
|
|
495
|
+
- Tests: `tests/web/inbox.test.mjs` (the fixture identity, the terminal's ids per view and filter, the page in three
|
|
496
|
+
modes, labels, refusals, results, schedule, input ownership, composer, thread actions, device-local, states, links, the
|
|
497
|
+
loader, the budgets, isolation; every detector has at least one sabotage leg, `LEGS`, a broken copy it must catch) and
|
|
498
|
+
`tests/web/prove_inbox.sh` (budget, loading, registration and fixture legs on edited copies, including the plan's
|
|
499
|
+
sabotage of `inbox.js` inlined into `mobile.js`, and the suite failing on the tree before W30-B; run in the lane's
|
|
500
|
+
managed job). A leg whose edit no longer applies is reported vacuous, never as caught. `tests/unit/test_web_inbox.py`
|
|
501
|
+
holds the `inbox.js` budget row, names the suite's tests and counts its legs against node's TAP totals.
|
|
502
|
+
|
|
382
503
|
## Docs page (plan W10 W6, LNS-107)
|
|
383
504
|
|
|
384
505
|
The docs cockpit's pages (Markdown, Mermaid, files; served by `lanes-docsd` behind `/lanes-docs/*`, plan W3) are their
|