← Back to Pull requests

docs: close the documentation drift found by the final truth audit #77

Closed
unknown closed this pull request without merging on Oct 07, 2026 14:07 UTC
View on GitHub
unknown unknown commented on Oct 07, 2026 12:22 UTC
Author

Documentation and comments only. No architecture, config, evidence level or capability changed, and no boundary was weakened to make a claim fit.

P0 — architecture contradiction

docs/README.md and docs/deployment-guide-k8s.md both described deploy/k8s/ as "API gateway only", while the manifest runs the repository Dockerfile whose entrypoint is python app.py. The K8s guide contradicted itself six sections later, where it correctly states the entrypoint is the monolith. Both now say one workload — the FastAPI monolith — and name api-gateway/ as the component the manifest does not deploy.

Taxonomy

SYNTHETIC DEMO was used beside the six evidence levels in five documents while being defined in none — precisely what docs/evidence-map.md rule 6 forbids. It is now registered in the existing "Run outcomes that are not evidence levels" table as fixture provenance, with a rule that it sits beside the evidence column and can never satisfy an upgrade path. It remains a literal UI marker the demo capture script requires, which is what it actually is.

Microservice inventory

Every document listing the retained service components named four; cache-service/ and rewrite-service/ are also tracked and carry code. All seven lists now name six. docs/final-canonical-runtime-audit.md additionally asserted exhaustiveness, which is what made the omission a claim rather than an abbreviation.

Audit action inventory

common/audit.py's KNOWN_ACTIONS registers nine actions. The truth audit listed nine; the PRD listed five and the runbook seven, both omitting knowledge.source.trust_decision and knowledge.source.quarantine. Both now list all nine and point at the constant as canonical.

Dead references

| Where | Defect |
|---|---|
| monitoring/prometheus/alerts.yml ×4 | runbook: annotations pointed at #high-error-rate / #high-latency; headings are ## HighErrorRate / ## HighLatency, so all four silently resolved to the top of the file |
| docs/final-canonical-runtime-audit.md ×11 | stale file:line citations — blank lines, table headers, unrelated sections — after #70–#75 renamed files |
| CHANGELOG.md 2.2.0 | announces POST /api/query/upload; that route does not exist (nine routes, none upload; no frontend call) |
| reports/benchmark/README.md | documented a benchmark. / latency_ms. schema with no producer; locustfile.py writes the seven-file artifact to artifacts/performance/<run-id>/ |
| docs/README.md | claimed every docs/.md is indexed or archived; docs/demo/ is neither |
| ruff.toml | excluded docs/superpowers/
, removed in #33 |

The stale file:line citations are replaced with file + section, and the document now states why: a line-number citation in an audit goes stale on the next unrelated edit, and a stale citation invites re-verifying the wrong line. docs/repository-drift-report.md keeps its line references on purpose — it is a point-in-time audit whose rows record where a defect was.

CHANGELOG.md is annotated HISTORICAL rather than deleted: retiring an artifact records it, it does not erase it.

Comment accuracy

  • deploy/prometheus.yml opened by saying it scrapes monitoring-service; its primary job is the canonical monolith's /api/metrics, and the rag-monitoring-service job emits none of the six alert metrics.

  • models/adapter_manager.py documented Qwen/Qwen2.5-14B; the canonical topology is Qwen3.

  • run_services.py hardcodes cross-encoder-ms-marco-MiniLM-L-6 while config.json names different cross-encoders. Left as-is — it is the legacy service path, not the canonical reranker — but the comment now says so instead of implying it is config-driven.
  • Vocabulary

    Removed the last interview wording from tracked files: two references in the truth audit's lineage and link text, plus a comment in check_repo_consistency.py describing a README section that no longer exists. No recruiter, hiring, résumé, career or interview wording remains in any tracked file.

    Verification

  • 0 broken links, 0 broken anchors across 208 local references in 32 markdown files

  • scripts/check_repo_consistency.py passes

  • ruff check . + ruff format --check . clean

  • 675 tests pass across tests/test_check_repo_consistency.py, tests/monitoring/, tests/test_runtime_api_metadata.py
  • README.md also carries the microservice-inventory correction here so the fact lands atomically with the other six documents; a separate follow-up PR finalizes the rest of the README.

    🤖 Generated with opencode

    Diff: 578 lines (+433 / -145) across 7 files Reviewer: Xander-Xai Review duration: 105m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 578 lines diff across 7 files
    0.50
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.381
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #77"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 49.8% (MEDIUM) · Higher = larger blast radius
    49.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 19.7% · Safe to merge
    19.7%