fix(copilot): keep Copilot modular instructions split at user-scope since supported - reverts #1619#2317
Open
kilianpaquier wants to merge 1 commit into
Conversation
…ince supported - microsoft#1619 Signed-off-by: kilianpaquier <git@kilianpaquier.dev>
Author
|
@microsoft-github-policy-service agree |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reverts the Copilot user-scope instructions behavior introduced in #1619 by restoring modular instruction deployment for the Copilot target at user scope (deploying *.instructions.md files under ~/.copilot/instructions/ instead of concatenating into ~/.copilot/copilot-instructions.md).
Changes:
- Remove the Copilot user-scope instruction concat override from the Copilot
TargetProfileand revert to the standardgithub_instructionsmapping. - Delete the concat integration/sync implementation from
InstructionIntegratorand simplify sync cleanup back to directory-based removal. - Update unit/integration tests and the targets matrix docs to reflect modular user-scope Copilot instruction deployment.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/integration/test_scope_integration.py | Updates expectations for Copilot user-scope instructions mapping (github_instructions). |
| tests/unit/integration/test_scope_install_uninstall.py | Updates user-scope install assertions to expect .copilot/instructions/ files rather than a single concat file. |
| tests/unit/integration/test_data_driven_dispatch.py | Adjusts for-scope filtering/mapping expectations for Copilot user-scope instructions. |
| tests/unit/install/test_install_copilot_user_instructions.py | Reworks acceptance tests to validate per-file deployment under .copilot/instructions/ and frontmatter preservation. |
| tests/integration/test_integration_runtime_coverage.py | Removes coverage tests specific to the deleted concat helpers and concat integration path. |
| src/apm_cli/integration/targets.py | Removes Copilot user-scope primitive override; updates Copilot user-scope behavior comments. |
| src/apm_cli/integration/instruction_integrator.py | Removes concat integration path and collapses sync cleanup logic to directory-prefix behavior. |
| docs/src/content/docs/reference/targets-matrix.md | Updates Copilot user-scope documentation to describe modular instructions under ~/.copilot/instructions/. |
Comments suppressed due to low confidence (1)
src/apm_cli/integration/instruction_integrator.py:271
- sync_for_target() now only removes managed files under "//". If a user previously installed Copilot user-scope instructions with the old concat format, the lockfile can still contain ".copilot/copilot-instructions.md" (root file), and an uninstall with this code will never match the new prefix, leaving that legacy file behind. Consider adding a small legacy cleanup pass for that specific path when uninstalling copilot at user scope.
return self.sync_remove_files(
project_root,
managed_files,
prefix=prefix,
legacy_glob_dir=legacy_dir,
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.
Description
Reverts changes introduced in #1619 since Copilot CLI (and VSCode Chat) support user-scope
~/.copilot/instructions/**/*.instructions.md.Fixes #650.
Type of change
Testing
Spec conformance (OpenAPM v0.1)
If this PR changes behaviour that an OpenAPM v0.1
req-XXXcovers,confirm the three-step ritual (see CONTRIBUTING.md "Adding or
changing a normative requirement"):
docs/src/content/docs/specs/openapm-v0.1.mdupdated(new/changed
<a id="req-XXX"></a>anchor + prose + Appendix Crow).
docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.ymlupdated.
@pytest.mark.req("req-XXX")test undertests/spec_conformance/added or extended.CONFORMANCE.{md,json}regenerated viauv run --extra dev python -m tests.spec_conformance.gen_statementand committed.
Proof of tests
Current APM installed version
v0.24.1Local build of this branch: