Commit 24c38bf
committed
Merge origin/main into feat/install-compile-root-flag
Resolved conflicts across install + compile + scope + tests; folded in
the Hickey/Lowy review fixes that were pending on PR microsoft#928.
Conflict resolutions follow upstream's Ruff convention (PEP 604
``X | None`` over ``Optional[X]`` with ``# noqa: F401, UP035`` on the
legacy import):
- ``commands/install.py``: kept upstream's ``_install_apm_packages`` /
``_post_install_summary`` decomposition; threaded ``--root`` Click
option + ``install_root_redirect`` context manager through the
refactored handler.
- ``commands/compile/cli.py``: source root reads (``apm.yml``
detection, ``detect_target`` project_root) wired through
``get_source_root(InstallScope.PROJECT)`` so they survive
``--root``'s chdir.
- ``compilation/agents_compiler.py`` + ``distributed_compiler.py``:
preserved the ``source_dir`` parameter end-to-end so primitive
paths in validation warnings, source-attribution comments, and
verbose-trace lines render against the source root.
- ``install/services.py`` + ``phases/integrate.py``: kept
``source_root=`` thread-through alongside upstream's new ``ctx=``
parameter to ``integrate_local_content``.
- ``install/context.py``: kept upstream's ``cowork_nonsupported_warned``
field; collapsed conflicting docstrings.
Hickey/Lowy fixes (microsoft#928 (comment)...):
- (Lowy / should-fix) ``InstallContext.source_root`` is now
required, not ``Optional[Path] = None``. Resolved at the CLI
boundary in ``run_install_pipeline``. Dropped the
``ctx.source_root or ctx.project_root`` and
``ctx.source_root or ctx.apm_dir`` fallbacks in
``phases/resolve.py`` and ``install/sources.py`` -- they masked
bugs whenever ``source_root != project_root``.
- (Hickey / should-fix) Replaced manual ``__enter__`` / ``finally:
__exit__`` pairs with ``with install_root_redirect(...)`` /
``with compile_root_redirect(...)`` in both commands. Re-indents
the handler body but unwinds correctly even on early ``return`` or
uncaught exceptions, and removes the ``_root_redirect`` reference
from the function frame.
- (Hickey / should-fix) Added a "Source-vs-deploy root convention"
section to ``install/pipeline.py``'s module docstring spelling out
which root each phase reads vs writes. Future field additions
must pick a side deliberately.
- (Lowy / optional) Expanded the comment on
``compile_root_redirect = install_root_redirect`` to document why
the alias exists and when it should split.
Test fixes for the now-required ``source_root`` field:
- ``test_direct_dep_failure.py`` and ``test_no_policy_flag.py``:
pass ``source_root=`` alongside ``project_root`` /
``apm_dir`` in ``InstallContext(...)`` constructions.
- ``test_architecture_invariants.py``: kept upstream's 1800-LOC
``commands/install.py`` budget; the ``--root`` plumbing fits in
the headroom thanks to upstream's parallel decomposition.
Verified end-to-end: ``apm install --root SCRATCH`` +
``apm compile --root SCRATCH --target codex,opencode`` produces
byte-identical AGENTS.md files to an in-place compile (modulo the
non-deterministic Build ID). All install + compilation unit tests
pass (656 + arch-invariant suite); the pre-existing 23 failures
elsewhere are environmental (missing ``ruamel`` in the local venv,
missing ``python``/``llm`` in PATH on Nix bare shell) and unrelated
to this merge.756 files changed
Lines changed: 90319 additions & 29826 deletions
File tree
- .apm
- agents
- instructions
- skills
- apm-review-panel
- assets
- evals
- pr-description-skill
- assets
- evals
- content
- fixtures
- results
- scripts
- .github
- ISSUE_TEMPLATE
- agents
- aw
- instructions
- skills
- apm-review-panel
- assets
- evals
- pr-description-skill
- assets
- evals
- content
- fixtures
- results
- scripts
- workflows
- devcontainer
- scripts
- src/apm-cli
- test
- apm-cli
- unit
- test_helper
- docs
- src/content/docs
- contributing
- enterprise
- getting-started
- guides
- integrations
- introduction
- reference
- troubleshooting
- packages/apm-guide/.apm/skills/apm-usage
- scripts
- project
- runtime
- src/apm_cli
- adapters
- client
- package_manager
- bundle
- commands
- compile
- deps
- marketplace
- plugin
- uninstall
- compilation
- core
- deps
- install
- helpers
- mcp
- phases
- presentation
- integration
- marketplace
- models
- dependency
- output
- policy
- primitives
- registry
- runtime
- security
- utils
- workflow
- tests
- acceptance
- benchmarks
- fixtures
- azure-skills
- .claude-plugin
- marketplace
- policy
- integration
- marketplace
- unit
- commands
- compilation
- core
- install
- phases
- integration
- marketplace
- policy
- primitives
- workflow
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
146 | 156 | | |
147 | 157 | | |
148 | 158 | | |
| |||
213 | 223 | | |
214 | 224 | | |
215 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
| 86 | + | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
0 commit comments