{"type":"meta","schema":"session-state/v1","slug":"autonomy-p2b-resolver-watchdog","topic":"P2 second half — resolver A2 (library+CLI), watchdog A4/I5/I6, V1 guardrails (protected paths, review-proof land), X3/X7/X8, W6/W8","created":"2026-07-08","exec_mode":"ship","scheduler":"sequential","land_mode":"merge-to-main","base_branch":"main","gate0_mode":"strict","depends_on":["autonomy-p2a-state-core"],"status_enum":["BLOCKED","PENDING","WORKING","WRITTEN","REVIEWED","COMMITTED"],"truth_rule":"this file is ground truth for INTENT (goals/task list); git is ground truth for DONE-NESS — reconcile statuses against git, never trust a COMMITTED line with no commit","report_rule":"at session end emit brief: done / blocked / deferred / canceled"}
{"type":"goal","text":"babysitter codified: table-driven resolver with bounded LLM rung + CLI seam, watchdog with identity-safe pgid kills, unattended-landing guardrails; babysit skill delegates to runplan resolve after this lands"}
{"type":"anchor","path":"spec/RESOLVER.md","what":"canonical spec — policy table, actions, breakers, LLM rung, failure input contract"}
{"type":"anchor","path":"spec/IMPLEMENTER-NOTES.md","what":"READ FIRST — esp. § Transition seam (resolver as library before daemon)"}
{"type":"anchor","path":"docs/plans/2026-07-08-autonomy-p2b-resolver-watchdog.md","what":"plan — pinned per-task contracts (### Task N)"}
{"type":"task","id":"w1.t1","wave":1,"phase":2,"seat":"coder","tier":"high","desc":"src/resolver.js deterministic tier per spec/RESOLVER.md: full policy table, closed action set, breakers, both failure inputs (stderr JSON + classifyFailure fallback), resolve.decision/outcome kinds (plan Task 1)","status":"PENDING","deps":[],"requires_decision":null,"files":["src/resolver.js","src/resolver.test.js"],"blocker":null}
{"type":"task","id":"w2.t1","wave":2,"phase":2,"seat":"coder","tier":"high","desc":"resolver LLM rung: exact prompt+schema per spec, fail-closed to escalate on ANY LLM failure, disabled-LLM byte-identical regression (plan Task 2)","status":"PENDING","deps":["w1.t1"],"requires_decision":null,"files":["src/resolver.js"],"blocker":"waiting on w1.t1"}
{"type":"task","id":"w2.t2","wave":2,"phase":2,"seat":"coder","tier":"medium","desc":"runplan resolve <slug> [--dry-run] CLI verb — wiring only, logic in library; transition seam per IMPLEMENTER-NOTES (plan Task 3)","status":"PENDING","deps":["w1.t1"],"requires_decision":null,"files":["bin/runplan","src/runner.js"],"blocker":"waiting on w1.t1"}
{"type":"task","id":"w3.t1","wave":3,"phase":2,"seat":"coder","tier":"high","desc":"watchdog src/engine/watchdog.js: per-state budgets, idle timeout, pid+start-time identity BEFORE signal, pgid SIGTERM→grace→SIGKILL, setsid spawn, output-size cap (plan Task 4)","status":"PENDING","deps":["w2.t2"],"requires_decision":null,"files":["src/engine/watchdog.js","src/runner.js"],"blocker":"waiting on w2.t2"}
{"type":"task","id":"w3.t2","wave":3,"phase":2,"seat":"coder","tier":"medium","desc":"X3 canary-first pure ordering fn in src/engine/scheduler.js: risk DESC, cost ASC (static table), no config (plan Task 5)","status":"PENDING","deps":[],"requires_decision":null,"files":["src/engine/scheduler.js"],"blocker":null}
{"type":"task","id":"w4.t1","wave":4,"phase":2,"seat":"coder","tier":"high","desc":"gates: X8 artifacts/verifycmd post-implement gate (artifacts-missing, fixable) + V1 protected paths with compiled non-removable defaults (protected-path-touched, quarantine+escalate, whitelist only via preflight gated decision) (plan Task 6)","status":"PENDING","deps":["w3.t1"],"requires_decision":null,"files":["src/engine/gates.js"],"blocker":"waiting on w3.t1"}
{"type":"task","id":"w4.t2","wave":4,"phase":2,"seat":"coder","tier":"high","desc":"ship: land only after journal review.passed per task both stages (land-blocked-unreviewed); ship.sh land non-zero → land-failed → resolver, no retry loop (plan Task 7)","status":"PENDING","deps":["w3.t1"],"requires_decision":null,"files":["src/engine/ship.js"],"blocker":"waiting on w3.t1"}
{"type":"task","id":"w5.t1","wave":5,"phase":2,"seat":"coder","tier":"medium","desc":"W6 snapshot bundle on quarantine (runstate/snapshots/) + W8 flaky evidence field + resolver flaky rule per spec row (plan Task 8)","status":"PENDING","deps":["w2.t1","w4.t1"],"requires_decision":null,"files":["src/engine/repair.js","src/fail-taxonomy.js","src/resolver.js"],"blocker":"waiting on w4.t1"}
{"type":"task","id":"w5.t2","wave":5,"phase":2,"seat":"coder","tier":"medium","desc":"X7 review diversity: reviewer adapter+model differs from attempt implementer (fixer counts); single-adapter → WARN review-diversity-unavailable, proceed, journal degradation (plan Task 9)","status":"PENDING","deps":[],"requires_decision":null,"files":["lib/risk-router.sh","src/engine/lease.js"],"blocker":null}
{"type":"task","id":"w6.t1","wave":6,"phase":2,"seat":"coder","tier":"low","desc":"ungate remaining P2 chaos assertions (hostile-agent suite, hung-agent, gate-red resolution, review-proof) per spec phase map; full suite green (plan Task 10)","status":"PENDING","deps":["w3.t1","w4.t1","w4.t2","w5.t1","w5.t2"],"requires_decision":null,"files":["test/chaos/scenarios/"],"blocker":"waiting on wave 5"}
