Skip to content

test(infra): rebind seeded archive clone bootstrap (#3884) - #3884

Merged
Sinity merged 1 commit into
masterfrom
feature/test/seeded-clone-bootstrap-rebind
Aug 8, 2026
Merged

test(infra): rebind seeded archive clone bootstrap (#3884)#3884
Sinity merged 1 commit into
masterfrom
feature/test/seeded-clone-bootstrap-rebind

Conversation

@Sinity

@Sinity Sinity commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Summary

Seeded workload archive clones now replace the copied fresh durable-bootstrap marker with evidence bound to the destination clone before use. Reflink and ordinary copy clones both open through the real ArchiveStore path without weakening durable-continuity checks.

Problem

The immutable seeded artifact's marker binds the source and user database identities. clone_seeded_archive copied that marker unchanged, so the first real writer open rejected the clone with a durable-identity mismatch. PR #3883 covered empty archive-template clones, but not seeded workload artifacts used by candidate and canary tests.

Solution

After making the clone writable, tests/infra/workload_artifacts.py removes only the copied marker and invokes the production bootstrap recorder against the destination. Tests exercise real ArchiveStore opens, prove the immutable source marker remains unchanged, cover reflink and forced-copy paths, and prove that restoring a foreign marker still fails closed.

Ref polylogue-seeded-clone-bootstrap-rebind.

Verification

  • .venv/bin/mypy --strict tests/infra/workload_artifacts.py tests/unit/infra/test_workload_artifacts.py: Success: no issues found in 2 source files
  • .venv/bin/python -m devtools test tests/unit/infra/test_workload_artifacts.py tests/unit/test_pytest_temp_policy.py tests/unit/storage/test_durable_change_train.py::test_startup_proves_durable_continuity_before_initialization_or_release: 26 passed
  • .venv/bin/python -m devtools verify --quick: all 24 steps green at exact head, receipt 20260808T083519Z-quick-3611577-c2b1e641

Summary by CodeRabbit

  • Bug Fixes

    • Improved seeded archive cloning to correctly initialize cloned archives without altering the original source.
    • Added safeguards to reject invalid or tampered archive identity markers.
    • Improved reliability when the preferred cloning method is unavailable by using a validated fallback.
  • Tests

    • Expanded coverage for clone isolation, fallback behavior, archive usability, and durable bootstrap validation.

Problem: seeded workload clones retained a fresh durable bootstrap marker bound to the immutable artifact. The first real archive open then failed durable identity continuity before candidate tests could reach their production route.

Recreate the copied marker through the production bootstrap writer after both reflink and copy fallback clones become writable. Cover destination-bound identity, immutable source preservation, real writer opens, and foreign-marker rejection.

Ref polylogue-seeded-clone-bootstrap-rebind.

Co-Authored-By: Codex <noreply@openai.com>
@Sinity Sinity changed the title test(infra): rebind seeded archive clone bootstrap test(infra): rebind seeded archive clone bootstrap (#3884) Aug 8, 2026
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 44a2c9fc-e083-4820-9f98-45f37996090e

📥 Commits

Reviewing files that changed from the base of the PR and between e1e23ec and c170fc9.

📒 Files selected for processing (3)
  • .beads/issues.jsonl
  • tests/infra/workload_artifacts.py
  • tests/unit/infra/test_workload_artifacts.py

📝 Walkthrough

Walkthrough

clone_seeded_archive now rebinds durable-bootstrap markers for cloned archives. Tests verify source-marker preservation, clone identity validation, reflink-to-copy fallback, and successful opening of the copied archive.

Changes

Seeded archive clone isolation

Layer / File(s) Summary
Rebind and validate clone bootstrap identity
.beads/issues.jsonl, tests/infra/workload_artifacts.py, tests/unit/infra/test_workload_artifacts.py
The clone helper replaces the inherited bootstrap marker with a destination-bound marker. Tests verify source isolation, tampered-marker rejection, copy fallback after reflink failure, and opening with 64 sessions.

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

Possibly related PRs

  • Sinity/polylogue#3883: Updates archive-clone test infrastructure with related durable-bootstrap rebinding and regression coverage.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the test change and the seeded archive clone bootstrap rebind.
Description check ✅ Passed The description covers the summary, problem, solution, verification, bead disposition, and test-only changelog exception.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ 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 feature/test/seeded-clone-bootstrap-rebind

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.

@Sinity
Sinity merged commit ef38228 into master Aug 8, 2026
3 checks passed
@Sinity
Sinity deleted the feature/test/seeded-clone-bootstrap-rebind branch August 8, 2026 08:49
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