Commit Graph
7 Commits
Author SHA1 Message Date
jason.woltje 0430c7dc32 fix(release,task,auth): health-reason review round: the worker credential check reads the auth file path as compose does (a leading ~ is $HOME, a relative path is from the checkout, a named volume is undecided), treats COMPOSE_ENV_FILES and docker-compose.override.yaml|yml as undecided like .env, and leaves the credential not checked when this user can't read the auth file (EACCES, EPERM) instead of refusing; a key variable that is only spaces is no credential, as in pi; a compose.yaml that can't be read or parsed gives fixed words, never its path or text; release.sh's reason with no run id comes from the new scripts/health-reason.mjs (the last refusal line, prefix dropped, redacted, withheld when it holds an environment value) and says "gave no run id"; the fault-injection and recursion-guard comments are back; tests cover the tilde path, COMPOSE_ENV_FILES, an unreadable auth file, a blank key, a compose warning line in a failed run's stderr, and the redacted and withheld reason; docs/TOOLS.md names each undecided case (#1873, lane health-reason) 2026-11-20 15:31:59 -06:00
jason.woltje 1433686d50 feat(release,task,auth,runs,plugins): health-reason: a failed release health check prints its run id and one plain reason before release: refusing activate: health check failed: the cause line mosaic-task show now prints for a run that did not succeed (a runner reason in words, else one redacted line from the run's stderr.txt read through the new readRunText), or, when the runner refused before a run record, its own refusal line, redacted. A pi run checks before its run directory exists that the worker container compose starts holds a credential for config execution.provider: names and types from the PI_AUTH_FILE compose mounts and the key variables compose passes with a value, judged by pi-ai's own checkAuth on placeholders (packages/plugins/harness/pi/worker-credential.mjs), so no provider list is kept; with none it refuses exit 3 naming the provider, what the container has and what to do; when it can't decide (COMPOSE_FILE, an override or .env, an env_file, an unknown provider) it says so and the run goes ahead. auth.sh status adds one line for the default run's provider and credential. Tests in test-task, test-release, test-auth and runs.test; docs/TOOLS.md (#1873, lane health-reason) 2026-11-20 15:14:07 -06:00
jason.woltje cabcb81d49 row 305 (#1812): each suite's network check also requires the network present under the run's project before the remove (mos-1445) 2026-10-23 06:49:49 -05:00
jason.woltje 353d65f577 row 305 (#1812, Vikunja 591) draft: per-run COMPOSE_PROJECT_NAME, exit trap removes that one network, one absent-network check per suite; for Mos through Sage before the build (mos-1272) 2026-10-23 06:49:49 -05:00
jason.woltje e69260a3ce row 244: gate runs mount a 0600 fixture pi auth file, test-release activates on the mock adapter, and real-model test-task cases sit behind MOSAIC_LIVE_PROVIDER=1 (#1757)
Candidate morgana/row244 94ab4c2fe on a36523713, manifest 6e7e3e3c (8 paths).
Webby APPROVE r1, rev 3008 (webby-0084, REVIEW-r1.md at webby/reviews
ebb3d83bf; request #1757 c30154). Gate on Sage's slot at 81e037d20
(sage-2147): the five gate-lane files whole 51/0, test-task.sh 91/0,
test-release.sh 14/0, mutants M-G, M-L, M-A, M-T and M-F killed.
94ab4c2fe adds only BUILD.md results. Webby's drift check: a36523713..d37210288
changes none of the 8 paths and no path either suite reads; merge-tree clean.
Rulings A and C (sage-1914, sage-2061). The dropped real-model coverage goes
to DEFERRED in the follow-up doc commit.
2026-10-21 16:44:37 -05:00
jason.woltje 439bea6915 ui(test): green OK/PASS, red FAIL - terminal-only, NO_COLOR-aware
Owner feedback: grep match-highlighting made the word 'policy' red while
status words were plain - counter-indicative. Suites + verify now emit
ANSI colors (green success, red failure) when stdout is a terminal;
piped/machine-parsed output stays plain, honoring NO_COLOR. Word 'ok'
promoted to 'OK' for scannability.

Verified byte-level via forced-pty run; piped output unchanged; suites
41/24/14 + verify green.
2026-09-03 06:23:47 -05:00
jason.woltje e87ecdb3e5 test(release): release-layer selftests (#12)
14 cases: RELEASE validation (valid/invalid/missing), tag consistency,
status on empty state, fault-injected refusal with no pointer + single
valid refusal log line, healthy activation, pointer fields, repeat
activation append-only log, rollback-without-previous refusal.

Harness fix learned the hard way: restore RELEASE from backup inline
after the missing-file case (mv-back restored the mutated file); single
exit trap self-heals the repo state.

Closes #12
2026-09-02 20:23:18 -05:00