Skip to content

fix(sources): restore the declared EXCLUDED -> ACTIVE cursor transition - #4707

Merged
Sinity merged 1 commit into
masterfrom
lane/restore-exclusion-revival
Sep 5, 2026
Merged

Sinity merged 1 commit into
masterfrom
lane/restore-exclusion-revival

Conversation

@Sinity

@Sinity Sinity commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Summary

Restores CursorStore.revive_replaced_exclusion's excluded=False write,
which #4704 removed by accident.

Problem

sources/live/cursor_lifecycle.py declares, as its first preventive
invariant, that revive_replaced_exclusion is the only actuator permitted to
move a cursor EXCLUDED -> ACTIVE, and only on a proved file-identity or
parser-fingerprint change. #4704 dropped the excluded=False write, so that
transition became unreachable and two soundness-sweep assertions in
tests/unit/sources/test_cursor_lifecycle.py — the proved-identity-change and
parser-fingerprint-change cases — assert ACTIVE against a store that stays
EXCLUDED.

The change was collateral: an earlier revert of it in the lane ran after the
commit that introduced it, so it restored the changed file rather than the
original.

Solution

Restore the store method to its pre-#4704 behavior. The polylogue-6q16u fix
this belonged to lives entirely in LiveWatcher._needs_work_from_state_uncorroborated,
which no longer calls this method when it merely notices a path deserves a
fresh attempt; nothing in the live path depends on the store's own behavior
changing too.

Verification

git show origin/master~1:polylogue/sources/live/cursor.py and this branch's
copy of the method are identical, so the two soundness-sweep cases return to
the state they passed in.

Residual: the host pytest pueue group is paused, so the focused selection
(tests/unit/sources/test_cursor_lifecycle.py) could not be run locally to
confirm. The restored file is byte-identical to the version those tests passed
against.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DNGJ3awfNrsLaMdHgQZvid

#4704 stopped revive_replaced_exclusion clearing excluded, which removes the
only declared actuator for that transition (cursor_lifecycle invariant 1) and
turns two soundness-sweep assertions red. The 6q16u fix it belonged to lives
entirely in the watcher, which no longer calls this method at notice time, so
the store keeps its original behavior.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01DNGJ3awfNrsLaMdHgQZvid
@coderabbitai

coderabbitai Bot commented Sep 5, 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: 0837b9cc-ac2a-423b-80e6-eb0fee62626e


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.

@Sinity
Sinity enabled auto-merge (squash) September 5, 2026 22:59
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 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-05T23:01:41.507446Z 7984455 PR opened
ℹ️ 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.

@Sinity
Sinity merged commit d430734 into master Sep 5, 2026
3 checks passed
@Sinity
Sinity deleted the lane/restore-exclusion-revival branch September 5, 2026 23:04
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