jason.woltje
784748347b
fix(harness,seat): pi-fit-tmp: the fit check gives one verdict whatever the temp directory is; with the scratch under /tmp, the bind of the scratch's tmp/ over /tmp hid the scratch's own bind and every run failed before pi started ("can't be checked: --help failed"); checkArgv now orders its binds with the new mountOrder (a bind goes before any bind whose target lies under its own, nothing else moves), the scratch goes under the temp directory's real path, and a failed --help line says how the run ended (exit status N, ended by SIGNAL, timed out) with no path; tests: a check with its temp directory in one mkdtemp directory under /tmp, and through a link to it, gives the verdict a temp directory outside /tmp gives and leaves nothing; mountOrder's order; the --help line for an exit status and a signal
2026-11-20 11:42:54 -06:00
jason.woltje
9869200a03
fix(harness): pi-unpin S6 review round: tests now pin the checks no test held; a blocked read that skips the gate's hook and fails on its own (outside and each of the four spellings) is refused by the gate-reason check; a pi whose reads all fail is refused as not running the allowed tool; agent_end must carry the model's final text answer (stopReason and hasText in the turn marker), not just any object; a pi that finishes the script and exits non-zero is undecided; a pi that exits non-zero before any request is undecided with a line that says so; a pi that leaks a blocked read and then hangs is refused, not undecided; pi-stand-in gains hookSkipFail, readFails, exitCode, agentEndEmpty and a numbered modelHang; pi-session.test.mjs takes the expected pi from the pi module's own lookup; README matches ( #1873 , lane pi-unpin-s6)
2026-11-20 10:59:40 -06:00
jason.woltje
be7066b725
feat(harness): pi-unpin S6: the fit check runs pi once against a scripted loopback model, so S0 lines 1, 2 and 4 and the system prompt are proved on the pi that runs; src/pi-fit-model.mjs is the model, first process in the sandbox, on the sandbox's own loopback with the network unshared, on a stand-in provider and model named fit-model; the script reads a file the gate allows, a file outside the project, the same file under each of the four read spellings pi 0.85.1 tries, and a file a second fit-only extension (src/pi-fit-throw.mjs) throws for; a pi that runs a blocked tool, swallows a handler's throw, drops the --system-prompt file or never emits agent_end is refused with harness-feature-missing's line, a run that times out or whose model gets no request is undecided, and the verdict is cached with the pass for the digest; helpers.mjs mockAnthropic shares the model's request handler; pi-session.test.mjs runs on the pi MOSAIC_PI_BIN names ( #1873 , lane pi-unpin-s6)
2026-11-20 10:59:40 -06:00
jason.woltje
4aa008e9fe
test(cli,plugins,webui): harness-watch-w3 re-check: the plugin-root leak test skips when TMPDIR's parent is not writable instead of placing the root under TMPDIR, where it passed with the root left out of the backstop (N1); red and missing lines must be the page's danger colour, not only unlike muted (N2); a usable record after the first 256 is not checked yet (N3) ( #1873 , lane harness-watch-w3)
2026-11-20 10:26:35 -06:00
jason.woltje
ca7f46e5d4
test(cli): harness-watch-w3 review P3-4: the plugin root in the write-time check test sits beside TMPDIR, not in it, so the test fails when store() leaves the plugin root out of the backstop (TMPDIR, an env value, caught a root under it anyway) ( #1873 , lane harness-watch-w3)
2026-11-20 10:26:35 -06:00
jason.woltje
256e80f26b
fix(cli,plugins,webui): harness-watch-w3 review: readWatchView drops a file-only harness name that is an env value (P3-1), keeps at most 64 entries from the first 256 records with a Set for order (P3-2) and keeps only real times, so 2026-02-30 is none (P3-7); red and missing lines take the danger colour r3 gives can't start (P3-6); new tests: the default stat key reads the plugin root (P3-3), a record naming the plugin root is not written (P3-4), and after Save harnesses the lines stay or take the save answer's harnessWatch (P3-5) ( #1873 , lane harness-watch-w3)
2026-11-20 10:26:35 -06:00
jason.woltje
3225536adc
feat(bus,cli,plugins,webui): harness-watch-w3: the bus plugins answer carries harnessWatch, one entry per harness (name, state, version, checkedAt, changedAt, failed, line) read from the host's <org dataRoot>/state/harness-watch.json by readWatchView (packages/plugins/src/harness-watch.mjs): read only, no link, FIFO or file over 1 MiB, and a missing, unreadable or wrong-shape file or record gives "not checked yet", never a throw or a guess; the read redacts again with the org and instance roots as known paths; Settings > Routing shows one line per harness under Save harnesses, red and missing in the warning colour, not checked yet never as fit, and one plain line when the answer has no list; the host's watch loads harness plugins from the instance root when there is one, as the launcher does, and keeps state under the org root; new tests: bus start starts the watch through deps.harnessWatch and --no-launch does not ( #1873 , lane harness-watch-w3)
2026-11-20 10:26:35 -06:00
jason.woltje
9287e2fac7
docs(agents): AGENTS.md "Version pin" becomes "Harness versions": no harness binary is pinned, package.json holds a floor range and the lock records what npm ci installs, the fit check and the host timer stand where the pin stood, and image tags derive from RELEASE and the lock ( #1873 , lane pi-unpin-s5)
2026-11-20 09:12:32 -06:00
jason.woltje
9d02ab4a69
test(release): pi-unpin S5 re-check round: gate-lane-image.test.mjs reads the expected tag from the copied lock instead of 0.85.1, so it follows the lock to a newer pi; pi-unpin-s5.test.mjs requires test-task.sh and test-auth.sh to stop when image-tag.mjs refuses; build.sh's header and docs/TOOLS.md say the tag comes from the lock, build.sh runs the fit step, and build.sh comes before test-task.sh since compose no longer builds a missing image ( #1873 , lane pi-unpin-s5)
2026-11-20 08:34:47 -06:00
jason.woltje
5210522e13
fix(release): pi-unpin S5 review round: compose.yaml loses its build section and sets pull_policy: never, so a compose run (hello.sh, agent.sh, the task runner) never builds or pulls the agent image past the fit step and refuses a missing one; build_image runs docker build -f Containerfile, refuses without MOSAIC_IMAGE_TAG, and with the gate's prepareImage is the only builder; test-task.sh and test-auth.sh stop when the tag can't be read; the gate test's order check no longer passes on a missing call; README and pi-fit-image.mjs say the fit check runs on the host's node, which can differ from the image's ( #1873 , lane pi-unpin-s5)
2026-11-20 08:34:47 -06:00
jason.woltje
8e9b05de8d
feat(release): pi-unpin S5: package.json gives pi the range >=0.85.1 and the lock still resolves 0.85.1; the image tag is mosaic-poc-agent:<lock version>-r<RELEASE>, built by scripts/image-tag.mjs from package-lock.json for common.sh, mosaic-task.mjs, the gate's lane-image.mjs, test-task.sh and test-auth.sh, never from the package.json string; scripts/pi-fit-image.mjs runs the fit check on the pi the lock resolves, as npm ci installed it, before every image build (build_image in common.sh for build.sh, release.sh package and verify.sh, and the gate's prepareImage), so an unfit locked pi fails the build; it runs on the host because docker build's seccomp refuses bwrap; agent-host-dev.sh records pi --version for its banner and no longer refuses on version; docs match ( #1873 , lane pi-unpin-s5)
2026-11-20 08:34:47 -06:00
jason.woltje
0f07301607
test(plugins): harness-watch-w2 re-check: the two group-kill tests wait up to 15 s for the stand-in's background child to start, since the --help capture comes after the adapter runs and --version and missed 3 s under heavy load ( #1873 , lane harness-watch-w2)
2026-11-20 07:29:22 -06:00
jason.woltje
a4d06b95c6
test(plugins): harness-watch-w2 re-check P3-3: the claude capture's stop test now has a background child that keeps the stdout pipe open, so it fails when a stop kills only the parent, and a new test does the same for pi's version capture on a stop ( #1873 , lane harness-watch-w2)
2026-11-20 07:29:22 -06:00
jason.woltje
f2463ab36d
fix(cli,plugins,harness): harness-watch-w2 review: pi-fit's two whole-result tests carry digest and undecided, and pi-binary's copy links packages/plugins/src (P2-1, P2-2); the claude fit rule counts a flag only from an option line read up to its description, so a flag a description only mentions is a miss (P2-3); on a cache miss preflight asks the bus host's watch for a pass at once (new src/watch-request.mjs: a stat pass now, a full pass on a changed key, one tick after a running pass, none after stop), and stays synchronous, so the launch that missed and launches before the first pass ends still go ahead (P2-4, the rest named in the README); the watch redacts word:/path, file:// and ~/ forms (P3-5); each claude capture kills its process group when it ends too and runs nothing on an aborted signal, the unobservable key-equal guard is dropped, pi inspect takes its check as an option, the host backstop leaves kept and source alone, and tests now fail without the group kill, the stop grace, the verdict cap, the early abort, the backstop's data root, home and process env needles and pi's undecided read (P3-6) ( #1873 , lane harness-watch-w2)
2026-11-20 07:29:22 -06:00
jason.woltje
7afe892e94
feat(cli,plugins,harness): harness-watch-w2: the bus host runs the harness watch on a timer (a full pass at start, a stat-key pass every 5 minutes, a full pass when the key changes or once a day, none while processing is halted or invalid and one on resume, never two at once, stop aborts the pass) and writes <org dataRoot>/state/harness-watch.json (temp then rename) and harness-watch.jsonl (one line per transition), checked for host paths and env values first; claude-code's fit rule: every flag adapter.sh passes (read from two recorded adapter runs) is in --help and --version answers, captured under unshare -r -n with pi-fit's fallback, a miss is fit fail with the flag as rule id, and preflight refuses harness-feature-missing on that kept verdict; pi-fit failures carry digest and undecided, pi's inspect reads them and its --version capture stops with the signal; the watch takes a signal and keeps flag rule ids ( #1873 , lane harness-watch-w2)
2026-11-20 07:29:22 -06:00
jason.woltje
4a3f501e13
fix(conversation): pi-unpin S4 sixth re-check: an engine node under /tmp no longer counts as one the fit check's sandbox shows, since pi-fit.mjs puts the fresh /tmp over it after it mounts that file, so a PATH with that node first refuses instead of letting the fit check run another node (R6-1); a lookup's problem line with a C1 control or a line or paragraph separator reads "the pi lookup gave no binary"; README and a test comment match ( #1873 , lane pi-unpin-s4)
2026-11-20 06:30:10 -06:00
jason.woltje
c065034a6e
fix(conversation): pi-unpin S4 fifth re-check: the own-copy rule for fit PATH entries covers /proc and /dev only; the sandbox's /tmp starts empty (pi-fit.mjs makes it fresh for each run), so a /tmp entry is judged like any directory the sandbox doesn't show, and S4h and a checkout under /tmp no longer refuse for it (R5-1); a lookup's problem line with a path or a control character in it reads "the pi lookup gave no binary"; S4h covers a /dev entry, a /tmp entry ahead of the engine's, and lookup lines ( #1873 , lane pi-unpin-s4)
2026-11-20 06:13:38 -06:00
jason.woltje
83250ef36b
fix(conversation): pi-unpin S4 fourth re-check: under #!/usr/bin/env node, up to the first node every fit PATH entry must read the same in the sandbox as on the host: in plain form, so a .. after a link can't point elsewhere, and not in /proc, /dev or /tmp, which the sandbox makes its own, by its spelling or by the real path of the nearest part of it that exists; an entry or a node link the host can't check refuses, and entries after the first node are not judged (R4-1); the fit check gets the controller's label, which must be words like the lookup's, so no refusal line carries a hand-built label with a path or a newline (R4-2); S4h covers each case ( #1873 , lane pi-unpin-s4)
2026-11-20 05:53:43 -06:00
jason.woltje
b432f9cd6f
fix(conversation): pi-unpin S4 third re-check: under #!/usr/bin/env node the PATH walk follows what the fit check's sandbox shows (/usr, /etc, the host's /bin, /lib, /lib64 and /sbin, and the engine's node file at its path): a node the sandbox can't show, or reaches through a link it can't show, may not come before the first one it can, and that first one must be the engine's, so the fit check and the launch run the same node (R3-1); an empty or relative PATH entry refuses, since env reads it against the fit check's directory (R3-2); a label that isn't a plain string without a / reads "the pi" in a refusal line; S4h covers each case ( #1873 , lane pi-unpin-s4)
2026-11-20 05:36:07 -06:00
jason.woltje
e0065b6a44
fix(conversation): pi-unpin S4 second re-check: under #!/usr/bin/env node the first node on the fit check's PATH (sessionEnv's: the repository's .bin, then this process's PATH) must resolve to the engine's own node and no node on it may lie inside the package the fit check mounts, or the start refuses engine-feature-missing, so the fit check and the launch run the same node (N1); the controller keeps a frozen plain copy of the lookup's answer, its own string data fields only, so a getter or a Proxy that answers differently later can't make the fit check read one package and the launch run another (N2); S4g covers a bin the lookup no longer takes (N3); a refusal line's label is the lookup's string label or "the pi"; tests in S4g and S4h ( #1873 , lane pi-unpin-s4)
2026-11-20 05:12:49 -06:00
jason.woltje
3f39ed3f11
fix(conversation): pi-unpin S4 re-check: a first line must end within the 256 bytes the kernel reads and carry no CR, and an absolute node in it must resolve to the engine's own node, so a package's own program named node or a long first line can't make the fit check run another program than the launch (P1); the lookup is run again on the answer's bin and must give the same root, dest, view and pkg, so a hand-built answer can't mount one package for the fit check and launch another (P2); S4g checks each field alone (P3); test S4h ( #1873 , lane pi-unpin-s4)
2026-11-20 05:12:49 -06:00
jason.woltje
28a5d38349
fix(conversation,discord): pi-unpin S4 review: the controller refuses engine-feature-missing for a pi whose first line doesn't run node (#!/usr/bin/env node, or an absolute path to a node), since the fit check runs the bin as a program and the launch runs its real file with node (F1); the lookup's answer must still hold together at each check, its bin and view resolving to the same file inside the package found, or it refuses unsealed-engine, so a package link moved since the lookup or a hand-built answer with another bin can't launch (F2); the Discord test helpers plant a pi package and name it in MOSAIC_PI_BIN, so no CLI test reads the host's pi (F3); the READMEs say what --repo and the old-claim line mean now (F4, F5); N24b proves the default lookup reads the controller's environment (F6); the stand-in pi gains a node form for the conversation fixtures; tests S4f, S4g and the S4e repeat ( #1873 , lane pi-unpin-s4)
2026-11-20 05:12:49 -06:00
jason.woltje
824b1213c1
feat(conversation,discord): pi-unpin S4: the controller launches the pi the harness lookup finds (binary.mjs locate, passed in as the pi option and defaulting to locate(process.env)) in place of pinRoot and PI_BIN; the seal compares the pre-argument to the real path of that bin, read again at each check; the version pin gives way to the fit check (pi-fit.mjs): a pi that lacks a feature or can't be checked refuses engine-feature-missing with the check's line, and the claim pins are engineVersion (the --version text) and enginePin (the fit digest), so changed bytes under a stopped claim still refuse engine-pin-mismatch; --no-mcp joins the seal when the pi's help lists it; a claim made under the old pin record refuses engine-pin-mismatch with a line saying to start a new claim; pi-pin.mjs is renamed pi-seal.mjs without the pin constants; the Discord CLI takes its pi from the same lookup; tests red on 29daa4c4b ( #1873 , lane pi-unpin-s4)
2026-11-20 05:12:49 -06:00
jason.woltje
ca7388743b
fix(adapters,harness): pi-skills re-check: the docs no longer call the fit check's last -p run a headless worker's argv, since task launches refuse skill directories and set MOSAIC_SKILLS empty (packages/processing-control containers.mjs) and only the interactive launch (scripts/agent.sh) sets it, in the TUI with --tools and --session-dir; the run is now named the nearest headless form of the adapter's --skill argv, and the Not run notes name the TUI launch's flags and --skill with no -e (R2-P2-1, R2-P3-1); the untested --system-prompt check added to that run is dropped, as at BASE (R2-P3-2) ( #1873 , lane pi-skills)
2026-11-20 04:30:23 -06:00
jason.woltje
59af86a5ee
fix(harness): pi-skills review: the fit check's last -p run is now the adapter's headless worker argv with MOSAIC_SKILLS, an -e file and no tools (new export workerShape: --no-skills then two --skill directories, --no-tools, --no-session, the fit route's --provider and --model, --system-prompt, -p), and must list both given skills and no planted one, so a pi that leaks only with --skill and --provider is refused harness-feature-missing (P3-1); a test runs the adapter and holds its argv to workerShape; the run replaces the plain sealed -p --no-session run, so it still adds no run, and both Not run notes now name that plain shape, --skill beside --tools, --session-dir, -c, --thinking or --mode json, and one or three or more --skill directories (P2-1); tests red on ffe241789 ( #1873 , lane pi-skills)
2026-11-20 04:30:23 -06:00
jason.woltje
d6d3271808
fix(adapters,harness): pi-skills: with MOSAIC_SKILLS the pi adapter keeps --no-skills and puts each --skill after it, since pi 0.85.1 adds a --skill directory to discovery (with --skill alone a scratch-HOME probe also loaded the user, settings, package and ~/.agents skills); the fit check's sealed -p run, the worker shape, now passes --no-skills with one --skill directory and must list that skill and no planted one, so a pi that lets --skill bring discovery back, or drops the --skill directory beside --no-skills, is refused harness-feature-missing, at no extra run; the stand-in pi loads --skill directories (skillLeak, ignoreSkill knobs); tests red on BASE for the argv order, real pi 0.85.1 through the adapter and both stand-in refusals; READMEs and the Not run note updated ( #1873 , lane pi-skills)
2026-11-20 04:30:23 -06:00
jason.woltje
4a7815d29e
fix(plugins): harness-watch-w1 recheck: with no digest on either record the version stands in only when both records have one, so a timeout or a throw (no version) between two unknown passes is no transition (N1); README says the stored surfaces are redacted and so are for display and comparison, with fit rules run inside the module on the text the binary printed (N2), and that pi's "can't be checked" is read after its lookup label ( #1873 , lane harness-watch-w1)
2026-11-20 04:24:37 -06:00
jason.woltje
af8c2f9777
fix(plugins): harness-watch-w1 review: a record carries lastDigest, the latest digest it knew, so a new binary after an unknown, red, missing, timeout or throw reads changed, and when neither record has a digest the version stands in, so red 2.0 to red 2.1 is a transition; the inspect answer is copied inside the try to own data fields only, so a getter, a Proxy or an inherited field is a failed inspect (unknown) and not a failed pass; redaction also covers realpaths, trailing slashes, the user name as a word (<user>) and any absolute path left (<path>), and the loader's refusal messages; a source or rule id equal to an env value is dropped; pi's "can't be checked" match reads only after its lookup label; claude-code skips relative PATH entries and hashes and runs the same resolved file; README updated ( #1873 , lane harness-watch-w1)
2026-11-20 04:12:24 -06:00
jason.woltje
b156727c00
feat(plugins): harness watch W1: watchHarnesses() makes one pass over every harness the loader gives, with no name list, and calls the optional inspect({ env, scratch, signal }) or falls back to version() with fit unknown; it sets each record's state (fit, changed, red, unknown, missing) from the answer and the last record, gives a transition only when the state or the digest changes, and writes nothing; only found plus fit pass reads as fit, a fail is red only when definite, and a throw, a timeout or an answer outside the contract is unknown; source must be a lookup step's name, and every text field has the scratch directory, the home directory, env values and PATH entries replaced by names; pi's inspect reuses preflight's fit check and its cache (a "can't be checked" failure is unknown); claude-code's inspect gives the version, the sha256 and a --help surface from a scratch HOME, fit unknown; README documents the contract ( #1873 , lane harness-watch-w1)
2026-11-20 03:54:47 -06:00
jason.woltje
29daa4c4bf
test(webui): settings-backend-a3 proof: the settings-review fixture's accounts answer carries the providers list, since with no list the Model setup page shows no sign-in button (F10 clicked it) ( #1873 , lane settings-backend-a3)
2026-11-20 02:21:46 -06:00
jason.woltje
c8db3665cf
fix(bus): settings-backend-a3 review: a provider list entry counts only with what its door needs, a sign-in host or a key base URL, so one missing it is refused provider-not-allowed before any proxy call (no sign-in opened at the proxy that the page cannot cancel), and a key group with no base URL is no provider's (P3-1) ( #1873 , lane settings-backend-a3)
2026-11-20 02:21:46 -06:00
jason.woltje
f2c262cf40
feat(model-proxy,bus,webui): settings-backend A3: the provider list comes from the cliproxy plugin's PROVIDERS (id, label, sign-in kind, the sign-in host for a subscription, the base URL for the key provider); the management client's oauthStart, the bus proxy page's names, login allow list, sign-in host check and key allow list read it, with the same refusals (proxy-client-invalid, provider-not-allowed); the setup status and the accounts answer carry providers as id, label and sign-in kind only; the Model setup page builds the provider select and its help text from them, and with no list, an empty one or a failed read it shows no select and says the providers could not be read; an architecture test holds that no provider id, sign-in host or key base URL is written out in client.mjs, proxy-page.mjs or display.js ( #1873 , lane settings-backend-a3)
2026-11-20 02:21:45 -06:00
jason.woltje
ebfbdb13a0
fix(webui): settings-s5c recheck: the status load says whether it painted the answer, and the result after an off says the list above is read again only then; a status read that answers 200 with null, an empty object or a page that is not JSON now says the list may be out of date, with Read again, instead of claiming the list is new (recheck P3); tests red on c47f9a3bd ( #1873 , lane settings-s5c)
2026-11-20 02:10:52 -06:00
jason.woltje
4d378fc38b
fix(webui): settings-s5c review: an open Turn off question goes when a status read no longer lists that program or cannot list programs, so the buttons are not left disabled (P3-1); a refusal code named like an object property (constructor) shows as its code with the plain refused words, in failText and in the shared explain(), never as page source (P3-2); after an off the result says the list above was read again only when that read worked; when it failed it says the list may be out of date and gives Read again, which reads it and moves focus to the result (P3-3); invalid-request on an off says the program is not in the Console's installed list or that list could not be read (P3-4); the programs box keeps its own spacing inside the settings form (P3-5); tests red without each change ( #1873 , lane settings-s5c)
2026-11-20 02:10:52 -06:00
jason.woltje
ab8633ede8
feat(webui): settings-s5c: Model setup, Advanced, lists the installed programs from the status read and which organizations have each one on, by display name, an organization whose list is null reading Not known in it, never off; Turn off for every organization asks first, naming the program, then POSTs programs/off, words each organization's outcome (bus-down never says stopped, failed:outcome-unknown says it may have changed, an unknown failed code shows the code unless it is shaped like a key), gives busy and a failed request a plain line, reads the status again and moves focus to the result; Technical details reads access health per organization when it opens: Ready only for ok with every key active and no reason, attention, unreadable, a missing or unknown health never Ready, no key id, agent or other count shown, a failed read with Read again; none of it shows or is read for a viewer who is not the instance owner; the old per-instance program read on Advanced is gone ( #1873 , lane settings-s5c)
2026-11-20 02:10:52 -06:00
jason.woltje
6ad11e6993
fix(pi): pi-unpin S3 re-check 10: unshare's outer layer is best effort: each fit check probes it once, alone and then with bwrap inside, and runs without it when unshare is missing, older than util-linux 2.36 or refused (Ubuntu 24.04 with apparmor_restrict_unprivileged_userns=1), with bwrap's argv the same either way and no refusal; only a failed bwrap or a missing setpriv refuses, each named; the sweep stops processes of this uid whose command line names a stale scratch dir before it removes it, scratch names carry the pid namespace and a sweep skips other namespaces' dirs, and a run or probe the check kills is swept at once; test 655 waits for pi.ready() before its fixture starts the launcher ( #1873 )
2026-11-20 01:17:33 -06:00
jason.woltje
e52a6b714f
fix(pi): pi-unpin S3 re-check 9: a fit check dies with the process that runs it: its command line runs under setpriv's parent-death signal and a shell that checks its parent is still that process, then unshare puts bwrap as pid 1 of a fresh pid namespace with --kill-child, so a process bwrap leaves in its setup dies with the namespace, and bwrap gets --die-with-parent; each run's scratch directory carries its process's pid and start time and a check first removes those a process no longer running left; the fit route is zai glm-5.3-flash, with a test that goes red on a Claude model or Anthropic provider; the launcher's warm-up records a harness plugin it can't load once, by code only; test 655 waits for pi's ready() before its timed part, with its own timeout raised ( #1873 )
2026-11-20 01:17:33 -06:00
jason.woltje
2d065b936e
fix(pi): pi-unpin S3 re-check 8: the launcher starts pi's fit check in the background when it starts, through one harness load helper a launch shares, so the first launch joins the check in flight; nothing waits on it, a failed warm-up is dropped with no cached verdict and no unhandled rejection; a fit check that throws refuses as harness-feature-missing with no path in its line; tests for the launcher's rejected preflight and the Triage host's wait on ready(); the fit's provider and model move to the pi module's session-env.mjs ( #1873 )
2026-11-20 01:17:33 -06:00
jason.woltje
098b3771c0
fix(pi): pi-unpin S3 re-check 7: the fit check runs its pi processes with async spawn, four at a time, and every caller awaits it, so the bus's event loop stays live (longest gap 22 ms against 6031 ms before) and two launches during one check share it; the launcher's call() awaits a module's promise and refuses its rejection as a throw, and preflight and version are awaited; the Triage host and route await the module's ready(); a run whose pipes outlive it settles a second after it exits or is killed; the fit's host env is the process's own through sessionEnv minus provider keys, its names are in the cache key, parity runs over a login shell's host and a unit's, and stand-ins that leak with TERM, TZ or LC_ALL unset are refused; bundle tests await harnessReady() ( #1873 )
2026-11-20 01:17:33 -06:00
jason.woltje
eac42663ba
fix(pi): pi-unpin S3 re-check 6: the fit runs get a bus session's environment, built by the launcher's sessionEnv over ENV_ALLOW, the sandbox's sessionSetenv and the runner's adapterEnv with the pi module's harnessEnv (now in session-env.mjs), so no run sets PI_CODING_AGENT_DIR and the agent sources sit at $HOME/.pi/agent; a test fails when the fit env and a bus session's env differ by a name outside one listed exception; the drift test runs the adapter in that env over 98 argv sets, each tool count, -c case, thinking level and provider, and checks every variable the adapter reads; -c over a session dir with nothing for the project is named under Not run, with a gap test ( #1873 )
2026-11-20 01:17:33 -06:00
jason.woltje
b41bc00b26
fix(pi): pi-unpin S3 re-check 5: five -p runs in a bus session's shape pass every pair of the adapter's session branches (tool list or --no-tools, -c over a planted session, --thinking, --mode json), a -c run must resume the planted session, each loads two -e, the -e extension's command list shows skills and prompt templates in -p, the drift test drives the adapter through all sixteen branch sets and fails on a pair no run passes, and a test holds the --no-mcp run on its own ( #1873 )
2026-11-20 01:17:33 -06:00
jason.woltje
749d6d98f5
fix(pi): pi-unpin S3 re-check 4: one sealed run in a bus session's shape, built by sessionShape, which a test holds to the adapter's argv; a one-out run must show only its own kind; the README and header list what a session passes that no fit run does ( #1873 )
2026-11-20 01:17:33 -06:00
jason.woltje
fa5ce3ae65
fix(pi): pi-unpin S3 re-check 3: the control passes --no-tools and --no-themes, one sealed run per loader flag leaves only that flag out and its kind must show, every run gets a fresh scratch directory, and the README says what argv the check runs ( #1873 )
2026-11-20 01:17:33 -06:00
jason.woltje
d009ccaec4
fix(pi): pi-unpin S3 re-check 2: the control passes the sealed runs' -e and --system-prompt so the runs differ only by the seal flags, a project source no longer shows a kind, a run over 4 MB says so, and --version gets 3 s ( #1873 )
2026-11-20 01:17:33 -06:00
jason.woltje
2613fb1c4c
fix(pi): pi-unpin S3 re-check: the control counts a kind only through a source the sealed runs can show, so a SYSTEM.md no longer stands in for the project APPEND_SYSTEM.md or an AGENTS.md ( #1873 )
2026-11-20 01:17:33 -06:00
jason.woltje
df26085303
fix(pi): pi-unpin S3 review: the control must show each planted kind and answer get_commands, the -e extension reads the system prompt so context and trusted project files are checked, settings and package sources are planted, help flags come from the option column, missing -e and the seal run in -p too, and the digest covers npm's lock files ( #1873 )
2026-11-20 01:17:33 -06:00
jason.woltje
7c1b87d154
fix(pi): pi-unpin S2 review: a found pi must be the bin its package's package.json names, and the fixtures name it ( #1873 )
2026-11-20 01:17:33 -06:00
jason.woltje
8908df113e
feat(pi): pi-unpin S3: every start runs a sandboxed, offline fit check on the pi it found and refuses harness-feature-missing when a flag is missing, a missing -e starts, or a planted source loads with the seal flags on ( #1873 )
2026-11-20 01:17:33 -06:00
jason.woltje
b8354e4304
test(pi): pi-unpin S2 follow-up: the adapter tests point MOSAIC_PI_BIN at their stand-in, and the sandbox test reads the new mount label ( #1873 )
2026-11-20 01:17:33 -06:00
jason.woltje
f62b1b9518
feat(pi): pi-unpin S2: the session runs the pi the module finds: MOSAIC_PI_BIN, else PATH, else the repository's copy, mounted by its package directory ( #1873 )
...
binary.mjs locate() takes MOSAIC_PI_BIN (absolute and executable), else the
first pi on PATH past the repository's node_modules/.bin, else the
repository's copy. The binary must belong to the pi package. mounts() and
installRoots() hold that package directory; the repository's copy keeps the
whole node_modules mount, since its packages are hoisted beside pi. env()
sets MOSAIC_PI_BIN to the binary's path inside the session, and the adapter
and the model-stream branch run it. sessionEnv passes MOSAIC_PI_BIN, and
Triage's SPAWN_PATH_ALLOW takes it with every host check kept.
harness-binary-missing keeps its code; with no pi its message is "no pi
found: set MOSAIC_PI_BIN, put pi on PATH, or run npm ci". A refusal names
the variable, never a host path.
2026-11-20 01:17:33 -06:00