|
| 1 | +# Stale Spec-Annotation Sweep — 2026-06-25 |
| 2 | + |
| 3 | +**Agent:** documentation-generator (Ferrox, Rust Engineer) |
| 4 | +**Scope:** in-code doc comments referencing spec documents / spec decisions |
| 5 | +**Trigger:** `please action the stale-spec annotations` |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## Method |
| 10 | + |
| 11 | +Grepped all `.rs` for spec-reference patterns (`Per spec`, `spec at .docs/`, |
| 12 | +`per spec <Tag>-N`, `Mirrors the spec`, `[SPEC]`). For each hit, verified |
| 13 | +whether the referenced artefact (spec file / cross-repo plan / Gitea issue) |
| 14 | +actually exists and whether the surrounding code matches the described |
| 15 | +behaviour. |
| 16 | + |
| 17 | +## Findings |
| 18 | + |
| 19 | +### Stale — ACTIONED (1 cluster, 6 files) |
| 20 | + |
| 21 | +**`crates/terraphim_merge_coordinator/`** — every module header referenced |
| 22 | +`.docs/spec-merge-coordinator.md`, a file that has **never existed in git |
| 23 | +history** (absent on `origin/main` too — a dangling pointer since the crate's |
| 24 | +inception, #1805). Headers also called the crate a "minimal skeleton" with |
| 25 | +logic "will be implemented in follow-up commits", but the crate is fully |
| 26 | +implemented (24 tests across 6 modules, real `evaluate_all` / `merge_and_close` |
| 27 | +/ PID-lock / retrying Gitea client). |
| 28 | + |
| 29 | +| File | Old stale fragment | Fix | |
| 30 | +|------|-------------------|-----| |
| 31 | +| `src/lib.rs` | "minimal skeleton … Full spec at .docs/spec-merge-coordinator.md will be implemented in follow-up commits" | Rewritten as accurate library overview | |
| 32 | +| `src/types.rs` | "Mirrors the spec at .docs/spec-merge-coordinator.md. Lib code in follow-up commits will use these types" | Rewritten; "spec" pointer dropped | |
| 33 | +| `src/evaluator.rs` | "Sequential per spec Concurrency-2 … per Failure-1 … per Failure-2" | Behavioural facts retained, dangling tag refs dropped | |
| 34 | +| `src/pid_lock.rs` | "File-based PID lock … (Concurrency-1 per spec)" | Tag dropped; behavioural doc kept | |
| 35 | +| `src/gitea.rs` | "retry/backoff per spec Failure-3 … never logs the token (Security-2)" | Tag dropped; facts kept | |
| 36 | +| `src/main.rs` | "Exit codes per Operational-1" | Rewritten as plain list | |
| 37 | + |
| 38 | +### Not stale — LEFT UNTOUCHED (surgical protocol) |
| 39 | + |
| 40 | +- `crates/terraphim_rlm/src/executor/trait.rs:111` — `Per spec: "Ignore |
| 41 | + external state drift on restore"` is a self-contained inline quote of the |
| 42 | + behaviour, not a file pointer. Accurate. Left as-is. |
| 43 | +- `crates/terraphim_orchestrator/src/pr_dispatch.rs`, `pr_poller.rs`, |
| 44 | + `tests/auto_merge_execution_tests.rs` — reference |
| 45 | + `cto-executive-system/plans/adf-rate-of-change-design.md` §Step N plus real |
| 46 | + Gitea issues (`adf-fleet#32`, `#34`). These are **cross-repo** pointers to a |
| 47 | + separate design repo, not workspace-internal dangling refs. Accurate. Left. |
| 48 | +- `pr-spec-validator` identifiers in `lib_tests.rs` — those are agent / status |
| 49 | + names, not spec annotations. Left. |
| 50 | + |
| 51 | +## Verification |
| 52 | + |
| 53 | +``` |
| 54 | +cargo fmt -p terraphim_merge_coordinator -- --check # clean |
| 55 | +cargo build -p terraphim_merge_coordinator # exit 0 |
| 56 | +cargo clippy -p terraphim_merge_coordinator --tests # exit 0 |
| 57 | +cargo test -p terraphim_merge_coordinator # 24 passed, 0 failed |
| 58 | +RUSTDOCFLAGS="-D warnings" cargo doc -p terraphim_merge_coordinator --no-deps # exit 0 |
| 59 | +``` |
| 60 | + |
| 61 | +No remaining `spec-merge-coordinator` / `minimal skeleton` / `will be |
| 62 | +implemented in follow-up` references in the crate. |
| 63 | + |
| 64 | +## Conclusion |
| 65 | + |
| 66 | +6 stale annotations resolved across 1 crate. Zero regressions. The crate's |
| 67 | +headers now describe actual behaviour rather than a non-existent spec and a |
| 68 | +skeleton state that no longer applies. |
| 69 | + |
| 70 | +Theme-ID: doc-gap |
0 commit comments