Skip to content

test(reindex): admit rebuild fixtures through source pipeline - #4438

Merged
Sinity merged 2 commits into
masterfrom
feature/packet/polylogue-itwu9
Aug 30, 2026
Merged

Sinity merged 2 commits into
masterfrom
feature/packet/polylogue-itwu9

Conversation

@Sinity

@Sinity Sinity commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Summary

Added admit_provider_source_packages, a shared input-only helper that sends law-owned provider-shaped files through parse_sources_archive. Migrated rebuild, deadline, lease, sharded, daemon bulk, CLI canary, and paging fixtures to production admission and removed the obsolete direct authority/census precondition helper.

Problem

Candidate fixtures in the affected paths wrote raw rows and then patched logical-source, parser-census, and revision-authority state directly. That bypassed the production acquisition and source-authority route and duplicated setup across tests.

Solution

Provider-shaped wire files now enter through ProviderSourcePackage and parse_sources_archive; production backfill/classification supplies source authority where a frozen candidate is required. Equivalence assertions compare typed parsed projections where independently admitted roots contain expected acquisition-path and timestamp differences. The obsolete tests/infra/rebuild_preconditions.py module was deleted.

Verification

  • nix develop -c devtools test tests/unit/maintenance/test_rebuild_index_resume_correctness.py tests/unit/maintenance/test_rebuild_index_deadline.py tests/unit/maintenance/test_rebuild_index_lease_lifecycle.py: 4 passed.
  • Broad focused selector: 141 passed initially, then the 3 migration-induced failures were fixed and each retested individually. Final targeted results: canary drift 1 passed, daemon equivalence 1 passed, paging/cache 1 passed.
  • nix develop -c devtools verify oracle-integrity: scanned 1182 modules; Oracle integrity intact.
  • nix develop -c devtools verify --quick: all checks passed.
  • nix develop -c devtools verify: refused before execution because no compatible native testmon graph is available; SQLite sidecars exist without the owned database.
  • Push pre-push quick baseline: all checks passed.

Residual risk

The compatible plain verification gate still needs a compatible testmon graph or an explicitly authorized devtools verify --all run. No full corpus verification was claimed.

@Sinity
Sinity enabled auto-merge (squash) August 30, 2026 12:10
@Sinity
Sinity merged commit 194c3ce into master Aug 30, 2026
1 check was pending
@Sinity
Sinity deleted the feature/packet/polylogue-itwu9 branch August 30, 2026 12:10
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-08-30T12:16:55.098663Z 7e96d83 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7e96d83786

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/unit/daemon/test_bulk_rebuild.py Resolved
Sinity added a commit that referenced this pull request Aug 30, 2026
Summary

Recover markerless spool handoffs, bound daemon source-cut copies, retire generation-owned cuts, and restore #4438 fixtures from master.

Problem

A spool crash before its completeness marker could delete the only retired generation, directory cuts double-counted grown files, and configured daemon cuts had no aggregate copy-capacity preflight or lifecycle retirement.

Solution

Keep retired spool roots through marker durability, restore them before retry validation, fsync the destination marker directory, mark post-cut arrivals, apply directory readmission, and preflight daemon configured inputs against available candidate capacity. Terminal generation cleanup now removes its candidate source cut.

Verification

- `bash nix/devtools-wrapper.sh test tests/unit/sources/test_source_snapshot.py tests/unit/daemon/test_bulk_rebuild.py tests/unit/operations/test_candidate_build.py tests/unit/maintenance/test_rebuild_index_selection.py`: 60 passed.

Residual risk

The full corpus was not run. The known master failures in `tests/unit/maintenance/test_reindex_canary.py` remain outside this change.
Sinity added a commit that referenced this pull request Aug 30, 2026
Summary

Recover markerless spool handoffs, bound daemon source-cut copies, retire generation-owned cuts, and restore #4438 fixtures from master.

Problem

A spool crash before its completeness marker could delete the only retired generation, directory cuts double-counted grown files, and configured daemon cuts had no aggregate copy-capacity preflight or lifecycle retirement.

Solution

Keep retired spool roots through marker durability, restore them before retry validation, fsync the destination marker directory, mark post-cut arrivals, apply directory readmission, and preflight daemon configured inputs against available candidate capacity. Terminal generation cleanup now removes its candidate source cut.

Verification

- `bash nix/devtools-wrapper.sh test tests/unit/sources/test_source_snapshot.py tests/unit/daemon/test_bulk_rebuild.py tests/unit/operations/test_candidate_build.py tests/unit/maintenance/test_rebuild_index_selection.py`: 60 passed.

Residual risk

The full corpus was not run. The known master failures in `tests/unit/maintenance/test_reindex_canary.py` remain outside this change.
Sinity added a commit that referenced this pull request Aug 30, 2026
 (#4441)

Summary

Recover markerless spool handoffs, bound daemon source-cut copies,
retire generation-owned cuts, and restore #4438 fixtures from master.

Problem

A spool crash before its completeness marker could delete the retired
generation. Directory cuts double-counted grown files. Configured daemon
cuts had no aggregate copy-capacity preflight or lifecycle retirement.

Solution

Retired spool roots survive until the destination marker is durable and
are restored before a retry validates the original preflight. The
destination directory is fsynced after writing the marker. Carry
manifests identify post-cut arrivals, directory copies use idempotent
readmission, configured daemon sources use an available-capacity policy,
and terminal generations retire their candidate cuts.

Verification

- `bash nix/devtools-wrapper.sh test
tests/unit/sources/test_source_snapshot.py
tests/unit/daemon/test_bulk_rebuild.py
tests/unit/operations/test_candidate_build.py
tests/unit/maintenance/test_rebuild_index_selection.py`: 60 passed.
- `bash nix/devtools-wrapper.sh verify --quick`: exit 0; 18 quick gates
passed in 91.3 seconds.
- `git diff --name-status origin/master..HEAD -- tests/infra
tests/unit/cli/test_reindex_canary_cli.py
tests/unit/maintenance/test_rebuild_index_deadline.py
tests/unit/maintenance/test_rebuild_index_lease_lifecycle.py
tests/unit/maintenance/test_rebuild_index_resume_correctness.py
tests/unit/maintenance/test_sharded_rebuild.py
tests/unit/storage/test_rebuild_paging_content_order.py`: no output.

Residual risk

The full corpus was not run. The two existing master failures in
`tests/unit/maintenance/test_reindex_canary.py` remain outside this
change.
Sinity added a commit that referenced this pull request Sep 1, 2026
 (#4438)

## Summary

Added `admit_provider_source_packages`, a shared input-only helper that
sends law-owned provider-shaped files through `parse_sources_archive`.
Migrated rebuild, deadline, lease, sharded, daemon bulk, CLI canary, and
paging fixtures to production admission and removed the obsolete direct
authority/census precondition helper.

## Problem

Candidate fixtures in the affected paths wrote raw rows and then patched
logical-source, parser-census, and revision-authority state directly.
That bypassed the production acquisition and source-authority route and
duplicated setup across tests.

## Solution

Provider-shaped wire files now enter through `ProviderSourcePackage` and
`parse_sources_archive`; production backfill/classification supplies
source authority where a frozen candidate is required. Equivalence
assertions compare typed parsed projections where independently admitted
roots contain expected acquisition-path and timestamp differences. The
obsolete `tests/infra/rebuild_preconditions.py` module was deleted.

## Verification

- `nix develop -c devtools test
tests/unit/maintenance/test_rebuild_index_resume_correctness.py
tests/unit/maintenance/test_rebuild_index_deadline.py
tests/unit/maintenance/test_rebuild_index_lease_lifecycle.py`: 4 passed.
- Broad focused selector: 141 passed initially, then the 3
migration-induced failures were fixed and each retested individually.
Final targeted results: canary drift 1 passed, daemon equivalence 1
passed, paging/cache 1 passed.
- `nix develop -c devtools verify oracle-integrity`: scanned 1182
modules; Oracle integrity intact.
- `nix develop -c devtools verify --quick`: all checks passed.
- `nix develop -c devtools verify`: refused before execution because no
compatible native testmon graph is available; SQLite sidecars exist
without the owned database.
- Push pre-push quick baseline: all checks passed.

## Residual risk

The compatible plain verification gate still needs a compatible testmon
graph or an explicitly authorized `devtools verify --all` run. No full
corpus verification was claimed.
Sinity added a commit that referenced this pull request Sep 1, 2026
 (#4441)

Summary

Recover markerless spool handoffs, bound daemon source-cut copies,
retire generation-owned cuts, and restore #4438 fixtures from master.

Problem

A spool crash before its completeness marker could delete the retired
generation. Directory cuts double-counted grown files. Configured daemon
cuts had no aggregate copy-capacity preflight or lifecycle retirement.

Solution

Retired spool roots survive until the destination marker is durable and
are restored before a retry validates the original preflight. The
destination directory is fsynced after writing the marker. Carry
manifests identify post-cut arrivals, directory copies use idempotent
readmission, configured daemon sources use an available-capacity policy,
and terminal generations retire their candidate cuts.

Verification

- `bash nix/devtools-wrapper.sh test
tests/unit/sources/test_source_snapshot.py
tests/unit/daemon/test_bulk_rebuild.py
tests/unit/operations/test_candidate_build.py
tests/unit/maintenance/test_rebuild_index_selection.py`: 60 passed.
- `bash nix/devtools-wrapper.sh verify --quick`: exit 0; 18 quick gates
passed in 91.3 seconds.
- `git diff --name-status origin/master..HEAD -- tests/infra
tests/unit/cli/test_reindex_canary_cli.py
tests/unit/maintenance/test_rebuild_index_deadline.py
tests/unit/maintenance/test_rebuild_index_lease_lifecycle.py
tests/unit/maintenance/test_rebuild_index_resume_correctness.py
tests/unit/maintenance/test_sharded_rebuild.py
tests/unit/storage/test_rebuild_paging_content_order.py`: no output.

Residual risk

The full corpus was not run. The two existing master failures in
`tests/unit/maintenance/test_reindex_canary.py` remain outside this
change.
@Sinity

Sinity commented Sep 28, 2026

Copy link
Copy Markdown
Owner Author

Codex review threads on this PR whose cited code is gone (checked against master at 23f91a5):

Resolving these threads.

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