chore: add refactor-sequencing guardrail and review check #354
No reviewers
Labels
No labels
adr
automated
bug
chore
dependencies
documentation
enhancement
epic
github-actions
P1-high
P2-medium
P3-low
release
research
rust
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jwilger/eventcore!354
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/guardrail-refactor-sequencing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds guardrails identified during review of PR #353 (issue #281), where continuous polling functionality was deleted during an API surface reduction because the replacement API path wasn't built before the old path was removed.
Changes
New rule:
.claude/rules/refactor-sequencing.md— When migrating functionality between API surfaces, establish the new reachability path before removing the old one. Dead code that appears solely because the replacement path hasn't been built signals an incomplete migration, not code to delete.REVIEW.md "What to Block" item #16 — Flag functionality removal (deleting types, methods, behaviors, or tests) during a refactor when the removal wasn't an explicit part of the task plan. Visibility reduction is not removal, but deleting code that becomes "dead" after a visibility change is.
REVIEW.md "API Design" checklist — Verify refactors that reduce API surface preserve internal functionality with new reachability paths before old paths are removed.
Root Cause Analysis
During PR #353, the agent:
pub→pub(crate)) per ADR-030PollMode,AwaitingPollSleep, etc.)Each step followed an existing rule, but the sequencing was wrong. The old reachability was removed before the new reachability existed, making working code appear dead. The new guardrail prevents this by requiring the add-before-remove sequence.
Test plan
.claude/rules/style conventions