Adopt ReqProof: 10 system requirements + Rust dogfood#561
Adopt ReqProof: 10 system requirements + Rust dogfood#561
Conversation
Initialises ReqProof, authors 1 stakeholder + 9 system requirements covering search, LSP daemon, fs traversal, subprocess, parsing, db, concurrency, configuration, and memory safety. Enables Rust code-signal check. First audit captured to .proof/dogfood-first-audit.txt and .proof/dogfood-finding-inventory.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drove proof audit code_signal_obligations_reviewed from 50 findings to 0/0 on probe by authoring 5 covering requirements + 41 obligation suppressions with concrete rationales + 2 ambiguity narrowings. Covering requirements: - SYS-REQ-010 lsp_daemon_concurrency: tokio::spawn task lifecycle - SYS-REQ-011 lsp_daemon_unsafe: SAFETY comments on lsp-daemon unsafe blocks - SYS-REQ-012 symbol_cache_query_safety: parameter binding for libsql/turso reads - SYS-REQ-013 bert_reranker_unsafe: mmap SAFETY invariant + size validation - SYS-REQ-014 bert_reranker_concurrency: std::thread lifetime bounded to caller Suppressions cover intentionally-out-of-contract patterns: best-effort .ok() on telemetry sinks, unreachable! in exhaustive matches, slice indexing on parser-validated input, .to_string_lossy on diagnostic-only paths, local-fs operations that do not cross a network boundary, and TOCTOU-benign cache-invalidation patterns. Documents experience in PROOF_RUST_DOGFOOD_CASE_STUDY.md and DX gaps in .proof/dx-gaps.md (top items: go run -C against sibling project surprises, catalog suggest --from-code silent on single-STK projects, suppression scope widens beyond the visible signal class, function-level implemented_by narrowing silently no-ops, foundational warnings drown dogfooding signal). Final state: code_signal_obligations_reviewed clean (886 signals across 15 artifacts, all resolved). Other audit checks (FRETish, satisfies edges, formalization, build/test wiring, function tracing, documentation) remain pre-existing seed-spec teething issues out of dogfood scope. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR Overview: Adopt ReqProof - Rust Dogfood & Requirements VerificationSummaryThis PR bootstraps ReqProof (a requirements verification framework) on the probe codebase and completes the first "dogfood" run using ReqProof's Rust signal scanner. The PR establishes a formal requirements specification covering 10 system requirements across probe's major components and validates them against static code analysis signals. What ChangedCore Infrastructure
Requirements Specification (10 system + 1 stakeholder)Stakeholder Requirement:
System Requirements (SYS-REQ-001 through SYS-REQ-009):
New Covering Requirements (SYS-REQ-010 through SYS-REQ-014):
Documentation & Artifacts
Architecture & ImpactComponent Coveragegraph TD
A[STK-REQ-001<br/>Probe: Reliable Search] --> B[SYS-REQ-001<br/>search_engine]
A --> C[SYS-REQ-002<br/>lsp_daemon]
A --> D[SYS-REQ-003<br/>fs_traversal]
A --> E[SYS-REQ-004<br/>subprocess_runner]
A --> F[SYS-REQ-005<br/>tree_sitter_parser]
A --> G[SYS-REQ-006<br/>symbol_cache]
A --> H[SYS-REQ-007<br/>concurrent_search]
A --> I[SYS-REQ-008<br/>config_loader]
A --> J[SYS-REQ-009<br/>bert_reranker]
C --> K[SYS-REQ-010<br/>lsp_daemon_concurrency]
C --> L[SYS-REQ-011<br/>lsp_daemon_unsafe]
G --> M[SYS-REQ-012<br/>symbol_cache_query_safety]
J --> N[SYS-REQ-013<br/>bert_reranker_unsafe]
J --> O[SYS-REQ-014<br/>bert_reranker_concurrency]
Signal Classes Detected
Key Technical Insights1. Unsafe Block Discovery:
2. Concurrency Lifecycle:
3. Database Safety:
4. Ambiguous Ownership:
Scope & BoundariesIn Scope
Out of Scope (intentionally)
Scanner Gaps DiscoveredThe dogfood identified limitations in the Rust scanner:
VerificationFinal State: Test Plan:
DX Gaps Reported10 issues documented in
Related Work
Metadata
Powered by Visor from Probelabs Last updated: 2026-05-07T09:05:01.022Z | Triggered by: pr_opened | Commit: cf18ab8 💡 TIP: You can chat with Visor using |
\n\n
Architecture Issues (1)
✅ Performance Check PassedNo performance issues found – changes LGTM. Quality Issues (8)
Powered by Visor from Probelabs Last updated: 2026-05-07T08:57:40.398Z | Triggered by: pr_opened | Commit: cf18ab8 💡 TIP: You can chat with Visor using |
Summary
Bootstraps ReqProof on probe and lands the first Rust-scanner dogfood run.
proof.yamlinitialized;.proof/artifacts (audit cache, dogfood inventory, dx-gaps log) checked in.SYS-REQ-001..SYS-REQ-014, with010/011/012/013/014authored as covers in this PR) plus 1 stakeholder requirement (STK-REQ-001).PROOF_RUST_DOGFOOD_CASE_STUDY.md— full writeup of the run.What it covers
R7a seeded
SYS-REQ-001..SYS-REQ-009mapping the nine major components (CLI, search orchestrator, ranker, BERT reranker, parser cache, path resolver, fs traversal, config, symbol cache).R7b (this PR) adds 5 covers from the dogfood:
SYS-REQ-010lsp_daemon_concurrency— everytokio::spawntask in lsp-daemon has a defined termination path.SYS-REQ-011lsp_daemon_unsafe— everyunsafeblock in lsp-daemon carries a SAFETY comment.SYS-REQ-012symbol_cache_query_safety— symbol-cache reads use parameter binding (libsqlparams!).SYS-REQ-013bert_reranker_unsafe— the memmapunsafeblock inbert_rerankercarries a SAFETY comment naming the file-immutability invariant and validates model-file size before deref.SYS-REQ-014bert_reranker_concurrency—std::thread::spawnlifetimes inbert_rerankerbound to caller; no leaks across drop.Findings closed
50 surface findings → 0 on
code_signal_obligations_reviewed. 886 signals scanned across 15 source artifacts, all resolved.src/main.rs,src/ranking.rs)Bugs surfaced
None real. But the scanner caught that probe has 3 unsafe blocks, not 1 as the eyeball-audited seed spec assumed — two more in
lsp-daemon/src/daemon.rsandlsp-daemon/src/server_manager.rsthat a manual audit would miss. Strongest single argument for the Rust archsignal scanner.Notes
The full audit (all 70 checks) still reports 7 errors / 14 warnings, all in foundational seed-spec checks (variables_declared, FRETish formalization, satisfies edges, build/test command wiring, function-level annotation, doc coverage). Out of scope for this dogfood PR — they are seed-spec teething issues, not Rust-scanner findings. The
code_signal_obligations_reviewedcheck is the green-target and is clean (0/0).DX gaps reported upstream
10 captured in
.proof/dx-gaps.md. Top three:go run -C reqforge ./cmd/proofruns against reqforge's own specs from a sibling cwd (Go's-Cflag changes cwd beforeproof.yamlresolution). Workaround:go buildfirst, then run the binary from project cwd.--implemented_by file:funcsyntax is silently accepted but no-ops because there is no symbol-resolution layer; the audit still treats the whole file as the owner.Test plan
go run -C ../reqforge ./cmd/proof audit --check code_signal_obligations_reviewedreturns 0 errors / 0 warnings on this branch.PROOF_RUST_DOGFOOD_CASE_STUDY.mdend-to-end.Related