Skip to content

merge: reconcile the notification-surface line with main (command hierarchy, panel fill contract) - #234

Open
dbowm91 wants to merge 65 commits into
mainfrom
feat/auto-20261128-eff72923-reconcile-main
Open

dbowm91 wants to merge 65 commits into
mainfrom
feat/auto-20261128-eff72923-reconcile-main

Conversation

@dbowm91

@dbowm91 dbowm91 commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

What this is

This branch (feat/auto-20261126-cae46b00, PR #232) was 51 commits ahead and 81 behind
main. main had meanwhile landed PR #233, Command hierarchy and completion, which
rewrote the whole command surface: the single flat slash-command list became a two-level
catalog, 169 built-in rows collapsed to 88, BuiltinSlashAction went from 161 to 82
variants, and every retired flat spelling (/lsp-status, /plugin-info, /terminal-create,
/chat-edit, /shell-include, /fork, /variants, …) was deleted with its caller-less
helpers.

This PR is the reconciliation. It merges origin/main (4f46a948a) into the line rather
than rebasing, because the commits are already published in #232's branch. #232 stays open
and untouched; this is a new head branch with the same work plus the merge.

How conflicts were resolved

The rule applied throughout: main owns command identity and shape (ids, forms,
routing, the catalog's version counter); this line owns its notification policy, the two
commands it added, and its planning records
. A deletion was accepted only after tracing a
replacement — a catalog row, a router arm, or a closure record.

27 files conflicted. The substantive ones:

Area Resolution
crates/codegg-core/src/command_catalog.rs /advisor and /toast re-expressed inside main's two-level catalog; version 13 → 14
crates/codegg-tui/src/command.rs main's registry + our two rows: 90 built-in rows, 84 variants
crates/codegg-core/src/frontend_action.rs union: main's 17 new variants plus ShowNotifications → 62 frontend-effect forms
src/core/daemon_commands.rs union of main's Research/ChatSend/StartTurn with our AdvisorStatus, in both the preflight set and the execution match
crates/codegg-tui/src/commands/lsp.rs main's router wholesale (47 toast sites → show_lsp_result/show_lsp_unavailable)
crates/codegg-tui/src/app/mod.rs 15 hunks: main's daemon-owned handle_memory_command stub, main's deletions of tests for retired /lsp-* rows, our dialog forms with main's two-level spellings
chat.rs, shell.rs, interactive_terminal.rs, sessions.rs, session_selection.rs our dialog forms + main's spellings; the retired dispatchers (dispatch_chat_edit, dispatch_chat_reply, dispatch_chat_redact, dispatch_chat_composing, dispatch_chat_action_{task,review}, dispatch_shell_{include,ask}, dispatch_terminal_{create,resize}, dispatch_fork, dispatch_variants) deleted with evidence
scripts/verify.sh, docs/tui.md both sides' wiring and text kept

Decisions worth reviewing

  1. Main's panel-fill contract is restored, against this line's own reds commit. 1fd9307cd
    ("fix(reds)") made two product changes to satisfy tui_panel_docking expectations:
    materialize_hosted_panel returned false for StillLoading/OpenedAs (so the column
    was not selected), and ready_terminal_panel focused the PTY on load. Both contradict
    main's M002 contract, which 9f8274622 — "a panel fill keeps the column and docks its
    box"
    — defines in code, and which main's test-only 4577b041f then restored in the
    tests after calling the old expectations stale. The merge keeps main's behaviour:
    every fill keeps the column and docks its box through dock_on_open, and selecting the
    terminal panel leaves the PTY in NOR with i as the one way in. The in-file unit test
    every_panel_the_walk_selects_keeps_the_column returns to asserting selection for every
    panel in SidePanelId::ALL. Two doc comments that still described the pre-9f8274622
    behaviour — the "except the two outcomes" paragraph on materialize_hosted_panel and
    "a terminal that has loaded is for typing" on ready_terminal_panel — are corrected;
    no other product behaviour changes.

  2. Usage warnings became Usage dialogs. Nine show_usage-class warnings in the generic
    router still emitted toasts after the merge. This line's reviewed notification policy
    puts usage and informational text in an info dialog and keeps error toasts. They were
    converted rather than recorded, so the manifest did not grow.

  3. /advisor moved into the daemon's effect table. It was an early return above the
    match (command_id, form) in build_inner_request. The table's closure test and
    scripts/check_command_catalog_ownership.py both read the match arms, so a key that
    exists only as a special case is, in the guard's words, "not a key the daemon serves".
    It is now an arm that returns its own effect, and NON_READY_SERVED keeps excusing it
    from the ready-shape rows.

  4. project_identity is restored to ToolRegistryOptions. main deleted it as dead
    config when the memory scope became memory_read_scope; this line's planning-corpus
    binding resolves an identity before tool registration, so a post-construction setter
    cannot serve it, and the hashed memory namespace cannot be used as the key.

  5. A child turn receives an LSP service or refuses. src/agent/worker.rs constructed
    LspService::new_arc for a security-review turn that is not under filesystem
    containment. scripts/check_lsp_service_identity.py pins production construction to the
    daemon factories and the standalone Lsp owner, because a service built there starts
    language servers with no admission, no live-process budget and no contained profile.
    The turn now takes the containment-scoped service when one exists and None otherwise;
    the LSP tools report themselves unavailable instead of running unadmitted.

  6. The toast manifest was re-derived, not merged. docs/toast-disposition.toml was
    regenerated as a diff against the merged tree: four entries whose call sites no longer
    exist were deleted, and three of main's surviving sites were recorded. It now stands at
    518 observed sites across 635 entries.

Verification

  • cargo nextest run --workspace --locked --profile ci --no-fail-fast with a private
    XDG_CACHE_HOME and the trusted sandbox helper built — 18147 passed, 0 failed,
    12 skipped
    (408 s). A second identical sweep reproduced that exactly (416 s, no leaky
    test); the first run had flagged one test as leaky, which nextest counts as a pass — a
    child process still winding down as the test exited — and it did not recur.
  • cargo nextest run -p codegg-tui --test tui_render -E 'test(tui_panel_docking)' —
    55/55, including the three panel tests this merge had broken.
  • cargo clippy --workspace --all-targets --locked -- -D warnings — clean.
  • scripts/verify.sh quick — passes (rustfmt, generated assets, the full guard set
    including check_command_catalog_ownership.py, check_lsp_service_identity.py,
    check_toast_disposition.py, and the workspace check).
  • python3 scripts/check_comment_budget.py --bank — re-banked after the tree settled
    (1571 files, ratio 0.1322).

The first full sweep caught five merge defects, all fixed here rather than worked around:
command_tree's top-level count (88 → 90), workstream_claim ordering events by a random
UUID instead of rowid (same-millisecond ties reordered a claim's causal sequence), 30
retired flat /lsp-* spellings in app/mod.rs tests plus one .inc, and the panel
contract in decision 1.

harness added 30 commits November 28, 2026 22:21
…nning records

Registers three planning lines that share plans/registry.md:

- Planning corpus and delegated assignment: proposed ADR-0069, its roadmap
  (P001, P002, deferred P003) and the P001/P002 implementation plans, both
  blocked on ADR-0069 acceptance.
- Todo state scale and truthfulness: the roadmap and the M001 statement for a
  truthful, durable and scalable checklist.
- Remote workspace and SSH execution: ADR-0067, ADR-0068, the roadmap,
  R001/R002/R003a plans and three research records.

Research records added: plan-linked instructions, planning-backend
reconciliation (workstream claims as the delegation channel, subagents keep no
planning tools, Git not required), Eggplan gaps G1-G7, and the three
remote-workspace records.

Documentation only: no source, crate, guard or test file is changed, and no
build, test, clippy or verify.sh run is claimed.
Accept the two remote-workspace decisions and the planning-corpus decision,
flip the five dependent implementation plans from blocked to ready, and move
them out of the registry's Blocked work section into Dependency-ready.

- ADR-0067 remote workspace target identity and node execution boundary
- ADR-0068 ssh transport trust and host configuration surface
- ADR-0069 planning corpus authority and delegated assignment
- ready: R001, R002, R003a (remote), P001, P002 (planning corpus)
- todo-state M001: the open D1 decision is settled at the plan's proposal
  (hard ceiling 512, ExplicitTodo default 100) by the owner's direction

check_adr_integrity.py passes.
…ary (R001)

Implement remote-workspace R001 against accepted ADR-0067, with no
behaviour change: a remote workspace is still refused by every entry
point.

- TargetRoot: opaque, bounded, validated text; no path accessor and no
  conversion into PathBuf. WorkspaceTarget: Local | Ssh { host, root }.
- ResolvedWorkspacePath keeps a resolved path bound to its target;
  into_local_path refuses the remote arm with a typed error.
- ExecutionContext carries the target and separate text-only remote
  roots; the path fields are local-only and a remote context never widens
  them.
- migrate_v96 rebuilds the workspace table (create/copy/drop/rename) to
  replace the inline UNIQUE with a unique index over
  (target_kind, host_ref, canonical_root). Foreign keys are disabled only
  on the checked-out migration connection and restored before it returns,
  so the table drop cannot cascade into child rows. STORAGE_LAYOUT_VERSION
  is 96 and the storage catalog is regenerated.
- get_or_register_remote is a typed refusal: concurrent-registration
  convergence is proven at the unique index in storage tests, because no
  successful remote registration exists in this milestone.
- Rewrite check_project_catalog_invariants.py into the successor
  invariant (a remote root is never coerced into a local path) with 13
  self-test cases, including injected TargetRoot accessors, an
  AsRef<Path> conversion, a Locator accessor and a materialization at a
  call site.
- Fix the synthetic v69 migration fixture, which marked a database v69
  but omitted the workspace table v22 already introduced; migration v96
  correctly operates on that table.

Verified by the implementer: cargo test -p codegg-core (1,045 library
tests and the integration families), check-core-boundary.sh, the catalog
guard and its self-test, the storage-catalog generator, scoped rustfmt.
The workspace check was blocked at the time by the parallel R002 work in
src/remote/; it is re-run in the R002 commit.
Implement remote-workspace R002 against accepted ADR-0068. Infrastructure
only: no remote CodeGG process, no durable host table, no user-visible
workspace, and no CoreRequest variant.

- src/remote: a transport-neutral HostDescriptor (host, port, user,
  identity reference, config source), a typed failure taxonomy mapped from
  bounded stderr samples, the launcher, the trust store and the fixed probe.
- Launcher: explicit argv, never a shell string. BatchMode, strict host-key
  checking, CodeGG-owned UserKnownHostsFile, GlobalKnownHostsFile=/dev/null,
  PermitLocalCommand=no, ForwardAgent/X11=no, ControlMaster/Path/Persist,
  ConnectTimeout, ServerAlive*, RequestTTY=no, ClearAllForwardings=yes,
  password and kbd-interactive refused. Option paths are quoted and
  fallible; a path OpenSSH config syntax cannot represent is a typed
  refusal. The child gets its own process group and an overall deadline,
  and remote scripts are sent on stdin to /bin/sh -s.
- Trust: the ONLY accept-new invocation is the trust verb's single write,
  and it follows the exact interactive confirmation. The verb requires a
  terminal, displays the ssh-keyscan SHA-256 fingerprint labelled
  unauthenticated, writes exactly one entry, is idempotent, and a changed
  key still refuses afterwards with no override.
- Probe: one fixed script reporting os, arch, libc, home, home-writable,
  exec-capability proven with a real ELF copy, disk, shell, codegg presence
  and version, Landlock, bubblewrap, and whether the target is a directory
  and its host-canonical form.
- `codegg remote probe|trust` are local CLI verbs; the probe issues no
  daemon request.
- Declarations: docs/execution-ownership.toml, the writer-disposition
  surface, and check_remote_trust_policy.py, whose self-test proves a
  non-trust accept-new injection is rejected while ordinary 'accept new
  work' prose is not mistaken for a policy token. The guard is wired into
  scripts/verify.sh quick.

Verified locally: cargo test -p codegg --lib remote:: (24 passed), cargo
test -p codegg --test remote_workspace (2 passed), cargo check --workspace,
and the execution-ownership, writer-disposition, daemon-cwd and trust
guards with their self-tests. A live loopback-sshd probe was NOT run: the
test suite uses a fake ssh executable and asserts the argv, taxonomy,
trust-store and probe-parser behaviour deterministically.
…list (M001)

Implement todo-state M001. ADR-0003 stays binding: the checklist is a
bounded, model-facing projection; no plan database and no second store.

- One owner: the tool registry owns the TodoState and the agent loop
  borrows it (`tool_registry.todo_state()`). The second construction site
  in the loop is gone. The regression test writes through the real
  registry and then builds the loop's reminder; it was measured failing
  against a loop-owned state ("the loop should have a reminder after
  todowrite") and passing after the change.
- Durable identity: migrate_v97 adds `id` and `blocker` with a
  deterministic `legacy-` backfill and a unique index on
  (session_id, id). Columns stay nullable because SQLite cannot add a
  NOT NULL column without a default; the writer enforces non-null and the
  migration comment states why. Import and export carry both fields.
- Incremental writes: Replace/Add/Update/Remove behind one candidate
  validator; replace_from_model is the Replace path. TodoStore::apply
  opens begin_immediate, reads, applies, validates and rewrites in one
  transaction. todowrite accepts action and id, and its echo is capped at
  8 items plus per-state counts.
- Read surface: todoread takes status/limit (default 20, max 100)/offset
  and returns a page with a total and a has-more flag. Its category is
  ReadOnly; the regenerated catalog now lists it beside todowrite.
- Bounds: MAX_TODO_ITEMS 512, item content 512 chars, list 256 KiB,
  projection 2048 chars, window 16 items, echo 8. The effective bound is
  min(policy.max_total_items, MAX_TODO_ITEMS); an operator value above
  the ceiling narrows rather than erroring. The WorkPlan projection keeps
  its own named 12-item ceiling, deliberately independent.
- Policy defaults: ExplicitTodo 100, SparsePlan 16, GuidedCurrentTask 4,
  Disabled 0. `update_frequency` is retired and a configuration that still
  carries it parses and is ignored. `subagent_todo_access` stays accepted
  and documented as reserved: retiring it is ADR-0069's later decision,
  not this milestone's.
- Truthfulness: todo_discipline_contract receives the single-in-progress
  rule instead of only the mode, and emits the "exactly one item in
  progress" sentence only when that rule is on; planning_surfaces_contract
  no longer asserts a count unconditionally. TodoUpdated's revision is
  documented as per-turn and not for cross-turn ordering. todowrite's
  description is a short router; the canonical map lives in
  plans/003-planning-process.md.

Deviation: the migration is v97, not the plan's v96, because R001 landed
v96 in the same tree; STORAGE_LAYOUT_VERSION and the storage catalog are
97.

Verified locally: cargo test -p codegg-core --lib task_state (26),
session::store (16), session::schema (11), work_plan::todo_projection (6);
cargo test -p codegg --lib tool::todo (3), agent::prompt (27), agent::loop
(6); cargo test -p codegg --test tool_catalog (10, regenerated); cargo
check --workspace; and the tool-catalog, project-catalog (incl. self-test),
storage-catalog, assertion-quality, duplication, first-party-skills,
writer-disposition, execution-ownership and daemon-cwd guards. scripts/
verify.sh quick is run at the tip of this commit.
The comment corpus grew 52 lines (140970 -> 141022) with the workspace
target boundary, the ssh transport foundation and the todo-state rewrite,
so the ratchet's recorded ceiling moves with it in the same change. The
global ratio falls (0.1339 -> 0.1334) because the code grew faster than
its comments; per-file ceilings rise only where a file gained explanatory
comments, and several per-file ratios fall.

Banked with `python3 scripts/check_comment_budget.py --bank`.
`cargo check --workspace` does not build test targets, so R001's `target`
field and M001's `TodoItemInput::{id, blocker}` only surfaced under
`--all-targets`. Six `WorkspaceRecord` literals across the agent-loop,
core-daemon and tool-program families now choose the Local target
explicitly, the workspace-isolation family converts the target-bound
resolver result to a local path before asserting on it, and four
`TodoItemInput` literals carry the two optional fields.

Also register the new `remote_workspace` family in
docs/test-ownership.toml (a target no group owns can never be selected by
the scoped mode) and re-measure the integration-test count in
architecture/overview.md (299 -> 300).

Verified: cargo check --workspace --all-targets.
Two defects only the unfiltered suite could see:

- migrate_v97 used a bare `ALTER TABLE todo ADD COLUMN`. This repository's
  migration tests replay the chain by rewinding `migration_version` and
  calling `migrate()` again, so a second pass failed with "duplicate column
  name: id". Both ALTERs now use `add_column_ignore_duplicate`, the helper
  every earlier add-column migration uses, and the unique index is created
  with IF NOT EXISTS.
- The `cached_models_composite_key` pre-v70 fixture created `workspace` but
  not `todo`, so v97 ran against a table a real v69 database already has.
  The fixture now carries the v69 todo shape.

Verified: cargo test -p codegg-core — 1,056 library tests and every
integration family green.
…d registry

R001 (remote workspace target + storage) is closed: the target model, the v96
rebuild, the successor catalog invariant with its 13-case self-test, and the
regenerated storage catalog. Three low findings are recorded rather than
hidden: empty local path fields on a remote record, contention proven only at
the unique index, and one unreachable v96 dispatch arm.

R002 (SSH transport foundation) is conditionally closed, not closed. Five of
its seven acceptance criteria have evidence -- the argv-only launcher, the
trust policy guard with its self-test, the fake-ssh transport tests, and both
ownership declarations. The two live-host criteria (a real `codegg remote
probe` against a loopback sshd, and a backgrounded long sleep whose process
group is killed with no survivor) have no evidence, so the closure says so
instead of claiming them.

M001 (todo state) is closed, including the v96->v97 deviation, where the
migration was taken at v97 rather than the reserved number because R001 had
already consumed v96. It also records the coverage lesson: two defects
(a non-replayable migration and a fixture missing its own table) were
invisible to every filtered test run and only surfaced when the unfiltered
codegg-core suite rewound and replayed the chain.

The two roadmap section 12 closure tables and the registry rows are updated
to match: P001 is next and unblocked, M002 is narrowed to compare-and-swap
plus a paging surface, and R003a is in flight.
The migration number is one serialized resource, and both plan files still
described it as "the next free number at handoff" against the pre-M001
state. The chain is fixed now: R001 took v96, todo-state M001 took v97, so
P001 takes v98 and P002 takes v99, each bumping STORAGE_LAYOUT_VERSION. P002
cannot start until P001 lands because both edit the same dispatch table and
version assertion, so the numbers are reserved in order rather than
negotiated later.
63c53c9 rewrote the two ALTER statements in migrate_v97 and never ran
rustfmt afterwards, so `cargo fmt --check` -- and therefore
scripts/verify.sh quick -- was red on the tip. Formatting only: no token in
the migration changes, and the idempotent helper call is the same call.

Found by a subagent that hit the failure while checking its own new file and
correctly reported it as pre-existing drift rather than formatting it away.
A handoff review landed packages A and B, then stopped and rewrote the plan,
the roadmap, the registry and a closure record to say the milestone was
blocked. It is not, and the two premises were checked against source:

- "no established daemon-owned history path": the commit tool already spawns
  `git` directly at src/tool/commit.rs:892 -- a declared native-git writer,
  not a new kind of surface. A corpus commit reuses it against a managed root
  and is declared with three tokens that already exist in
  docs/writer-disposition.toml's own vocabulary (daemon / non-checkout /
  managed-root). Stop condition 4 is "the manifest cannot express it"; adding
  an entry is the intended shape. What stays forbidden is widening the
  model-facing grants, which is invariant I5.
- "the registry says Git is not a hard requirement, so the medium is
  unchosen": that sentence describes the long-term specification, which asks
  for a history medium that retains prior content. ADR-0069, once accepted,
  settles it by choosing Git. Acceptance was the decision.
- "D/E need the R003a-protected src/tool/factory.rs": they do not. Tool
  construction is ToolRegistry::with_options in src/tool/mod.rs, which is
  where these tools are registered.

The premature blocked closure record is deleted; a real closure replaces it
when C-F land. Two edits from that review are kept because they are correct:
the roadmap's stale prerequisite lines (ADR-0069 accepted, M001 closed) and a
new plans/003-planning-process.md section fixing the corpus path and anchor
conventions, including explicit {#id} for headings likely to be renamed.
Two closed lines land with their design records: ADR-0067 (the bounded
second-model read), ADR-0068 (declared roster axes), ADR-0069
(classification-bound verification execution) and ADR-0070 (guidance-gated
consultation, superseding ADR-0067's clauses 1 and 6), both subsystem
roadmaps, eight implementation plans and eight closure records.

Advisor: M001 and M002 stay conditionally closed on their live-provider
receipts; M003 is closed, and its record states plainly that the evidence is
the scripted matrix plus the request-message integration assertion rather
than a second live call.

Roster: M001-M005 closed, with M003 and M005 carrying recorded deviations
rather than silently renegotiated acceptance.

Registry rows and roadmap statuses are reconciled to the delivered state,
including the M003 milestone row that still read "conditionally closed".
…M001-M003

Roster (M001-M005): the declared selectable / subagent / default axes replace
the legacy mode projection and are enforced on every dispatch path, including
the ACP turn (requested and default agent resolution), the delegated
specialized runtime and the nested-subagent dispatch; verification execution is
classification-bound (ADR-0069); user-authored agents are selectable per
session; and the prompt and contract reconciliation retires the two superseded
contract prompts and regenerates the built-in agent definitions.

Advisor (M001-M003): the advisor tool is a bounded second-model read of the
provider-visible conversation with no authority of its own. M003 (ADR-0070)
makes the call parameterless -- the whole conversation is the input and the
description carries the conditions under which to consult -- and removes the
per-turn consultation count from configuration, resolution, turn state,
refusal, operator status and the progress detector. It also corrects a
prerequisite defect the plan did not name: AdvisorTool declared a read-only
category while inheriting a non-idempotent effect, so consultation was never
observable as read progress; the contract now declares ReadOnly and leaves
retry, cache, idempotency and caller policy untouched. Changed advice counts
as progress, repeated advice does not, and the projection is sized from the
matched model's context window.

Guards: check_advisor_consultation.py, check_agent_roster_consistency.py and
check_agent_identity_literals.py, each with a self-test, wired into
verify.sh quick and CI. The integration-test count in architecture/overview.md
is re-measured to 300 for the new family member.

Verification: scripts/verify.sh quick green on this tree. Focused suites:
codegg-config 144; advisor:: 169 passed / 4 ignored; tool_batch 50;
daemon_commands 22; progress_recovery 31; request_preparation 23; TUI messages
96; agent_loop family 573 passed / 0 failed / 1 ignored; tui_render 1249
passed with its 8 pre-existing reds. The command-catalog fixtures are
re-measured (160 commands / 166 forms / 126 daemon-effect / 40 frontend), so
their three count assertions now pass; one pre-existing failure remains,
command_execute_refuses_a_frontend_effect, which names /projects -- a command
absent from the catalog at HEAD as well, so this tree neither caused nor
repairs it.
`codegg node --run` serves a private Unix socket; `--proxy` bridges stdio to
it and starts it detached when absent. New types-only crate
`codegg-node-protocol` carries the bounded JSONL framing and the typed
method/error DTOs, with no tool, sandbox or protocol dependency.

The plan's stop condition was the registry: it is not hit. The node builds the
real registry through the existing factory, which gains one optional run-store
root so the node uses `<node-dir>/scratch/` instead of the workspace. Tool
construction is not duplicated, and `invoke` does not exist in this milestone.

Isolation fails closed before the socket is bound: a platform backend probe
and the strict sibling sandbox-helper check both have to succeed, and the
refusal is typed with the probe reason per backend. This is preflight
evidence, not a claim that any process was confined, because nothing is
invoked. The socket directory is created 0700 with the socket at 0600, the
peer uid is a mandatory accept check, and the node socket has an explicit
deny-list row plus a regression test that it is an exact match.

One real bug surfaced in the process test, and it was not test bookkeeping:
`tokio::io::stdin()` performs a blocking read that is not cancellation-safe, so
selecting the shutdown response against it left the runtime alive and the proxy
never emitted EOF — the daemon closed, the proxy stayed. The proxy now reads
stdin on a detached OS thread and forwards through a bounded channel, so
dropping the forwarding future releases the process.

Evidence, from a real forked `--run` plus `--proxy` over pipes rather than a
mock: handshake, attach/detach, two concurrent proxies, proxy death leaving the
daemon serving, a SIGKILL leaving a stale socket that auto-start recovers, and
graceful shutdown reaching proxy EOF and exit. The run recorded Seatbelt as the
obtained backend, the validated helper path, the node scratch path, 0700/0600
modes and 65 registry tools. Same-UID acceptance is proven live; mismatched-UID
rejection is proven synthetically only, and the milestone claims no more.

The proxy stays byte-transparent: daemon EOF closes it, and `remote_lost` is the
typed error for a request that meets a dead daemon, which the stale-socket path
covers. It synthesises no response of its own.

Comment budget re-banked: the ceiling now covers this change and the in-flight
planning-corpus work in the same tree.
…ity, read grant

Package A: the pure section resolver. `crates/codegg-core/src/plan_corpus/`
addresses a corpus document by a validated relative `.md` path and a heading
anchor, and returns a line range plus an eight-hex-character digest of the
normalised section body. No I/O. Slug rules keep a leading section number and
collapse whitespace; an explicit `{#id}` overrides the slug and is stripped
from the title. A duplicate heading is a typed `AmbiguousAnchor`, never a
first match. The digest normalisation (CRLF to LF, per-line trailing whitespace
trimmed, trailing blank lines dropped) is documented as part of the contract,
because changing it would invalidate every stored digest. Bounds are 2 MiB per
document, 400 lines per section, and a 60-line inline threshold reported as a
flag rather than enforced silently. Eleven tests cover the plan's list,
including section precision: editing one section leaves another's digest
unchanged, which a whole-file digest cannot do.

Package B: corpus identity and the narrowest read grant. `migrate_v98` creates
`plan_corpus_binding` (project identity, root, repository identity, head commit,
last observed digest, timestamps — no document content) and adds the two
optional todo columns, both through the idempotent helper so the chain stays
replayable. The root is resolved from project identity, refuses a root that
overlaps the workspace, and is offered to `ReadTool` as an additional
read-only allowance only — nothing forwards it to a writer, a process launcher
or a sandbox allowance, and `scripts/check_plan_corpus_read_authority.py`
asserts that absence with a self-test that injects a grant and proves the
refusal.

Two defects in this package are known and are removed by the C-F commit rather
than shipped and forgotten. The binding upsert is currently invoked from the
read path, so `read` performs a durable write — binding creation belongs to the
corpus service, not to a read, and `read` should receive a resolved root and
nothing else. And neither the binding module nor that write has a
`docs/writer-disposition.toml` entry; the guard passes only because it looks for
known writer roots rather than for a read tool that started writing.

Packages C-F (lifecycle commit, `plan_ref` proven at write, `todoread` detail,
the SlowChanging spine) are not in this commit; the milestone stays active.
The condition both records named -- "a live receipt showing a real
consultation and its row", "a real status read against a provider" and "a
real advice disclosure" -- is obtained on the delivered build (dbc8e25).
plans/closure/advisor-consultation/receipts/ holds the record and four
captures: /advisor resolved live with the model, the 300000 ms deadline and
the forwarding disclosure and no per-turn count; three consultations served
at 3.7 / 4.3 / 5.1 s with their rows; and the served text hidden while
collapsed and visible after /expand-all.

The run used the operator's own database, which was already at
migration_version 95 -- equal to STORAGE_LAYOUT_VERSION -- so swapping the
daemon onto this build ran no migration, and the daemon was restored to the
installed binary afterwards.

Two limits are recorded rather than glossed. The advisor's own usage is
unobservable on this provider: a direct one-shot of the same model reports
zero tokens, so account_advisor_usage adds zero although the path runs. And
the served advice was not substantive -- two self-referential refusals,
because the forwarded conversation's last message was the instruction to
consult, then a provider tool-call echo in DSML markup served verbatim. That
echo is the artifact class M003 section 8 records as a separate untouched
finding (classifying a provider tool-call echo as a malformed response is
not implemented), and the receipt reproduces it on demand. It is recorded in
roadmap section 10 as the line's next candidate and is not claimed fixed.

Dispositions move to closed for M001 and M002 in both closure records, the
roadmap header, verification strategy, completion definition and milestone
table, and the registry's status cell, milestone rows and narrative.

Docs only; no production code changed. Verification:
check_work_plan_repository_binding, check_advisor_consultation and
check_postmortems pass on the edited tree.
R003a is closed as an infrastructure milestone that claims no execution: `invoke`
is R005. The plan's one design gate was not hit -- the real registry is built
through the existing factory with one optional run-store root, so tool
construction is not duplicated.

The closure records what is actually proven and what is not. The live evidence is
a real forked `--run` plus `--proxy` over pipes: handshake, attach/detach, two
concurrent proxies, proxy death with the daemon still serving, a SIGKILL leaving
a stale socket that auto-start recovered, and graceful shutdown reaching proxy
stdout EOF and exit. It also names the two gaps: mismatched-UID rejection is
synthetic only, and there is no hosted or Windows-lane evidence.

It also records the defect the milestone found, because the fix is the interesting
part: tokio::io::stdin() is a blocking read that is not cancellation-safe, so a
select! arm holding it kept the runtime alive after the forwarding future was
dropped -- the daemon closed and the proxy stayed, with no EOF.

R003 now has all three inputs with closure records (R001 closed, R002
conditionally closed on its own live-host criteria, R003a closed) and is eligible.
…etail, spine

Package C runs the corpus lifecycle entirely inside the approved Git route.
`rev-parse --show-toplevel`, `status --porcelain --untracked-files=all`,
`commit --quiet -m`, and `rev-parse HEAD` are trusted non-executable operations;
the repository is selected by cwd rather than `-C`, because the classifier
denies any `-c`, `-C`, `--git-dir` or `--work-tree` as explicit authority. A
test pins the exact argv vectors and asserts no config or repository override
is ever constructed.

Staging is the one operation the policy gates: `add` classifies as
RequiresContainedExecution [CleanSmudgeFilter], and there is no contained
backend for a managed non-checkout root, so it resolves to BackendUnavailable.
That is surfaced as a typed StagingUnavailable and reported as plan 8's
documented degradation -- the corpus reads `dirty`, the turn completes, nothing
is bypassed and no process is started for the staging attempt.

CodeGG does not initialise the corpus repository. `git init` is incompatible
with the approved route's unconditional `--work-tree` pin, and that pin exists
so repository-local `core.worktree` cannot redirect a trusted Git operation into
an arbitrary host path. Relaxing it for one call site is a product-wide
loosening to buy a local convenience, so the pin stays and an absent or
non-repository root becomes a typed `Unavailable` that names the real
limitation: the corpus repository must be created out of band. A change that
had exempted `git init` from the pin was reverted before this commit, and
`crates/egggit` is unmodified.

Package D puts the address on the item and proves it at write time: the
candidate list is resolved against the corpus before any mutation, so a broken,
ambiguous, traversal or missing-document address refuses the whole write and
leaves the previous list byte-identical. The digest is recomputed by the
harness and a model-supplied one is ignored; both fields round-trip through the
v98 `plan_ref_json` and `plan_digest` columns.

Package E adds `todoread` detail on a single item, returning the address, the
resolved range and one of four typed outcomes -- unchanged, changed, unavailable,
dirty -- and never the section body. A 300-line section reports its range and
refuses to inline; an unavailable corpus still returns detail so the linked todo
stays readable.

Package F splits the injected block: `plan:spine` is SlowChanging and carries
corpus inventory, pinned standing instructions and the item window with
addresses; a volatile remainder holds the optional cadence reminder. The spine
measures 1,946 bytes at the maximum supported item count, strictly under its
2,048 cap, after trimming 12 trailing inventory entries. Two unchanged turns
produce identical text -- no timestamp, counter or revision number.

Also fixes a pre-existing failure that this work exposed but did not cause: the
`work_plan_projection_arbiter` family asserted `<= 8` and `<= 10` against a
projection that has capped at the named `MAX_PROJECTED_WORK_ITEMS` (12) since
M001. Both literals now reference the constant.

Authority: a `daemon`/`non-checkout`/`managed-root` writer disposition for the
corpus module, a `deferred_domain_executor` execution-ownership entry for its
Git invocations, and a new `scripts/check_planning_corpus_authority.py` wired
into both quick and CI. The corpus root stays absent from every writer,
execution and sandbox grant, and `read` no longer persists anything.

Acceptance criterion 6 -- one attributable commit per changed parent turn --
is NOT met, for the authority reason above. Every other criterion is, and the
closure record says which is which.

`scripts/verify.sh quick` passes; the unfiltered `codegg-core` suite passes.
P001 delivers the address: an item points at a corpus section, the address is
proven at write time, and resolution returns a range and digest without ever a
body. The spine is SlowChanging and byte-stable at 1,946 bytes with the maximum
item count, and the no-corpus path is re-baselined against M001's output.

Criterion 6 is not met and the closure says so with the reason: `git add`
classifies as RequiresContainedExecution [CleanSmudgeFilter] because staging can
execute repository-configured filters, and there is no contained staging backend
for a managed non-checkout root -- C007's publisher stages in WorkspaceWrite
mode, which is the sandbox write grant I5 forbids for the corpus. The degradation
is the one plan 8 already specifies: the corpus reports `dirty`, the turn
completes, no process starts.

CodeGG also does not create the repository, for the same pin. Rather than relax
the product-wide --work-tree hardening so `git init` would succeed, an absent
root is a typed `unavailable` that names the limitation and leaves creation out
of band. The closure records that a relaxation was written and reverted, because
the reason it was wrong is more useful than a clean-looking diff.

Three defects found during the work are recorded rather than buried: a read tool
that performed a durable write, a direct `git` spawn that bypassed the trusted
route, and that policy relaxation. A pre-existing failure is fixed too -- the
projection arbiter asserted <= 8 against a ceiling that has been a named 12 since
M001.

The three ways past criterion 6 all move a boundary, so the milestone does not
choose one: accept the out-of-band commit, add a contained staging backend under
its own ADR, or narrow the add policy behind a mechanical proof that no
executable attribute can run. P002 is unblocked either way -- it takes nothing
from this commit path and types its own instruction reference.
…hannel

The store already had the states, transitions, compare-and-swap, prerequisites
and bounds; the tool exposed four of eight actions and hardcoded
`lease_expires_at: None`. This completes the surface and adds no store, no table
family and no tool.

A claim gains a bounded `note` (512 characters) and an opaque instruction
reference typed as its own two-field value rather than P001's `PlanAddress` — the
reference is stored and round-tripped here, never resolved, so no second Markdown
parser appears. `claim` takes `lease_seconds` (default 3600, existing 86400
ceiling) and the instruction, and `board` takes `mine_only`.

Three actions become reachable: `complete_claim`, `block_claim` and
`unblock_claim`, each requiring claim id, expected version and expected lease
generation. Every one is compare-and-swap, and a second completion of the same
claim is a stale-version conflict rather than a silent success. The actor is the
bound caller and there is deliberately no parameter to name another actor: a
check that merely refuses is weaker than an absent parameter, and a foreign claim
is refused as `OwnedByAnother`.

`migrate_v99` adds the two columns through the idempotent helper, so the chain
stays replayable under the migration tests that rewind the marker and re-run it.
The storage catalog is regenerated at layout version 99.

The projection gains both fields as optional and defaulted, so an older payload
still decodes, and the task overlay renders state and note.

Evidence: 1,071 core library tests; 10 `workstream_claim_m003` members covering
block/unblock/complete with version and lease-generation movement, dependency
chains, cycle refusal, group-owner release, `OwnedByAnother`, and a 40 ms lease
checked after 60 ms where a live run blocks replacement and a completed run
releases it; 24 `tool::task` tests including the exact 26-action list; the
research-mode permission test still denies `plan_enter`/`plan_exit`. The
regenerated catalog and `scripts/verify.sh quick` pass.

One authority observation, recorded rather than resolved: `claim` assigns
ownership to the bound caller and `request_handoff` records a request, so a
parent cannot transfer a claim directly to a child. If the delegation channel
needs direct assignment, that is a separate action and authority decision.
…ion channel

P002 closed with every acceptance criterion met and evidence mapped to a named
test rather than to a claim of work. The store already had the states, the
compare-and-swap, the prerequisites and the bounds; the tool had four of eight
actions and hardcoded lease_expires_at: None, so three transitions had no call
site. The closure records that this is a surface completion and not a new
subsystem.

The two findings that matter are recorded as findings, not smoothed over: there
is no direct owner transfer, because `claim` binds ownership to the caller and
`request_handoff` only records a request, so a parent cannot hand a claim to a
specific child without a new action and an authority decision; and the
concurrency evidence is single-process, proven by version and generation movement
rather than by two racing processes.

It also records what makes the milestone safe rather than merely working: the
actor is the bound caller and there is no parameter by which a child names a
sibling, so a foreign claim is refused as OwnedByAnother instead of being checked
and allowed. A check that refuses is weaker than an absent parameter.

The roadmap's four layers now each have an owner: corpus prose (P001), structure
under ADR-0003, assignment in the claim store (P002), and attention in the
parent-only checklist. P002 takes nothing from P001's commit path, so it does not
inherit its conditionality.

`scripts/verify.sh quick` re-run and green at this tip.
…nd closure records

The line starts from four rules the owner stated: a toast is only for
information the operator may miss; it is never the only place a message is
seen; it never duplicates what the destination surface renders; and it is
never generated by a direct user action. The roadmap turns those into six
milestones and a measured surface.

The plan-time inventory was wrong, and the correction is the roadmap's first
recorded finding. "501 call sites" was a single-line grep count: 641 of the
tree's 1,142 calls put `.toasts` and the level call on separate lines, so a
line-oriented scan cannot see them. The audit blanks comments and string and
char literals first, and measures 1,142 calls across 55 files, collapsing to
615 (path, symbol, constructor) entries.

Six implementation plans and four closure records (001, 002-004, 005, 006)
land with the roadmap. 002-004 share a record because they were delivered in
one pass over the same files, while each plan's dispositions stay separable
in the manifest. The registry flips seven rows to closed and prefixes each
note cell with a Delivered clause rather than rewriting the plan-time
snapshot.

Docs and plans only; no code in this commit.
…, 630 toasts removed, /toast view

The TUI announced everything through toasts, including the operator's own
actions. This lands all six milestones of the notification-surface roadmap:
the surface falls from 1,142 calls across 55 files to 512 across 53, and what
survives is a recorded decision rather than an accumulation.

M001 -- the disposition manifest and its guard. docs/toast-disposition.toml
keys every site by path + symbol + constructor, never by line number, with a
disposition and the condition that makes the toast legitimate.
scripts/check_toast_disposition.py fails on an unrecorded site and on a stale
entry, and a `removed` tombstone fails if its call comes back. It blanks
comments and string and char literals before matching, carries --report, and
its --self-test injects 14 defects. Wired into verify.sh quick and CI.

M002-M004 -- the removal pass, done by file rather than by milestone. 630
calls are gone: action acknowledgements, echoes of the command the operator
just typed, restatements of state a panel already renders, and repeated
condition reports collapsed to one. The manifest carries 633 entries: 329
tombstones, 285 alert entries covering 493 calls, 14 repeated, 5 result; no
echo, duplicate or unclassified call remains. Removing toasts took the
observable effect away from 41 lib tests, which now assert the destination
surface instead of the toast. Where a removal left a built-in action with no
observable effect at all, every_builtin_action_reaches_a_handler was repaired
rather than allowlisted: the fixture now binds a session, a workspace and a
tab, and records the open panel and the TTS flag as effects. Four variants
stay in SURFACE_NOT_IN_THIS_FIXTURE and two in IDLE_TURN_NO_EFFECT, each for
a reason the list names.

M005 -- /toast and the notification history. LogsView gains All and
Notifications, CommandDispatch records the view, and the command catalog gains
the descriptor and FrontendAction::ShowNotifications. A toast now has a
durable place to be read again, which is what rule 2 requires before it may be
the last thing seen. Catalog counts move 160 -> 161 commands, 166 -> 167
forms, 40 -> 41 frontend actions, and architecture/command.md and docs/tui.md
record the command and the view.

M006 -- the constructor set. What each constructor may express is documented
on ToastManager::{add,info,success,warning,error}, and the manifest's
allowed-constructors is the set the tree may use, so a constructor outside it
fails at the site. Surviving calls by constructor: error 119 of 212, warning
137 of 227, info 38 of 56, success 6 of 9, add 4 of 8.

Two defects found on the way are fixed rather than filed. The /team path
ignored a non-numeric revision in five `Err(_) => {}` arms, so a typo did
nothing at all; a shared parse_revision opens the usage dialog instead, and
a_non_numeric_revision_opens_the_usage_dialog_instead_of_doing_nothing pins
it. An empty `else` in commands/tasks.rs::dispatch_loop and seven needless
returns are gone.

Recorded and not claimed fixed: the MCP dialog's action mode offers seven
actions that reach no effect and now collapses them behind Browse Resources
with a documented catch-all; four action variants have no observable effect in
the dispatch fixture; and 56 `info` calls survive because 31 of their 38 live
entries are alert-class, which is the M006 closure record's stop condition for
keeping the constructor.

Verification: scripts/verify.sh quick green on this tree, three times, last
after the registry edits; the change-triggered guards green; cargo fmt --
--check clean. TUI lib suite 3,357 passed / 0 failed / 1 ignored. Clippy
reports no finding this branch introduced in codegg-tui (six pre-existing
remain: input.rs items-after-test-module, render.rs format!-in-format!,
sessions.rs match-for-destructuring, task_view.rs x3). The command-catalog
fixture red command_execute_refuses_a_frontend_effect is untouched and still
fails: it names /projects, absent from the catalog at HEAD too.
The lint gate CI runs — `cargo clippy --workspace --all-targets --locked --
-D warnings` — reported ten findings introduced by this line's earlier
commits (P001's packages, R001's target model, R003a's node role, P002's claim
surface). All ten are mechanical, and all ten are repaired here without
changing behaviour:

- `plan_corpus::resolve_section`: two error arms returned their `Err`
  explicitly where yielding it is the same value.
- `session::store`: the eleven-field todo insert tuple, repeated three
  times, is one `TodoInsertValues` alias; two call sites now rely on
  auto-deref rather than spelling the dereference out.
- `workspace`: `String::len()` is already the byte length the bound
  checked, and `WorkspaceTarget` now derives `Default` with `Local` as
  the default variant — the value the hand-written impl returned.
- `tool::factory`: `build_session_tool_registry_with_run_store_root` keeps
  its established nine-argument public signature; bundling its resolved
  inputs would churn the API and its callers for this lint alone, so the
  allowance carries that reason instead.

The comment budget is re-banked for this tree, which is the only place the
manifest's ceilings are allowed to move.

The workspace lint gate as a whole is still red, on five `codegg-tui`
findings that predate this line; they are recorded in the P004 closure record
rather than folded into this repair.
P001 was closed conditionally on one criterion: the corpus commit could not
run. The cause was located against source rather than accepted on report.
`classify_git_request` is argv-only and reports
`RequiresContainedExecution [CleanSmudgeFilter]` for `add`, and
`ensure_trusted_git_request` turned that into `BackendUnavailable` — before
the bounded configuration-surface detector the route already runs could be
consulted. The detector answers exactly the question the refusal stood in
for: the only authority that can *name* a filter driver is the repository's
own configuration, and every configuration file the child will read is either
pinned off or inspected. So the refusal was a proxy for an answer the route
already had.

The discharge is narrow, and narrow on purpose:

- it is opt-in. `GitEnvPolicy::admit_certified_staging` is false by default,
  and the default is the model-facing contract: there, `git add` still needs
  the contained-execution tier, and the `Add` arm's preflight still refuses
  before any publisher is consulted — the behaviour
  `tests/command_git/git_index_publication.inc` deliberately pins. Only the
  daemon-owned corpus lifecycle opts in, with
  `GitEnvPolicy::with_certified_staging()`;
- it is `add` alone. `checkout`, `restore`, `switch`, `merge` and
  `stash` keep their containment requirement;
- it requires the *whole* certificate to be free of capability-bearing
  surfaces, so a truncated inspection — "we could not check" — still refuses;
- the classifier is unchanged and stays argv-only, so a caller-supplied `-c`,
  `--git-dir`, `--work-tree` or `C` is refused before anything is
  inspected;
- C007's private-index publication is untouched. The model-facing path is not
  the path being widened.

`GIT_ATTR_NOSYSTEM=1` is now pinned on every child. The system-wide
attributes file is a separate authority from the system config file —
`GIT_CONFIG_NOSYSTEM` does not disable it and `core.attributesFile` does not
name it — so it was the one attributes source outside the certificate.

The corpus lifecycle follows. It must be the top level of its *own* Git
repository, checked with `rev-parse --absolute-git-dir`, because the pinned
`--work-tree` makes `--show-toplevel` unusable as the sole check: it
returns the pinned root even inside a foreign repository. A Git failure
degrades to a typed `dirty` and does not fail the turn; only a storage
failure does, because a durable record that cannot be written is not a
degradation. The repository itself is still created out of band — CodeGG does
not run `git init`, and the `--work-tree` pin stays — and the reason text
says so.

The guard now asserts the detector call *and* the refusal in both spawn
paths, the certificate condition, the `"add"` scoping, the attributes pin and
that certified staging is opt-in, each with an injected defect: 49 are
rejected, so none of the obligations is a claim.

ADR-0070 records the decision and is left `proposed` — its acceptance is the
owner's. `architecture/git.md` is corrected rather than appended to: the
sentence that said no Git authorization was widened is replaced, because the
route can now do one operation it could not.
P001's one unmet criterion is discharged. A turn that changed a corpus document
now produces exactly one attributable commit, and a clean turn produces none,
through the approved Git route.

What was not done is the thing this milestone most easily could have got wrong.
The discharge is opt-in, so the model-facing contract is unchanged: the default
GitEnvPolicy still refuses `git add`, the `Add` arm's preflight still refuses
before any publisher is consulted, and
`tests/command_git/git_index_publication.inc` still pins that. A global
discharge would have been simpler and would have widened a boundary the model
already relies on. Only the daemon-owned corpus lifecycle — a root no model
can reach — opts in.

The closure records what the evidence supports and no more. The requirement
matrix names a test per criterion rather than claiming work. The verification
section labels every run local, and names what did not run: hosted CI, the
nextest workspace sweep, and any live corpus holding authored documents.

It also records the three things that are not clean:

- the workspace lint gate is still red, on five `codegg-tui` findings that
  predate this line — each blames to an ancestor of the pre-line baseline, and
  none of those three files is touched by the line. They are recorded rather
  than folded in: the TUI crate is another subsystem with its own roadmap and
  closure discipline, and this closure does not claim that gate as green;
- a pre-existing flake in `egggit`'s object-view cache is measured, not
  inherited quietly: it fails 2 of 5 runs under plain `cargo test` on the
  baseline because the test shares a process and the global four-entry cache is
  evicted by parallel tests. It passes under nextest and in isolation;
- the corpus repository is still created out of band, because `git init` is
  incompatible with the approved route's unconditional `--work-tree` pin. The
  pin is left intact rather than relaxed, and the tool output says so.

P001's own closure record is not edited. It still reads `conditionally closed`
and still names the condition, because a closure record is immutable except for
factual corrections and the M005/C007 precedent is that a conditionally-closed
milestone's own record stands while a corrective milestone carries the
promotion. The promotion is carried here, in the roadmap's milestone table and
in the registry.

The unblock audit is recorded rather than left implicit: nothing moved to
`ready`, because no registered plan's blocker is resolved by this closure.
R002 remains conditionally closed on live-host evidence, which this milestone
neither supplies nor affects.

ADR-0070 stays `proposed`. Its acceptance is the owner's.
ADR-0070 records the trusted route's certificate-conditional staging
admission. It was written as proposed because acceptance is the owner's; the
owner accepted it in session on 2026-11-29, so the status moves to accepted
and the decision text is untouched.

The edits are the acceptance and its factual consequences, nothing else:

- the ADR's status line records the acceptance and says explicitly that the
  decision text is unchanged from the proposed version;
- plans/adrs/README.md gains the allocation section every accepted ADR in
  this repository carries, and ADR-0069's "next free number is ADR-0070"
  sentence is corrected because that number is now spent (ADR-0071 is next);
- the registry's subsystem row, its dependency-ready P004 row and its
  recently-closed P004 row say accepted instead of proposed;
- the roadmap's P004 milestone entry and milestone-table row say the same;
- P004's closure record and its implementation plan are corrected factually,
  and both say plainly that the record was written while the ADR was
  proposed. A closure record is immutable except for factual corrections,
  and an acceptance that happened after it was written is one.

P001's closure record is untouched: it still reads conditionally closed and
still names the condition.
…te red

`cargo clippy --workspace --all-targets --locked -- -D warnings` failed on
pre-existing findings in two frontend crates, which is what kept the
workspace lint gate red on this line.

`codegg-tui` (five):

- `task_view.rs`: delete the unused `hint()` and `selected_line()`. The
  first was a stale duplicate advertisement — `hint_line()` is the live one
  and its verb set is unchanged here — and its still-true reasoning about
  which keys the panel host claims moved onto `hint_line()`. The second had
  no caller under `crates/codegg-tui/src/`.
- `app/render.rs`: flatten a `format!` nested inside a `format!` into one
  four-part format. The concatenation is byte-identical for these `&str`
  inputs.
- `workspace_dashboard.rs`: drop a `return` from a tail call.
- `task_view.rs`: annotate the private `render_view` with
  `#[allow(clippy::too_many_arguments)]` and the reason, matching the
  convention already used elsewhere in the workspace. The signature is
  unchanged.

`codegg-cli` (one):

- `main.rs`: a node proxy parse test compared a `PathBuf` against a freshly
  allocated `PathBuf::from` literal, which is the `cmp_owned` finding. It
  compares against `Path::new` instead; the assertion is unchanged.

No behaviour changes: `q` still closes and `↑`/`↓` still move in the task
view, the painter renders the same nine inputs, and the parse test asserts
the same socket path.
Third of the three not-clean findings in the P004 closure record §10: the
corpus repository had no owner, because `git init` was run out of band.
It could not go through the trusted route, which pins `--work-tree`
unconditionally and Git rejects that for creation
(`fatal: GIT_WORK_TREE (or --work-tree=<directory>) not allowed without
specifying GIT_DIR`; `git init --work-tree=X` is an unknown option).

`init_managed_repository` / `init_managed_repository_with_timeout` build
`git init --initial-branch=main` themselves, so no argument plumbing can
reach `--template`, `--separate-git-dir`, `--bare`, `--object-format` or a
`<directory>` operand. The pin's exception is driven by an internal
`TrustedArgvShape`: public `apply`/`apply_sync` always build the
repository shape, and only the creation function reaches
`RepositoryCreation`, so `apply(["git", "init"])` still pins and still
fails. Creation reuses the existing spawn site rather than adding a third.

The shape is safe only because creation is refused before any child runs:
not an existing real directory, a symbolic link, any existing `.git` entry
(the directory or the file a linked worktree and a submodule use), the bare
layout (`HEAD` plus `objects`), or a root inside another repository. That
last case is a bounded walk over the ancestors' filesystem metadata, never
a Git invocation: `GIT_CEILING_DIRECTORIES` hides an enclosing repository
from Git, so a Git answer would be truncated by this module's own policy.

Also bounds the two flaky tests this crate carried, both by asserting the
guarantee the code makes rather than a stronger one it does not:

- The object-view retention assert ran after `drop(command)`, so it claimed
  the cache keeps a lease-free view. It does not: at four entries it retires
  one that holds no lease. The assert now runs while the lease is held — the
  commitment the sibling generation test already states — and passed 8 runs.
- The global-hook assert claimed no hook ran anywhere in the process, while
  `GIT_CONFIG_GLOBAL` is process-global and other tests' raw `git commit`
  inherits it and runs that hook. The hook now records the commit it ran
  against and the assert names this commit, which is the actual guarantee.
harness added 30 commits November 29, 2026 21:56
…e corrected P003

`scripts/verify.sh full` was run for the first time on this line. It found two defects, both fixed
before this record:

- `79e1f70e8`: a linked detail read went through `ensure_available` and initialized the corpus
  repository, so a read created `.git` and then reported a missing document instead of an
  unavailable repository.
- `df7bf1be3`: the advisor's frozen M003 receipt canary had no record of the claim deltas, so its
  reconstruction of the pre-M003 task schema stopped matching the receipt.

The sweep is still not green: a `--no-fail-fast` companion enumerates 15 failures in five areas
outside this milestone — command-catalog counts, one storage migration, one claim event order, one
stack overflow and eight TUI render invariants. §4 records all three runs and the companion sweep,
§10 records the 15 as a medium line-wide finding, and §5's invariant 7 names the caller-side test
that now pins the read.

The record also still called P003 "deferred". The roadmap and registry were corrected to
`superseded` in `9d5e5ec2f` and this record was missed, so §11 and §12 now say superseded and the
unblock audit no longer calls P003 blocked. The closure decision is unchanged.
The §10 entry said two transitions in one millisecond were "ordered by something other than their
sequence". `list_events` orders by `created_at, event_id`, so the claim is exact and now cites it.
The lane's five commits are siblings of this line off 77f32eb, not ancestors: agent roster
M001-M005, advisor consultation M001-M003, and the notification surface M001-M006 (the disposition
guard, 630 toasts removed, the /toast view).

Three conflicts, all resolved by keeping both sides:

- plans/registry.md: both lanes appended rows to "Dependency-ready implementation plans". The
  remote lane's two advisor rows follow this line's six.
- architecture/overview.md: each lane counted the integration test files with only its own addition
  in view, so both claimed 300. The merged tree carries both — tests/remote_workspace.rs from R002
  and tests/agent_loop/advisor_consultation_m003.inc — so the count is 301.
- docs/comment-budget.toml: generated. Re-banked against the merged tree rather than hand-merged.
Three things the automatic merge left needing a decision:

- src/agent/prompt.rs: two PromptContext constructors in the todo-contract test were missing the
  subject field, so the merged library test target did not compile.
- tests/core_daemon/command_catalog_m007d.inc: the frontend-effect refusal test named /projects,
  which this line removed. It now uses /help — the same classification, a surviving command.
- ADR identities: both lanes had allocated ADR-0067 through ADR-0070 to different decisions, so
  the merged tree had two active records per number and check_adr_integrity failed. The upstream
  lane's allocations are published and this line's are not, so this line's five records move to
  ADR-0072 through ADR-0076 with their decision, status and acceptance dates unchanged, following
  the rule plans/adrs/README.md already records. The originals are archived with source blobs and
  SHA-256 digests, the mapping is plans/adrs/planning-corpus-adr-id-migration.md, and every
  inbound reference (closures, roadmaps, implementation plans, the planning process, the research
  note and the registry rows) names the canonical identity.

Evidence (local): check_adr_integrity passed; tool_advisor::causal_frontier 78 passed;
core_daemon command_catalog_m007d 12 passed.
`cargo check --workspace --all-targets` caught one more constructor the automatic merge left
short: `tests/agent_loop/advisor_consultation_m003.inc` builds a `WorkspaceRecord` without the
`target` field this line added with R001. The fixture now names the default local target, as the
other fixtures do.

Evidence (local): `scripts/verify.sh quick` exit 0.
…ion result in P005

§4 gains the post-merge measurement (18,093 run / 18,057 passed / 36 failed / 11 skipped at
4182150) as its own row and a delta paragraph, and replaces the blanket "no hosted CI"
statement with the five qualification lanes that did run on that commit: three successes, the
Windows native probe contract failure (a compile error, not a probe assertion) and the Linux M004
lane that was still in progress. .github/workflows/ci.yml triggers on push only for main, so the
routine job genuinely has not run here; that is now said precisely instead of approximately.

§10 is rewritten around the merged-tree 36 rather than the pre-merge 15, and each cluster is
attributed: 5 resolved (four command_catalog_m007d, one workstream_claim_m003 that passed and is
recorded as a pass, not a fix), 10 persisting, 10 new from the roster lane's non-selectable `build`
axis (nine host::tests plus the cli workspace-policy case), and 16 new from the notification lane's
toast removal (fourteen observe an empty report list). None is this milestone's surface, so none is
repaired here; the Windows compile break is added as its own Medium finding with its merge-base
provenance. §9 also notes that its next-free-ADR sentence predates the identity migration.
The merged tree at df4bd8e failed 36 tests in the post-merge sweep
(P005 section 4). This repairs 35 and narrows the last one to a compile-time
stack exhaustion it does not fix.

Host and CLI (10). assets/agents/build.toml declares selectable = false from
dbc8e25, and the agent-roster closure records that build remains the default
but is not selectable. The nine host::tests reds named a selectable agent in
their fixture, which the default path never does, so the harness omits the
agent field and asserts against the resolved default; the CLI fixture uses
general, which is selectable (ADR-0068).

Migration (1). The v81 fixture staged only the tables the test read. A real
v81 database always holds workspace, todo and workstream_claim, which v96's
INSERT ... SELECT names, so the fixture stages them.

TUI (24). Three causes.

An incomplete removal pass: app/input.rs carried two empty refusal arms beside
an unused send_now_refusal_message, and the composer undo and redo verbs
called the text model with no report at all, while the tests encode the rule
that a verb is never silent and that 'nothing to undo' is a different fact
from 'nothing happened'. The refusals and both undo branches report through
ToastManager again, and docs/toast-disposition.toml records why the removals
were reverted.

No observable signal: the composer copy route could not be told apart from the
routes that must not copy once the toast went away, so src/util/clipboard.rs
gains a tui-test-support-gated thread-local recorder -- thread-local because a
render family runs many tests per process. Each test now asserts the exact
text its route wrote, including that the non-copying routes wrote nothing.

Product paths that contradicted their own tests: materialize_hosted_panel
documented that StillLoading and OpenedAs must not select the column and
returned true for both, so a live box claimed a column whose keys all went to
the modal; dock_open_box swapped the panel and said nothing about the edge it
vacated, which the sidebar test requires it to name. Both follow the documented
contract now, and the panels unit test asserts the biconditional (the column is
selected exactly when no box is waiting) instead of the blanket claim its own
function contradicts.

Reported surfaces were corrected only where the product was right: the TaskView
hint deliberately lists a subset of handled keys and both merge parents already
carried the short hint, so the recorded vocabulary follows it, and the
side-panel walk needed five steps because Workspace is registered between
Terminal and Help.

Remaining red:
delegated_transcript::a_delegated_run_records_a_bounded_tool_result_with_truncation_marked
aborts with a stack overflow inside regex-automata's Thompson compiler
(c_at_least). Under lldb the faulting stack runs capture_transcript ->
prepare_transcript_row -> redact_transcript_body -> ProjectionFieldRedactor::
redact_text -> compiled_for -> Regex::new. It is not payload-dependent (a 1/16
payload overflows identically) and is not the grep tool's own pattern. Not
fixed here; no test was weakened, ignored or given a larger stack.

Verified locally: codegg-tui --lib 3357 passed / 0 failed, the tui_render
family 1257 passed / 0 failed, host::tests 13, cli exec_workspace_path_policy
2, core_daemon storage_migrations 5, and scripts/verify.sh quick passed. No
hosted routine CI runs on this branch.
Section 4 keeps the merged-tree measurement as it was taken and adds the
correction to its outstanding set: what each group's cause was, what the
repair did, and the local measurement that confirms it. Section 10 keeps its
findings and gains a pointer to that record, because only the
delegated_transcript stack overflow is still outstanding.

That last one is recorded as a diagnosis, not a fix, with the frame chain that
locates it (capture_transcript -> prepare_transcript_row ->
redact_transcript_body -> ProjectionFieldRedactor::redact_text -> compiled_for
-> Regex::new), the measurement that rules out payload dependence, and the
hypothesis that was tried and disproved.
The delegated_transcript abort was recorded as "a redactor rule exhausts the
compiler stack". Measured, the requirement is bounded: RUST_MIN_STACK=3145728
passes, and 4 MB and 6 MB pass too. Every rule set stays shallow, the
projection redactor's own suite is green on the default stack, and so is the
sibling delegated-transcript test.

So the red is one unoptimized-build regex compile against libtest's 2 MB
spawned-thread stack, not unbounded recursion, and the prohibition on raising
the stack was aimed at a recursion bug that this measurement excludes. The
record states the choice that remains rather than taking it.
…the stack

The 36th red of the post-merge sweep was a stack overflow in
delegated_transcript::a_delegated_run_records_a_bounded_tool_result_with_truncation_marked.
The faulting frame was inside regex-automata's Thompson compiler, reached from
capture_transcript, and three measurements show the compiler is where the stack ran
out rather than what consumed it:

- every redactor rule pattern compiles inside a 128 KB thread on its own;
- compiling every rule set at the test's shallow depth first changes nothing --
  the abort is identical;
- the payload size is irrelevant: a 1/16 payload aborts identically, and the depth
  from the test's future to the redaction is the same 1.87 MB either way.

What consumes the stack is the delegated task's own future. execute_agent_task is the
whole agent loop, so in an unoptimized build rustc keeps a yielded local in a stack
slot and copies it into the generator state, and its poll frame measures ~158 KB.
The delegated chain from the worker loop down to the transcript redaction is long
enough that the unboxed frame tipped a stock 2 MiB thread over: the abort reproduced
on libtest's thread, on tokio's worker thread and on tokio's blocking thread alike,
so this was not a harness artifact. The requirement measured ~2.06 MiB against the
2 MiB available.

Boxing the future moves the state to the heap and leaves the poll frame small, so
the chain fits on a stock 2 MiB thread. A boxed future is polled identically, so the
task's behaviour is unchanged. RUST_MIN_STACK was a diagnostic throughout and is
not the fix.

Verified: agent_loop 573 passed / 0 failed, the red is green on the default stack
with the test's original #[tokio::test] flavor untouched, and scripts/verify.sh
quick passed.

The P005 closure record carries the corrected finding: the earlier text named the
redactor's regex as the cause, which the measurements exclude.
The full nextest workspace sweep at the pushed tip is green: 18,093 tests run,
18,093 passed, 0 failed, 11 skipped in 401.3 s, with a private cache root and
the same companion shape as the red measurement it replaces.

The two counts are the load-bearing part: the red round at 4182150 ran the
same 18,093 tests with the same 11 skipped, so nothing was removed, ignored or
newly skipped to reach green. The 36 that failed now pass.
The §4 hosted table carried the M004 row as "in progress at the time of
writing", and §10 said four of the five qualification workflows had reported.
Both statements are now known to be incomplete, and the PR cites this record,
so the correction is made here rather than left to rot.

The `Linux M004 process and IPC qualification` lane completed as a failure at
`418215000` (`46321657268`) and failed the same way on its next run, at
`0217dc6ab` (`46352852139`): the member
`interactive_process_attach_resume::m004_daemon_constrained_pty_uses_principal_profile_and_cancels_descendant`
panics with `contained target and descendant started: Elapsed(())`.

The lane has been red on this branch at every push since `eefbfa0fa`
(2026-11-27), where the failing member was the sibling
`m004_daemon_constrained_pty_fails_closed_when_user_namespaces_restricted` in
the same Linux containment family; `af1632350` fails the same way. So the red
predates `1fd9307cd` and `0217dc6ab` and is not a consequence of the repair.

§4's table row, §4's cause paragraph, §10's hosted findings and §10's CI
paragraph are corrected to say so. The milestone's own verdicts are untouched:
no `plan_corpus`, `plan_corpus_repository_binding`, `tool::todo` or `egggit`
test fails in any of the four measurements, and the sweep is green.

Guards: check_planning_corpus_authority, check_adr_integrity and
check_comment_budget pass.
The closing line of §4 read "this milestone's own tests are green, and the
workspace sweep this line would land on is not." That was true when the
workspace sweep was red, and §4 now records it green: 18,093 run, 18,093
passed, 0 failed, 11 skipped, measured at `0217dc6ab`. The sentence is
corrected to match the measurement recorded in the same section.

The verdict this sentence supports is unchanged: this milestone's own tests are
green, and the sweep it would land on is green too.

Guards: check_planning_corpus_authority, check_adr_integrity and
check_comment_budget pass.
The hosted `CI / verify` job runs `cargo clippy --workspace --all-targets
--locked -- -D warnings` on the runner's stable toolchain, which is newer than
the local default, and it failed at `7d8958fa7` with nine errors. `main`'s own CI
passes the same step, so these are this branch's findings. The first failure hid
the rest: the `codegg` lib failed to compile, so `codegg-tui` was never linted
until the lib was clean.

- `src/acp.rs` -- `native_agents` returned a three-element tuple inline
  (`clippy::type_complexity`). The tuple is now a named alias, so the three
  parts are readable at the signature.
- `src/agent/registry.rs` -- two `unwrap_or_else` closures whose bodies were
  field reads are now `unwrap_or` (`clippy::unnecessary_lazy_evaluations`). The
  fallbacks have no side effects, so the eager form is equivalent.
- `src/agent/registry.rs` -- `assert_eq!` against a literal `true` is now
  `assert!` (`clippy::bool_assert_comparison`). The same assertion, spelled the
  way clippy asks for; the property under test is unchanged.
- `src/agent/request_preparation.rs` -- the advisor-tool registry probe was an
  `if ... is_none() { return None }` block, now the `?` operator
  (`clippy::question_mark`).
- `src/permission/mod.rs` -- the verify-agent refusal was a nested `if`, now
  one condition (`clippy::collapsible_if`). The refusal is unchanged: a verify
  agent still gets `Deny` for `bash`/`terminal` when the command is not
  read-only.
- `src/util/clipboard.rs` -- the two test-only thread-locals now have `const`
  initializers (`clippy::missing_const_for_thread_local`). A `const` initializer
  still gives every thread its own value, which is what the recorder's
  thread-local isolation depends on; that was measured with a four-thread
  program, not assumed.
- `crates/codegg-tui/src/commands/sessions.rs` -- the empty-session cleanup
  report was a `match` with an empty `None` arm, now `if let`
  (`clippy::single_match`).
- `crates/codegg-tui/src/app/input.rs` -- the `#[cfg(test)]` module sat above the
  `impl App` it tests, so items followed a test module
  (`clippy::items_after_test_module`). The module moves to the end of the file,
  byte-identical.

`docs/comment-budget.toml` is re-banked from the merged tree: three files lost
code lines, so their comment-to-code ratios rose, and `src/acp.rs` gained the
alias's one-line doc comment.

Verified locally: `cargo clippy --workspace --all-targets --locked -- -D
warnings` exits 0; `cargo test -p codegg --lib` 5,297 passed / 0 failed / 5
ignored; `cargo test -p codegg-tui --lib` 3,357 passed / 0 failed / 1 ignored;
`cargo test -p codegg-tui --test tui_render` 1,257 passed / 0 failed;
`scripts/verify.sh quick` passes; `check_comment_budget.py` passes.
The hosted `Desktop E2E` lane failed at compile time on its own `--locked`
clippy: "the lock file ... needs to be updated but --locked was passed to
prevent this". The desktop tree is a separate Cargo workspace that
path-depends on the root `codegg` package, so the root workspace's new members
(`codegg-node-protocol`, `codegg-sandbox`) left its lock stale -- and stale in
both directions, because the lock also still carried packages no manifest
requires any more: `zbus` and its whole `async-*` subtree, which no
`Cargo.toml` in this repository declares.

Cargo's own resolution is the fix, so the lock is regenerated rather than
hand-edited. The removal is a genuine consequence of the manifests, not a
resolution accident: `cargo tree -i approx` reports that the package is no
longer in the graph.

Verified locally:
`rustup run 1.90.0 cargo metadata --manifest-path apps/desktop/src-tauri/Cargo.toml
--locked` exits 0 for the default resolution and for `--all-features`, which is
the check the hosted lane's `--locked` clippy performs before it compiles
anything. The desktop build itself cannot be run here: its build script needs
the `codegg` binary staged as a Tauri resource, which the hosted lane
produces and a local checkout does not have.
The TUI moved out of the root package into `codegg-tui`, and the desktop tree
still reached for `codegg::tui::...`. Seven references in
`apps/desktop/src-tauri/src/lib.rs` -- all in the host checks -- stopped
compiling, so the hosted `Desktop E2E` lane failed at its lint step with
`error[E0433]: failed to resolve: could not find 'tui' in 'codegg'` and never
reached a test.

The desktop now takes `codegg-tui` as a dev-dependency and names the crate
directly. The lock is regenerated with it: the TUI crate's own dependency tree
belongs in the desktop's lock now, which is what the previous commit's prune
had left out.

Verified locally with the hosted lane's own commands, at the pinned 1.90.0
toolchain and with the daemon resource staged the way the lane stages it:

- `rustup run 1.90.0 cargo clippy --manifest-path apps/desktop/src-tauri/Cargo.toml --all-targets --locked -- -D warnings` -- exit 0
- `rustup run 1.90.0 cargo fmt --manifest-path apps/desktop/src-tauri/Cargo.toml -- --check` -- clean
- `rustup run 1.90.0 cargo test --manifest-path apps/desktop/src-tauri/Cargo.toml --locked --lib` -- 119 passed, 1 failed, 1 ignored

The one failure is
`tests::production_tui_and_desktop_adapters_share_one_live_lsp_service`, which
could not compile on this branch until now and therefore has never run here: it
asserts that opening a Rust document warms the configured fake LSP server, and
the server does not start. The lane was already red on `main` before this
change -- at `1ca8f7b01` it failed on the same stale lock -- so this repairs
the compile break and leaves one named failure behind rather than claiming a
green lane.
Merges main (command hierarchy #233 plus the M002 panel-fill contract) into
the notification-surface line. A merge rather than a rebase: these commits
are already published in #232, which stays open and untouched.

Command surface (main's shape, our two commands):
- /advisor and /toast live inside main's two-level catalog at version 14;
  90 built-ins, 84 variants, 149 forms, 87 daemon-served, 62 frontend
  effects.
- /advisor moved out of build_inner_request's early return into a real
  match arm, so the readiness table, the effect-closure test and
  check_command_catalog_ownership.py all read one table.
- main's retirements stand: the flat /lsp-*, /chat-*, /shell-* and
  /terminal-* spellings are gone, and this line's tests now speak the
  two-level forms.

Notification surface (ours):
- Nine usage advisories became InfoType::Usage dialogs; the terminal,
  shell, panel and chat confirmation toasts stay removed.
- docs/toast-disposition.toml re-derived: 518 sites across 635 entries.

Panel fill contract (main's, restored):
- 1fd9307 had flipped materialize_hosted_panel to false for
  StillLoading/OpenedAs and made ready_terminal_panel focus the PTY on
  load, to satisfy tui_panel_docking expectations that main's 4577b04
  declares stale. Both are reverted to main's contract, which
  9f82746 ("a panel fill keeps the column and docks its box") states in
  code: every fill keeps the column, and selecting the terminal panel
  leaves the PTY in NOR with i as the one way in.
- Two doc comments still describing the pre-9f8274622 behaviour are
  corrected; no other product behaviour changed.

Auto-merge repairs:
- ToolRegistryOptions keeps project_identity: the planning-corpus binding
  resolves an identity before tool registration.
- A child turn receives or refuses an LspService; worker.rs no longer
  constructs one.
- command_tree top_level 88 -> 90; workstream_claim orders events by
  rowid so a claim's causal order survives same-millisecond writes.

Verification: cargo nextest run --workspace --locked --profile ci (18147
passed, 12 skipped), cargo clippy --workspace --all-targets -D warnings,
scripts/verify.sh quick, comment budget re-banked.
… plan

The line owns the lane set, the timing-sensitive qualification fixtures and the
one product defect no other open line owns: the Windows target does not compile.

M001 is the only milestone ready for handoff; M002 and M003 are hard-blocked on
its hosted evidence and M005 on all four.
Both constants are `#[cfg(unix)]` in `codegg-sandbox`, so the unconditional
re-export left a Windows target with nothing to import: `error[E0432]` for
`SANDBOX_ACK_FD` and `SANDBOX_STATUS_FD`, and neither Windows code lane could
reach a test.

Every consumer already sits inside `#[cfg(unix)]` — `managed_process`'s
`configure_status_fds` and the Darwin descriptor scan — so gating the re-export
removes no Windows surface. It stops publishing a contract the helper protocol
does not implement there, which is the invariant: the constants stay Unix-only
rather than gaining a Windows definition.

`architecture/security.md` now says Unix-only where it names them, and the
comment budget is re-banked for this and the following commit's comments.
`signal_group` was already platform-split, but its three call sites passed
`libc::SIGTERM` and `libc::SIGKILL`, so a Windows target reported
`error[E0425]: cannot find value SIGKILL in crate libc` twice and the launcher
lane never reached its tests.

The call sites now name an intent — `GroupSignal::Terminate` and
`GroupSignal::Kill` — and the `#[cfg(unix)]` arm owns the mapping. The
`#[cfg(not(unix))]` arm stays the explicit no-op it already was: this is a
compile repair, not Windows containment, and no fabricated signal number is
introduced.

The terminate-wait-kill-wait sequence and the drop guard's kill are unchanged in
order and count.
Every plan item these workflows serve is closed or conditionally closed with a
negative or no-admission outcome, so each lane spends Windows runner time
answering a question that is already answered: C020, the C021/C024/C027/C028
dedicated-principal chain, C032, C033, C035, C036, C037 and C044.

None of the eight invokes a named `--test` target or any suite a surviving
lane runs. They drive separate research manifests, `--bin c036`/`--bin c037`,
PowerShell probes and one-shot `cargo check`s, and no guard, script,
architecture document, `docs/` page or surviving workflow names them.

`command-authorization-macos-compile.yml` stays: it compiles the root library
for `x86_64-apple-darwin`, answers no Windows question, and its disposition is
M003's. `ci.yml` keeps its whole-suite scope and its `plans/**` filter —
removing that filter would be the change-scoped routine job I1 forbids.

The line's target of nine surviving workflow files is unchanged: M002 removes
eight, M003 owns the ninth.
…ile lane

Three defects, each measured on the tree.

`windows-process-launcher.yml` ran `--test windows_sandbox_test_support` twice in
two identically configured steps. A scan of every `run:` block in every workflow
found exactly that one pair and now finds none. The pair had been used as an
in-run control to attribute a flake
(`plans/closure/ci-test-throughput-recovery/008-merge-and-absorption-status.md`),
but two identical steps are also an always-on, undocumented retry: a first-run
failure is the signal the second run was hiding.

`shared-checkout-macos-qualification.yml` push-triggered on
`work/agent-workstream-m005-writer-audit`, which does not exist on origin.

`command-authorization-macos-compile.yml` is retired under D3. Its push trigger
named two `planning/` branches that do not exist and it had no `pull_request`
trigger, so it has not run automatically; repointing it at `src/**` would add a
macOS lane to nearly every pull request. The loss is recorded rather than
hidden: no surviving lane performs `cargo check -p codegg --lib --target
x86_64-apple-darwin`.

Decided against, with reasons recorded in the roadmap: the three per-job helper
builds in `linux-m004-native.yml` are per-job setup rather than duplicate work,
and root `Cargo.toml`/`Cargo.lock` stay in the platform lanes' path filters
because a dependency change is when those lanes should run.

`.github/workflows` now holds nine files, every workflow parses, and every
triggered push branch resolves on origin.
`identity_m003_daemon_authorization`'s due-entry member seeded `now + 30ms` and
immediately required the sweep to see the entry as not yet due. On a loaded
runner the margin elapsed first, the entry was legitimately due, the tick
claimed it, and the assertion failed — aborting the 33-minute `CI / verify` job
`46509924610` while passing locally in 0.2 s.

The member now seeds two entries: a far-future one for "never early" and an
already-due one for "when due". The sweep's effect is read as a written
sentinel (`updated_at_ms = 0` must advance), so no sleep is needed to tell the
tick's write from the add's. Both directions were falsified by injection before
acceptance: a future due entry fails the "must have reached" assertion, and a
past not-yet entry fails the "left untouched" assertion.

The other three margins are gone too: the wake seed is 1 s with a 5 s poll
budget, the latency seed is 2 s (about 2.9 s of stall tolerance against its
900 ms bound), and the workstream lease is expired by construction instead of by
a 60 ms sleep over a 40 ms deadline.

The two contained-PTY members are escalated, not widened. Run `46509924827`
shows `_fails_closed_` failing at `:1261:9` in 0.20 s on a state assertion — it
contains no start wait at all — while `_uses_principal_profile_` is the
`Elapsed(())` at `:1146:10` after 15.27 s against a fixed 15 s timeout. They are
not one failure class, and a longer deadline would hide a containment that
genuinely does not start.
… records

The before side is hosted: nine lanes, aggregate about 9.8 ks (2.7 h) per push
across 18 workflow files. The after side's lane count is hosted too — push
`c7f28b773` started exactly nine workflows and requested no retired lane — but
its durations were still running, so none is quoted; the record names the nine
run ids instead.

The record keeps apart two quantities the line's opening evidence conflated: a
lane's duration and a push's aggregate request. The eight retired lanes had
almost no push history, so retiring them removes no measured per-push duration;
what it removes is the possibility that a plan or research edit requests Windows
capacity. Saying otherwise would make the line look better than the evidence.

M001 and M002 are recommended closed. M003, M004 and M005 are recommended
conditionally closed: the surviving-lane pass, the hosted repeat-under-load, and
the settled-tree durations are hosted facts that had not completed. The two
contained-PTY members are carried as a Medium finding owned by the containment
line, and no deadline was widened.
The measurement record named nine run ids from `c7f28b773` as the place to read the
after-side durations. The `docs(plans)` push that followed superseded them through
each group's `cancel-in-progress: true`, so the launcher run is recorded as
`cancelled` and those ids cannot carry the durations.

The record now says so, names the final head as the run set to read, and records
the cancellation itself as a Low finding: a docs-only push throws away runner time
already spent, and a measurement has to be taken on the last push rather than the
first one after a code change.
The last push on the branch (ba3462d) ran all nine surviving lanes: seven
green, two red, 7 611 s of runner time. That turns the three conditions the
line recorded against itself into facts, so M003, M004 and M005 move from
conditionally closed to closed (recommended), and the roadmap and registry
agree with the five closure records.

The two reds are attributable outside this line and are recorded as such:

- Linux M004: run 46534026607 settles what the earlier run could not. The
  _fails_closed_ member fails in 0.18 s because the runner DOES start a
  user-namespace-constrained PTY (InteractiveProcessCreated, child pid 3597),
  so that member's premise is false on that host. The sibling's Elapsed(())
  after 15.28 s is therefore not evidence that containment fails to start.
  No deadline was widened.
- Desktop E2E: the inherited failure of
  production_tui_and_desktop_adapters_share_one_live_lsp_service at
  apps/desktop/src-tauri/src/lib.rs:1712. Job- and step-level identity with
  main's run 46478456148 is verified; test-level identity is not, and the
  record says so.

Corrections made while settling the record:

- the after side is the LAST push, not the first: the earlier run set was
  cancelled by the docs push that followed, because the lane groups use
  cancel-in-progress: true. The cancellation finding is kept, as Low.
- ba3462d is a docs(plans) commit, not a code head; the last source commit
  is c7f28b7. Both are now named correctly.
- the "durations are pending" text contradicted the filled table and is gone.
- "passes repeatedly under load" is carried by the local repeats plus ONE
  hosted sample; the record no longer implies a hosted distribution.
- the registry's subsystem cell said M004/M005 were conditionally closed
  while its own header said all five were recommended closed, and M004's row
  still said a Linux host was needed to show containment starts.
…paused

The desktop product's development is paused, and the lane was spending 1190 s
of runner time per push on it. Measured on run 46534026619: 375 s building the
root daemon binary, 718 s in the host step (which failed), 34 s in the
renderer, 23 s in the Tauri system dependencies. The visible-window trajectory
itself was skipped in that run, because the host step failed first, so the
lane's red was never in the trajectory.

The lane now runs: the production boundary guard, the renderer checks, the
root daemon build and staging the Tauri build script requires, the host's
cargo fmt --check, and cargo clippy --all-targets against
apps/desktop/src-tauri in the pinned 1.90.0 toolchain.

Two steps stay for reasons rather than habit:

- the renderer is not optional. tauri.conf.json sets frontendDist to ../dist,
  tauri::generate_context!() embeds that directory at compile time, and dist/
  is gitignored, so without the renderer build the host does not compile at
  all. It is 34 s and keeps the renderer's typecheck, unit tests and bindings
  checks.
- fmt --check needs no build and costs seconds, so it survives even though the
  rest of the host phase does not.

What stops running, with the loss recorded in architecture/desktop.md and
architecture/testing.md: the host test suite (cargo test --lib) and the
built-app WebDriver trajectory. The host's
tests::production_tui_and_desktop_adapters_share_one_live_lsp_service
(apps/desktop/src-tauri/src/lib.rs:1712) is red and inherited, and it is now
executed by nothing until the lane is restored.

scripts/check_desktop_gate_wiring.py is unchanged and still passes, including
its --self-test: the workflow exists, keeps its push/pull_request path
filters, lints the host and calls the entry point. That is deliberate - the
2026-10-23 pause left the desktop Rust tree compiled by no gate at all, and
this guard is the artifact that made that unrepeatable.
…e PTY finding

The M004 process-ipc job ran three commands - protected_mount_ in codegg, the
bare-repository guard in codegg-sandbox, and trusted_git in egggit - under the
same C006/C009 gates that linux-c006-native.yml uses for the same three
commands, and C006 was green on the same head (46534026556, 359 s). The step
is removed and its three docs/security-test-filters.toml registrations with it
(26 -> 23 filters); check_test_filter_execution.py rejects both halves of that
move, which is how the registry stayed honest. The env gates stay: other steps
in the job select tests gated on them.

The same run also corrects the PTY finding this line recorded on 2026-12-01.
That record said the member's premise - that this runner restricts user
namespaces - was false. The log says otherwise:

- the restricted job verifies user.max_user_namespaces reads 0 before the
  tests, and the step that checks it passed;
- the sibling job records Bubblewrap mode 755 0 /usr/bin/bwrap, so bwrap is
  not setuid and needs an unprivileged user namespace;
- under those facts a launch cannot have obtained a user namespace, yet the
  create returned InteractiveProcessCreated with a child pid.

So the refusal is late, not absent, and ProductionLinuxLaunchAdapter::plan
(crates/codegg-sandbox/src/linux_launch.rs:205-240) is why: it checks trusted
bubblewrap, Landlock and seccomp and never probe_user_namespace_creation
(:441-449), whose own doc comment makes these facts diagnostic-only. A host
that cannot create user namespaces still plans ProtectedProcessIsolation.

What that needs is a decision on the refusal shape plus a Linux host to verify
it - not a wider deadline. No assertion was weakened and POLL_TIMEOUT was not
touched; the corrected finding is in the roadmap, the measurement record, the
M004 closure record and the registry row.
The reduced lane dropped `ripgrep` from the Tauri apt list together with
`xvfb`. But the boundary guard is `scripts/check-desktop-boundary.sh`, and it
greps the desktop tree with `rg` in ten places, so run 46586093242 failed at
step 7 with `rg: command not found` after 49 s and steps 8-12 were skipped:
the reduction has not been measured yet, and this is the fix that lets it be.

Commented rather than merely re-added, because the package list is otherwise
assumed and the omission cost a run.
…oth lanes

The reduced desktop lane had never been measured. Its first attempt failed at
step 7 in 49 s because `ripgrep` went out with `xvfb` - the boundary guard
greps the tree with `rg` - and steps 8-12 were skipped. `925ff5dee` restores
the package, and run 46590280230 is the first complete run of the new shape:
596 s, green, against 1190 s and red before it.

Three documents claimed the reduction dropped two things it still runs. The
renderer phase and `cargo fmt --check` are both in the workflow. The renderer
has to be: `tauri.conf.json` sets `frontendDist: "../dist"` and
`generate_context!()` embeds it at compile time, with `dist/` gitignored, so
without it the host does not compile and the lint has nothing to lint.
Formatting costs one second. Both are corrected in `architecture/desktop.md`,
`architecture/testing.md` and `apps/desktop/README.md`.

The measurement record gains 4.2, carrying the whole nine-lane set for
925ff5d: 7223 s and eight of nine green, against section 4's 7611 s and seven
of nine. It states plainly that the desktop lane is green because the failing
test suite stopped running, not because anything was fixed; that Linux M004 is
red on the same two contained-PTY members in the same shape (0.19 s against
0.18 s, and the same `Elapsed(())` marker timeout); and that CI's two samples
- 859 s and 1284 s of workspace tests on effectively the same code - differ by
half, which is why neither is quoted as an effect.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant