[AUTOMATION] feat: clean up internal canonical paths#287
Open
michiosw wants to merge 1 commit into
Open
Conversation
Greptile SummaryThis PR consolidates internal helper ownership and removes duplicate wrapper entry points. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Reviews (1): Last reviewed commit: "feat: clean up internal canonical paths" | Re-trigger Greptile |
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
This cleans up internal canonical paths by deleting dead wrapper entry points and reusing shared decision and timestamp helpers.
Before this, duplicate constructors and parser/type aliases lived in internal/guard/app/server, internal/managedstream, internal/guard/store/sqlite, internal/hook, and internal/run, which made internal ownership harder to reason about and easier to drift.
Now one canonical internal path owns each helper:
internal callers
-> canonical server constructor / decision type / ledger timestamp parser
-> reused by managed stream and hook code
-> less duplicate internal surface
Why
This gives kontext-cli a cleaner maintenance path for internal runtime plumbing:
internal callers
-> canonical internal helper
-> one implementation
-> less drift
This PR does not broaden behavior beyond the cleanup scope.
What changed
Removed unused Guard server wrapper constructors and the unused hosted run alias
Consolidated the hook decision type onto the canonical guard decision type
Reused the SQLite ledger timestamp parser from managed stream
Updated tests for the managed stream timestamp parser and Guard server helpers
Verification
go test ./internal/run ./internal/hook ./internal/guard/store/sqlite ./internal/managedstream ./internal/guard/app/servergo test ./...git diff --check