Commit Graph
4265 Commits
Author SHA1 Message Date
jason.woltje 138171ca0d docs: record lifecycle Task 1 review, fix round and landing decision (#797) 2026-11-03 18:21:15 -06:00
jason.woltje bec3583286 fix(bus): keep the request route across setup waits and recheck association after admission (#1839) 2026-11-03 18:15:48 -06:00
jason.woltje 3b071cac7b feat(bus): persist pre-task request intake and selection (#1839) 2026-11-03 17:53:45 -06:00
jason.woltje 1e1357cb6e feat(console): answer every eligible decision option (#1839) 2026-11-03 17:25:24 -06:00
jason.woltje 831d15f0b4 docs: prepare lifecycle execution and original request evidence (#1839) 2026-11-03 17:01:26 -06:00
jason.woltje 63bd48a5f8 docs: specify working repository bootstrap interface (#797) 2026-11-03 16:59:51 -06:00
jason.woltje 260f2ce7ed docs: plan request lifecycle implementation and PRD addendum (#797) 2026-11-03 16:59:51 -06:00
jason.woltje a34f79692e docs: record user terminology migration inventory (#1840) 2026-11-03 16:52:09 -06:00
jason.woltje 930d77eeca docs: track user terminology and identifier migration (#1840) 2026-11-03 16:46:04 -06:00
jason.woltje 7e849a7b0b docs: plan GPT implementation of Console decision answers (#1839) 2026-11-03 16:37:00 -06:00
jason.woltje ec5354bcc2 docs: propose request-to-product intake and decision flow (#1839) 2026-11-03 16:32:20 -06:00
jason.woltje 7024e35f59 Merge #784 R2: the paste test catches a handler that enters the live page (Vikunja #784) 2026-11-02 22:35:21 -06:00
jason.woltje cbc43c6edc docs(editor #784 R2): BUILD-LOG and SESSIONS lines (Vikunja #784) 2026-11-02 22:34:45 -06:00
jason.woltje e71222d1a0 test(webui): the paste test catches a handler that enters the live page (Vikunja #784 R2)
Chromium also targets the document when a handler-bearing element is attached to the live page and removed before the CSP event is sent, so the readHTML filter alone (directive, source file, line, target document) could not tell that from the inert parse. The page now also records, with a MutationObserver on the live document, every element that enters the page carrying an on* attribute and every on* attribute set on an element in the page, and h.quiet() asserts the record is empty. The live-handler test gains a case for a handler attached and removed in the same turn, and checks per case that the observer saw the handler enter the page (not for the element never attached). Test-only; no product change.
2026-11-02 22:31:45 -06:00
jason.woltje 18a0bd47d7 Merge Console writes: factory Console takes the paired --sso --send; .53 launches through the proxy (Vikunja #415) 2026-11-02 22:16:25 -06:00
jason.woltje a702076576 docs: record Vikunja #415 and #416 Console writes build (BUILD-LOG, SESSIONS) 2026-11-02 22:12:57 -06:00
jason.woltje 4d1d5ee8ee Merge #784: set aside the editor paste's inert-parse CSP reports under Chromium 156 (Vikunja #784) 2026-11-02 22:09:19 -06:00
jason.woltje bd79daffdd fix(case2-unit): factory Console takes the paired --sso --send; .53 launches through the proxy (Vikunja #415, #416)
The factory profile of scripts/case2-unit.sh now takes the bare pair
--sso --send, ported from the lane's serve_flags rule (b00019548). Either
flag alone refuses, and the proxy preview set and the proof pair still
refuse. Before any unit write, a bounded query run as the stack user,
through the existing config-query supervisor, checks that the stack
user's system config has console.sso; the Console refuses --sso without
it at start (packages/webui/src/cli.mjs:95). The server needs no change.

The library profile is unchanged: still read-only, still refusing --send
and --sso. Taking library --send with forward-auth and proof would need
the #385 refusal reverted in cli.mjs:63, serve.mjs:681 and the service,
release and upgrade scripts, so it is not done here.

docs/guides/case1-business.mosaic-stack.json now launches
claude-opus-5-5 with provider proxy, route anthropic, under account
factory with credential proxy.
2026-11-02 22:09:01 -06:00
jason.woltje 1bf83078b4 docs(editor Chromium 156): BUILD-LOG and SESSIONS lines (Vikunja #784) 2026-11-02 22:07:43 -06:00
jason.woltje 0c6aa1a1e2 test(webui): set aside the paste's inert-parse CSP reports under Chromium 156 (Vikunja #784)
Chromium 156 (host upgrade 2026-11-03) checks script-src-attr when an
inline handler attribute is created, in a document with no window as well
(WPT PR 62762; the follow-up PR 64290 that skips windowless documents is
not in 156). prosemirror-view's readHTML parses pasted HTML into the body
of a new createHTMLDocument, so the paste test at :154 got one report per
pasted handler (img onerror, a onclick, a onmouseover, svg onload), each
at editor.js:8212 with the document as target. No pasted handler reaches
the live document; Chromium 153, 151 and Brave 154 report nothing there.

The page record now sets aside only a script-src-attr report whose event
names editor.js at that readHTML line and whose target is the document.
The line is found from the bundle's text, and the lines that make the
parse target a new createHTMLDocument body are pinned; the test file
refuses to load if they change. h.quiet(), inert(), injected, errors and
rejections are unchanged. No product or CSP change.

New test: after a hostile paste, three live handlers each still fail
h.quiet() with one script-src-attr report: an onclick set on an editor
paragraph and clicked, an img onerror parsed into a page-owned detached
element, and an onclick prosemirror-view sets through its attributes prop
(a report naming editor.js at another line).
2026-11-02 22:03:26 -06:00
jason.woltje b9811c492f Merge #774 R2: the first proxy check gates the route the final check picks (Vikunja #774) 2026-11-02 21:52:46 -06:00
jason.woltje d27fe0ea95 docs(row 332 R2): BUILD-LOG and SESSIONS lines for the route prediction fix (Vikunja #774) 2026-11-02 21:41:33 -06:00
jason.woltje b8f01a189f fix(row 332 R2): proxy first check gates the route the final check picks (Vikunja #774)
Route selection moves into one helper, pickRoute(proxyOf), that both checks call: the
primary preflight, and the fallback with its own preflight only when the primary's
fails, with the same messages. The final check passes proxyFor and is otherwise
unchanged. The first check of a proxy launch passes a stand-in session proxy (marker
key PENDING_ADMISSION_KEY and the configured loopback base URL), which reaches only
the preflights, then runs gate() with a null session proxy on the predicted route only.
The round 1 union over both routes is gone.

The managed fixture takes extra (more harnesses switched on), real (harnesses loaded
unfaked) and hostEnv. Seven tests in proxy-launch-order.test.mjs.
2026-11-02 21:37:48 -06:00
jason.woltje e6ba6eb8dc Merge row 333 follow-ups: orphan ids after a failed lookup, dropped proxy usage batches, business-imports scanner, held refusal-test ports (Vikunja #783, #778, #779, #782) 2026-11-02 21:22:41 -06:00
jason.woltje 3c7a7740c4 docs(row 333 follow-ups R3): BUILD-LOG and SESSIONS lines (Vikunja #779) 2026-11-02 21:16:02 -06:00
jason.woltje 180fb8ab00 fix(row 333 follow-ups R3): a spread before import is a dynamic import (Vikunja #779)
The negative lookbehind in DYNAMIC and in the dynamic branch of IMPORT excluded any dot
before `import`. That also skipped the last dot of the spread punctuator, so
`${({...import('../x.mjs')})}` returned [] for an existing, a missing and an outside
target, and `{...import(name)}` in plain code was neither returned nor refused.

Both patterns now share one fragment: a word character or $ before `import`, or a single
dot (x.import, x?.import), makes it a property call; a dot that follows another dot ends a
spread and does not exclude it. `1..import(` is read as an import too, which errs toward
refusal; the header names it.

Tests: a spread inside a substitution refuses for an existing, a missing and an outside
target and for array spread; a spread in plain code is returned, reaches the target
checks, and is refused when its argument is not a plain string; x.import and x?.import
stay property calls in plain code and in a substitution.
2026-11-02 21:13:56 -06:00
jason.woltje 42c72d781b docs(row 333 follow-ups R2): BUILD-LOG and SESSIONS lines (Vikunja #779) 2026-11-02 21:00:22 -06:00
jason.woltje d3b6ab11da test(row 333 follow-ups R2): refuse a dynamic import inside a template substitution, read division after ++ and -- (Vikunja #779)
The business-imports helper blanked a whole template literal, so a dynamic import inside a
${...} substitution was neither found nor refused and skipped the existence and containment
checks. The scanner now reads a substitution to its closing brace, refuses it with
"unsupported import inside a template substitution" when it holds a dynamic import, and drops
it otherwise, so a nested template and a brace inside a string no longer end it early.

A slash after a postfix ++ or -- was read as the start of a regular expression, so
`n++ / 2` threw "unterminated regular expression". After a ++ or -- pair that follows an
operand the slash is division; after one that follows an operator it still starts a regular
expression. The header names the rare form this still misreads.

Output on the real tree is byte-identical.
2026-11-02 20:59:35 -06:00
jason.woltje a605e44d1e docs(row 332): BUILD-LOG and SESSIONS lines for the proxy first check fix (Vikunja #774) 2026-11-02 20:52:59 -06:00
jason.woltje 85ecdfbde5 fix(row 332): proxy first check runs every key-independent refusal; testProxy test option (Vikunja #774)
F1: with system.proxy set, the first launcher check no longer returns
before the account, sandbox, capacity and limit checks. It skips only the
harness preflight and the session proxy key match, which need the key P2
admits in startLocked. A launch that can never start now refuses before
authorizeLaunch, the workspace and checkouts, and modelPreflight. The first
proxy pass accepts only credential "proxy" for a declared account, tries
the fallback model when the primary refuses, and lets mayLaunch
key-quota-no-model-key through so P2 can issue the first key. The final
check is unchanged and still runs before newRun and spawn.

F4: the proxy test option is renamed testProxy and createLauncher throws
test-proxy-refused when it is given with system.proxy.
launch-account.test.mjs is a second caller, so the option stays.

Tests: proxy-launch-order.test.mjs (6), launcher.test.mjs F4 throw test;
the managed launch fixture gains bwrap, admit and trace.ops.
2026-11-02 20:51:51 -06:00
jason.woltje 2ba22b4cbf docs(row 333 follow-ups): BUILD-LOG and SESSIONS lines (#1831) 2026-11-02 20:41:10 -06:00
jason.woltje 5fbf3d2b51 test(row 333): hold the port a refusal test uses instead of probing and closing it (Vikunja #782)
control-board serve.test: the non-loopback refusal test took a port from a
probe-and-close helper and then called startServer on it. It now binds its
own listener, keeps it for the whole test, and closes it in finally, so the
port cannot be taken by another process in between.

stack-release.test T-I4: the free port goes only to webui-service.sh install
rows that refuse before any listen, so it is now a closed lease
(leaseClosedPort), which refuses connects and blocks other binds.

The 22 other freePort callers hand the number to `stack-release.sh rehearse`,
which probes it and starts a Console later. That needs a script change and
is left as a design, with a comment above freePort naming the window.
2026-11-02 20:22:14 -06:00
jason.woltje 0e7e203db8 test(row 333): harden the business-imports helper and test it on small trees (Vikunja #779)
The helper read imports with a regex that treated a commented import as live, missed
`import (` written with a space, skipped a missing target inside packages/business/src
before checking it existed, and resolved targets lexically. It now blanks comments
(and ignores import forms inside strings and regular expressions) before matching,
counts a spaced or line-broken dynamic import, throws on a dynamic import whose
argument is not a plain string and on a file with an unterminated string, comment,
template or regular expression, checks every target exists and is a regular file
before the inside-own-directory skip, and refuses a target whose real path is outside
the real repository root. The output for the real tree is unchanged.

business-imports.test.mjs builds small trees under a private temp directory.
2026-11-02 20:14:25 -06:00
jason.woltje 38cfa72335 feat(row 333): count dropped proxy usage batches and show them in the Console (Vikunja #778)
The usage queue read drains the proxy. A batch that is then not written (the
client or the bus refuses its shape, an ambiguous key owner, a failed write) is
lost, and the Console showed proxy totals with no sign of it. The reader now
counts these per enabled business since the bus started, the proxy view returns
the count as droppedBatches, and the Console proxy section says so above 0.
A read that failed before the proxy answered or that it refused drained nothing
and is not counted. Telemetry only; no quota reads it. The log line stays
proxy-usage-read-failed.
2026-11-02 20:08:50 -06:00
jason.woltje 3dc824ea12 fix(row 333): a failed lineage lookup forgets orphan ids the document dropped (Vikunja #783)
observeOrphans kept the whole remembered set when the lookup failed, so a leaf
removed and added back during the failure logged no second orphan line. It now
keeps only the ids the refreshed document still holds and adds none. Quota
decisions are unchanged: a failed lookup still refuses.
2026-11-02 20:05:28 -06:00
jason.woltje 1ff45c4ad6 Merge row 333: proxy usage and human model-key quotas, R4 (Gitea #1831) 2026-11-02 19:40:46 -06:00
jason.woltje 9c2f391a90 docs(row 333 R4): BUILD-LOG and SESSIONS lines (#1831) 2026-11-02 19:27:31 -06:00
jason.woltje a13050012a docs(row 333 R4): BUILD.md R4 section (#1831)
Rulings 1 to 4 as built, choices and departures, tests, runs, mutants M1 to M5, and what was not done. The R3 section is unchanged.
2026-11-02 19:27:04 -06:00
jason.woltje 8cf2eda9ff Merge flakes #780 and #781: project inspectGit maintenance race, held closed test ports
Branch t3/flakes-780-781-r2-fix (R1 7e0d3c93f, 1009bbfaf, 9944100ad; R2 1977f4ffc, 728442fce) on 925612922.
GPT review APPROVE on R2 (reviews/flakes-780-781-r2-gpt.md). Probe-then-bind follow-up is Vikunja #782.
2026-11-02 19:03:37 -06:00
jason.woltje f65faf9df8 fix(row 333 R4): a moved key quota keeps its count; orphan set on every refresh (#1831)
Ruling 1: the bus runtime passes launchSettings a key lineage lookup read
from its own credential records (ids only). A new daily key quota takes the
earliest stored since among the old document's daily key quotas in its key's
lineage, and now only when there is none. A reset still sets now, a
caller-supplied since still refuses, and a quota removed and added back in a
later write is new. A failed or malformed lookup refuses proxy-key-refused; a
write that adds no new daily key quota never calls it.

Ruling 2: every limits refresh updates the remembered orphan set, an empty
set when no daily key quota is left, so a quota removed and added back logs
again. In memory only: a restart is a fresh observation.

Ruling 3: pollSettledAfterTick yields on the real setImmediate, captured at
load, inside its deadline.

Tests: p5-key-lineage (writer move counts 160, reset restarts, lookup
failure, orphan remove and re-add), p5-runtime (exhausted on A, moved to B
through the real runtime, refuses), p5-background (barrier with every timer
mocked), token-limit-settings (earliest, no match, re-add, caller since,
malformed answers, default refusal). READMEs: business, plugins, daily-quota,
cliproxy-queue.
2026-11-02 19:02:45 -06:00
jason.woltje 728442fcef Record #780 R2 and correct the R1 entry in BUILD-LOG and SESSIONS (Vikunja #780)
Appends a BUILD-LOG entry that corrects the R1 entry without editing it: the
R1 walk change also dropped the recursive lstat, which R2 restores; the
tester-cli freePort helper has no callers and binds nothing; the stack-release
and control-board probe-then-bind window stays a known risk for a follow-up.
Appends one SESSIONS line.
2026-11-02 18:57:39 -06:00
jason.woltje 1977f4ffc6 Restore the fresh recursive lstat in project inspectGit (Vikunja #780)
R1 passed the parent's stat of a listed directory into the recursive walk,
so a recursive entry no longer took its own lstat. A directory replaced by a
symlink after that stat passed the stale directory check and readdirSync
followed the link; a directory replaced by a regular file leaked a raw
ENOTDIR instead of refusing with project-repository.

The walk now takes a root flag. The .git root keeps its raw lstat and its
own error; every recursive entry takes a fresh lstat through statEntry, so
a vanished entry still maps ENOENT to 'git metadata changed during
inspection' and a replaced one refuses with 'expected local .git directory'.
The mapper is unchanged: ENOENT only.

Two deterministic tests replace a directory under .git/objects inside the
lstat call that stats it as a listed entry, after the real stat is taken:
once with a symlink to a fixture-only directory outside the repo, once with
a regular file. Both refuse with project-repository.
2026-11-02 18:56:28 -06:00
jason.woltje 9944100ade Record the #780 and #781 flake fixes in BUILD-LOG and SESSIONS (Vikunja #780, #781) 2026-11-02 18:28:39 -06:00
jason.woltje 1009bbfaf9 Hold closed fixture ports for the test's life (Vikunja #781)
leasePort({closed:true}) ignored its option: it probed an ephemeral port and
closed it, so a parallel test file could bind it and answer a request the
test expected to fail (preview.test.mjs:209 saw 200 instead of 502).

leaseClosedPort holds a bound, non-listening socket in a perl child until the
test's after hook. Connects still get ECONNREFUSED, bind() from another
process gets EADDRINUSE, and the kernel's ephemeral allocation skips the port.
Lane mode keeps its band and per-port lock, and releases the socket before
the lock. leasePort now refuses a closed option, so a stale call cannot get
the unheld port again.

Unanswerable callers (webui preview, serve, service) move to leaseClosedPort(t).
Callers that listen on the port themselves (stack-release rehearse, control-board
serve, tester-cli) keep leasePort and drop the ignored option.
2026-11-02 18:25:27 -06:00
jason.woltje fe3ef5128d docs(row333 R3): BUILD-LOG and SESSIONS lines (#1831) 2026-11-02 18:12:22 -06:00
jason.woltje 0be9e024cf docs(row333 R3): BUILD.md R3 rotation fix section (#1831) 2026-11-02 18:12:04 -06:00
jason.woltje 7e0d3c93f3 Fix project inspectGit race with git maintenance (Vikunja #780)
Fixture helpers that commit to a repository the product later inspects now pass
maintenance.auto=false and gc.auto=0, as the product's own git calls already do,
so a detached git maintenance run no longer writes pack temp files mid-walk.

inspectGit now refuses a git metadata entry that vanishes between readdir and
lstat (or between listing a directory and reading it) with project-repository,
'git metadata changed during inspection', instead of leaking a raw ENOENT.
It still refuses rather than skipping or retrying. A missing .git keeps its
existing error.

A deterministic test removes the named entry from inside a replaced readdirSync,
for both a file and a directory.
2026-11-02 17:55:40 -06:00
jason.woltje 3692fca522 fix(row333 R3): per-key quota follows the agent's key lineage across rotation and re-issue (#1831)
Ruling 1: model records keep a bounded previous list (64 ids, oldest dropped)
of ids that left by rotation, grace expiry or re-issue; a fire removes the
record. A tokens.keys leaf matches and counts every id in the lineage that
holds it. Lineage ids are unique host-wide. An orphaned leaf limits nothing,
logs one value-free line when it becomes orphaned, and the Console usage
view lists it.
Ruling 2: an agent with no model key under a key quota refuses
key-quota-no-model-key, passed through the broker, launcher and stop reason.
Ruling 3: covered by the lineage; no mayLaunch change.
Ruling 4: the usage module receives a frozen { readUsageQueue } only.
Ruling 5: every telemetry fixture wait races a 5 s real-timer deadline.
2026-11-02 17:54:07 -06:00
jason.woltje 9256129228 PR 1838 review P3s (#725): approved wording in the tasks requirements test header, REBASE-1.19 location correction
GPT review of the 1.19 rebase found the test header still called the PRD a candidate and the rebase record placed lines 793 and 645 in the wrong requirements. Comment and record only; no assertion changes.
2026-11-02 17:29:16 -06:00
jason.woltje 31222d81d7 Merge PR 1838 (#725): disk-space governance PRD as version 1.19
Rebased onto refactor as 1.19 because row 335 landed 1.18 first. Requirement text, IDs, order and the 101
records match the approved fd9ae104d apart from version labels. GPT review APPROVE with two P3s, fixed in the
next commit.
2026-11-02 17:29:03 -06:00