Skip to content

feat(checkpoint): persist resumable result progress - #60

Closed
seonghobae wants to merge 8 commits into
agent/resumable-stream-checkpointsfrom
agent/persistent-result-checkpoint-store
Closed

feat(checkpoint): persist resumable result progress#60
seonghobae wants to merge 8 commits into
agent/resumable-stream-checkpointsfrom
agent/persistent-result-checkpoint-store

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Parked historical stack — design/test provenance only

This Draft contains the former durable PostgreSQL result-checkpoint store slice: tenant-qualified checkpoint identity, exact compare-and-swap advancement, transaction-coupled save/load operations, forced RLS requirements, byte-identical package/container migrations, fail-closed rollback for non-empty acknowledgement evidence, explicit nonblank DSN selection, bounded PostgreSQL counters, and deterministic migration/concurrency/integration coverage.

Fresh exact topology

  • historical feat(checkpoint): persist resumable result progress #60 head agent/persistent-result-checkpoint-store: a496bfcc4557904cefd6dc3c5f7f619b5ae5fda4;
  • historical feat(checkpoint): persist resumable result progress #60 base agent/resumable-stream-checkpoints: 683a3e7f52e5529817180a6ace0c2b2176d85412;
  • protected main: 0052c00f31b404ef8b328f3175e3fe1245afc7c2, which now includes the current-main resumable streaming implementation from feat(streaming): rebuild resumable checkpoints on current main #177;
  • a dedicated successor branch feat/durable-checkpoint-store-current-main was created from that exact protected head and now carries fail-first RED commit a2fb87b0354b459204005f54489aa786ec35b5da;
  • the RED commit adds only current-main contracts requiring the package-owned durable checkpoint-store API, explicit nonblank PostgreSQL target selection, and bounded host-selected consumer identity; no production implementation has been copied yet;
  • no PR currently targets the successor branch because the ordinary PR-creation mutation was blocked by the platform safety layer in the current execution. That exact mutation lane is deferred rather than retried through lower-level APIs.

No checks, reviews, approvals, ancestry, generated merge evidence, or staged acceptance from this historical PR transfer to the successor branch. This Draft must not be retargeted directly onto main and must not be merged.

Reconstruction boundary

Continue only on the explicit current-main successor branch once the PR-creation control-plane lane is available. Preserve standalone/custom-store operation, trusted tenant/consumer authority, exact CAS semantics, caller-owned transaction coupling, forced RLS, descriptive two-or-more-word snake_case database objects, rollback protection, explicit DSN target authority, package/container migration identity, bounded PostgreSQL counters, and the explicit absence of a distributed exactly-once claim.

The reconstructed successor becomes merge-eligible only after one unchanged exact head satisfies live-base ancestry/mergeability, zero valid unresolved findings, exact 100% owned production statement/branch and public-docstring coverage, Python 3.10/3.12/3.14, realistic PostgreSQL migration/rollback/concurrency evidence, package/container/security/SAST/SBOM/provenance, every live required central workflow, Release Acceptance, and every approval requirement actually imposed by the live ruleset.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 82743162-8c42-4bed-a5ab-6468cd7fc36c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Exact-head CI finding on 45761886664d5a1a9ef934ebcd326beea5d1e6f3 (CI run 31116219720): Python 3.10/3.12/3.14 and the coverage job fail only on two deterministic documentation-contract assertions, with 578 tests passing and 5 deselected.

Both required semantic phrases are present but split by Markdown line wrapping: fail-closed\n rollback in CHANGELOG.md, and Row\nsecurity policies in the APA reference. This is assertion brittleness rather than a missing authoritative contract. Fix on the existing branch path by normalizing document whitespace in the documentation-test helper before phrase matching (for example, joining text.split() with one space), while retaining the exact required phrases and all authoritative source details. Do not reflow prose solely to satisfy raw substring layout, weaken any required phrase, or count the currently in-progress Release Acceptance run as success. Rerun every exact-head CI and release-acceptance gate after the fix.

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Exact-head deployment finding and test-first remediation on 90854868c7099b93087ceea07982675174112f24 over stacked base cc1595774ee6ab076f72dc6ba5a4175d3bec0f5d: the package and container checkpoint SQL files were byte-identical, but docker/postgres/Dockerfile did not copy the checkpoint migration into /docker-entrypoint-initdb.d, so a fresh bundled PostgreSQL image would never execute the new durable checkpoint schema. Test-only RED commit a223f7277c71f504cdeb9a65a9696d0c1dd1156e requires both byte identity and a unique ordered image-init destination. GREEN commit 90854868c7099b93087ceea07982675174112f24 installs init/03_result_stream_checkpoints.sql as /docker-entrypoint-initdb.d/04_result_stream_checkpoints.sql, after the existing cron script, without overwriting another init entry. No workflow or parallel branch writer was added. Previous ff183... queued CI/Release Acceptance evidence is stale; no current-head workflow run is counted as success until it exists and completes. This author review is audit evidence only, not independent approval.

seonghobae commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Current head/base revalidation after the deployment-assurance doc/test slice:

  • source head: efe2c81f8a9cd8301461fe8ae3ce9d5901652185
  • exact stacked base: cc1595774ee6ab076f72dc6ba5a4175d3bec0f5d
  • ancestry: 35 ahead / 0 behind
  • CI 31165199727: completed / success for this pull-request run, but this branch predates the permanent exact-source checkout assertion introduced later in the stack; its CI job steps do not prove git rev-parse HEAD equals the source SHA. This is supporting PR-event evidence only, not exact-source merge evidence.
  • Release Acceptance 31165197963: completed / success and explicitly checked out the exact pull-request head before materializing two clean exact-head source trees
  • CodeRabbit commit status: success
  • unresolved inline review threads: 0

This head now has a permanent documentation contract tying the byte-identical checkpoint migration to /docker-entrypoint-initdb.d/04_result_stream_checkpoints.sql after the cron init script, plus matching doctoring and CHANGELOG evidence. The test-first sequence was d2a8aaa512cd5d26f1240884268b4fabb7d6ba9a (RED documentation contract) → 437392e19a2ad0de6a89a35e85b62990ea481402 (doctoring) → current head (CHANGELOG/refactor).

No stale predecessor run, queued/pending result, synthetic merge evidence, automated status, or absent protection/security surface is being counted as merge authority. In particular, the successful CI run above is not being promoted to exact-source evidence without an in-job source-SHA assertion. The PR remains a stacked draft; fresh exact-source CI after integration, independent non-author approval, and repository protection/security gates remain mandatory.

@seonghobae
seonghobae force-pushed the agent/resumable-stream-checkpoints branch from cc15957 to 76b4abe Compare August 8, 2026 23:44

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Review-only request for exact current source head 6b2e19e3503ef3671aa2d2f974df7561ba1e1ca0 against exact current stacked base 76b4abe68e8f2ff3deb8a05423d340dd32fef09e (#59). The branch was replayed onto the current predecessor and is exactly 1 commit ahead / 0 behind. Current CI 31284862809 and Release Acceptance 31284862795 are completed/success on this source head; predecessor-head reviews do not transfer. Re-verify tenant-qualified checkpoint persistence, compare-and-swap/idempotency, concurrent first-writer reconciliation, package- and caller-owned transaction boundaries, forced-RLS/default-deny behavior and rollback guard, signed BIGINT fail-closed bounds, package/container migration identity and fresh-image installation ordering, prefix-only checkpoint assurance, and documentation/test coverage. Report source defects separately from upstream stack/review-governance prerequisites. Review only: do not mutate the branch, change Draft state, merge, release, weaken checks, or create repair workflows.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

@seonghobae I will review #60 at the specified source head and stacked base. I will report source defects separately from integration and review-governance prerequisites. I will not modify the branch or pull request state.

⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor Author

Ancestry is now obsolete: immediate predecessor PR #59 was freshly verified and closed as superseded by current-main replacement #177. This PR still targets the retained historical agent/resumable-stream-checkpoints branch and carries unique durable-checkpoint-store work, so the feature is not being declared implemented or discarded. Closing only this stale PR relation prevents old-base checks from masquerading as active acceptance. Preserve the branch/PR as replay provenance; after #177 reaches protected main, rebuild the durable store from that exact integrated result and reacquire all current gates. No #60 checks/reviews transfer to the future replacement.

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