refactor: enforce domain boundaries; fix trailing whitespace and split-file reader safety - #17
Merged
Merged
Conversation
Continue the domain-owned refactoring architecture (PR #15) by introducing a validated BindingIndex newtype, replacing panicking .expect() calls in extract-constant path resolution with proper Result-based errors, and splitting LetCompositionPlan into distinct merge/split plan types so split-let's binding index is no longer an Option<usize> on a plan that never needs it.
edit replace/format rewrites could leave stray trailing whitespace on lines they touched. Normalize trailing spaces/tabs on changed lines only, leaving untouched lines and opaque trivia (multiline atoms, block comments) alone.
split-file rejected any Common Lisp reader-conditional/vector-literal form present anywhere in the source file, even when the split left those forms untouched. Narrow the safety check to only the spans actually being moved out of the file, so unrelated reader-time forms elsewhere in the file no longer block a safe split.
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
Consolidates useful, tested work found sitting unmerged across local branches/worktrees:
BindingIndexnewtype, replaces panicking.expect()calls in extract-constant path resolution with properResult-based errors, and splitsLetCompositionPlaninto distinct merge/split plan types so split-let's binding index is no longer anOption<usize>on a plan that never needs it.edit replace/formatrewrites could leave stray trailing whitespace on lines they touched. Normalizes trailing spaces/tabs on changed lines only, leaving untouched lines and opaque trivia (multiline atoms, block comments) alone.split-filepreviously rejected any Common Lisp reader-conditional/vector-literal form present anywhere in the source file, even when the split left those forms untouched. Narrows the safety check to only the spans actually being moved, so unrelated reader-time forms elsewhere in the file no longer block a safe split.Other local branches/worktrees were checked and found to be stale (content-identical to already-merged PRs #14/#16):
feat/common-lisp-vector-reader-2026,feat/top-level-insert-2026,feat/splice-reader-prefix-guard,feat/split-file-reader-conditionals. No action needed there.Test plan
cargo buildcargo test(1275 + 1065 + 4 doctests, all passing)cargo clippy --all-targets(clean)cargo fmt --check(clean)