← Back to Pull requests

docs: converge runtime, config and documentation truth #18

Closed
unknown closed this pull request without merging on Sep 29, 2026 18:43 UTC
View on GitHub
unknown unknown commented on Sep 29, 2026 17:04 UTC
Author

Why

Repeated runtime changes caused configuration, runbooks, generated API docs,
RAG evaluation docs, interview material and historical snapshots to diverge.
The previous 2026-09-29 alignment report itself became a stale "current truth"
while contradicting the repo state it described. This PR reconciles code/config
truth with documentation and installs automated guards so future drift is
detected instead of accumulating.

What changed

  • reconciled canonical runtime/config documentation

  • - new current-facts entry point: docs/reference/current-state.md (dynamic, never hardcodes HEAD)
    - README/CLAUDE.md: removed hardcoded audited-HEAD block; command-based verification; per-file test tables replaced by directory+command tables
  • aligned deployment model defaults

  • - docker-compose.yml OPENAI_MODEL default now matches core/config.py (Qwen/Qwen3-8B); LLM_ROUTER_TIMEOUT template made overridable with runtime-fallback note
    - .env.example distinguishes runtime fallback vs deployment-recommended values
    - LLM provider runbook rewritten against current runtime (/api/health, auth probe, evidence runner; provider SLA/latency/price downgraded to NOT_VERIFIED)
  • regenerated OpenAPI

  • - docs/openapi.json via new scripts/generate_openapi.py (+ --check drift mode, make openapi-check)
    - api-reference corrected to 53 HTTP paths / 55 operations (49 /api/* ops)
  • fixed RAG benchmark/evaluation documentation

  • - dataset count derives from tests/eval/rag_benchmark.json metadata (649; metadata==len(queries) enforced)
    - historical 30-query metrics labelled dated snapshots; stale rag/knowledge_base.py line links re-pointed to current modules
  • separated current facts from historical snapshots

  • - ADR-003 → Superseded by ADR-007; ADR-004 → Partially Superseded by ADR-008 (bodies untouched)
    - dated plans / v5.3.1 checklists / root audit files banner-marked HISTORICAL AUDIT SNAPSHOT
    - model-comparison split into Current implementation vs historical estimates
  • strengthened documentation drift guard

  • - scripts/audit_doc_consistency.py discovery-based checks A–H (links, file refs, env coverage, canonical config, OpenAPI drift, benchmark metadata, stale terms/counts)
  • added regression tests (tests/unit/test_doc_consistency.py, 22 cases)

  • added scripts/project_facts.py + make facts / audit-docs / openapi-check
  • Verification

  • documentation audit: python3 scripts/audit_doc_consistency.py → OK (36 active docs), exit 0

  • OpenAPI: python3 scripts/generate_openapi.py --check → OK (53 paths == app.openapi())

  • pytest collection: 1789 tests collected

  • pytest: 1784 passed, 5 skipped (5 = real_llm markers needing API key)

  • frontend tests: npm test → 60 passed (7 files)

  • frontend build: npm run build → PASS

  • Ruff (task files): PASS. Full-repo ruff check .: 131 pre-existing baseline findings (TASK_INTRODUCED = 0). npm run lint (biome) fails on pre-existing theme-a11y.css !important baseline — unchanged on base.

  • compileall: PASS
  • Evidence boundary

  • production provider latency: NOT_MEASURED

  • provider billing/token reduction: NOT_VERIFIED (local benchmark snapshots only, dated 2026-06)

  • production SLA: NOT_VERIFIED

  • FCR/human efficiency: NOT_MEASURED / NOT_VERIFIED (resume claims downgraded accordingly)
  • Unverified items remain explicitly NOT_VERIFIED / NOT_MEASURED.

    Not changed

  • no production credentials

  • no main branch mutation

  • no invented release version (runtime stays 6.3; changelog stays Unreleased)

  • no historical evidence rewritten as current evidence (bodies of historical reports/ADRs preserved)

  • no benchmark gold data modified (tests/eval/rag_benchmark.json untouched)
  • Diff: 464 lines (+348 / -116) across 5 files Reviewer: Xander-Xai Review duration: 98m
    All Vouch review confidence checks passed
    Residual risk 0.29 = Change Risk (0.74) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.74 · 464 lines diff across 5 files
    0.74
    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.367
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.074
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #18"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    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: 73.8% (HIGH) · Higher = larger blast radius
    73.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: 29.1% · Safe to merge
    29.1%