docs: converge repository truth after RAG evidence pipeline #20
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #20"
general
weight: 0.35
Xander-Xai
Why
PR #19 introduced the reproducible 649-query RAG evidence pipeline, while several active docs, interview materials, readiness checklists, and drift guards still reflected the previous repository state. This is convergence v3 (baseline
4c97406c638825e5bd50d49cf6c0e2a5a2dc8f1e): audit-first, code→config→docs→interview→guards. Mid-PR review corrected an evidence-direction inversion: formal status is no longer read from Markdown — it is derived from provenance-bearing evidence artifacts (see "Formal evidence state (final architecture)").What changed
Current-truth docs
make rag-eval-import→-preflight→-smoke→rag-eval-649); smoke explicitly non-evidence; formal 649-query metrics NOT_VERIFIED; historical 30-query snapshots framed as historical.make eval-ragdocumented as compatibility alias.eval-ragis now an explicit alias delegating torag-eval-649(single canonical formal command; no second logic path).Design/ops docs
scripts/probe_provider_auth.py); provider prices marked historical estimates; embedding/reranker credential semantics documented per code.secrets/keys.jsonstatus corrected (removed from tracking this round, not "next commit"); local-machine .env statement replaced with repo-policy framing; pointers updated to the 2026 audits.EMBEDDING_API_KEYmay fall back toOPENAI_API_KEY;RERANKER_API_KEYis standalone — no claim that all three keys must exist independently).Interview materials (live docs only; frozen snapshot untouched)
vector_onlyvsbm25_onlyvshybrid_no_rerankvshybrid_rerankablation semantics, Hit@K/Recall@K/Precision@K/NDCG@K/MRR@K distinctions, the three population denominators, GOLD_NOT_INDEXED accounting, provider-401 fail-closed rationale, reranker silent-fallback danger & how to prove reranking works, bad-case taxonomy, provenance/benchmark-sha/git-sha discipline. No current 649-query numbers invented; legacy cache-latency claims softened to design goals; "生产级部署" softened to "部署架构(复核未完成)".docs/reports/resume-description.md— excluded by design (evidence freeze 2026-09-29 banner; historical snapshot preserved as-is).Governance
Formal evidence state (final architecture)
artifacts/evaluation/rag-649//report.jsonartifacts that pass the formal full-run contract; preflight-only / smoke / subset artifacts and doc declarations are rejected structurally.status == VERIFIED_FULLAND all four canonical experiments (vector_only / bm25_only / hybrid_no_rerank / hybrid_rerank) fully executed (metrics + run_summary, n_success == executed, benchmark sha256 bound to the current benchmark,evaluation_populations.primary_view == all_queries).VERIFIED_FULL_NO_RERANK(reranker ablation leg missing) does NOT promote formal VERIFIED — NOT_VERIFIED, fail-closed.SUBSET_SMOKE/PARTIAL/ preflight BLOCKED likewise NOT_VERIFIED.scripts/project_facts.pyno longer hardcodes "expected NOT_VERIFIED until …" —--checkderives the actual state and compares docs against it, so a future formal artifact needs no Python change: generate artifact + re-render docs, and the guard recognizes VERIFIED.rag_formal_artifact_path / timestamp / git_sha / schema_versionare all null (no formal 649 full-run artifact exists yet). Historical artifacts (preflight v1, import manifest) are byte-identical.Drift guards (automation, not manual fixes)
scripts/rag_evidence_status.py(new) — shared, schema-faithful derivation of the formal status from artifacts (validate_formal_rag_reportreturns the validation payload; canonical contract extracted fromscripts/evaluate_rag.py, never a second schema).scripts/audit_doc_consistency.pyv3 — rules: (A/I) test counts framed as current truth; (B/J) canonical RAG eval commands resolvable in Makefile & canonical doc referenced by entry docs; (C+) canonical evidence-pipeline tokens; (D/K) metric claims follow the ARTIFACT-derived status (NOT_VERIFIED → provenance qualifier required; VERIFIED → provenance binding still required, never fully disabled); (E/L) make targets referenced by truth docs must exist; (F/M) tracked+ignored repository hygiene.scripts/project_facts.py— machine-derived evaluation facts (experiments/metric family/Ks/populations/failure taxonomy/schema version) extracted fromscripts/evaluate_rag.pyat runtime; formal status + provenance fields projected from artifacts;--checkguards experiments, populations and make-target presence incurrent-state.mdand compares formal-status claims in BOTH directions. No one-off provider 401 hardcoded anywhere.tests/unit/test_doc_consistency.py: final count 60 passed (artifact-driven governance assertions such astest_no_formal_artifact_is_not_verified,test_preflight_artifact_does_not_verify_metrics,test_smoke_subset_artifact_does_not_verify_metrics,test_valid_formal_artifact_marks_verified,test_verified_full_no_rerank_does_not_promote_formal_metrics,test_doc_cannot_self_promote_to_verified,test_verified_artifact_with_stale_not_verified_doc_fails,test_not_verified_artifact_with_fake_verified_doc_fails,test_metric_check_uses_artifact_state_not_doc_state,test_metric_claim_guard_uses_artifact_state_not_doc_state).Repository hygiene
git rm --cached secrets/keys.json(rotation-ledger metadata only; perdocs/security/public-repository-secret-policy.md, while.gitignorealready ignoressecrets/),tests/data/csai.db-shm,tests/data/csai.db-wal(SQLite runtime sidecars; maincsai.dbalready untracked; no code/test depends on them). Local files kept.CLAUDE.mdstays tracked intentionally (documented in the guard whitelist + audit report).Evidence boundary
report.jsonfrommake rag-eval-649). The committed preflight v1 artifact shows the provider-auth blocker (401) — preserved as-is.Verification
Executed on the PR branch (mid-PR state, HEAD
4f07746518c8f73584438c898755c199d414aebf):| Command | Result |
|---|---|
|
python3 scripts/rag_evidence_status.py| NOT_VERIFIED,rag_formal_artifact_= null ||
python3 scripts/project_facts.py| OK — version 6.3, Qwen/Qwen3-8B, BAAI/bge-large-zh-v1.5, BAAI/bge-reranker-v2-m3, qdrant_only, 53 paths, 9 agents, 649 queries + eval facts (4 experiments / 5 metric names / K∈{1,3,5,8} / 3 populations / 5 taxonomy codes / schema rag-eval-evidence/v2 / formal NOT_VERIFIED) ||
python3 scripts/project_facts.py --check docs/reference/current-state.md| OK (bidirectional formal-status comparison incl. rag-evaluation.md) ||
python3 scripts/audit_doc_consistency.py| OK — 36 active documents (guard rule K uses the artifact-derived state) ||
python3 scripts/generate_openapi.py --check| OK — 53 paths surface matches ||
pytest tests/unit/test_doc_consistency.py -q| 60 passed ||
pytest tests/unit/test_rag_eval_harness.py -q| 30 passed ||
pytest -q -m "not real_llm"| passed (final run); test/collect counts taken from live command output, not hardcoded into docs ||
ruff check <changed py files>| All checks passed ||
npm test| 60 passed (7 files) ||
npm run build| built OK ||
git diff --check| clean ||
git ls-files -ci --exclude-standard| onlyCLAUDE.md(intentional, whitelisted) || CI (final run) | run 36638725103 — test (3.10/3.11/3.12) + security SUCCESS |
Historical files preserved
artifacts/evaluation/rag-649/preflight-20260929T191128Z/report.json(v1 evidence — byte-identical)artifacts/evaluation/rag-649/import_manifest_import-20260929T190455Z.jsondocs/reference/rag-evaluation-report.json(2026-06 30-query snapshot)docs/archive/,docs/reports/milestone/,docs/reports/plans/, old release notessecrets/keys.jsonline — left as recorded, corrected only in Unreleased)docs/reports/resume-description.md(evidence freeze)Final Closeout (2026-10-01)
Final round executed in worktree
/home/dev/projects/csaa-convergence-v3(branch
docs/convergence-v3-20260930); the main checkout was untouched.4c97406c638825e5bd50d49cf6c0e2a5a2dc8f1e(origin/main at PR start)4f07746518c8f73584438c898755c199d414aebf85e249831a3216debdabf9e395a930d61ba86863Additional findings fixed in this round
The P0 items (cache "local/in-process/sub-ms" claims;
response_cache.pyrandom-vector docstring; ops-guide stale script claims; E2E current/historical
ambiguity; unsupported interview numbers) had been prepared as uncommitted
worktree edits — they are now committed and code-verified (implementation
fail-closed path,
scripts/existence,core/config.pyenv surface, drift-detector
NEGATION_PAIRS,core/container.pyLLM key reads).New drift found by re-deriving facts from code:
1. P1 —
production-operations-guide.mdfailover recipe referencednonexistent
DEEPSEEK_API_KEY; runtime always readsOPENAI_API_KEY/OPENAI_BASE_URL/OPENAI_MODEL(core/container.py:240-274),LLM_PROVIDERis a label only. Recipe fixed.2. P1 — same doc claimed
DATABASE_POOL_SIZE/DATABASE_MAX_OVERFLOWenvvars; the pool is hardcoded in
db/database.py(10/20) — and the doc itselfsaid so 500 lines earlier. Fixed to point at code.
3. P2 —
GUNICORN_THREADS/TIMEOUT/KEEPALIVEpresented as env-tunable;only
GUNICORN_WORKERS/GUNICORN_BINDareos.getenv-read, timeout/keepaliveare hardcoded in
gunicorn.conf.py. Fixed.4. P2 — README "40+ 否定/矛盾词对" vs code's exactly 40 (
NEGATION_PAIRS);restated as code-derived count with source link.
5. P2 — README "极致级生产就绪 - 超越99.9%..." reframed production-oriented
with explicit estimate / NOT_VERIFIED qualifiers (Guard R semantics).
New guard: S (env references must resolve)
scripts/audit_doc_consistency.pynow validates that env-shaped tokens inactive docs resolve to a machine-derived config surface (
core/config.pyconstants, env reads in any Python module,
.env.example/.env.test,compose/deploy/workflow env) — with env-usage-context scoping and
negative/historical line tolerance. This mechanizes the exact drift class
found in the ops guide. 5 new regressions in
tests/unit/test_doc_consistency.py(now 78) + real-repo invariant extended.
Files changed in the final round
README.md,cache/response_cache.py,docs/design/architecture-design.md,docs/design/interview-deep-dive.md,docs/design/interview-intro.md,docs/operations/e2e-verification-guide.md,docs/operations/production-operations-guide.md,docs/reference/current-state.md,docs/reference/rag-evaluation.md,docs/reports/audit/2026-09-30-documentation-convergence-v3.md(§15),docs/reports/releases/changelog.md,scripts/audit_doc_consistency.py,tests/unit/test_doc_consistency.py.Final-round verification (live output, no hardcoded counts)
| Command | Result |
|---|---|
|
python3 scripts/rag_evidence_status.py| NOT_VERIFIED, artifact fields null ||
python3 scripts/project_facts.py| OK (6.3 / Qwen3-8B / 53 paths / 9 agents / 649 queries / formal NOT_VERIFIED) ||
python3 scripts/project_facts.py --check docs/reference/current-state.md| OK ||
python3 scripts/audit_doc_consistency.py| OK — 36 active docs incl. Guard S ||
python3 scripts/generate_openapi.py --check| OK — 53 paths ||
pytest tests/unit/test_doc_consistency.py -q+test_rag_eval_harness.py -q| 108 passed (78 + 30) ||
pytest -q -m "not real_llm"| 1867 passed, 5 deselected; 3 pre-existing collection/setup errors intests/integration/test_integration.py(pytest-asyncioFixtureDef.unittestenv incompatibility) — reproduced identically on origin/main, unrelated to this PR ||
ruff check(changed py files) | clean; full-repo baseline 130 pre-existing errors in files untouched by this PR (alerts/notifier.py 26, collaboration/orchestrator.py 14, auth/service.py 14, …) ||
npm test| 60 passed (7 files) ||
npm run build| built OK (524ms) ||
git diff --check| clean ||
git ls-files -ci --exclude-standard| onlyCLAUDE.md(intentional, whitelisted) || CI (final run) | run 36781311836 — tests (3.10/3.11/3.12) + security SUCCESS |
Evidence boundary (unchanged)