Skip to content

Stabilize preserved child record identities - #681

Merged
nicho1ab merged 1 commit into
mainfrom
issue-475-repeat-idempotence-correction-2
Aug 9, 2026
Merged

nicho1ab merged 1 commit into
mainfrom
issue-475-repeat-idempotence-correction-2

Conversation

@nicho1ab

@nicho1ab nicho1ab commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Pull Request Evidence

Governing issue and intended outcome

Implementation scope

  • Major files or components changed: preserved-artifact child-ID reconciliation, focused backfill regression coverage, and hosted-backfill developer documentation.
  • Important behavior intentionally left unchanged or out of scope: schemas, migrations, connectors, live retrieval, reviewer UI presentation, authentication, facility-reference precedence, reviewer-created state, deployment configuration, statewide 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. Stable source-derived identity, source-document relationships, reviewer-created-state separation, fixture relationships, and reviewer/audit relationships remain unchanged; no reviewer-facing presentation or interaction behavior changed.

Acceptance-criteria evidence

Acceptance criterion Evidence and result
Reproduce second-pass child-ID instability PASS - historical-fixture regression reproduces the old immediate-repeat update caused by positional allegation stable-ID reassignment.
Stable child-ID reconciliation PASS - exact generated IDs are reserved first, followed by occurrence matching and deterministic fallback.
Immediate same-operation idempotence PASS - corrected regression reports zero updates on immediate preserved-artifacts replay.
Equivalent operation idempotence PASS - canonical-complaint-observations replay produces zero representation-only updates in the regression lifecycle.
Second apply idempotence PASS - second apply performs zero source-derived writes in the regression lifecycle.
Genuine governed source changes PASS - affected seeded-import regression continues to detect legitimate governed source changes.
Production acceptance Pending - merged correction must still be deployed and prove 29-facility and full 312-facility repeat idempotence 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_repeat_is_unchanged_when_extraction_adds_child -q PASS - 1 passed in 1.61s 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 tests/unit/test_hosted_ccld_backfill_cli.py -q PASS - 23 passed in 5.22s 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 in 1 source file none
& 'C:\Repos\CCLD-complaints-poc.venv\Scripts\python.exe' scripts/check_docs.py PASS - Documentation check passed none
git diff --check PASS - exit 0 with no output none
& 'C:\Repos\CCLD-complaints-poc.venv\Scripts\python.exe' scripts/audit_portable_paths.py publication --field completion_report --input C:\tmp\issue475-completion-report.txt PASS - Portable-path contract passed 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 - both files would be reformatted; no bulk reformat performed pre-existing non-governing formatter drift
  • Implementation-caused failures: None.
  • Pre-existing failures: Supplemental Ruff format check reported broad formatter drift in the two affected files; no unrelated bulk reformat was performed.
  • Environmental failures: None.
  • Tests intentionally not run and why: Full local suite intentionally not run because this is a narrow focused correction; required PR CI provides repository-wide validation.

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 specifies deterministic preserved child-ID reconciliation.
  • Assumptions and limitations: local regression and focused validation pass, but production repeat-idempotence acceptance has not yet been rerun against this correction.
  • Remaining risks or follow-up: deploy the merged correction and rerun the retained 29-facility dry/apply/repeat lifecycle plus the full 312-facility preserved-artifact repeat before closing Make preserved-artifact backfills safely repeatable #475.

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 source connector or retrieval contract changed.
Security and privacy No change No credentials, authentication, authorization, private-data, or secret-handling behavior changed.
Production data and correction behavior Authorized change Preserved-artifact backfill now reconciles child stable IDs deterministically instead of positional lexical reassignment.
Deployment and infrastructure No change No QNAP, Compose, Cloudflare, container, host, or infrastructure configuration changed.
Repository governance No change No repository governance files or policies 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 tests/unit/test_hosted_ccld_backfill.py changed to strengthen regression coverage for the discovered child-ID reconciliation defect. No assertion, validation requirement, test, or required check was removed, skipped, relaxed, or weakened to obtain passage.

Required GitHub checks

  • validate
  • docs-check
  • fixtures
  • security

@nicho1ab
nicho1ab merged commit 242b9b8 into main Aug 9, 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