Skip to content

tests: accept a duplicate-key refusal from the losing writer in two concurrent observation tests - #10

Merged
lucidprogrammer merged 1 commit into
devfrom
tests/concurrent-observation-refusal
Nov 10, 2026
Merged

lucidprogrammer merged 1 commit into
devfrom
tests/concurrent-observation-refusal

Conversation

@lucidprogrammer

@lucidprogrammer lucidprogrammer commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Two integration tests run two writers recording an observation at the same time and expect one to commit and the other to be refused with a typed error: impact_cascade_probes::concurrent_record_observation_two_root_serializes_with_typed_error_on_refusal and impact_analysis_engine_capabilities::engine_serializes_concurrent_record_observation_with_typed_error_on_refusal. When both commits reach the same pending invalidation key, the losing writer is refused as that key's unique violation (CgError::UniqueViolation { entity: "invalidation" }), a typed refusal of an atomic commit, but each test accepted only CgError::Engine refusals, so they failed intermittently (seen on context-graph PR #9 and on this PR's first run).

What changes

  • Both tests also accept the duplicate-key refusal from the losing writer. Their data checks are unchanged: exactly one writer's invalidations are committed and stored.

Verification

@lucidprogrammer-svc
lucidprogrammer-svc force-pushed the tests/concurrent-observation-refusal branch from 4940d2f to bd2186c Compare November 10, 2026 06:43
@lucidprogrammer lucidprogrammer changed the title tests: accept a duplicate-key refusal from the losing writer in the concurrent observation test tests: accept a duplicate-key refusal from the losing writer in two concurrent observation tests Nov 10, 2026
@lucidprogrammer
lucidprogrammer merged commit dcc3196 into dev Nov 10, 2026
21 of 25 checks passed
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