Repository navigation
A Review close that would invert a fact's interval is refused - #1315
Merged
WaylandYang merged 2 commits intoOct 19, 2026
Merged
WaylandYang merged 2 commits into
WaylandYang merged 2 commits into
Conversation
Signed-off-by: Aschenbath <Aschenbath@users.noreply.github.com>
WaylandYang
approved these changes
Oct 19, 2026
WaylandYang
left a comment
Contributor
There was a problem hiding this comment.
Thank you, Aschenbath, clean and well targeted. The check sits in close_superseded under the row lock, compares both ends after truncating them with the same truncate_to #1295 uses, and covers the conflict's default close at the new fact's start, while close_stated and the graph.rs callers stay untouched. The three cards now toast the localized refusal, which also brings today's silent empty_state_span to the surface, and the route test covers all three paths plus the default close, confirms nothing is written and the items stay in their queues, and that a later date still goes through.
Thanks also to @Maya-Kid for the report and the failing cases on #1294.
Merging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closing a Review fact before its start currently stores an inverted interval and removes the item from review. Reject these closes with HTTP 422
interval_inverted, and show the localized error in all three Review cards.close_superseded, after locking the live fact row and before any rewrite. This also covers a conflict closed at the new fact's start by default;close_statedand the ingestion callers stay unchanged.empty_state_spanrefusals visible too.Validation on Linux x86_64 against local PostgreSQL 16 with pgvector and Poppler (
UTOPIA_TEST_REQUIRE_DB=1,UTOPIA_TEST_REQUIRE_PDFTOTEXT=1), on dev2bcc763:cargo fmt --all --checkandcargo clippy --workspace --all-targets -- -D warnings: passed.cargo test --workspace: 1,622 passed, 0 failed, 6 existing opt-in tests ignored.cargo test --workspace --bin utopia-server review_closes_refuse: failed before the fix (route returned200 {"ok":true}) and passed after it.web/:pnpm buildpassed,pnpm test286/286 passed,node --test scripts/bench/lib.test.mjs15/15 passed.The commit is DCO signed off.
Closes #1294