4.5 KiB
4.5 KiB
Autonomous Work Run — 2026-09-03
Status: COMPLETED (single-session batch; see Results at bottom) Constraint: The assistant cannot run unattended. This was one long interactive session, not 12 wall-clock hours. Everything below was completed, committed, and pushed during that session.
Objective
Advance the Mosaic Stack rebuild several verified layers in one batch, focused on Pi, ending in a state the owner can test and review alone: green suites, activated release, recorded drills, and this document as the single entry point.
Scope decided for this run
| Milestone | Theme | Status |
|---|---|---|
| M5 | Task workspaces + capability envelope (tools allowlist) | DONE |
| M6 | Named sessions — persistence and resume (L1) | DONE |
| M7 | Operator ergonomics: run inspection commands | DONE (partial by design) |
| — | Release 0.0.6 packaged + health-gated activated | DONE |
Explicitly deferred (do not mistake for forgotten):
- Claude/Codex/OpenCode adapters (owner: focus on Pi for now)
- Network policy engine (container boundary is the current control)
- Fine-grained read restrictions (excluded by the original brief)
- Config/state migrations (no schema breaks so far; keep it that way)
Design decisions taken during this run
- Workspace (
task.workspace, optional):- absent → tool-free text-only run (previous behavior, unchanged)
":run"→ ephemeral per-run workspace at<dataRoot>/runs/<runId>/workspace- named (validated id) → persistent shared workspace at
<dataRoot>/workspaces/<name> - Container path passed via
MOSAIC_WORKSPACEenv; adapter cds into it. No new mounts (dataRoot is already mounted).
- Capabilities (
task.capabilities.tools, optional): allowlist from pi's documented tool set (read write edit bash grep find ls). Absent →--no-tools(previous behavior). Passed viaMOSAIC_TOOLSenv; pi adapter maps to--tools. - Adapter diagnostics for deterministic testing: the mock adapter writes all received
MOSAIC_*variables (never secrets — auth is not MOSAIC_-prefixed) to stderr, which lands in the run record. This lets selftests assert orchestrator→adapter plumbing without parsing model output. - Sessions (
task.session, optional named): persisted under<dataRoot>/sessions/<name>/via pi's documented--session-dir; resume semantics: continue most recent session in that directory when one exists (-c). - Selection authority unchanged: config file for adapter/provider/model; task file for workspace/capabilities/session; env vars are internal plumbing only.
- configVersion stays 1; all new task fields are optional. Old tasks/configs remain valid.
Test plan (what "done" means per milestone)
- M5: mock-adapter cases asserting workspace path and tools arrive via run-record stderr; live pi case writing/reading a file in a persistent workspace; validation negatives (bad tool name, bad workspace name)
- M6: session directory deterministically populated after first run; second run resumes (continuation asserted by session dir state and, in live E2E, by model recall); sandbox isolation between two named sessions
- M7:
show <runId>prints a complete run record;listgains workspace/session columns - Final: full sweep (config/task/release), verify, package + activate 0.0.6, config checksum unchanged
Review checklist for the owner
cat docs/plans/2026-09-03_autonomous-run.md(this file)scripts/release.sh status→ 0.0.6 activescripts/test-config.sh && scripts/test-task.sh && scripts/test-release.sh && scripts/verify.sh- Try a workspace task:
scripts/run-task.sh run tasks/workspace-demo.json ls ~/.mosaic-dev/workspaces/demo/ - Try the session demo:
scripts/run-task.sh run tasks/session-demo-1.json # teaches a word scripts/run-task.sh run tasks/session-demo-2.json # recalls it - Inspect any run:
node scripts/mosaic-task.mjs show <runId> - Gitea: milestones M5/M6/M7 closed; issues referenced by merge commits
Results (to be filled at end of run)
- M5: pending
- M6: pending
- M7: pending
- Release activation: pending
- Final suite counts: pending
- Corrections encountered: pending
Next steps after this run (not started)
- Owner review + hands-on testing of workspaces, capabilities, sessions
- Decision: capability defaults per mission (mission-level policy) — natural M8
- Second real adapter remains available whenever wanted
- Consider run-record pruning/retention policy once run volume grows
- Consider a
mosaic-task.mjs retry <runId>convenience for failed runs