Skip to content

test(control): lock replay cursor on projection failure#189

Merged
hadamrd merged 1 commit into
trunkfrom
fix/replay-projection-failure-cursor
Jun 3, 2026
Merged

test(control): lock replay cursor on projection failure#189
hadamrd merged 1 commit into
trunkfrom
fix/replay-projection-failure-cursor

Conversation

@hadamrd
Copy link
Copy Markdown
Owner

@hadamrd hadamrd commented Jun 3, 2026

Remediates the Forge critic finding from #187.

Change

  • Adds an adversarial replay_projection test where a projection applies one event, raises on the next event, and the durable projection cursor remains at the original stored sequence.
  • This exercises the helper-level promise that partial projection failures do not bless a replay position.

Verification

  • uv run --extra dev pytest tests/test_control_restart_replay.py::TestControlRestartReplayInvariants::test_projection_failure_does_not_advance_stored_cursor -q
  • uv run --extra dev pytest tests/test_control_restart_replay.py tests/test_eventlog_sqlite.py tests/test_boot_context.py tests/test_cli.py tests/test_cli_status_control_plane.py -q -> 47 passed
  • uv run --extra dev ruff check tests/test_control_restart_replay.py
  • uv run --extra dev ruff format --check tests/test_control_restart_replay.py
  • uv run --extra dev mypy src/forge_loop/eventlog
  • uv run --extra dev pyright tests/test_control_restart_replay.py

@hadamrd hadamrd merged commit 04f93a0 into trunk Jun 3, 2026
2 checks passed
@hadamrd hadamrd deleted the fix/replay-projection-failure-cursor branch June 3, 2026 01:36
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