Skip to content

test(recovery): cover stale evidence registry cleanup - #233

Open
seonghobae wants to merge 5 commits into
mainfrom
fix/recovery-evidence-weakref-coverage-b84f0c9
Open

test(recovery): cover stale evidence registry cleanup#233
seonghobae wants to merge 5 commits into
mainfrom
fix/recovery-evidence-weakref-coverage-b84f0c9

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Add deterministic regression coverage for stale weak-reference cleanup guards in the PostgreSQL backup and packaged-schema evidence registries. The tests prove that when a registry slot is replaced while an older weak reference is still live, the stale callback cannot delete the replacement entry. Production source and canonical documentation are unchanged.

Fresh exact protected/base/head boundary — 2026-09-07 KST

  • protected main: 5913c4bad79d6bc29d7cc1c624abb7db2ea6a77c;
  • exact PR head: 01d231fde23b82e2ced258d7bfcb4721ed75706d;
  • base: protected main;
  • changed production paths: none;
  • changed test path: tests/test_postgres_recovery_evidence_registry.py;
  • state: Ready, open, mechanically mergeable.

This branch was reconciled non-destructively with the current protected main. No force push, destructive rebase, predecessor-evidence transfer, protected-main direct write, or source duplication is used.

Exact-current repository evidence

The leaf repository's deterministic product/test/security lanes are terminal GREEN on exact 01d231fde23b82e2ced258d7bfcb4721ed75706d:

  • CI 33892586784: success;
  • Release Acceptance 33892586880: success;
  • Security Scan 33892586851: success;
  • SAST Semgrep 33892586757: success;
  • Strix 33892586134: success;
  • Required PR Review Merge Scheduler 33892586044: success;
  • native dynamic GitHub CodeQL PR 33892583929: success.

These successes do not override non-passing required compatibility/review workflows below.

Current required-workflow REDs

Three required central lanes remain terminal failure on this unchanged exact head.

CodeQL PR 33892586782

The language detector succeeds, but both compatibility shards fail. On rerun attempt 2 the required job cannot find an authenticated exact-head codeql-dispatch/<language> terminal status and terminates with Exact CodeQL job was rerun without an authenticated terminal verdict. This is a central dispatch/settlement defect, not a test-only leaf source failure. Canonical repair remains .github#1902, with .github#1929 retaining the downstream terminal-publication acceptance issue; the #1902 candidate is Draft/open and not mechanically mergeable, so no downstream success is inferred before protected integration and a fresh exact-head verdict.

Required OpenCode Review 33892586092

Bootstrap/admission/coverage evidence succeeds and the current-head OpenCode dispatch itself succeeds. The required job then re-reads reviews for exact 01d231fde..., finds no authenticated current-head APPROVED or CHANGES_REQUESTED from opencode-agent, and fails closed. Cross-repository status/review-publication observability belongs to central .github#691; do not synthesize a review or treat dispatch success as a verdict.

Required Noema Review 33892586119

Exact-head admission, repository-scoped cwl-noema-review GitHub App credential minting, contextual-orchestrator sidecar provisioning, and orchestrator/free preflight all succeed. The model-verdict request then fails after 1794 seconds with HTTP 502. Central .github#1948 owns the shared free-route probe/replay budget and capacity evidence relevant to this failure class. The failure remains non-passing until the ordinary central owner path produces a current-head terminal review verdict; no shorter timeout, provider/model hard-code, paid fallback, or synthetic status substitutes for that evidence.

Review/governance boundary

Formal review inventory contains three historical OpenCode REQUEST_CHANGES records in DISMISSED state on predecessor heads plus a Devin COMMENTED review. There is no qualifying APPROVED review on current exact head 01d231fde...; COMMENTED/model evidence is not approval and historical dismissed reviews do not transfer.

Live organization ruleset 18156473 currently requires one approving review while required_reviewers is empty and code-owner review is disabled. In the current one-human-maintainer topology that generic approval count is a central governance defect tracked by .github#772, not permission to self-approve or bypass. Preserve deterministic workflow/security/SAST/coverage/package/SBOM/provenance/thread/deletion/non-fast-forward controls while that rule is repaired centrally.

Integration rule

Normal merge requires the unchanged exact head to remain repository-clean and every then-required central workflow to publish authenticated current-head terminal success under live governance, with the central approval contract structurally satisfiable without self-approval. Until that is true, keep this PR open/Ready and repair the central prerequisites rather than churning the leaf branch, fabricating approval, weakening protection, force-updating history, or using routine administrator bypass.

Refs #244, #157, #204 and central .github#1902, .github#1929, .github#691, .github#1948, .github#772 owner paths.

@cursor

cursor Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d1cb030e-2080-476a-a556-5a2368121beb

📥 Commits

Reviewing files that changed from the base of the PR and between b84f0c9 and 1ddfc32.

📒 Files selected for processing (1)
  • tests/test_postgres_recovery_evidence_registry.py

Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

백업 및 스키마 복구 증거 레지스트리에 stale weak-reference callback 회귀 테스트를 추가했다. 각 테스트는 replacement entry 보존을 검증하고 테스트 후 레지스트리를 정리한다.

Changes

PostgreSQL 복구 증거 레지스트리

Layer / File(s) Summary
Stale callback replacement 보존 검증
tests/test_postgres_recovery_evidence_registry.py
백업 및 스키마 증거 레지스트리에 replacement entry를 설치한다. 기존 증거 객체를 삭제하고 garbage collection을 실행한다. stale callback이 replacement entry를 삭제하지 않는지 검증한 후 레지스트리 항목을 정리한다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 1ddfc

This is a localized test-only change that adds regression coverage without changing production behavior; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 stale evidence registry cleanup을 다루는 회귀 테스트 추가를 명확하게 설명합니다. 변경 사항의 주요 목적과 일치하며 간결합니다.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/recovery-evidence-weakref-coverage-b84f0c9

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.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 1ddfc3260cc8e7e981c5c3bdd4ba2206348f4143.

  • Head SHA: 1ddfc3260cc8e7e981c5c3bdd4ba2206348f4143

  • Workflow run: 32003415023

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Test: test_postgres_recovery_evidence_registry.py"]
  S1 --> I1["regression suite"]
  I1 --> R1["Review risk: Test: test_postgres_recovery_evidence_registry.py"]
  R1 --> V1["targeted test run"]
Loading

@opencode-agent

opencode-agent Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 5951b7a4d779903b8924abaef2a387cae50b7f54
  • Workflow run: 32100082025
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 5951b7a4d779903b8924abaef2a387cae50b7f54.

  • Head SHA: 5951b7a4d779903b8924abaef2a387cae50b7f54

  • Workflow run: 32100082025

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Test: test_postgres_recovery_evidence_registry.py"]
  S1 --> I1["regression suite"]
  I1 --> R1["Review risk: Test: test_postgres_recovery_evidence_registry.py"]
  R1 --> V1["targeted test run"]
Loading

Copy link
Copy Markdown
Contributor Author

@opencode-agent Please re-review the unchanged exact head 1ddfc3260cc8e7e981c5c3bdd4ba2206348f4143 against protected base b84f0c94154043a3473939c01bb6471de5a129ae. The prior central coverage-evidence run failed while materializing trusted uv archives before tests/coverage execution (HTTPError); repository-local exact-head CI, Security Scan, SAST Semgrep, and Release Acceptance are terminal-success. This request is review-only: do not update the branch or enable auto-merge.

Create a tree-identical branch commit after the authenticated OpenCode review failed before PR test execution while downloading the trusted central uv archive. This does not alter source/docs or count as passing evidence; all required workflows and the independent review must revalidate this new exact head.

Copy link
Copy Markdown
Contributor Author

@opencode-agent Please re-evaluate the current exact head 5951b7a4d779903b8924abaef2a387cae50b7f54 against live protected main@b84f0c94154043a3473939c01bb6471de5a129ae. Repository-local exact-head CI, Security Scan, SAST Semgrep, and Release Acceptance are terminal-success; the prior CHANGES_REQUESTED review is anchored to predecessor head 1ddfc3260cc8e7e981c5c3bdd4ba2206348f4143 after central coverage-evidence infrastructure failed before test materialization. Please publish only fresh same-head review evidence; do not transfer predecessor evidence.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 5951b7a4d779903b8924abaef2a387cae50b7f54.

  • Head SHA: 5951b7a4d779903b8924abaef2a387cae50b7f54

  • Workflow run: 32069198553

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Test: test_postgres_recovery_evidence_registry.py"]
  S1 --> I1["regression suite"]
  I1 --> R1["Review risk: Test: test_postgres_recovery_evidence_registry.py"]
  R1 --> V1["targeted test run"]
Loading

Copy link
Copy Markdown
Contributor Author

@opencode-agent

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review

Copy link
Copy Markdown
Contributor Author

@opencode-agent review

Please re-evaluate exact current head 5951b7a4d779903b8924abaef2a387cae50b7f54 now that the central trusted-uv download repair from ContextualWisdomLab/.github#1116 is integrated on protected .github/main@092df969f71c7afc56dd9ab2662b016ad40696c8. Do not reuse the prior infrastructure-failed verdict or predecessor evidence; run the current exact-head coverage/review path once under the repaired central control plane.

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review

Please perform a fresh independent review of exact current head 5951b7a4d779903b8924abaef2a387cae50b7f54 against protected main@b84f0c94154043a3473939c01bb6471de5a129ae. Repository-local CI, Security Scan, SAST, Release Acceptance, and CodeRabbit status are terminal-success for this unchanged head. Do not transfer predecessor review evidence. Evaluate the actual one-file test-only change and, if your reviewer identity is eligible and the unchanged head is acceptable under live policy, publish the appropriate formal review for this exact last push; otherwise report concrete current-head findings only.

seonghobae added a commit that referenced this pull request Sep 3, 2026
Non-destructively retain the existing #237 scheduler-contract tree while adding current dependency-root #233 (3246971) as a merge parent. The former #233 tip and the current tip have the identical tree e362d62, so this ancestry repair introduces no additional semantic delta and transfers no predecessor checks or reviews.
@seonghobae
seonghobae enabled auto-merge (squash) September 4, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance priority: medium Normal-priority or P2 work scope: research Research, statistical validation, or scientific evidence status: blocked Blocked by conflict, dependency, or required prerequisite type: test Test coverage, fixtures, fuzzing, or validation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant