← Back to Pull requests

docs: reconcile repository metadata truth (#58) #62

Closed
unknown closed this pull request without merging on Oct 06, 2026 23:33 UTC
View on GitHub
unknown unknown commented on Oct 06, 2026 02:37 UTC
Author

Closes #58.

What the live metadata actually is

Re-read from the GitHub API on 2026-10-06 (Xander-Xai/Beauty-Industry-RAG-QA-System):

| Field | Live value | Changed by this PR? |
|---|---|---|
| description | 277 chars — "Multimodal RAG QA for cosmetics regulation: hybrid retrieval, two-stage reranking, evidence gating that refuses unsupported answers, uint32 RBAC, evaluation and observability. FastAPI + Qdrant/Elasticsearch/Redis; evidence levels separate implemented from production-validated." | No |
| homepage | "" (empty) | No |
| topics | 20: rag, retrieval-augmented-generation, llm, multimodal-rag, hybrid-search, reranking, evidence-gating, rbac, fastapi, qdrant, elasticsearch, redis, llm-evaluation, llmops, observability, docker, kubernetes, python, cosmetics, regulatory-compliance | No |

The drift was one-directional: GitHub had already been changed and the document still described the old state. docs/repository-metadata.md recorded a 239/241-character description ending ...graded by evidence level., and a topic list containing bm25, hallucination-detection and vector-search while omitting python, cosmetics and regulatory-compliance. Neither matched the live repository. This PR moves the document onto the live values.

Why keep the live values unchanged

Per the issue's decision principle, live metadata is preserved unless there is a factual error, an unverified runtime capability, a conflict with the README's canonical positioning, or a discoverability loss. Checked against the current tree, none applies:

  • No factual error. Every element of the description maps to something checkable — uint32 RBAC is common/auth.py's _MAX_UINT32 = 0xFFFFFFFF contract; hybrid retrieval, two-stage reranking and evidence gating are retrieval/parallel_recall.py, retrieval/bi_encoder.py + cross_encoder_ensemble.py, and retrieval/evidence_gate.py; evaluation and observability are the RAGAS/benchmark harness and the metrics/alerts paths, all REPO_VERIFIED.

  • No unverified runtime capability. The description contains no Qwen/vLLM/GPU topology, no QPS/P95/P99/accuracy/Recall figure and no "production validated" / "production ready" claim. The one hyphenated phrase, separate implemented from production-validated, is a boundary statement (who is separated from whom), not a validation claim — and it was verified not to trip the existing guard.

  • No conflict with the README first fold. The H1 summary and the metadata packet describe the same thing: multimodal RAG QA over cosmetics regulation knowledge, answers that refuse on insufficient evidence, role/department isolation.

  • No discoverability loss. All 20 slots are in use and 2 of them are the domain words (cosmetics, regulatory-compliance) that distinguish this repository from any other RAG project. Removing a live topic to "make a change" would have been the drift, not the fix.
  • Explicitly not changed and not added: open-telemetry (OTLP closed loop is PENDING), qwen/vllm/bge/clip (model-name-as-runtime-evidence), enterprise- (marketing).

    The 26 → 31 fact and its source

    Source: tests/deploy/test_k8s_manifests.py. It defines 31 module-level test_ functions, and pytest tests/deploy/ --collect-only -q independently reports 31 tests collected. The AST derivation in the new guard is asserted equal to the collected count, so the two cannot silently diverge.

    26 was stale in four current documents — README.md, docs/deployment-guide-k8s.md, docs/interview-walkthrough.md, docs/repository-metadata.md — while docs/deployment-guide-k8s.md:15 and docs/repository-truth-audit.md:184 already said 31. Two correct numbers sitting beside four wrong ones is precisely the drift class this repository's guard exists to catch, so restating a count in prose is no longer enough:

  • check_k8s_static_check_counts in scripts/check_repo_consistency.py derives the count from the test module via ast and rejects any stated count in any canonical document that disagrees — offline, no pytest invocation, no clock, no GitHub API.

  • It is line-scoped on 静态检查 / static checks so ordinary Chinese prose (再加一项检查时) and unrelated figures (0440, golang:1.24-alpine3.22, fsGroup 1000) are not misread as counts.

  • An unreadable shape is reported as cannot verify, never skipped, and the numeric token is captured whole so -26 can never be read as 26.

  • 11 new regression tests in tests/test_check_repo_consistency.py, including the derivation-vs-collection check, accepted/rejected phrasings, false-positive lines, missing-module and empty-module behaviour, and an end-to-end wiring assertion that main() actually calls the guard.
  • Mutation check: deleting test_committed_secret_is_named_as_an_example makes the guard fail on all six documents (states 31 ... but ... defines 30) and makes test_current_documents_state_the_static_check_count_the_module_defines fail. The test file was restored afterwards and carries no diff.

    Why homepage is still empty

    homepage is "" and stays "". There is no public deployment, no demo site and no demo video. The candidates were all rejected before: an online demo does not exist; frontend/ has no Pages build and no publishable artifact, and without a real backend it would be a dead shell; localhost addresses mean nothing to an external reader and leak deployment shape; the README screenshot is a synthetic-data capture, so using it as a homepage would present SYNTHETIC DEMO as a product; an off-repository doc site would break this repository's single-source-of-truth discipline. The three conditions that would permit setting it are unchanged. The empty value is now recorded as a decision, not as a field nobody filled in.

    One further correction

    The packet claimed scripts/check_repo_consistency.py does not cover this file. That was false: CANONICAL_DOCS includes docs/*.md, so the packet has always been in scope (link/anchor, path, Python-entrypoint, stale-governance, retired-topology, evidence-vocabulary and count guards). What the guard genuinely cannot do is read live GitHub values. The document now states that precise boundary instead of describing a gap that does not exist, and the checklist now separates which rows are machine-checked from which are manual read-backs.

    No evidence promotion

    No capability, architecture, evidence level, benchmark framework or result, runtime behaviour, config value or release version changed. No new external validation artifact was produced. config.json → system.version stays 2.3.0. The Kubernetes row stays REPO_VERIFIED (manifests + static checks) / PENDING (real cluster). The README was touched in exactly one place — a stale integer — and was not rewritten.

    Verification

    python3 scripts/check_repo_consistency.py          # passed
    pytest tests/test_check_repo_consistency.py        # 552 passed
    pytest tests/deploy/test_k8s_manifests.py          # 31 passed
    pytest tests/                                       # 2372 passed, 16 skipped
    ruff check .                                        # All checks passed
    ruff format --check .                               # 287 files already formatted
    git diff --check                                    # clean
    

    Live-vs-document read-back, character for character:

    description matches live : True   (277 chars)
    topics match live (set)  : True   (20 topics, missing/extra: none)
    homepage empty           : True
    description banned words : none
    topics banned topics     : none
    

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: Xander-Xai Review duration: 1256m
    All Vouch review confidence checks passed
    Residual risk 0.25 = Change Risk (0.57) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.57 · 650 lines diff across 8 files
    0.57
    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%
    56%
    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.388
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #62"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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: 57% (MEDIUM) · Higher = larger blast radius
    57%
    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: 56.8% · Lower = rushed or shallow review
    56.8%
    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: 24.7% · Safe to merge
    24.7%