Repository navigation
fix(hooks): copilot self heal dual hooks (drop camelCase entry) - #3449
Merged
Merged
Conversation
Legacy camelCase invocation rewrites the old stock config to the single-schema form, so upgrades need no manual rtk init --copilot.
Match the exact stock camelCase entry instead of the whole file, so extended configs (extra hooks/keys) heal too; anything non-stock stays untouched.
Real-binary tests: heal correctness, refusal matrix, response integrity, concurrency, unwritable dir.
aeppling
marked this pull request as ready for review
August 5, 2026 15:09
KuSh
approved these changes
Aug 6, 2026
KuSh
left a comment
Collaborator
There was a problem hiding this comment.
LGTM, just a nitpick and a question (non blocking)
| // Exact camelCase entry written by pre-b754b85 `rtk init --copilot`; that | ||
| // stale registration is the only thing routing invocations into the | ||
| // CopilotCli arm above. Only this entry is removed — user additions stay. | ||
| fn legacy_camelcase_entry() -> Value { |
Collaborator
There was a problem hiding this comment.
Nitpick: use OnceLock for lazy init
Merged
KuSh
approved these changes
Aug 6, 2026
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
rtk init --copilot: on a legacy camelCasepreToolUseinvocation, remove rtk's own duplicate camelCase entry fromrtk-rewrite.json(project + global) so upgrades need no manual re-initTest plan
cargo fmt --all && cargo clippy --all-targets && cargo testtests/copilot_selfheal_test.rs: 13 real-binary e2e tests (sandboxed HOME/COPILOT_HOME); heal correctness, 10-case refusal matrix, response byte-identical pre/post heal, concurrency, unwritable dir, exit 0 + silent stderr everywherertk hook copilot, configs and responses inspected