fix: audit remediation Wave 1 — correctness fixes C-1, C-4, C-11 (+ doc fixes) #12
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/audit-wave-1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Wave 1 of audit remediation
Targets the correctness findings that need no data migration — the identity
normalization (C-7) and its re-ingest are Wave 2. This branch is stacked on
audit/loop-1, so the PR diff is exactly the four fix commits below.Fixes
fix(wiki)—compile_allpublished zero-citation pages(incl. the LLM-outage empty-page case) because the quarantine gate was guarded
by
total_claims > 0. Now quarantines them and does not freeze them as"compiled" in the compile-state. Regression test reproduces the bypass.
fix(synthesis)— every stage numbered leads fromL-0001,so connection / gap / improvement leads collided in
grounded/and silentlyoverwrote one another (4 distinct leads → 2 files). Ids are now kind-prefixed
(
L-C-/L-G-/L-I-/L-X-). Regression tests added.fix(discover)—discover.pycompared the raw OpenAlexcited_idagainstpapers.id, mis-reporting ingested papers as discoveryleads. The cited_id→paper resolution is now a single shared
RESOLVED_CITATIONS_SQLused by bothgraph.pyanddiscover.py, so therule cannot drift again. Live-DB validated: 13 → 0 ingested papers leaking
into
discovery_leads.docs— corrected the cite-boost formula docstring and thewrite_leads/_update_index"append-only" contradiction.Verification
ruff+mypyclean.Findings reference:
docs/audit/AUDIT-2026-06-15-full-repo.md(onaudit/loop-1).🤖 Generated with Claude Code