Skip to content

Stabilize preserved extraction audit identities - #684

Merged
nicho1ab merged 1 commit into
mainfrom
issue-475-extraction-audit-idempotence-correction
Aug 10, 2026
Merged

nicho1ab merged 1 commit into
mainfrom
issue-475-extraction-audit-idempotence-correction

Conversation

@nicho1ab

Copy link
Copy Markdown
Owner

Pull Request Evidence

Governing issue and intended outcome

Implementation scope

  • Major files or components changed: preserved-artifact extraction-audit identity reconciliation, focused production-shaped regression coverage, and hosted-backfill developer documentation.
  • Important behavior intentionally left unchanged or out of scope: schemas, migrations, connectors, allegation/event identity behavior, importer semantics, global provenance behavior, reviewer-created state, deployment, production execution, and Issue Fix preserved-artifact backfill failures for 27 facilities #476.
  • Reviewer UI regression contracts: RT-RC-004 and RT-RC-006 remain protected invariants; no reviewer-facing presentation or interaction changed.

Acceptance-criteria evidence

Acceptance criterion Evidence and result
Production-shaped reproduction PASS - pre-fix two-document regression produced 66 differences from shared historical extraction-audit identities.
Equivalent replay audit identity PASS - corrected replay produces zero diagnostic differences and unchanged audit stable-ID/source-record-key sets.
Immediate idempotence PASS - dry run, apply, immediate replay, equivalent-operation replay, and second apply all report updated=0 and unchanged=1 for equivalent inputs.
Genuine audit changes PASS - changed final audit evidence reports updated=1; a genuinely new audit receives one collision-free identity; removed final audit evidence reports updated=1.
Retained #679-#683 behavior PASS - four prior preserved-artifact regressions pass.
Protected state PASS - source relationships, raw hashes, import scope, reviewer-created state, and audit history remain unchanged.
Production acceptance Pending - human deployment must rerun the authoritative 312 diagnostic and final zero-update lifecycle before #475 closes.

Validation and failure classification

Exact command Result Failure classification, if applicable
C:\Repos\CCLD-complaints-poc\.venv\Scripts\python.exe -m pytest tests/unit/test_hosted_ccld_backfill.py::test_preserved_artifact_reuses_shared_historical_audit_identities -q Expected pre-fix FAIL - 66 diagnostic differences implementation-caused behavior reproduced before correction
C:\Repos\CCLD-complaints-poc\.venv\Scripts\python.exe -m pytest tests/unit/test_hosted_ccld_backfill.py::test_preserved_artifact_reuses_shared_historical_audit_identities -q PASS - 1 passed in 3.77s none
C:\Repos\CCLD-complaints-poc\.venv\Scripts\python.exe -m pytest tests/unit/test_hosted_ccld_backfill.py::test_preserved_artifact_repeat_is_unchanged_with_duplicate_complaint_projections tests/unit/test_hosted_ccld_backfill.py::test_preserved_artifact_identity_uses_final_persisted_projections tests/unit/test_hosted_ccld_backfill.py::test_preserved_artifact_insertion_keeps_allegation_semantic_siblings tests/unit/test_hosted_ccld_backfill.py::test_preserved_artifact_repeat_is_unchanged_when_extraction_adds_child -q PASS - 4 passed in 3.69s none
C:\Repos\CCLD-complaints-poc\.venv\Scripts\python.exe -m pytest tests/unit/test_hosted_ccld_backfill.py tests/unit/test_hosted_seeded_corpus_import.py -q PASS - 24 passed in 8.35s none
C:\Repos\CCLD-complaints-poc\.venv\Scripts\python.exe -m ruff check src/ccld_complaints/hosted_app/ccld_backfill.py tests/unit/test_hosted_ccld_backfill.py PASS - All checks passed none
C:\Repos\CCLD-complaints-poc\.venv\Scripts\python.exe -m mypy src/ccld_complaints/hosted_app/ccld_backfill.py PASS - no issues found none
C:\Repos\CCLD-complaints-poc\.venv\Scripts\python.exe scripts/check_docs.py PASS none
C:\Repos\CCLD-complaints-poc\.venv\Scripts\python.exe -m ruff format --check src/ccld_complaints/hosted_app/ccld_backfill.py tests/unit/test_hosted_ccld_backfill.py FAIL - pre-existing formatter drift on unchanged lines pre-existing non-governing formatter drift
git diff --check PASS none
Full local pytest suite Not run - focused correction; required GitHub CI remains the repository-wide gate none
  • Implementation-caused failures: Expected pre-fix regression reproduced the defect; one initial corrected test mutated a superseded projection and was corrected to mutate the final persisted projection.
  • Pre-existing failures: supplemental Ruff format check retains pre-existing formatter drift.
  • Environmental failures: None.
  • Tests intentionally not run and why: full local suite not repeated because scope remained focused and required CI provides the repository-wide gate.

UI and accessibility evidence (when applicable)

Not applicable - no UI or accessibility change.

Reviewer-facing redesign artifact classification (when applicable)

Not applicable - no reviewer-facing removal, merge, rename, relocation, replacement, or redesign.

Documentation, assumptions, and remaining risks

  • Documentation impact: hosted-backfill documentation now describes historical extraction-audit reconciliation.
  • Assumptions and limitations: production validation against this correction remains pending.
  • Remaining risks or follow-up: after merge and deployment, rerun the exact authoritative 312 selector diagnostic; require zero false extraction-audit persisted-record differences, review remaining genuine governed differences, and obtain final 0/312 repeat before closing Make preserved-artifact backfills safely repeatable #475. Issue Fix preserved-artifact backfill failures for 27 facilities #476 remains separate.

Governed-boundary review

Governed boundary Status Specific explanation or evidence
Schemas and migrations No change No schema or migration changed.
Ingestion and source-connector contracts No change No connector or live-source behavior changed.
Security and privacy No change No authentication, authorization, secret, or privacy behavior changed.
Production data and correction behavior Authorized change Historical extraction-audit identities are deterministically reconciled without suppressing genuine audit changes.
Deployment and infrastructure No change No deployment or infrastructure file changed.
Repository governance No change No governance mechanism changed.
Required GitHub workflows and checks No change validate, docs-check, fixtures, and security remain required.
Tests or checks weakened to obtain passage Authorized change Regression coverage was strengthened; no test or required check was weakened.

Required GitHub checks

  • validate
  • docs-check
  • fixtures
  • security

@nicho1ab
nicho1ab merged commit 0833e02 into main Aug 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant