Skip to content

RFC-0018: its decisions in full

Rows of the decision inventory, from the RFC.

RFC-0018-1: The monorepo is restructured into apps/, libs/ and robots/, each unit with its own pyproject.toml and uv.lock, path-sourced, with no split into repositories yet

  • Decided: eight units built in 2026-11-19 (libs/runfile, libs/gate, libs/worldmodel, apps/observatory, apps/mission-control, apps/nxt-web, robots/duck; later libs/simhost, libs/runner, libs/missions). No uv workspace and no PyPI. A piece is split into its own repository only when its trigger fires.
  • Why: "as we are evolving this so fast, very soon I'm gonna be thinking how to separate this out ... What are the seams?" (§1); "a split done without knowing the seams cuts in the wrong place" (§1); operator: "5C since this is more/less big shape we are after"; "Yes to all 10 and go for phase 2" (status).
  • How: the folders above; scripts/check_boundaries.py; the plan docs/wip/PHASE2-RESTRUCTURE-PLAN.md (§10).
  • Alternatives rejected: stay one repository for ever; split now by folder; two projects only; one package per module; a monorepo tool (uv workspace, Bazel) (§7).
  • RFC status and section: Built; §5.1, §7, §10.
  • Who decided and when: the operator, 2026-11-18 and 2026-11-19.
  • Existing ADR: none.
  • Later changed by: RFC-0022 (2026-11-21; adds libs/runner, moves platform code out of duck_lab); RFC-0030 (adds libs/missions, per RFC-0018 §10 "Since then 2026-11-26"); RFC-0024 (Mission Control built as apps/mission-control; RFC-0018 §6 itself amended 2026-11-26); RFC-0018 §6.1 itself (2026-11-26 split triggers).
  • In code: Yes: ls shows apps/{mission-control,nxt-web,observatory}, libs/{gate,missions,runfile,runner,simhost,web,worldmodel}, robots/duck.

RFC-0018-2: Package import rules between units are enforced by a boundary check that fails CI

  • Decided: libraries import no other package of the lab (except libs/runner, libs/simhost as listed); apps never import apps; robots never import apps; a project's tests may use what the table lists as "tests". EXCEPTIONS is empty.
  • Why: "Four contracts hold it together. Nothing else may cross a project line." (§5.2). The first version's step 1: "a test that fails when a forbidden import appears" (§6).
  • How: scripts/check_boundaries.py (stdlib ast, run by make lint; self-test proves a forbidden import fails; EXCEPTIONS: dict = {}) (§10).
  • Alternatives rejected: none named.
  • RFC status and section: Built; §6 step 1, §10.
  • Who decided and when: built 2026-11-19 under the operator's "go for phase 2"; later table updates 2026-11-21 and 2026-11-26.
  • Existing ADR: none (RFC-0024 §3 item 6 and RFC-0022 reference it as a standing constraint).
  • Later changed by: RFC-0022 §8 (the navigator duck_lab.nav, payload, plugins, profile may not import labrunner or simhost; libs/runner may import simhost, runfile, worldmodel, robotgate); RFC-0030 (libs/missions imports nothing, only mission_control imports it).
  • In code: Yes: scripts/check_boundaries.py exists with EXCEPTIONS: dict = {} at line 81.

RFC-0018-3: The run format is its own library (runfile), cut from the viewer; robots depend on it, never on the Observatory

  • Decided: writer, reader, keys, schemas, validate, store, catalog, index and the adapters live in libs/runfile; the duck and the NXT stop installing the viewer.
  • Why: "the Observatory package holds two different things: the run format ... and the viewer ... The robots need the first and not the second" (§3); "A split that is moving folders, not rewriting code" (§4.1).
  • How: libs/runfile; grep miniview in duck/src and nxt/src finds no viewer import (step 2 of §6); test-run-compat unchanged.
  • Alternatives rejected: two projects only (lab and Mission Control), which "leaves the run format welded to the viewer" (§7).
  • RFC status and section: Built; §3, §5.1, §6 steps 1-2, §10.
  • Who decided and when: the operator, 2026-11-18 "I also accept all previous recommendations" (§8) and 2026-11-19 "go for phase 2".
  • Existing ADR: partly: ADR-0007 defines the run file; no ADR records that it is a standalone library robots import.
  • Later changed by: RFC-0018 §6.1 (2026-11-26): libs/runfile becomes a published package only when a second repository imports it; RFC-0021 §5 step 2 adds truthcopy.py to it.
  • In code: Yes: libs/runfile/src/runfile/ has mcapio.py, keys.py, schemas.py, truthcopy.py.

RFC-0018-4: A contract changes only by adding; each carries a number; a reader accepts its own and earlier numbers and refuses a newer one

  • Decided: four contracts (run format, gate protocol, Observatory API, world-model records), each with a number; adding keeps the number; breaking raises it; a project names the versions it speaks in its README.
  • Why: "A reader accepts its own number and the ones before it, and refuses a newer one with a clear message" (§5.3).
  • How: gate protocol: 1 (RFC-0017 §3.1); run format number in the file; libs/runner/CONTRACT.md (version 1.0 later).
  • Alternatives rejected: none named.
  • RFC status and section: Built (the gate part); §5.2, §5.3.
  • Who decided and when: the operator accepted the recommendations 2026-11-18; the gate number was added at phase 5, 2026-11-23.
  • Existing ADR: partly: ADR-0007 (run format 2), ADR-0010 (API version 2) each carry a number; the general rule is in no ADR.
  • Later changed by: RFC-0025 line 285 and 1858 restate it ("the platform's habit").
  • In code: Yes: PROTOCOL in libs/gate/src/robotgate/__init__.py; libs/runner/CONTRACT.md exists.

RFC-0018-5: The Observatory's robot adapters go to each robot, loaded by name; they stayed in runfile until RFC-0020's plugin loader

  • Decided: answer 7 (§8): the format knows no robot and the Observatory loads adapters by name. In the built restructure (§10), the adapters stayed in libs/runfile, deferred to RFC-0020's plugin loader.
  • Why: "so the format knows no robot and the Observatory loads adapters by name. The cost is a plug-in point in the Observatory; your call." (§8).
  • How: libs/runfile/src/runfile/adapters/duck.py still there.
  • Alternatives rejected: adapters inside the run format (§3 open question 7).
  • RFC status and section: Built with a deviation; §8 question 7, §10 "Adapters".
  • Who decided and when: the operator accepted the recommendation 2026-11-18.
  • Existing ADR: none.
  • Later changed by: not found in my RFCs.
  • In code: Partial: libs/runfile/src/runfile/adapters/ exists (the deferred half), no by-name loader checked.

RFC-0018-6: The Observatory rename keeps old runs and fixtures byte-for-byte readable: the MCAP topics, schema names, the signals proto and storage keys keep miniview until format 3

  • Decided: package, command and make targets became observatory; the on-disk wire names (/miniview/* topics, schema names and profile, the index folder state/miniview, window.miniview, --miniview-data) stay "Revisit with format 3". The old miniview command ran one more release.
  • Why: "Kept so old runs and fixtures read byte for byte" (§10).
  • How: §10 "The rename"; ADR-0003 and ADR-0005 carry a banner for the rename.
  • Alternatives rejected: renaming the wire names too (implicit).
  • RFC status and section: Built; §8 question 1, §10.
  • Who decided and when: the operator's rename direction in RFC-0014; implementation 2026-11-19.
  • Existing ADR: partly: ADR-0003 and ADR-0005 carry a banner "Now the Observatory (RFC-0018, built 2026-11-19)"; ADR-0019 still names the wire topics miniview.objects.
  • Later changed by: not found in my RFCs.
  • In code: Unknown: not checked for the topic names. ---