Files
stack/docs/plans/2026-09-03_autonomous-run.md
T
jason.woltje 24bdef75fa feat(ops): run inspection, release 0.0.6, docs (#24)
- mosaic-task.mjs show <runId>: full record + snapshots + artifacts;
  uppercase-tolerant id validation; missing/traversal ids exit 4
- list: task/workspace/session columns
- RELEASE -> 0.0.6; README workspaces/capabilities/sessions sections;
  BUILD-LOG Phases 9-11; autonomous-run tracker results filled

Closes #24
2026-09-02 22:14:18 -05:00

5.2 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
Releases 0.0.5+0.0.6 packaged; 0.0.6 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

  1. 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_WORKSPACE env; adapter cds into it. No new mounts (dataRoot is already mounted).
  2. 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 via MOSAIC_TOOLS env; pi adapter maps to --tools.
  3. 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.
  4. 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).
  5. Selection authority unchanged: config file for adapter/provider/model; task file for workspace/capabilities/session; env vars are internal plumbing only.
  6. 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; list gains workspace/session columns
  • Final: full sweep (config/task/release), verify, package + activate 0.0.6, config checksum unchanged

Review checklist for the owner

  1. cat docs/plans/2026-09-03_autonomous-run.md (this file)
  2. scripts/release.sh status → 0.0.6 active
  3. scripts/test-config.sh && scripts/test-task.sh && scripts/test-release.sh && scripts/verify.sh
  4. Try a workspace task:
    scripts/run-task.sh run tasks/workspace-demo.json
    ls ~/.mosaic-dev/workspaces/demo/
    
  5. 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
    
  6. Inspect any run: node scripts/mosaic-task.mjs show <runId>
  7. Gitea: milestones M5/M6/M7 closed; issues referenced by merge commits

Results

  • M5 merged on main (merge commit ddb1554), tagged workspace-capabilities-v1
  • M6 merged on main (merge commit 4e2a413), tagged sessions-v1
  • M7 merged on main, tagged operator-ergonomics-v1
  • Release 0.0.6 packaged, health-gated activated, full sweep green
  • Suites at end of run: config 24/24, task 32/32, release 14/14, verify PASS
  • Build log: Phases 9 (M5), 10 (M6), 11 (M7) appended with corrections
  • Corrections encountered: dropped constant from a failed atomic edit batch (SUPPORTED_TOOLS); dash export output format vs env; three selftest authoring defects; showRun id-regex case sensitivity + missing-run crash. All fixed and covered by tests.
  • Commits pushed incrementally; nothing left uncommitted
  • Live proof: workspace file host-visible; session teach/recall ('mosaico') verified

Next steps after this run (not started)

  1. Owner review + hands-on testing of workspaces, capabilities, sessions
  2. Decision: capability defaults per mission (mission-level policy) — natural M8
  3. Second real adapter remains available whenever wanted
  4. Consider run-record pruning/retention policy once run volume grows
  5. Consider a mosaic-task.mjs retry <runId> convenience for failed runs