Refactor 922 cowork cleanups#1667
Open
abhinavgautam01 wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR centralizes config key removal through the update_config() write path and extends target deployment path resolution to support primitive-specific deploy_root overrides (used by skills), updating skill integration logic and tests accordingly.
Changes:
- Add
remove_keyssupport toupdate_config()and route_unset_config_key()through it. - Extend
TargetProfile.deploy_path()with an optionalprimitiveparameter to honor primitive-leveldeploy_root/subdir. - Refactor skill integrator path building to use
target.deploy_path(...)and expand tests for these behaviors.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/test_config.py | Adds unit tests ensuring unset helpers call the shared update_config() path. |
| tests/unit/integration/test_skill_integrator_phase3w4.py | Updates test target construction to provide a deploy_path() matching new primitive-aware behavior. |
| tests/unit/integration/test_skill_integrator_hermetic.py | Same as above for hermetic integration coverage. |
| tests/unit/integration/test_copilot_cowork_target.py | Adds coverage for primitive deploy-root override behavior on the copilot target. |
| src/apm_cli/integration/targets.py | Implements deploy_path(..., primitive=...) and removes prior Path typing workarounds. |
| src/apm_cli/integration/skill_integrator.py | Replaces bespoke “skills root” resolution with TargetProfile.deploy_path(). |
| src/apm_cli/config.py | Adds remove_keys to update_config() and routes unsets through it. |
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
Cleans up the remaining accepted cowork internal refactor items from #922. This routes skill deployment path construction through
TargetProfile.deploy_path(...), preserves primitive deploy-root overrides such as.agents/skillsand makes config unset helpers use the sharedupdate_config()read-modify-write path.The
sync_remove_filescowork-root caching item from #922 was already present on currentmain, so this PR does not touchbase_integrator.py.Fixes #922
Type of change
Testing
Validation run:
Results:
Note: uv run --python 3.12 pytest -q exited 0 locally, but integration/live suites were environment-gated (26704 skipped, 173 deselected), so the meaningful broad local signal is the full unit suite above.
Spec conformance (OpenAPM v0.1)
If this PR changes behaviour that an OpenAPM v0.1 req-XXX covers,
confirm the three-step ritual (see CONTRIBUTING.md "Adding or
changing a normative requirement"):
Spec edit: docs/src/content/docs/specs/openapm-v0.1.md updated
(new/changed anchor + prose + Appendix C
row).
Manifest edit: docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.yml
updated.
Test edit: a @pytest.mark.req("req-XXX") test under
tests/spec_conformance/ added or extended.
CONFORMANCE.{md,json} regenerated via
uv run --extra dev python -m tests.spec_conformance.gen_statement
and committed.
N/A -- this PR does not change OpenAPM-observable behaviour.