Repository navigation
fix(storage): validate index after fast-forward - #4536
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Team Run ID: 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. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9dd4235888
ℹ️ 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".
9dd4235 to
7d5ae28
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7d5ae282eb
ℹ️ 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".
…rules Flattened from feat/review-rules-and-rerun onto current master. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01YGi8wLWGR2HYBh8p8fXFXz
7d5ae28 to
551a95c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 551a95c6ed
ℹ️ 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".
## Summary Fixes the two reds in `tests/unit/devtools/test_verify.py`. One was a real defect (inherited, not from #4709); one was a stale expectation from #4709. ## Which was which Measured, not assumed. Both tests were run at `d430734f1`, the commit immediately before #4709 merged, with `devtools` and `tests` both checked out at that commit: - `test_accepted_flake_clears_both_recorded_exit_statuses` **fails identically there**. It is inherited and predates #4709. The `relative_to(ROOT)` call it trips over came from #4536. - `test_missing_checkout_venv_tool_is_a_typed_failure` **passes there**. That one is #4709's, and it is a stale expectation rather than a defect: an absent `.venv` now reports `gate_unprovisioned_environment` instead of `gate_missing_executable`, which is the intended distinction and is what the new test in #4709 asserts. So the rerun routing through `run_pytest` is not implicated; it arrived in #4581 and is unchanged here. ## Problem `_rerun_failed_once` formats its receipt with `rerun_report.relative_to(ROOT)`, which raises `ValueError` when the step directory is outside the checkout — a configured basetemp root, or any caller supplying its own artifact directory. A rerun that had already adjudicated its flakes correctly then died formatting its own path, and no rerun result was recorded at all. ## Solution Report the path relative to the checkout when it is inside one, absolute otherwise. Split the venv test into both conditions so the original coverage (a provisioned venv missing one tool) survives beside the new one (no venv at all). ## Verification `POLYLOGUE_ALLOW_BARE_PYTEST=1 POLYLOGUE_PYTEST_RUN_ID=x .venv/bin/python -m pytest tests/unit/devtools/test_verify.py -p no:randomly --override-ini=addopts=` — **41 passed**, redirected to a file and read, not piped. ## Residuals - A third red was reported in this file; only these two reproduce at master (`04e297bbc`). If the third is real it is ordering-dependent and not visible in a full run of the file. - The static quick gate ran green via the pre-push hook; the focused run above is the test evidence. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01DNGJ3awfNrsLaMdHgQZvid Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
|
Codex review threads on this PR whose cited code is gone (checked against master at 23f91a5):
Resolving these threads. |
|
Closing out open Codex review threads on this PR (evidence checked against master at 64a9bd0):
Resolving every thread listed; confirmed defects are fixed under the named bead. |
|
Closing out open Codex review threads on this PR (evidence checked against master at 0914f89):
Resolving every thread listed; confirmed defects are fixed under the named bead. |
Summary
Validate the complete index schema manifest after applying a clone-safe lifecycle fast-forward.
Problem
The fast-forward branch stamped an older index as current and returned before checking objects outside the declared plan. An undeclared table or untouched object drift could therefore remain live until a later open.
Solution
Run
assert_schema_manifestimmediately afterapply_index_fast_forward. Add a regression with an undeclared table that requires the fast-forward open path to reject the index.Verification
bash nix/devtools-wrapper.sh test tests/unit/storage/test_index_fast_forward_executor.py -k 'sql_fast_forwardable_index_db_reaches_current_on_open or fast_forward_validates_untouched_index_objects or sql_fast_forwardable_index_db_reopen_is_idempotent'passed: 3 passed, 8 deselected.bash nix/devtools-wrapper.sh verify schema-versioningpassed: Schema evolution policy intact.bash nix/devtools-wrapper.sh verify --quickpassed: all quick checks passed.Residual risk
The full fast-forward executor file retains three inherited failures from fixtures that do not create
schema_identity, plus one unrelated pricing-shape failure. The focused affected tests and post-rebase quick gate are green.Receipt: harvest-174880a94e35ba8892a3714b9f2a4c16