refactor(api): split mutation.rs test module → mutation/tests.rs#417
Merged
Conversation
Standalone touch-time 1000-line-debt split (CLAUDE.md "1000-line debt = touch-time split"). `mutation.rs` was 1629 lines (source 1–605, inline `#[cfg(test)] mod tests` 606–1629). Converts to a directory module `mutation/mod.rs` (607 lines) + `mutation/tests.rs`, mirroring the script-session `mutation/mod.rs` → `mutation/tests.rs` precedent. Pure verbatim move — source body and test bodies are byte-identical to HEAD (verified by diff); `use super::*;` retained so the tests keep private access to `MutationObservation` / `MutationObservedBy` / `add_transient_observers` / `clear_transient_observers`. Surfaced by /elidex-review Axis 5 on the B1.2d-i PR (#413); split kept out of that feature PR per the standalone-split discipline. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Standalone 1000-line-debt split (second pass on mutation/tests.rs, 1021 lines after the mod.rs extraction). Two scenario-seam sub-files: - `tests_core.rs` (354 lines): notify/observe/disconnect/subtree/pending tests. `child_list_added` helper duplicated here for self-containment. - `tests_transient.rs` (687 lines): `observe_on_transient_only_node_*` + the full transient-registered-observers (DOM §4.3) suite. `mod.rs` updated: `mod tests;` → `mod tests_core; mod tests_transient;`. Mirrors the script-session `tests.rs` / `tests_replace_all.rs` sibling pattern. Pure split — 52/52 tests pass, clippy clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
Standalone touch-time 1000-line-debt split (CLAUDE.md "1000-line debt = touch-time split").
mutation.rswas 1629 lines (source 1–605, inline#[cfg(test)] mod tests606–1629). Converts to a directory module matching the script-sessionmutation/mod.rs→mutation/tests.rsprecedent:mutation/mod.rsmutation/tests.rsPure verbatim move — source body and test bodies are byte-identical to HEAD (machine-verified by diff).
use super::*;retained so the tests keep private access toMutationObservation/MutationObservedBy/add_transient_observers/clear_transient_observers.Surfaced by /elidex-review Axis 5 on the B1.2d-i PR (#413); kept out of that feature PR per the standalone-split discipline.
Verification
cargo test -p elidex-api-observers --all-features→ 52 passedcargo clippy -p elidex-api-observers --all-features --all-targets→ cleanmise run ci(check + lint + test-all + doc + deny) → all greenPure verbatim move (zero design surface) — pre-push design-review stages are no-ops.
🤖 Generated with Claude Code