Repository navigation
Normalize publication context and separate shim responsibilities - #381
Merged
Merged
Conversation
Give text adapters and command publication an explicit Invocation subject contract, preserving absent, empty and unread input and independent tool identity. Bind command scope, ownership and text destination checks to one lazy normalized destination with host and selection provenance. Move pattern_refusal, pattern_finding and consult into shim::checker. Move scope_holds, forge, visibility, gh_repository_target, declared_standing and effective_scope into shim::destination. Replace resolve_target with Destination::resolve, and ScopeMemo::holds and ScopeMemo::standing with the bound CommandContext methods. No rule bodies, checker exit contracts, editor behavior or process handoff are changed. Add an allowed/refused fixture matrix across scan, guard, hook, command and editor paths, unread-surface cases, and destination-observation tests. Document the shared boundary and the adapters' remaining limits. Validated 543 unit tests and 257 focused CLI/structural tests; clippy --all-targets passes. Implements #373 and the first cohesive module boundaries for #374.
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 10
✨ Finishing Touches
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. Comment |
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (95.95%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #381 +/- ##
==========================================
+ Coverage 94.61% 94.67% +0.06%
==========================================
Files 46 49 +3
Lines 25233 25327 +94
==========================================
+ Hits 23873 23978 +105
+ Misses 1360 1349 -11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Publication adapters need to distinguish absent subjects from unread input and share the same destination when applying scope and ownership checks. Introduce a common subject
Invocationand a command context that binds arguments, destination, host, and selection provenance for one invocation.Extract destination/scope resolution and checker execution into internal shim modules. Keep policy dispatch centralized and preserve the single-binary interface, stdin replay, original argument handoff, and editor checks. Hooks and direct text retain their documented destination limits.
Validation: 543 unit tests and 257 focused CLI/structural tests, including shared allowed/refused fixtures across scan, guard, hook, shim, and editor, unread-input cases, environment/explicit destination precedence, and cached destination behavior. All-target Clippy and normal commit checks pass.
Closes #373. Closes #374.