Skip to content

Commit 75f806f

Browse files
committed
docs: reconcile tracker truth and bootstrap coverage gate
1 parent e64dee4 commit 75f806f

30 files changed

Lines changed: 577 additions & 121 deletions
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: rlm-core coverage
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "rlm-core/**"
7+
- "rlm-core-derive/**"
8+
- "scripts/run_coverage.sh"
9+
- "Makefile"
10+
- ".github/workflows/rlm-core-coverage.yml"
11+
push:
12+
branches:
13+
- main
14+
paths:
15+
- "rlm-core/**"
16+
- "rlm-core-derive/**"
17+
- "scripts/run_coverage.sh"
18+
- "Makefile"
19+
- ".github/workflows/rlm-core-coverage.yml"
20+
21+
jobs:
22+
coverage:
23+
name: Coverage Gate
24+
runs-on: ubuntu-latest
25+
timeout-minutes: 45
26+
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
31+
- name: Install Rust toolchain
32+
uses: dtolnay/rust-toolchain@stable
33+
34+
- name: Install cargo-llvm-cov
35+
uses: taiki-e/install-action@cargo-llvm-cov
36+
37+
- name: Run coverage gate
38+
env:
39+
COVERAGE_MIN_LINES: "80"
40+
run: make coverage
41+
42+
- name: Upload coverage artifacts
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: rlm-core-coverage
46+
path: coverage/
47+
if-no-files-found: error

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
SHELL := /bin/bash
22

3-
.PHONY: check lint typecheck test review verify
3+
.PHONY: check lint typecheck test coverage review verify
44

55
check: typecheck test
66

@@ -13,6 +13,9 @@ typecheck:
1313
test:
1414
cd rlm-core && cargo test --quiet
1515

16+
coverage:
17+
./scripts/run_coverage.sh
18+
1619
review: typecheck
1720

1821
verify: check

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ rlm-core powers these projects:
162162
- [Documentation Portal](docs/README.md) - Role-based index and workflow-oriented navigation.
163163
- [User Guide](docs/user-guide/README.md) - New user to power-user guidance.
164164
- [Developer Guide](docs/developer-guide/README.md) - Setup, gates, and contribution workflow.
165+
- [API Docs Status](docs/developer-guide/api-docs-status.md) - What "documented" currently means, without fiction.
165166
- [Internals](docs/internals/README.md) - Architecture, OODA flow, and module map.
166167
- [Troubleshooting](docs/troubleshooting/README.md) - Incident triage and diagnostics checklists.
167168

docs/developer-guide/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This guide is for contributors changing code in Loop itself.
77
1. [Setup](./setup.md)
88
2. [Quality Gates](./quality-gates.md)
99
3. [Contribution Workflow](./contribution-workflow.md)
10+
4. [API Docs Status](./api-docs-status.md)
1011

1112
## Development Contract
1213

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# API Documentation Status
2+
3+
This page is the source of truth for what "documented" means in this repository.
4+
5+
## Current State (2026-02-20)
6+
7+
- Module-level docs: complete baseline.
8+
- Workflow/docs/navigation guides: complete baseline.
9+
- Item-level rustdoc coverage for every public symbol: partial and incremental.
10+
11+
That means the project is navigable and operable, but not every exported method has bespoke prose yet.
12+
No hand-waving, no cosplay as "finished."
13+
14+
## Enforcement Contract
15+
16+
Use these commands for docs quality checks:
17+
18+
```bash
19+
cd /Users/rand/src/loop/rlm-core
20+
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps
21+
```
22+
23+
Interpretation:
24+
- Build succeeds: no rustdoc warnings.
25+
- Build fails: fix docs or signatures before merge.
26+
27+
## Policy
28+
29+
1. Never claim "all public APIs documented" unless item-level rustdoc coverage is actually complete.
30+
2. Module-level docs are mandatory.
31+
3. Item-level docs are required for newly introduced public API in the same change set.
32+
4. Legacy public API doc depth is improved incrementally, prioritized by high-use surfaces.
33+
34+
## Practical Rule of Thumb
35+
36+
- If users copy/paste from it: document it now.
37+
- If only a debugger should ever see it: document it soon.
38+
- If nobody can explain it without opening three files: document it yesterday.

docs/developer-guide/quality-gates.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Quality Gates
22

3-
Loop uses layered quality gates: local correctness, policy enforcement, and release-grade verification.
3+
Loop uses layered quality gates: local correctness, coverage proof, policy enforcement, and release-grade verification.
44

55
## Gate Layers
66

@@ -14,7 +14,22 @@ Runs:
1414
- Type checks
1515
- Tests
1616

17-
### Layer 2: Governance review
17+
### Layer 2: Coverage proof (CI-backed, locally runnable when tooling is available)
18+
19+
```bash
20+
make coverage
21+
```
22+
23+
Runs:
24+
- `scripts/run_coverage.sh`
25+
- `cargo llvm-cov` line-coverage gate (`COVERAGE_MIN_LINES`, default `80`)
26+
- Artifact output: `coverage/lcov.info`, `coverage/summary.txt`
27+
28+
Notes:
29+
- If `cargo-llvm-cov` is missing locally, the script exits with actionable install guidance.
30+
- GitHub Actions workflow `rlm-core-coverage.yml` is the canonical enforcement path.
31+
32+
### Layer 3: Governance review
1833

1934
```bash
2035
./scripts/dp review --json
@@ -25,7 +40,7 @@ Purpose:
2540
- Consistent, machine-readable status
2641
- Standardized workflow enforcement
2742

28-
### Layer 3: Enforcement gates
43+
### Layer 4: Enforcement gates
2944

3045
```bash
3146
./scripts/dp enforce pre-commit --policy dp-policy.json --json
@@ -55,7 +70,8 @@ No partial-pass narratives.
5570

5671
1. During iteration: targeted tests.
5772
2. Before commit: `make check`.
58-
3. Before push: full `dp` enforcement chain.
73+
3. Before push: `make coverage` (or verify CI coverage gate pass when local tool install is blocked).
74+
4. Before push: full `dp` enforcement chain.
5975

6076
## Evidence Logging
6177

docs/execution-plan/DECISIONS.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,47 @@ Use this file for architecture and contract decisions that affect more than one
264264
- Preserves reproducibility by requiring clean-clone claim runs despite canonical local working-tree churn.
265265
- Impacted tasks/gates: loop-5va, Ops-Weekly, VG-LA-001, VG-LA-002, VG-CONTRACT-001.
266266

267+
## D-019 Coverage Proof Uses Reproducible `llvm-cov` Gate With CI Canonical Evidence
268+
269+
- Status: Accepted
270+
- Date: 2026-02-20
271+
- Context: Historical coverage closure claims were not backed by a reproducible, enforced coverage gate in this repository.
272+
- Decision:
273+
- Adopt `scripts/run_coverage.sh` + `make coverage` as the canonical coverage execution path.
274+
- Add CI workflow `.github/workflows/rlm-core-coverage.yml` as the canonical enforcement/evidence path.
275+
- Set line-coverage threshold policy to `>= 80%` (`COVERAGE_MIN_LINES`, default `80`).
276+
- Consequences:
277+
- Coverage evidence becomes repeatable and reviewable with concrete artifacts (`coverage/lcov.info`, `coverage/summary.txt`).
278+
- Local environments without `cargo-llvm-cov` can still proceed with explicit blocked evidence while CI remains authoritative.
279+
- Impacted tasks/gates: loop-k7d, VG-COVERAGE-001.
280+
281+
## D-020 `rlm-claude-code` Migration Scope Is Component Delegation Until Binding Surface Expands
282+
283+
- Status: Accepted
284+
- Date: 2026-02-20
285+
- Context: Early migration specs model full Python replacement, but Python bindings still do not expose orchestration/repl surfaces (`Orchestrator`, `ClaudeCodeAdapter`, `ReplPool`/`ReplHandle`).
286+
- Decision:
287+
- Treat component-level delegation as the supported migration end state for current scope.
288+
- Mark full replacement language in migration docs as archival target-state planning, not active backlog.
289+
- Consequences:
290+
- Removes ambiguity between executed migration reality and aspirational architecture.
291+
- Prevents false "partial implementation" interpretation for intentionally out-of-scope binding gaps.
292+
- Impacted tasks/gates: loop-cyl, loop-k7d, VG-CONTRACT-001, documentation reconciliation gates.
293+
294+
## D-021 API Documentation Claims Must Distinguish Module-Level Baseline vs Item-Level Depth
295+
296+
- Status: Accepted
297+
- Date: 2026-02-20
298+
- Context: Prior closure text implied complete public API docs while item-level rustdoc remained partial.
299+
- Decision:
300+
- Treat module-level docs as mandatory baseline.
301+
- Require item-level docs for newly introduced public API in the same change set.
302+
- Report legacy item-level rustdoc depth as incremental progress, not "fully complete."
303+
- Consequences:
304+
- Eliminates over-claims in project status reporting.
305+
- Preserves merge discipline for new API surfaces without blocking on historical backlog in a single tranche.
306+
- Impacted tasks/gates: loop-4w9 (historical interpretation), loop-k7d, docs/developer-guide/api-docs-status.md, doc review gates.
307+
267308
## Update Rule
268309

269310
When adding a new decision:

docs/execution-plan/LANE-MAP.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ This map defines lane ownership and safe-mode activation rules.
66

77
Default on this machine:
88

9-
- Lane A: active execution lane for M7 runtime closure (heavy work allowed via wrapper)
10-
- Lane B: read-only by default (docs/governance lane)
11-
- Lane C: cadence + consumer lane (heavy work only when Lane A is idle)
9+
- Lane A: complete M7 runtime closure lane (historical)
10+
- Lane B: complete M7 docs/governance lane (historical)
11+
- Lane C: cadence + consumer operations lane (active steady-state)
1212

13-
Lane A is the default heavy lane for M7; Lane B and Lane C may run heavy commands only when orchestrator explicitly marks them active in `WORKBOARD.md`.
13+
Heavy commands run in Lane C steady-state cadence windows; any new implementation tranche requires explicit activation in `WORKBOARD.md`.
1414

15-
## Lane A - M7 Core Runtime Closure (Active)
15+
## Lane A - M7 Core Runtime Closure (Complete)
1616

1717
Scope:
1818

@@ -37,7 +37,7 @@ Primary file areas:
3737
- `/Users/rand/src/loop/docs/spec/`
3838
- `/Users/rand/src/loop/docs/execution-plan/`
3939

40-
## Lane B - M7 Docs/Governance Reconciliation (Standby)
40+
## Lane B - M7 Docs/Governance Reconciliation (Complete)
4141

4242
Scope:
4343

@@ -59,18 +59,17 @@ Start condition:
5959
- Lane A has completed implementation-heavy tasks or is blocked.
6060
- Orchestrator marks Lane B active in `WORKBOARD.md`.
6161

62-
## Lane C - Consumer Cadence and Interop Follow-up (Conditional)
62+
## Lane C - Consumer Cadence and Interop Follow-up (Steady-State)
6363

6464
Scope:
6565

6666
- Ongoing Ops-Weekly compatibility cadence
67-
- `M7-T09` io-rflx adapter fixture + calibration task
6867

6968
Task order:
7069

7170
1. Ops-Weekly cadence runs (steady-state)
72-
2. `M7-T09` once `M7-T08` is done
73-
3. Resume cadence ownership after M7 closure
71+
2. Open and claim a new scoped issue when cadence discovers regressions/new scope
72+
3. Execute fix + evidence loop, then return to cadence ownership
7473

7574
Primary file areas:
7675

docs/execution-plan/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ Last reconciled: 2026-02-20 (live state source: `docs/execution-plan/STATUS.md`
1515
- Small-batch: execute one task card at a time, not one milestone at a time.
1616
- Reproducibility: every gate has a deterministic command and pass criteria.
1717

18-
## Current Reality (Historical Snapshot: 2026-02-19 Post-M6 + M7 Planning)
18+
## Current Reality (Live Snapshot: 2026-02-20 Reconciliation)
1919

2020
Use `docs/execution-plan/STATUS.md` for live status before acting on any item below.
2121

22-
- M0-M6 remediation/governance milestones are complete with evidence.
23-
- SPEC-20..27 still contain implementation gaps or partial integrations requiring runtime closure.
24-
- Open gap IDs from traceability artifact: `G-001` (`LLM_BATCH` end-to-end runtime integration) and `G-002` (orchestrator fallback wiring).
25-
- `loop-agent` and `io-rflx` remain active integration targets; compatibility claims must follow D-017 clean-clone committed-tuple policy.
22+
- M0-M7 remediation/governance milestones are complete with evidence.
23+
- Historical M7 gaps (`G-001`, `G-002`) are closed by `M7-T01` and `M7-T02`.
24+
- Post-M7 critical refinement backlog (`loop-azq` + `loop-azq.1..9`) is implemented and closed.
25+
- No open implementation backlog currently exists in Beads (`open=0`, `in_progress=0`, `blocked=0`).
26+
- `loop-agent` and `io-rflx` remain active integration targets; claim-grade compatibility evidence follows D-017 clean-clone committed-tuple policy.
2627
- Safe mode remains mandatory due prior OOM history; heavy command concurrency stays at 1.
27-
- M7 is complete; post-M7 critical refinements are tracked in `loop-azq` and child tasks.
2828

2929
## File Map
3030

docs/execution-plan/STATUS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Last updated: 2026-02-20
3838
| F10 | No executable performance gate harness for REPL startup/batch throughput | Resolved by M5-T01 (`run_m5_perf_harness.sh` + VG-PERF artifacts) | M5 |
3939
| F11 | Efficacy scenario suite lacked explicit mixed batch and fallback-non-submit coverage | Resolved by M5-T02 scenario matrix + targeted tests (`45 passed`) | M5 |
4040
| F12 | No baseline-vs-candidate performance/efficacy rollup report | Resolved by M5-T03 comparative analysis report with regression check | M5 |
41-
| F13 | Residual implementation gaps remained across SPEC-20..27 after M0-M6 closure | M7 task cards (`M7-T01`..`M7-T10`) are complete; post-M7 up-next critical refinements are explicitly tracked in `loop-azq` with reconciled spec metadata | M7/post-M7 |
41+
| F13 | Residual implementation gaps remained across SPEC-20..27 after M0-M6 closure | Resolved: M7 task cards (`M7-T01`..`M7-T10`) and post-M7 refinement backlog (`loop-azq` + children) are complete and closed | M7/post-M7 |
4242

4343
## Active Blockers
4444

@@ -99,12 +99,13 @@ Last updated: 2026-02-20
9999
| R46 | Closed M7-T08 by enforcing SPEC-25 root prompt submit semantics, aligning helper-surface guidance with runtime helpers, and passing context/REPL/doc gates | `evidence/2026-02-20/milestone-M7/M7-T08-validation-summary.md` |
100100
| R47 | Closed M7-T09 by delivering `io_rflx_interop.v0` fixture/calibration artifacts, executable RFLX fixture gate coverage, and refreshed RFLX/contract/perf evidence | `evidence/2026-02-20/milestone-M7/M7-T09-validation-summary.md` |
101101
| R48 | Closed M7-T10 by reconciling SPEC-20..27 status/governance metadata, refreshing consumer claim evidence, and assigning post-M7 up-next critical gaps to `loop-azq` | `evidence/2026-02-20/milestone-M7/M7-T10-validation-summary.md` |
102+
| R49 | Closed post-M7 reconciliation drift by aligning execution-plan tracker docs with live Beads state (`loop-azq` closed, no active implementation backlog) | `loop-k7d` + updated tracker docs |
102103

103104
## Top Priority Queue (Next 9 Tasks)
104105

105106
| Priority | Task ID | Description |
106107
|---|---|---|
107-
| P0 | loop-azq | Decompose and execute up-next critical post-M7 spec refinements backlog |
108+
| P0 | None (no open implementation backlog) | Create and claim a new issue from cadence findings or newly approved scope before editing |
108109

109110
## Consumer Readiness Snapshot
110111

0 commit comments

Comments
 (0)