Skip to content

feat(reconcile): add bounded content-free sweep evidence - #253

Draft
seonghobae wants to merge 5 commits into
fix/recovery-evidence-weakref-coverage-b84f0c9from
feat/reconciliation-sweep-evidence-b84f0c9
Draft

feat(reconcile): add bounded content-free sweep evidence#253
seonghobae wants to merge 5 commits into
fix/recovery-evidence-weakref-coverage-b84f0c9from
feat/reconciliation-sweep-evidence-b84f0c9

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Buyer-visible operability slice

This Draft adds a bounded, content-free reconciliation sweep evidence primitive for the operator-evidence part of #102. It intentionally does not claim scheduling, crash recovery, durable leasing, terminal retirement, or distributed exactly-once semantics.

RED -> GREEN contract

Test-only commit 0216d1d6cc2ea885bbbb98b40bf989014e6673bc defined immutable fixed-category counts; exact non-negative integer types; the protected reconciliation candidate ceiling; attempted work bounded by the candidate page; and applied/deferred/failed outcomes partitioning attempted work. The required module is absent from that RED tree while the test imports it. Those transient test-only workflows were cancelled by normal PR concurrency after GREEN and are not counted as passing RED evidence.

The product implementation adds pg_llm_batch/reconciliation_sweep_evidence.py and tests/test_reconciliation_sweep_evidence.py. ReconciliationSweepEvidence is frozen/slotted, accepts exact built-in integers only, bounds every count to MAX_RECONCILIATION_CANDIDATES, rejects attempted work above the candidate page, requires applied + deferred + failed to partition attempted work, and serializes only five fixed count categories with rejected values redacted. Focused isolated validation produced 10 passed and 100% statement/branch coverage for the touched production module.

Exact coverage RCA and stack boundary

The original direct-main GREEN head f0cdbd2e169618c6eba104e9b9f6fe9715c9af6d completed Security Scan 32201655359, SAST Semgrep 32201655177, and Release Acceptance 32201655324 successfully. CI 32201655351 failed only at repository-wide coverage after checking out that exact head: all 1,342 non-integration tests passed, but protected main still lacked exactly two weakref guard arcs (postgres_backup_evidence.py:65->exit and postgres_schema_evidence.py:49->exit), producing 99.96% aggregate coverage. Those arcs are already owned by root PR #233; duplicating that regression here would create competing ownership.

This lane is therefore non-destructively stacked on exact #233 head 5951b7a4d779903b8924abaef2a387cae50b7f54. Current exact head 13fc0156c6c044b5932a60660b2aad7aafd10150 has #233 as a merge parent and is three commits ahead / zero behind it. Relative to #233, this PR changes only:

  • pg_llm_batch/reconciliation_sweep_evidence.py; and
  • tests/test_reconciliation_sweep_evidence.py.

Current exact-head validation

Fresh repository-local workflows on unchanged exact 13fc0156c6c044b5932a60660b2aad7aafd10150 are now terminal-success:

  • CI 32203505994: success;
  • Security Scan 32203506018: success;
  • SAST Semgrep 32203506094: success; and
  • Release Acceptance 32203506064: success.

CI independently checked out and verified exact 13fc0156c6c044b5932a60660b2aad7aafd10150 with persisted checkout credentials disabled. Python 3.10/3.12/3.14 unit jobs and PostgreSQL/container smokes succeeded; compile and Ruff succeeded; public-docstring coverage was exactly 100%; repository production statement/branch coverage was exactly 100.00% (3660 statements, 1014 branches, zero misses/partials); lock freshness succeeded; and uv build --no-sources produced both sdist and wheel. The Python 3.14.7 coverage run completed 1344 passed, 5 deselected, 5 warnings.

Those five warnings are inherited test-harness hygiene defects outside this reconciliation-sweep diff: four schema-evidence finalizer warnings owned by Draft #251 and one compose/runpy warning owned by Draft #252. They are not suppressed here. #251 and #252 separately prove their bounded fixes on exact stacked heads, but their evidence does not transfer to this PR.

Fresh formal-review and inline-thread inventories remain empty; absence of review is not approval. Keep this PR Draft because predecessor #233 must integrate first and then this child must be reconciled/revalidated against then-current protected main with qualifying final review.

Writer and governance boundary

The source branch remains the only reconciliation-sweep-evidence lane in the fresh branch inventory. It does not change existing reconciliation worker source, schema, workflows, canonical docs, or the #233-owned weakref regression itself. No source/documentation mutation was made directly to protected main.

#233 remains the exact predecessor. Its pg-local quality/security/release evidence is terminal-success, but its current-head independent-review state remains non-passing because the required review-evidence path is owned by read-only central .github. This child neither duplicates nor bypasses that blocker.

After #233 integrates, retarget this PR to then-current protected main, prove the reconciled descendant diff remains only this sweep-evidence slice, and reacquire every exact-final-head quality/security/coverage/package/SBOM/provenance/release/review gate. No predecessor, pre-stack, infrastructure-failed, status-only, author-only, or other-branch evidence transfers.

Refs #102, #233, #244, #250, #251, #252.

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Non-destructively stack the reconciliation sweep evidence lane on exact #233 head 5951b7a so repository-wide 100% coverage can be validated without duplicating the protected-main weakref regression. The relative product diff remains the sweep-evidence module and tests only.
@seonghobae
seonghobae changed the base branch from main to fix/recovery-evidence-weakref-coverage-b84f0c9 August 19, 2026 01:02
@opencode-agent opencode-agent Bot added priority: medium Normal-priority or P2 work status: draft Draft pull request type: feature New or expanded product capability labels Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: medium Normal-priority or P2 work status: draft Draft pull request type: feature New or expanded product capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant