Review of RFC-0030 (Missions), 2026-11-26¶
The operator asked for a review of RFC-0030 by the advisor (Fable 5.1). It was read-only, at main fb884b2. Each finding is marked VERIFIED (the reviewer read the code path) or SUSPECTED. The reviewer ran no test, checker, simulator or Mission Control; C1 is read from code paths, not reproduced with a running gate.
Our note, from checking the reviewer's "not read" list: RFC-0005
(Proposed, revision 3) is also "Missions": flotilla decides, the simulated duck rehearses every
mission before the real duck, eval-harness measures. RFC-0030 does not cite it. Its auto mode and
RFC-0005's loop overlap (who decides, the sim rehearsal), so RFC-0030 must say how the two relate
before the name missions is fixed.
Verdict: accept with changes¶
- The cut (planning module, executor, config) is right and matches the code; the decided modes, loop and sequencing are sound in shape.
- One critical gap: STOP ends the loop only by assertion. Between steps there is no active run to cancel and the gate grants a new lease at once after a STOP, so the next step can start after a STOP unless Mission Control latches the mission itself.
- The approval binds to a checksum that omits what decides safety: target (sim or real), the bound
robot,
sim_first. - Approval is a flag (
confirm_required) and a stage in a diagram, not a server-side state machine Mission Control enforces; an MCP client could start plan steps around it. - The decision record is placed in the wrong store: Mission Control may not write run files, and the
Decided tab reads a run's
events. Use the existing event with adecision, written by the navigator from thegoal_startspec; no new record kind.
Findings¶
| # | Severity | Finding | Fix |
|---|---|---|---|
| C1 | CRITICAL, VERIFIED | A STOP between steps does not stop the loop. core.stop (core.py:165-169) acts through _after_stop only when rt.active is set (core.py:195-201); between steps it is None. The gate's _stop_from ends the lease and _acquire grants a new one at once (robotgate 225-238; _stopped_at gates only motion_without_lease, 1 s). The runner's next _start_run succeeds |
A mission latch in Mission Control, set inside core.stop / stop_all before they return, for every mission whose robots include the stopped one (every mission for STOP ALL), checked under a lock by the step-start path. The latch is Mission Control's, not the runner thread's, so it holds when the thread is wedged in a model call |
| H1 | HIGH, VERIFIED | STOP and cancel are indistinguishable at the run level (cancelled / interrupted, navcontract.ENDS); 6.4 lists "a goal fails" as a replan trigger, so mode 3 would replan after a STOP |
The runner consumes the stop / stop-all bus events (or C1's latch); cancelled and interrupted end the mission stopped, never replan, whatever on_failure says |
| H2 | HIGH, VERIFIED | The checksum is "computed the way goals.version computes it" (goals.py:159), which excludes name, folder and sim_first: a plan approved then edited to sim_first: false keeps its checksum. 4.2 has no target, bound robot, approval mode or budgets |
The checksum covers the whole canonical document: sim_first, target, the robot binding (resolve needs.robot: null before approval, or re-approve on binding), approval mode, budgets. The approval record stores checksum, target, robots, mode, who, when. The full digest, not 16 hex characters |
| H3 | HIGH, VERIFIED | Approval is not enforced server-side: confirm_required: true is data in plan's answer (planner.py:174) and nothing in core checks it; POST /plans/{id}/runs is reachable by any token holder, the MCP client included |
Mission Control holds the mission state machine (planned, reviewed(checksum), approved(checksum, mode), step k running, ...) and refuses a step whose plan checksum is not the approved one; only a token identity the operator names sets the approval mode (api.py:76 client()), never the MCP client; the MCP server's target / sim_robot / no_opt_out guards (mcp_server.py:98-127) apply to every goal of a plan |
| M1 | MEDIUM, VERIFIED | "Dead planner" covers the process, not the thread: a thread can die while the process lives, and the mission stays running |
The runner's loop catches like _loop (core.py:100-109) and ends the mission failed; a heartbeat stamp on the mission row; no active step and a stale heartbeat is shown as such |
| M2 | MEDIUM, VERIFIED | Context is a snapshot (planner.py:34; core.py:703-712) with no site version and no pose; reachability is reviewed on a map that may change before the step starts |
Provenance carries the site's updated_at and object count; a site change since review is a replan trigger, stated in 6.4 |
| M3 | MEDIUM, VERIFIED | The prompt-injection surface is misnamed ("a sighting"): object kind is a closed vocabulary; label is operator-typed (sites.py:295) or imported (sites.py:339-372) |
Name the free text the model reads: refusal reasons, anomaly summary strings, operator notes, imported labels. Model output stays constrained to the schema (goals.validate drops unknown fields); the reviewer's rules run on the validated plan |
| M4 | MEDIUM, VERIFIED | The churn list is wrong: api.py imports none of goals, planner, guardrails |
The real importers: core.py:14, cli.py:16, telemetry.py:19 (stays), robots.py:41 and sites.py:9 (guardrails.normalise, moves), tests test_goals.py:9, test_planner.py:17, common.py |
| M5 | MEDIUM, VERIFIED | merge cannot stay behind without _LIMITS (guardrails.py:83-86); 4.2's fourth level "plan" changes LEVELS (guardrails.py:16), a guardrail-rule change 12 puts out of scope |
Fold plan-level guardrails into each step's must_not at plan validation; merge unchanged. Either merge moves too or LIMITS becomes public in missions |
| M6 | MEDIUM, VERIFIED | goals, guardrails and planner raise HTTP-shaped ApiErrors |
Decide in the RFC: the library raises its own PlanError(code, message); Mission Control wraps at the call site (api.py:634 catches ApiError only) |
| M7 | MEDIUM | Section 7 row 1 ("manual mode's is a plan of one goal") contradicts 4.4 and 6.1 | Keep POST /goal-runs untouched; the plan of one is optional |
| M8 | MEDIUM, VERIFIED | 6.3's new record kind: Mission Control may not write run files (check_boundaries.py:74), decisions happen between runs, and the Decided tab reads M.run.events by kind (shell.js:459-471) |
The goal_start spec's goal_run (core.py:503; written into the run by nav/server.py:153-182) gains mission, plan, step and why {rule, reason, values}; the navigator writes one event with that decision at goal start (validate.py:111). Reviews, approvals and mission decisions stay in Mission Control's store, served through the /control/ proxy. One additive navigator-contract field, no ADR-0007 change |
| L1 | LOW, VERIFIED | Approval mode 3 "only on the simulator" is a recommendation (9.5) | A rule in code: mode 3 requires target == "sim" and a robot with variant == "sim", like mcp_server.sim_robot |
The plan contract (section 4.2)¶
- Missing:
target, amissionid, the approval mode, mission budgets, a site snapshot stamp (H2, M2). afterwithon_failure: continue: say that dependents of a failed step are skipped.- An outcome table: SUCCESS goes to the next step;
refused,failed,not_found,timeout,stalled,stopped_by_guardrailgo toon_failure;cancelledandinterruptedend the missionstopped(H1). - Partial results:
merge_run_objectsruns during the step (core.py:634), so sightings from a failed step are already in the site; say so. sim_firston a whole plan: with the per-goal rule as built (core.py:532-553: samegoals.version, same site, a twin, 24 h), running the plan on the sim twin first rehearses each step, and every replanned step on a real robot is refused until rehearsed. State that as the rule for auto on a real robot.- Multi-robot:
needs.robot: nullwith sequential binding lets one mission touch several robots; C1's latch covers all of them. - Step reporting (4.3):
plan-runneedsreviewing,awaiting_approval,replanningstates.clientis the token identity (api.py:76-82), notmission:<id>; add amission_idcolumn.
The cut, enforceability, sequencing, cost¶
- The checker's rule works once both
MODULESandALLOWEDgainmissions(check_boundaries.py:26-57);libs/missions/srcmatchesprojects().test_planner.py:142-144pins planner.py's imports by name and moves with it;test_goals.py:130-137stays in Mission Control with the run states. - Row 1 is small: about 480 source lines and 336 test lines move, five import sites. It does not
collide with RFC-0025 steps 1-3. "Touch
core.py's run start once" is a weak reason (the Protocol and frame-owner refactors touchrobots.pyandduck.py, not_start_run); say "cheap now". make test-libsneedsmissionsinlibs-sync(Makefile:84, a fixed list) and inLIBS_TESTS.- The spike's cost measure is not measurable today:
LlmPlanner.plandiscardsusage(planner.py:120-121). Add token and cost capture before the first LLM run. Row 3's safety review adds C1 to H3. - Line drift: section 2's "api.py: goals and runs 253-311" is at api.py:288-325 at fb884b2.
The open questions (the reviewer's answers)¶
- A,
missions: agree. - A: agree; the site snapshot stamp goes in provenance (M2).
- A: agree; an LLM auto mission also needs a per-mission cost ceiling in
planner.json, and refuses to start without one. - B, plus a date or session cap on the spike itself; if the rules planner alone meets the coverage target, the LLM is measured as a delta.
- A by default; C only on the simulator, enforced in code (L1); B requires the scenario set's record to be a stored artefact.
- A, with M1's thread rules and C1's latch in Mission Control, not in the thread.
Not covered¶
Not run: any test, the boundary checker, the simulator, Mission Control. Not read: sites.py beyond
imports, labels and definitions; api.py beyond auth, routes 285-330 and the error handler;
mcp_server.py beyond 90-135; cli.py and telemetry.py beyond grep; robots.py beyond 440-478
and grep; the navigator's lease acquisition in goal_start (whether it acquires per goal is assumed
from RFC-0017 and the gate code); the duck and NXT adapters; RFC-0025 sections 3 and 7-10; RFC-0014
beyond 3.4.5; RFC-0005 (an older "Missions", a possible name clash); the Observatory proxy's auth;
scripts/test_check_boundaries.py; whether mission tables need a SQLite schema migration
(store.py:11). Section 2's per-class line counts were not recounted.