@vibelord/lanes 1.7.7 → 1.8.0
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/README.md +13 -9
- package/package.json +1 -1
- package/payload/lanes/VERSION +1 -1
- package/payload/lanes/bin/lanes +26 -4
- package/payload/lanes/bin/lanes-site-serve +4 -8
- package/payload/lanes/bin-rs/BINARIES.json +17 -2
- package/payload/lanes/bin-rs/THIRD-PARTY-NOTICES +18953 -0
- package/payload/lanes/bin-rs/x86_64-unknown-linux-musl/lanes-hook +0 -0
- package/payload/lanes/bin-rs/x86_64-unknown-linux-musl/lanes-terminal +0 -0
- package/payload/lanes/client/lanes-launch +4 -2
- package/payload/lanes/container/lane-mcp +1 -1
- package/payload/lanes/container/lane_core.py +4 -3
- package/payload/lanes/docs/ARCHITECTURE.md +26 -4
- package/payload/lanes/docs/RUNBOOK.md +121 -52
- package/payload/lanes/docs/USERGUIDE.md +28 -0
- package/payload/lanes/install/lanes-host.service.in +25 -0
- package/payload/lanes/install/services.py +243 -0
- package/payload/lanes/libexec/agent_state.py +3 -1
- package/payload/lanes/libexec/attach.py +139 -21
- package/payload/lanes/libexec/cutover.py +24 -4
- package/payload/lanes/libexec/doctor_lanes2.py +3 -3
- package/payload/lanes/libexec/native.sh +2 -2
- package/payload/lanes/libexec/native_bin.py +595 -109
- package/payload/lanes/libexec/shadow.py +51 -3
- package/payload/lanes/libexec/sidebar_status.py +190 -80
- package/payload/lanes/libexec/update.py +12 -3
- package/payload/lanes/site/protocol.py +24 -9
- package/payload/lanes/site/relay.py +292 -0
- package/payload/lanes/site/server.py +31 -3
- package/payload/lanes/web/README.md +6 -6
- package/payload/lanes/web/directory.js +10 -8
- package/payload/lanes/web/generated/README.md +85 -21
- package/payload/lanes/web/generated/lanes2_protocol.d.mts +4190 -188
- package/payload/lanes/web/generated/lanes2_protocol.mjs +14218 -351
- package/payload/lanes/web/inbox.js +8 -6
- package/payload/manifest.json +22 -5
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
"""lanes-site/1 relay to the guest's own lanes host (final contract decision FC-X31; Lanes2 architecture §3.32's
|
|
2
|
+
3 November note). Python 3 stdlib only.
|
|
3
|
+
|
|
4
|
+
The Python reference server (site/server.py) is the 2.0 `lanes-site/1` server on every guest. Once the guest's lanes
|
|
5
|
+
host (`throttle-rc lanes host`, FC-R1) owns a state domain — `$LANES_STATE/cutover/<domain>.json` no longer admits
|
|
6
|
+
`lanes-py` (FC-R2: `cutover.py check <domain> --holder lanes-py --admit`) — the server stops being an effect owner in
|
|
7
|
+
that domain and becomes a relay: a `lanes.api/1` client speaking Frame lines (FC-D1, FC-D1b) on
|
|
8
|
+
`$LANES_STATE/run/lanesd.sock`.
|
|
9
|
+
|
|
10
|
+
op domain while lanes-py owns the domain while the lanes host owns it
|
|
11
|
+
msg.deliver delivery owner_unclaimed (tmux_write types) request{inbox_compose} (FC-T1) under the
|
|
12
|
+
UUIDv7 operation id the aggregator's
|
|
13
|
+
client minted (FC-D4)
|
|
14
|
+
msg.status delivery owner_unclaimed command{query_operation}
|
|
15
|
+
snapshot.subscribe observation (not an op of this server yet) subscribe (FC-X31, FC-X24): relayed as a
|
|
16
|
+
`subscribe` Frame once lanes-site/1 gains
|
|
17
|
+
the op (protocol.OPS has none today)
|
|
18
|
+
exec.run, exec lifecycle served by the server owned_elsewhere (no lanes.api/1 kind)
|
|
19
|
+
fs.write_if_changed observation (no Python op yet) owned_elsewhere (no lanes.api/1 kind)
|
|
20
|
+
tmux_write delivery served by the server owned_elsewhere (FC-R2: every Python
|
|
21
|
+
effect path checks its domain)
|
|
22
|
+
|
|
23
|
+
The read operations (boards.*, tmux_read; AR's containers.resolve, fs.read|list|stat, proc.facts, holder.discover,
|
|
24
|
+
holder.facts, holder.capture and capacity.pools as they arrive) stay local Python reads: they observe and take no
|
|
25
|
+
effect. A relay holds no store, no lock and no probe, and it refuses `owner_unavailable` while lanesd.sock is absent.
|
|
26
|
+
|
|
27
|
+
Relay arguments (decided on engineering merit; additive within lanes-site/1):
|
|
28
|
+
msg.deliver{operation_id, to, text, [reply_to], [timing]} operation_id a UUIDv7 (the client mints it, once per
|
|
29
|
+
logical message: a retry repeats it and the host's durable operation identity answers it, FC-D4); `to` and
|
|
30
|
+
`reply_to` lane addresses (inbox_compose's token alphabet); `text` check_text-bounded; timing now|after_turn
|
|
31
|
+
(default now) -> {operation_id, receipt} with the host's receipt body
|
|
32
|
+
msg.status{operation_id, target: {workspace_id, lane_id}, expected_owner_epoch} -> {operation_id, receipt}
|
|
33
|
+
What the host answers (FC-X5, FC-T3):
|
|
34
|
+
* a `receipt` is the answer: its body is returned as `receipt`, except a refusal receipt (outcome status
|
|
35
|
+
`refusal`, or state `refused`), which is no success. Its reason code `outcome.detail.code` is classified by
|
|
36
|
+
FC-X5's rule: busy, host_shutting_down, quota_exhausted, mailbox_full, bytes_exhausted and stopped are the
|
|
37
|
+
custody class owner_unavailable (the host took no custody and cannot now: retry later under the same operation
|
|
38
|
+
id) and answer `owner_unavailable`; every other code answers `relay_refused` naming the code in `human`.
|
|
39
|
+
* a `refused` frame is the host's boundary refusal of the relay's own frame (its closed FrameRefusalCode set:
|
|
40
|
+
malformed, frame_too_large, too_deep, invalid, wrong_direction, not_negotiated, stale_epoch,
|
|
41
|
+
hello_after_negotiation, expected_hello, protocol_epoch_changed). None of those is a lanes-site/1 code, so it
|
|
42
|
+
answers `relay_refused` naming the code."""
|
|
43
|
+
import json
|
|
44
|
+
import os
|
|
45
|
+
import re
|
|
46
|
+
import secrets
|
|
47
|
+
import socket
|
|
48
|
+
import sys
|
|
49
|
+
import time
|
|
50
|
+
from pathlib import Path
|
|
51
|
+
|
|
52
|
+
HERE = Path(__file__).resolve().parent
|
|
53
|
+
sys.path.insert(0, str(HERE))
|
|
54
|
+
sys.path.insert(1, str(HERE.parent / 'libexec'))
|
|
55
|
+
import protocol as P # noqa: E402
|
|
56
|
+
|
|
57
|
+
SOCKET = Path('run') / 'lanesd.sock' # under $LANES_STATE (FC-R1; DM-LANES2-C6-KEYS)
|
|
58
|
+
HOLDER = 'lanes-py' # the Python half's holder word in the cutover journal (FC-R2)
|
|
59
|
+
SCHEMA_READ = 1 # the schema epoch the Python half reads (cutover.py check --schema)
|
|
60
|
+
DOMAIN_OF = {'msg.deliver': 'delivery', 'msg.status': 'delivery', 'tmux_write': 'delivery', 'exec.run': 'lifecycle',
|
|
61
|
+
'exec': 'lifecycle', 'fs.write_if_changed': 'observation'}
|
|
62
|
+
RELAYED = frozenset({'msg.deliver', 'msg.status'})
|
|
63
|
+
LOCAL_EFFECTS = frozenset({'tmux_write', 'exec.run', 'exec', 'fs.write_if_changed'})
|
|
64
|
+
UUID7 = re.compile(r'[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\Z')
|
|
65
|
+
TOKEN = re.compile(r'[A-Za-z0-9_][A-Za-z0-9_.:/@-]{0,127}\Z') # inbox_compose's `to` / `reply_to`
|
|
66
|
+
TIMINGS = ('now', 'after_turn')
|
|
67
|
+
PROTOCOL = {'major': 1, 'minor': 1} # lanes-protocol negotiate::PROTOCOL_MAJOR / PROTOCOL_MINOR
|
|
68
|
+
CAPABILITIES = ('inbox', 'durable_command_query')
|
|
69
|
+
LINE_MAX = (1 << 20) + 1 # lanes-protocol wire::LINE_MAX_BYTES
|
|
70
|
+
DEADLINE_S = P.WRITE_DEADLINE_S # the whole relay round trip, connect to answer
|
|
71
|
+
ANSWERS = frozenset({'receipt', 'refused', 'document', 'view_result'})
|
|
72
|
+
# FC-X5: the reason codes CustodyCode::of_refusal_code classifies as owner_unavailable.
|
|
73
|
+
OWNER_UNAVAILABLE = frozenset({'busy', 'host_shutting_down', 'quota_exhausted', 'mailbox_full', 'bytes_exhausted',
|
|
74
|
+
'stopped'})
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def uuid7(now_ms=None):
|
|
78
|
+
"""A fresh UUIDv7 text (RFC 9562: 48-bit Unix milliseconds, version 7, variant 10, random bits)."""
|
|
79
|
+
ms = int(time.time() * 1000) if now_ms is None else now_ms
|
|
80
|
+
value = (ms & ((1 << 48) - 1)) << 80 | 0x7 << 76 | secrets.randbits(12) << 64 | 0b10 << 62 | secrets.randbits(62)
|
|
81
|
+
text = f'{value:032x}'
|
|
82
|
+
return f'{text[:8]}-{text[8:12]}-{text[12:16]}-{text[16:20]}-{text[20:]}'
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def domain_owner(state, domain, check=None):
|
|
86
|
+
"""('lanes-py', code) while the Python half may admit work in `domain`, else ('elsewhere', code): FC-R2's rule,
|
|
87
|
+
cutover.py's `check <domain> --holder lanes-py --admit` read in process. An unreadable or malformed record never
|
|
88
|
+
reads as absent: it is `elsewhere`."""
|
|
89
|
+
if check is None:
|
|
90
|
+
import cutover as CO # libexec: the one journal of record's Python half
|
|
91
|
+
try:
|
|
92
|
+
record = CO.read_record(state, domain)
|
|
93
|
+
except CO.Refused as refused:
|
|
94
|
+
return 'elsewhere', refused.code
|
|
95
|
+
# FC-R2's table: every domain this relay gates (delivery, lifecycle, observation) has lanes-py as its legacy
|
|
96
|
+
# owner, so no record means the Python half owns it.
|
|
97
|
+
allowed, code = CO.may_admit(record, HOLDER, SCHEMA_READ, HOLDER)
|
|
98
|
+
else:
|
|
99
|
+
allowed, code = check(state, domain)
|
|
100
|
+
return ('lanes-py' if allowed else 'elsewhere'), code
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
class FrameClient:
|
|
104
|
+
"""One `lanes.api/1` connection to the lanes host: a Hello line, then one request or command line and its answer
|
|
105
|
+
(receipt, refused, document or view_result with the same request_id; events in between are skipped). Bounded by
|
|
106
|
+
one deadline from connect to answer; nothing is retried here (the aggregator's client retries under the same
|
|
107
|
+
operation id)."""
|
|
108
|
+
|
|
109
|
+
def __init__(self, path, build='unknown', instance='lanes-site-relay', deadline=DEADLINE_S):
|
|
110
|
+
self.path, self.build, self.instance, self.deadline = Path(path), build, instance, deadline
|
|
111
|
+
|
|
112
|
+
def _send(self, sock, frame):
|
|
113
|
+
sock.sendall(json.dumps(frame, separators=(',', ':'), ensure_ascii=False).encode('utf-8') + b'\n')
|
|
114
|
+
|
|
115
|
+
def _read(self, sock, buffer, until):
|
|
116
|
+
while b'\n' not in buffer:
|
|
117
|
+
if len(buffer) >= LINE_MAX:
|
|
118
|
+
raise P.ProtocolError('owner_unavailable', 'the lanes host sent a line over the lanes.api/1 bound')
|
|
119
|
+
left = until - time.monotonic()
|
|
120
|
+
if left <= 0:
|
|
121
|
+
raise P.ProtocolError('owner_unavailable', f'the lanes host did not answer within {self.deadline:g} s')
|
|
122
|
+
sock.settimeout(left)
|
|
123
|
+
try:
|
|
124
|
+
chunk = sock.recv(65536)
|
|
125
|
+
except socket.timeout:
|
|
126
|
+
raise P.ProtocolError('owner_unavailable',
|
|
127
|
+
f'the lanes host did not answer within {self.deadline:g} s') from None
|
|
128
|
+
if not chunk:
|
|
129
|
+
raise P.ProtocolError('owner_unavailable', 'the lanes host closed the connection')
|
|
130
|
+
buffer += chunk
|
|
131
|
+
line, _, rest = bytes(buffer).partition(b'\n')
|
|
132
|
+
buffer[:] = rest
|
|
133
|
+
try:
|
|
134
|
+
frame = json.loads(line.decode('utf-8'))
|
|
135
|
+
except (UnicodeDecodeError, ValueError):
|
|
136
|
+
raise P.ProtocolError('owner_unavailable', 'the lanes host sent a line that is not one JSON object') \
|
|
137
|
+
from None
|
|
138
|
+
if not isinstance(frame, dict) or not isinstance(frame.get('frame'), str) \
|
|
139
|
+
or not isinstance(frame.get('body'), dict):
|
|
140
|
+
raise P.ProtocolError('owner_unavailable', 'the lanes host sent something that is not a Frame')
|
|
141
|
+
return frame
|
|
142
|
+
|
|
143
|
+
def exchange(self, build_frame):
|
|
144
|
+
"""Hello, then `build_frame(protocol_epoch, request_id)`'s frame -> the answer frame for that request id."""
|
|
145
|
+
until = time.monotonic() + self.deadline
|
|
146
|
+
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
|
147
|
+
try:
|
|
148
|
+
sock.settimeout(self.deadline)
|
|
149
|
+
try:
|
|
150
|
+
sock.connect(str(self.path))
|
|
151
|
+
except OSError as error:
|
|
152
|
+
raise P.ProtocolError('owner_unavailable',
|
|
153
|
+
f'{self.path}: {error.strerror or error}') from None
|
|
154
|
+
self._send(sock, {'frame': 'hello', 'body': {
|
|
155
|
+
'protocol': dict(PROTOCOL), 'role': 'client',
|
|
156
|
+
'peer': {'product': 'lanes-site-relay', 'build': self.build, 'instance_id': self.instance},
|
|
157
|
+
'qualification': 'lanes-site-relay',
|
|
158
|
+
'capabilities': [{'name': name, 'min_version': 1, 'max_version': 1, 'send': True, 'receive': True}
|
|
159
|
+
for name in CAPABILITIES]}})
|
|
160
|
+
buffer = bytearray()
|
|
161
|
+
hello = self._read(sock, buffer, until)
|
|
162
|
+
if hello['frame'] == 'refused':
|
|
163
|
+
raise frame_refusal(hello['body'])
|
|
164
|
+
if hello['frame'] != 'hello' or hello['body'].get('role') != 'host':
|
|
165
|
+
raise P.ProtocolError('owner_unavailable', f"the lanes host answered hello with {hello['frame']}")
|
|
166
|
+
epoch = hello['body'].get('protocol_epoch', 0)
|
|
167
|
+
request_id = f'relay-{secrets.token_hex(6)}'
|
|
168
|
+
self._send(sock, build_frame(epoch if isinstance(epoch, int) and epoch >= 0 else 0, request_id))
|
|
169
|
+
while True:
|
|
170
|
+
frame = self._read(sock, buffer, until)
|
|
171
|
+
if frame['frame'] in ANSWERS and frame['body'].get('request_id') == request_id:
|
|
172
|
+
if frame['frame'] == 'refused':
|
|
173
|
+
raise frame_refusal(frame['body'])
|
|
174
|
+
if frame['frame'] == 'receipt':
|
|
175
|
+
refused = receipt_refusal(frame['body'])
|
|
176
|
+
if refused is not None:
|
|
177
|
+
raise refused
|
|
178
|
+
return frame
|
|
179
|
+
finally:
|
|
180
|
+
sock.close()
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
def frame_refusal(body):
|
|
184
|
+
"""The ProtocolError a host `refused` frame answers the relayed request with: the host refused the relay's own
|
|
185
|
+
frame at its boundary (a FrameRefusalCode, never a lanes-site/1 code), so relay_refused naming it."""
|
|
186
|
+
code, reason = str(body.get('code') or 'refused'), str(body.get('reason') or '')
|
|
187
|
+
return P.ProtocolError('relay_refused', f'the lanes host refused the relayed frame ({code})'
|
|
188
|
+
f'{": " + reason if reason else ""}')
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
def receipt_refusal(body):
|
|
192
|
+
"""The ProtocolError a refusal receipt answers the relayed request with (FC-X5), or None for any other receipt:
|
|
193
|
+
owner_unavailable for the custody class of that name, relay_refused naming every other reason code."""
|
|
194
|
+
outcome = body.get('outcome') if isinstance(body.get('outcome'), dict) else {}
|
|
195
|
+
if outcome.get('status') != 'refusal' and body.get('state') != 'refused':
|
|
196
|
+
return None
|
|
197
|
+
detail = outcome.get('detail') if isinstance(outcome.get('detail'), dict) else {}
|
|
198
|
+
code, reason = str(detail.get('code') or 'refused'), str(detail.get('reason') or '')
|
|
199
|
+
said = f'the lanes host refused it ({code}){": " + reason if reason else ""}'
|
|
200
|
+
if code in OWNER_UNAVAILABLE:
|
|
201
|
+
return P.ProtocolError('owner_unavailable', f'{said}; retry later under the same operation_id')
|
|
202
|
+
return P.ProtocolError('relay_refused', said)
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
class Relay:
|
|
206
|
+
"""The relay half of a guest's lanes-site/1 server: which ops it relays or refuses, and the relayed calls.
|
|
207
|
+
`check(state, domain) -> (allowed, code)` replaces cutover.py's in-process check, `client(path) -> FrameClient`
|
|
208
|
+
the connection (tests)."""
|
|
209
|
+
|
|
210
|
+
def __init__(self, state, build='unknown', instance='lanes-site-relay', check=None, client=None):
|
|
211
|
+
self.state, self.check = Path(state), check
|
|
212
|
+
self.client = client or (lambda path: FrameClient(path, build, instance))
|
|
213
|
+
|
|
214
|
+
def owner(self, op):
|
|
215
|
+
"""(owner word, code) of `op`'s domain, or None for an op no domain gates (a read)."""
|
|
216
|
+
domain = DOMAIN_OF.get(op)
|
|
217
|
+
return None if domain is None else domain_owner(self.state, domain, self.check)
|
|
218
|
+
|
|
219
|
+
def gate(self, op):
|
|
220
|
+
"""Before a local effect: raise owned_elsewhere while the lanes host owns its domain (zero bytes, no spawn)."""
|
|
221
|
+
if op not in LOCAL_EFFECTS:
|
|
222
|
+
return
|
|
223
|
+
owner, code = self.owner(op)
|
|
224
|
+
if owner != 'lanes-py':
|
|
225
|
+
raise P.ProtocolError('owned_elsewhere', f'{DOMAIN_OF[op]} belongs to this guest\'s lanes host ({code}): '
|
|
226
|
+
f'{op} has no lanes.api/1 kind, so the server refuses it')
|
|
227
|
+
|
|
228
|
+
def socket_path(self):
|
|
229
|
+
path = self.state / SOCKET
|
|
230
|
+
if not path.exists():
|
|
231
|
+
raise P.ProtocolError('owner_unavailable', f'{path} is absent: this guest\'s lanes host is not serving')
|
|
232
|
+
return path
|
|
233
|
+
|
|
234
|
+
def relayed(self, op):
|
|
235
|
+
"""The socket a relayed op goes to, or a refusal: owner_unclaimed while lanes-py still owns its domain,
|
|
236
|
+
owner_unavailable while lanesd.sock is absent."""
|
|
237
|
+
owner, code = self.owner(op)
|
|
238
|
+
if owner == 'lanes-py':
|
|
239
|
+
raise P.ProtocolError('owner_unclaimed', f'no lanes host owns {DOMAIN_OF[op]} on this guest ({code}); '
|
|
240
|
+
'tmux_write is its write')
|
|
241
|
+
return self.socket_path()
|
|
242
|
+
|
|
243
|
+
def deliver(self, args):
|
|
244
|
+
"""msg.deliver -> request{inbox_compose} -> {operation_id, receipt}."""
|
|
245
|
+
operation, to, reply_to = args.get('operation_id'), args.get('to'), args.get('reply_to')
|
|
246
|
+
timing = args.get('timing', 'now')
|
|
247
|
+
if not isinstance(operation, str) or not UUID7.match(operation):
|
|
248
|
+
raise P.ProtocolError('args_invalid', 'msg.deliver needs operation_id, a UUIDv7 the client minted')
|
|
249
|
+
if not isinstance(to, str) or not TOKEN.match(to) or (reply_to is not None and (
|
|
250
|
+
not isinstance(reply_to, str) or not TOKEN.match(reply_to))) or timing not in TIMINGS:
|
|
251
|
+
raise P.ProtocolError('args_invalid', 'msg.deliver needs {operation_id, to, text, [reply_to], '
|
|
252
|
+
'[timing: now|after_turn]}')
|
|
253
|
+
text = P.check_text(args.get('text'))
|
|
254
|
+
path = self.relayed('msg.deliver')
|
|
255
|
+
compose = {'v': 1, 'operation_id': operation, 'to': to, 'text': text, 'timing': timing}
|
|
256
|
+
if reply_to is not None:
|
|
257
|
+
compose['reply_to'] = reply_to
|
|
258
|
+
|
|
259
|
+
def frame(epoch, request_id):
|
|
260
|
+
return {'frame': 'request', 'body': {
|
|
261
|
+
'v': 1, 'request_id': request_id, 'protocol_epoch': epoch,
|
|
262
|
+
'remaining_deadline_ms': int(DEADLINE_S * 1000),
|
|
263
|
+
'payload': {'kind': 'inbox_compose', 'args': compose}}}
|
|
264
|
+
answer = self.client(path).exchange(frame)
|
|
265
|
+
return {'operation_id': operation, 'receipt': answer['body']}
|
|
266
|
+
|
|
267
|
+
def status(self, args):
|
|
268
|
+
"""msg.status -> command{query_operation} -> {operation_id, receipt}."""
|
|
269
|
+
operation, target, epoch = args.get('operation_id'), args.get('target'), args.get('expected_owner_epoch')
|
|
270
|
+
if not isinstance(operation, str) or not UUID7.match(operation) or not isinstance(target, dict) \
|
|
271
|
+
or not all(isinstance(target.get(k), str) and P.IDENT.match(target[k])
|
|
272
|
+
for k in ('workspace_id', 'lane_id')) \
|
|
273
|
+
or not isinstance(epoch, int) or isinstance(epoch, bool) or epoch < 0:
|
|
274
|
+
raise P.ProtocolError('args_invalid', 'msg.status needs {operation_id (UUIDv7), target: {workspace_id, '
|
|
275
|
+
'lane_id}, expected_owner_epoch}')
|
|
276
|
+
path = self.relayed('msg.status')
|
|
277
|
+
|
|
278
|
+
def frame(protocol_epoch, request_id):
|
|
279
|
+
return {'frame': 'command', 'body': {
|
|
280
|
+
'v': 1, 'request_id': request_id, 'operation_id': uuid7(), 'retry_epoch': 0,
|
|
281
|
+
'protocol_epoch': protocol_epoch,
|
|
282
|
+
'target': {'authority': 'lanes', 'workspace_id': target['workspace_id'],
|
|
283
|
+
'lane_id': target['lane_id']},
|
|
284
|
+
'expected_owner_epoch': epoch, 'remaining_deadline_ms': int(DEADLINE_S * 1000),
|
|
285
|
+
'payload': {'kind': 'query_operation', 'args': {'operation_id': operation}}}}
|
|
286
|
+
answer = self.client(path).exchange(frame)
|
|
287
|
+
return {'operation_id': operation, 'receipt': answer['body']}
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
def env_state():
|
|
291
|
+
"""$LANES_STATE as lanes_lib reads it, without importing it (the relay holds no lanes_lib state)."""
|
|
292
|
+
return Path(os.environ.get('LANES_STATE') or Path.home() / '.local/state/lanes')
|
|
@@ -7,7 +7,11 @@ architecture §3.32, DM-LANES-SITE-ADAPTER). The authorized_keys line on the gue
|
|
|
7
7
|
command="<home>/.local/share/lanes/current/bin/lanes-site-serve",restrict ssh-ed25519 AAAA… lanes-site@<aggregator>
|
|
8
8
|
|
|
9
9
|
`restrict` gives no pty, no forwarding and no agent; the forced command (bin/lanes-site-serve, POSIX sh) ignores
|
|
10
|
-
whatever the client asked to run and execs this file
|
|
10
|
+
whatever the client asked to run and always execs this file: it is the 2.0 lanes-site/1 server on every guest and reads
|
|
11
|
+
no flag (final contract decision FC-X31). Once the guest's lanes host owns a domain, this server is its relay
|
|
12
|
+
(site/relay.py): msg.deliver and msg.status go to the lanes host as `lanes.api/1` frames on $LANES_STATE/run/lanesd.sock,
|
|
13
|
+
and the local effects of that domain (tmux_write for delivery; exec and exec.run for lifecycle) are refused
|
|
14
|
+
`owned_elsewhere` with zero bytes and no spawn.
|
|
11
15
|
|
|
12
16
|
It answers from the guest's own Lanes state (`$LANES_STATE`: registry.json, containers.json — the files its own
|
|
13
17
|
`lanes sync` and statusd write) and holds no store: it reads them again for every request, so a sync between two
|
|
@@ -32,6 +36,7 @@ TREE = HERE.parent
|
|
|
32
36
|
sys.path.insert(0, str(HERE))
|
|
33
37
|
sys.path.insert(1, str(TREE / 'libexec'))
|
|
34
38
|
import protocol as P # noqa: E402
|
|
39
|
+
import relay as R # noqa: E402
|
|
35
40
|
|
|
36
41
|
BOOT_ID = '/proc/sys/kernel/random/boot_id'
|
|
37
42
|
|
|
@@ -65,7 +70,7 @@ class Server:
|
|
|
65
70
|
text)` (lanes_lib.tmux_probe), `lock(info, lane_id)` a context manager yielding None while held, else why not
|
|
66
71
|
(lanes_lib.dispatch_lock), `runner(argv, timeout) -> (rc, out, err)` (lanes_lib.run_bounded), `pause(seconds)`."""
|
|
67
72
|
|
|
68
|
-
def __init__(self, lib, tmux=None, lock=None, runner=None, pause=None, guest_id=None, boot_id=None):
|
|
73
|
+
def __init__(self, lib, tmux=None, lock=None, runner=None, pause=None, guest_id=None, boot_id=None, relay=None):
|
|
69
74
|
self.L = lib
|
|
70
75
|
self.tmux = tmux or lib.tmux_probe
|
|
71
76
|
self.lock = lock or lib.dispatch_lock
|
|
@@ -73,6 +78,8 @@ class Server:
|
|
|
73
78
|
self.pause = pause or time.sleep
|
|
74
79
|
self.guest_id = guest_id or _guest_id()
|
|
75
80
|
self.boot_id = _boot_id() if boot_id is None else boot_id
|
|
81
|
+
# FC-X31: the relay to this guest's own lanes host (`relay(state) -> R.Relay`; tests pass a fake check/client)
|
|
82
|
+
self.relay = relay or R.Relay(lib.STATE, build=_version(), instance=f'relay-{self.guest_id}')
|
|
76
83
|
self.greeted = False
|
|
77
84
|
|
|
78
85
|
# ------------------------------------------------------------------ the guest's own state, read per request
|
|
@@ -183,6 +190,7 @@ class Server:
|
|
|
183
190
|
raise P.ProtocolError('args_invalid', 'tmux_write needs {lane, text, enter: bool}')
|
|
184
191
|
intent, _epoch = P.check_intent(args)
|
|
185
192
|
text = P.check_text(args.get('text')) # before the lane: a bound is checked whoever the recipient is
|
|
193
|
+
self.relay.gate('tmux_write') # FC-R2: delivery owned by the lanes host refuses here, zero bytes
|
|
186
194
|
lane = self.registered_lanes(self.registry()).get(lane_id)
|
|
187
195
|
if lane is None:
|
|
188
196
|
raise P.ProtocolError('lane_unregistered', f'{lane_id} is not a registered tmux lane of this guest')
|
|
@@ -246,6 +254,7 @@ class Server:
|
|
|
246
254
|
def op_exec(self, _message, args):
|
|
247
255
|
template, container = P.check_exec(args)
|
|
248
256
|
intent, _epoch = P.check_intent(args)
|
|
257
|
+
self.relay.gate('exec') # FC-R2/FC-X31: lifecycle owned by the lanes host refuses, no spawn
|
|
249
258
|
if container not in self.registered_containers(self.registry()):
|
|
250
259
|
raise P.ProtocolError('container_unknown', f'this guest registers no container {container}')
|
|
251
260
|
if self.L.read_health().get('level') == 'critical': # never spawn on a critical host (statusd's rule)
|
|
@@ -260,8 +269,27 @@ class Server:
|
|
|
260
269
|
return dict(reply, rc=rc, outcome='timeout' if rc is None else ('ok' if rc == 0 else 'failed'),
|
|
261
270
|
out=(out or '')[-P.TAIL_MAX:], err=(err or '')[-P.TAIL_MAX:])
|
|
262
271
|
|
|
272
|
+
def op_exec_run(self, message, args):
|
|
273
|
+
"""AR §3.32's exec.run{template_id, args, [intent_id], [epoch]}: exec under AR's names. FC-X31: it has no
|
|
274
|
+
lanes.api/1 kind, so while the lanes host owns `lifecycle` it is refused owned_elsewhere."""
|
|
275
|
+
if set(args) - {'template_id', 'args', 'intent_id', 'epoch'}:
|
|
276
|
+
raise P.ProtocolError('argv_refused', 'exec.run takes a template_id and its args{container} only')
|
|
277
|
+
mapped = {'template': args.get('template_id'), 'args': args.get('args', {})}
|
|
278
|
+
mapped.update({key: args[name] for name, key in (('intent_id', 'intent'), ('epoch', 'epoch')) if name in args})
|
|
279
|
+
P.check_exec(mapped)
|
|
280
|
+
P.check_intent(mapped)
|
|
281
|
+
self.relay.gate('exec.run')
|
|
282
|
+
return self.op_exec(message, mapped)
|
|
283
|
+
|
|
284
|
+
def op_msg_deliver(self, _message, args):
|
|
285
|
+
return self.relay.deliver(args)
|
|
286
|
+
|
|
287
|
+
def op_msg_status(self, _message, args):
|
|
288
|
+
return self.relay.status(args)
|
|
289
|
+
|
|
263
290
|
OPS = {'hello': op_hello, 'boards.list': op_boards_list, 'boards.lanes': op_boards_lanes,
|
|
264
|
-
'tmux_read': op_tmux_read, 'tmux_write': op_tmux_write, 'exec': op_exec
|
|
291
|
+
'tmux_read': op_tmux_read, 'tmux_write': op_tmux_write, 'exec': op_exec, 'exec.run': op_exec_run,
|
|
292
|
+
'msg.deliver': op_msg_deliver, 'msg.status': op_msg_status}
|
|
265
293
|
|
|
266
294
|
def handle(self, message):
|
|
267
295
|
"""One request -> its reply (never raises)."""
|
|
@@ -281,9 +281,9 @@ unchanged 24 747 B cap; the laptop/tablet download 24 709 + 3 318 = 28 027 B, un
|
|
|
281
281
|
| `browser.css` | 2 048 B | 1 947 B | `test_web_view.BROWSER_CSS_CAP` |
|
|
282
282
|
| `mobile.js` + `browser.js` | 28 065 B | 28 027 B (2026-11-01, W30-B) | DEF-1569, `LAPTOP_TABLET_JS_RATCHET` |
|
|
283
283
|
| `mobile.css` + `browser.css` | 20 993 B | 20 892 B | DEF-1569's CSS twin, `LAPTOP_TABLET_CSS_CAP` |
|
|
284
|
-
| `directory.js` (on demand) | 60
|
|
284
|
+
| `directory.js` (on demand) | 60 417 B (exact) | 60 417 B (2026-11-03, INT-1 FC-X22; 60 239 B on 2026-10-30) | `test_web_directory.DIRECTORY_JS_CAP` |
|
|
285
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
|
|
286
|
+
| `inbox.js` (on demand) | 72 864 B (exact) | 72 864 B (2026-11-05, FC-I-6 builds panel members; 72 626 B on 2026-11-02, review repair after BEY-7130, dev-container) | `test_web_inbox.INBOX_JS_CAP`, `tests/web/inbox.test.mjs` `INBOX_JS_CAP` |
|
|
287
287
|
|
|
288
288
|
## Lane directory (Lanes 2.0, fan-out F3)
|
|
289
289
|
|
|
@@ -338,10 +338,10 @@ items (below).
|
|
|
338
338
|
projections over is open.
|
|
339
339
|
- **Device-local and shared.** Density and glyph mode (device appearance overrides), and this device's filter,
|
|
340
340
|
selection and scroll, live in `localStorage` under `lanes:directory:` (the place keys per principal); Show hidden is
|
|
341
|
-
for this page only. Pins and hidden lanes are never stored here: Pin, Hide and Unhide send the
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
document change the rows. An answer carrying another device's change says so.
|
|
341
|
+
for this page only. Pins and hidden lanes are never stored here: Pin, Hide and Unhide send the `PreferencesUpdate`
|
|
342
|
+
of final decision FC-X22 (`v`, a fresh `operation_id`, `expected_revision` and the whole current content, including
|
|
343
|
+
`hidden_boards`, `appearance` and `fleet_fold`, with one list changed; hiding a pinned lane unpins it, since a lane
|
|
344
|
+
is never both) to the preference owner (fan-out F5), and only its answer and the next document change the rows. An answer carrying another device's change says so.
|
|
345
345
|
- **Hidden lanes.** The header counts them and **Show hidden (n)** draws them faint: in their places when the owner
|
|
346
346
|
sends their rows, otherwise by identity under Hidden, but only on a board the directory shows and never one whose
|
|
347
347
|
access was revoked. A hidden lane offers Open and **Unhide**. As in the sidebar, hiding the selected lane takes it
|
|
@@ -304,29 +304,31 @@ function decodeSnapshot(s) {
|
|
|
304
304
|
/** PrincipalPresentationPreferences: the document and its pinned and hidden identities. */
|
|
305
305
|
function decodePreferences(p) {
|
|
306
306
|
if (!p || p.v !== 1 || !isText(p.principal_id) || !isInt(p.revision) || !p.theme || !Array.isArray(p.pinned)
|
|
307
|
-
|| !Array.isArray(p.hidden) || !Array.isArray(p.viewed_done) || !Array.isArray(p.board_order)
|
|
307
|
+
|| !Array.isArray(p.hidden) || !Array.isArray(p.viewed_done) || !Array.isArray(p.board_order)
|
|
308
|
+
|| !Array.isArray(p.hidden_boards) || !p.appearance || typeof p.fleet_fold !== 'boolean') bad('a preference document the page cannot read');
|
|
308
309
|
const pinned = p.pinned.map(laneId), hidden = p.hidden.map(laneId);
|
|
309
310
|
if (new Set(pinned).size !== pinned.length || new Set(hidden).size !== hidden.length || pinned.some(id => hidden.includes(id))) {
|
|
310
311
|
bad('a preference set lists a lane twice, or pinned and hidden');
|
|
311
312
|
}
|
|
312
313
|
return {doc: p, pinned: new Set(pinned), hidden: new Set(hidden)};
|
|
313
314
|
}
|
|
315
|
+
let minted = 0;
|
|
316
|
+
const mint = prefix => `${prefix}-${globalThis.crypto?.randomUUID?.() || `${Date.now().toString(36)}.${Math.random().toString(36).slice(2, 10)}`}.${++minted}`;
|
|
314
317
|
/**
|
|
315
|
-
* The
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
+
* The PreferencesUpdate (preferences_update.schema.json, FC-X22): `v`, an operation id, the revision it expects, and
|
|
319
|
+
* the whole current content with one list toggled. A lane is never pinned and hidden at once, so hiding a pinned lane
|
|
320
|
+
* also unpins it.
|
|
318
321
|
*/
|
|
319
322
|
function preferencesUpdate(prefs, identity, verb) {
|
|
320
323
|
const {doc} = prefs, without = list => list.filter(lane => keyOf(lane) !== identity);
|
|
321
|
-
const content = {pinned: doc.pinned, hidden: doc.hidden,
|
|
324
|
+
const content = {pinned: doc.pinned, hidden: doc.hidden, hidden_boards: doc.hidden_boards, board_order: doc.board_order,
|
|
325
|
+
viewed_done: doc.viewed_done, theme: doc.theme, appearance: doc.appearance, fleet_fold: doc.fleet_fold};
|
|
322
326
|
if (doc.resume) content.resume = doc.resume;
|
|
323
327
|
if (verb === 'pin') content.pinned = prefs.pinned.has(identity) ? without(doc.pinned) : [...doc.pinned, laneOf(identity)];
|
|
324
328
|
else if (prefs.hidden.has(identity)) content.hidden = without(doc.hidden);
|
|
325
329
|
else Object.assign(content, {hidden: [...doc.hidden, laneOf(identity)], pinned: without(doc.pinned)});
|
|
326
|
-
return {v: 1, expected_revision: doc.revision, preferences: content};
|
|
330
|
+
return {v: 1, operation_id: mint('op-pref'), expected_revision: doc.revision, preferences: content};
|
|
327
331
|
}
|
|
328
|
-
let minted = 0;
|
|
329
|
-
const mint = prefix => `${prefix}-${globalThis.crypto?.randomUUID?.() || `${Date.now().toString(36)}.${Math.random().toString(36).slice(2, 10)}`}.${++minted}`;
|
|
330
332
|
const DEADLINE_MS = 15000;
|
|
331
333
|
/**
|
|
332
334
|
* The frozen Command envelope (command.schema.json) for a native action on one row: a fresh operation id, the
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
# Lanes 2.0 browser decoders (generated)
|
|
2
2
|
|
|
3
|
-
<!-- GENERATED by crates/lanes-protocol/src/schema/codegen.rs from docs/contracts/lanes2/schema (sha256:
|
|
3
|
+
<!-- GENERATED by crates/lanes-protocol/src/schema/codegen.rs from docs/contracts/lanes2/schema (sha256:558037ad6db6b20af095acf718408e3d4b1ca672f33cbd824ce4db25fd58505d). Do not edit; regenerate with `LANES2_DECODERS_BLESS=1 cargo test -p lanes-protocol --lib schema::codegen` in a managed build job. -->
|
|
4
4
|
|
|
5
|
-
Generated from the
|
|
5
|
+
Generated from the 60 exported Lanes 2.0 wire schemas in `docs/contracts/lanes2/schema` by `crates/lanes-protocol/src/schema/codegen.rs` (fan-out lane A5; RT decision D03 and section 12.1). `lanes/web` stays JavaScript: the decoders are a plain ES module and their types are TypeScript declarations that browser code consumes through JSDoc. Only generated files live here; they ship in the Lanes payload.
|
|
6
6
|
|
|
7
7
|
| File | Content |
|
|
8
8
|
| --- | --- |
|
|
9
|
-
| `lanes2_protocol.mjs` | Generated: one decoder per document (`decodeCommand`,
|
|
10
|
-
| `lanes2_protocol.d.mts` | Generated:
|
|
9
|
+
| `lanes2_protocol.mjs` | Generated: one decoder and one schema-aware encoder per document (`decodeCommand`/`encodeCommand`, ...), the bounded strict JSON reader, the plain `encode`, `DOCUMENTS`, `ENCODERS`, `SCHEMA_DIGEST`. |
|
|
10
|
+
| `lanes2_protocol.d.mts` | Generated: 583 types (370 objects, 25 tagged unions, 188 enumerations). |
|
|
11
11
|
|
|
12
12
|
The decode tests are `lanes/tests/web/lanes2_protocol.test.mjs` (hand-written; the Lanes unit job runs them through `lanes/tests/unit/test_web_view.py`, or run `node --test lanes/tests/web/lanes2_protocol.test.mjs`). They decode every golden fixture of `crates/lanes-protocol/tests/fixtures/lanes2`, read at run time, against the verdicts of the refused ones in `crates/lanes-protocol/src/schema/codegen/fixture-verdicts.json` (generated beside the generator).
|
|
13
13
|
|
|
14
14
|
## What a decoder checks
|
|
15
15
|
|
|
16
|
-
Before parsing: at most 1 MiB and 32 nesting levels (the Rust `limits::check_frame`). The reader is strict JSON: valid UTF-8, no lone surrogate escape, no raw control character in a string, no duplicate key, no trailing characters; integers stay exact (`bigint` where the schema allows more than 2^53 - 1). Then the exported schema exactly: required and unknown members, types, constants, enumerations, string length in characters and UTF-8 bytes, the token/text/digest alphabets, list bounds, integer bounds and tagged unions. Only the handshake (`hello`) is tolerant: a newer peer's unknown members are dropped.
|
|
16
|
+
Before parsing: at most 1 MiB and 32 nesting levels (the Rust `limits::check_frame`). The reader is strict JSON: valid UTF-8, no lone surrogate escape, no raw control character in a string, no duplicate key, no trailing characters; integers stay exact (`bigint` where the schema allows more than 2^53 - 1). Then the exported schema exactly: required and unknown members, types, constants, enumerations, string length in characters and UTF-8 bytes, the token/text/digest/opaque-id/ULID alphabets, list bounds, integer bounds and tagged unions (adjacent, with the members their alternatives share, and internal). A document's encoder writes `null` only for a nullable member and a negative integer only for the signed one. Only the handshake (`hello`) is tolerant: a newer peer's unknown members are dropped.
|
|
17
17
|
|
|
18
18
|
## Where it is stricter than serde
|
|
19
19
|
|
|
@@ -30,10 +30,10 @@ The `Validate` refusals of the Rust decoders are not expressed in the exported s
|
|
|
30
30
|
- `event` `/delivery_sequence`: minimum 1 (`refused/event/sequence-zero.json`: delivery sequences start at 1)
|
|
31
31
|
- `hello` `/protocol_epoch`: minimum 1 (`refused/hello/epoch-zero.json`: protocol epochs start at 1)
|
|
32
32
|
- `hello` `/replay_horizon/max_events`: minimum 1 (`refused/hello/horizon-zero.json`: replay horizon with a zero bound retains nothing)
|
|
33
|
-
- `message_create_payload` `/ttl_s`: maximum
|
|
33
|
+
- `message_create_payload` `/ttl_s`: maximum 86400 (`refused/message_create_payload/ttl-out-of-range.json`: a message time-to-live above 86400 seconds is outside the owner's bound)
|
|
34
34
|
- `message_create_payload` `/ttl_s`: minimum 1 (`refused/message_create_payload/ttl-zero.json`: a message time-to-live of zero is already expired)
|
|
35
35
|
- `receipt` `/outcome/detail/last_observed_navigation_step`: minimum 1 (`refused/receipt/step-zero.json`: navigation steps are numbered from 1)
|
|
36
|
-
- `retry_horizon` `/
|
|
36
|
+
- `retry_horizon` `/retry_horizon_ms`: minimum 1 (`refused/retry_horizon/zero-horizon.json`: a zero retry horizon admits no operation id)
|
|
37
37
|
- `snapshot` `/delivery_sequence`: minimum 1 (`refused/snapshot/sequence-zero.json`: delivery sequences start at 1)
|
|
38
38
|
- `subscribe` `/page_limit`: minimum 1, maximum 500 (`refused/subscribe/page-limit-501.json`: page limit outside 1..=500)
|
|
39
39
|
|
|
@@ -41,8 +41,46 @@ The `Validate` refusals of the Rust decoders are not expressed in the exported s
|
|
|
41
41
|
|
|
42
42
|
- `adapter_capability`: an adapter cannot answer prompts it cannot observe
|
|
43
43
|
- `adapter_capability`: an answering adapter must accept at least one option
|
|
44
|
+
- `build_log_page`: a log read's next offset is before its start
|
|
45
|
+
- `build_log_request`: a log read of zero bytes reads nothing
|
|
46
|
+
- `builds_panel`: an incomplete queue carries no label
|
|
47
|
+
- `builds_panel`: an unavailable action carries its code and reason
|
|
48
|
+
- `capacity_panel`: a booking names a run of another lane
|
|
49
|
+
- `capacity_panel`: a booking's epoch ends before it starts
|
|
50
|
+
- `capacity_panel`: a ceiling amount is not in the ceiling's currency
|
|
51
|
+
- `capacity_panel`: a ceiling is exact only when every envelope's owner enforces exactly (INT-06)
|
|
52
|
+
- `capacity_panel`: a control appears twice
|
|
53
|
+
- `capacity_panel`: a conversion is an amount of money
|
|
54
|
+
- `capacity_panel`: a figure list reports a category twice
|
|
55
|
+
- `capacity_panel`: a figure value carries exactly the members of its kind
|
|
56
|
+
- `capacity_panel`: a figure's watermark goes with partial coverage, and only with it
|
|
57
|
+
- `capacity_panel`: a figure, wait or row names a source the document does not list
|
|
58
|
+
- `capacity_panel`: a lane wait names a run of another lane
|
|
59
|
+
- `capacity_panel`: a record id appears twice among runs and bookings
|
|
60
|
+
- `capacity_panel`: an envelope lists a member twice
|
|
61
|
+
- `capacity_panel`: an exact hard cap names its source: enforcement is the owner's claim (INT-06)
|
|
62
|
+
- `capacity_panel`: an unavailable action carries its code and reason
|
|
63
|
+
- `capacity_panel`: an unavailable read carries no pool, build, run, booking or wait: nothing is known, not zero
|
|
64
|
+
- `cli_diagnostics`: a component names its version, or why it is unknown, exactly one
|
|
44
65
|
- `command`: a native-session command must name its expected native generation
|
|
45
66
|
- `command`: a revision-checked command must name its expected revision
|
|
67
|
+
- `connector_page`: a connector page names a store key twice
|
|
68
|
+
- `connector_page`: a stale validation carries its cause, a current one none
|
|
69
|
+
- `connector_page`: an engagement names a descendant run twice
|
|
70
|
+
- `connector_page`: an outbound intent carries its journal outcome, an internal one none
|
|
71
|
+
- `delivery_receipt`: a delivery receipt's witness establishes its rung
|
|
72
|
+
- `delivery_receipt`: a delivery witness carries exactly the members of its kind
|
|
73
|
+
- `delivery_receipt`: open and definitely rejected attempts are released attempts
|
|
74
|
+
- `economics_panel`: a figure carries a value and an unknown part at once
|
|
75
|
+
- `economics_panel`: a figure list reports a category twice
|
|
76
|
+
- `economics_panel`: a row appears twice
|
|
77
|
+
- `economics_panel`: a row names a run but no lane
|
|
78
|
+
- `economics_panel`: a row's lane carries its label
|
|
79
|
+
- `economics_panel`: a row's run and run title go together
|
|
80
|
+
- `economics_panel`: a source is listed twice
|
|
81
|
+
- `economics_panel`: an unavailable read carries no row: nothing is known, not zero
|
|
82
|
+
- `economics_panel`: coverage is complete exactly when it names no reason
|
|
83
|
+
- `economics_panel`: the sources name two Throttle instances: a board read reaches only one (F10)
|
|
46
84
|
- `event`: a prompt event's target generation must equal the prompt's generation
|
|
47
85
|
- `event`: a prompt without options cannot be answered
|
|
48
86
|
- `event`: duplicate prompt assurance
|
|
@@ -70,20 +108,32 @@ The `Validate` refusals of the Rust decoders are not expressed in the exported s
|
|
|
70
108
|
- `lane_directory_row`: a lane is a member of the workspace that minted its id
|
|
71
109
|
- `lane_directory_row`: an action is listed twice on a row
|
|
72
110
|
- `lane_directory_row`: an unavailable action must say why
|
|
73
|
-
- `
|
|
74
|
-
- `
|
|
75
|
-
- `
|
|
76
|
-
- `
|
|
77
|
-
- `
|
|
78
|
-
- `
|
|
79
|
-
- `owner_operation_receipt`: an
|
|
80
|
-
- `owner_operation_receipt`: an
|
|
81
|
-
- `owner_operation_receipt`:
|
|
82
|
-
- `owner_operation_receipt`:
|
|
83
|
-
- `
|
|
111
|
+
- `message_create_payload`: a message names its recipient by lane trace; an address is resolved before the intent is persisted
|
|
112
|
+
- `owner_create_answer`: a create answer carries the retained receipt, never a tombstone
|
|
113
|
+
- `owner_create_answer`: a create answer's receipt says whether it replayed
|
|
114
|
+
- `owner_create_answer`: an owner answer's id is its receipt's owner operation reference
|
|
115
|
+
- `owner_lookup_answer`: a lookup is not a retry: its receipt has no replayed
|
|
116
|
+
- `owner_lookup_answer`: a lookup names an expiry exactly when the detailed receipt is retained
|
|
117
|
+
- `owner_operation_receipt`: an owner commits an operation no earlier than its id was issued
|
|
118
|
+
- `owner_operation_receipt`: an owner commits an operation no later than its retry horizon
|
|
119
|
+
- `owner_operation_receipt`: an owner operation id is a UUIDv7 in canonical lowercase hyphenated form
|
|
120
|
+
- `owner_operation_receipt`: an owner receipt records committed custody; a refusal is not a receipt
|
|
121
|
+
- `panel_page_request`: page limit outside 1..=500
|
|
84
122
|
- `preferences_update`: a lane cannot be both pinned and hidden
|
|
123
|
+
- `principal_presentation_preferences`: a board list names a workspace twice
|
|
124
|
+
- `principal_presentation_preferences`: a board list names workspace ids
|
|
85
125
|
- `principal_presentation_preferences`: a lane cannot be both pinned and hidden
|
|
86
126
|
- `principal_presentation_preferences`: a preference set lists a lane twice
|
|
127
|
+
- `project_agent_request`: a claim epoch is 1 to 2^53 - 1
|
|
128
|
+
- `project_agent_request`: a claim lease is 60 seconds to 7 days
|
|
129
|
+
- `project_agent_request`: a project request carries an argument of another op
|
|
130
|
+
- `project_agent_request`: a project request is missing a required argument
|
|
131
|
+
- `project_agent_request`: a project request's lane is a lane id
|
|
132
|
+
- `project_agent_request`: a revision is 1 to 2^53 - 1
|
|
133
|
+
- `project_agent_request`: a work page holds 1 to 500 items
|
|
134
|
+
- `project_command`: a project name list names one name twice
|
|
135
|
+
- `project_command`: a project text carries no tab
|
|
136
|
+
- `project_command`: an accepted outcome links its evidence
|
|
87
137
|
- `receipt`: a definite navigation names its last positively observed step
|
|
88
138
|
- `receipt`: a merely possible navigation has no positively observed step
|
|
89
139
|
- `receipt`: a possible submission or holder acceptance means submission possibly started
|
|
@@ -93,14 +143,28 @@ The `Validate` refusals of the Rust decoders are not expressed in the exported s
|
|
|
93
143
|
- `receipt`: partial input means submission definitely did not start; otherwise the outcome is unknown
|
|
94
144
|
- `receipt`: the effect certainty contradicts the receipt state
|
|
95
145
|
- `receipt`: the outcome contradicts the receipt state
|
|
96
|
-
- `
|
|
146
|
+
- `request`: a view device is a Lanes device name
|
|
147
|
+
- `request`: request deadline already expired
|
|
148
|
+
- `retry_horizon`: receipts must outlive the retry window, or an identical retry could miss its original
|
|
97
149
|
- `retry_horizon`: tombstones must outlive detailed receipts, or an expired id could look new
|
|
98
150
|
- `runtime_binding`: a capability is negotiated at most once
|
|
151
|
+
- `schedule_command`: a weekly rule names a weekday twice
|
|
152
|
+
- `schedules_page`: a pending timed occurrence names its nominal instant, a condition one none
|
|
153
|
+
- `schedules_page`: an occurrence appears twice on a schedule
|
|
154
|
+
- `sidebar_command`: a view request names a workspace id
|
|
155
|
+
- `signals_snapshot`: a signal appears twice in a snapshot
|
|
156
|
+
- `signals_snapshot`: a wholly unavailable signal carries no sample
|
|
99
157
|
- `snapshot`: a snapshot page names its next page until the last, and only the last carries the resume token
|
|
100
158
|
- `source_update`: complete coverage cannot name missing parts
|
|
101
159
|
- `subscribe`: a filter lists a workspace or project twice
|
|
102
|
-
|
|
103
|
-
|
|
160
|
+
- `tool_repair`: a repair answer that says nothing
|
|
161
|
+
- `tools_panel`: a fixture catalog carries its fixture label (X5)
|
|
162
|
+
- `tools_panel`: the fresh session's skills are neither listed nor said to be unavailable
|
|
163
|
+
- `view_result`: a refused view operation moved nothing
|
|
164
|
+
- `view_result`: a view result carries a refusal exactly when it is refused
|
|
165
|
+
- `view_step`: a view device is a Lanes device name
|
|
166
|
+
|
|
167
|
+
Corpus: 202 refused fixtures: 64 refused by the schema, 0 not strict JSON, 0 refused before parsing, 138 refused only by a `Validate` rule (11 of them by a single-field bound the schema could express).
|
|
104
168
|
|
|
105
169
|
## Drift
|
|
106
170
|
|