Skip to content

fix(storage): validate index after fast-forward - #4536

Merged
Sinity merged 1 commit into
masterfrom
feature/packet/polylogue-vdedm
Sep 2, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/packet/polylogue-vdedm

Conversation

@Sinity

@Sinity Sinity commented Sep 2, 2026

Copy link
Copy Markdown
Owner

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_manifest immediately after apply_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-versioning passed: Schema evolution policy intact.

bash nix/devtools-wrapper.sh verify --quick passed: 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

@coderabbitai

coderabbitai Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: 4fe9f7d5-9212-4fb7-816b-3677ff0c2050


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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 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-09-02T16:46:10.554853Z 551a95c New commits
ℹ️ 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: 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".

@Sinity
Sinity force-pushed the feature/packet/polylogue-vdedm branch from 9dd4235 to 7d5ae28 Compare September 2, 2026 12:10
@Sinity

Sinity commented Sep 2, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@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: 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".

@Sinity
Sinity force-pushed the feature/packet/polylogue-vdedm branch from 7d5ae28 to 551a95c Compare September 2, 2026 16:37
@Sinity
Sinity merged commit 6817e6c into master Sep 2, 2026
2 of 3 checks passed
@Sinity
Sinity deleted the feature/packet/polylogue-vdedm branch September 2, 2026 16:37

@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: 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".

Comment thread devtools/verify.py Resolved
Comment thread devtools/verify.py Resolved
Comment thread devtools/verify.py Resolved
Sinity added a commit that referenced this pull request Sep 6, 2026
## 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]>
@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.

@Sinity

Sinity commented Sep 29, 2026

Copy link
Copy Markdown
Owner Author

Closing out open Codex review threads on this PR (evidence checked against master at 64a9bd0):

  • P1 devtools/verify.py:382: Not a defect (checked at 64a9bd0): A failed first attempt stays recorded as failing in the graph, since the rerun does not load testmon (devtools/pytest_rerun.py:254-255). Affected selection always includes previously failing tests (set(data.failing_tests) at devtools/verify.py:501), so the test cannot be deselected by its partial trace.
  • P1 devtools/verify.py:527: Fixed on master (checked at 64a9bd0): The rerun, and the exit-0 override that follows it, apply only when the initial exit is 1 (devtools/verify.py:885, 914-920). The focused runner applies the same restriction (devtools/run_tests.py:1085).

Resolving every thread listed; confirmed defects are fixed under the named bead.

@Sinity

Sinity commented Sep 29, 2026

Copy link
Copy Markdown
Owner Author

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.

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