Repository navigation
docs: clarify apm_modules is derived - #2601
Daniel Meppiel (danielmeppiel) merged 6 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds documentation clarifying that apm_modules/ is a derived, recreatable install directory and should typically be ignored in version control, positioning the lockfile as the durable source of truth.
Changes:
- Documented that
apm_modules/is derived fromapm.yml+apm.lock.yamland can be regenerated viaapm install - Added a recommended
.gitignoreentry forapm_modules/ - Noted CI/ephemeral workflow guidance and current lack of an automatic post-install cleanup flag
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| Python Architect | 0 | 0 | 0 | Documentation-only PR accurately describes the apm_modules/ materialization model. Matches architectural reality. No concerns. |
| CLI Logging Expert | 0 | 0 | 0 | CLI commands referenced (apm install) are accurate and CI pattern is consistent with actual tool behavior. |
| DevX UX Expert | 0 | 0 | 2 | Mental model correct, well-aligned with npm/cargo conventions. Prose is clear and actionable. No blocking issues. |
| Supply Chain Security Expert | 0 | 1 | 1 | Correctly positions apm_modules/ as derived output and the lockfile as the integrity anchor. No security regressions. |
| OSS Growth Hacker | 0 | 0 | 1 | Solid friction-reducer answering the #1 question every Node/Python dev asks on first encounter with a new package manager. |
| Doc Writer | 0 | 4 | 2 | Section is accurate and well-placed; three issues to fold: auto-add contradiction, missing apm-deps-clean reference, and inline limitation prose. |
B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.
Top 5 follow-ups
- [Doc Writer] Fix contradiction: note that APM auto-adds apm_modules/ to .gitignore on first install -- Factual accuracy between pages is non-negotiable for trust. (install-packages.md:134 already says this; the new section should be consistent or cross-reference it.)
- [Doc Writer] Replace manual rm -rf guidance with
apm deps cleanreference -- The command exists and is documented; omitting it teaches users a worse workflow and leaves the CLI surface undiscoverable. - [Supply Chain Security Expert] Add one sentence stating apm install verifies content against lockfile commit-SHA -- Closes the trust-model explanation for CI readers who need to justify the reinstall pattern to security reviewers.
- [Doc Writer] Use 'package cache' instead of 'install cache/materialization directory' for corpus consistency -- Three other pages use 'package cache'; inconsistent terminology erodes the glossary contract.
- [Doc Writer] Wrap the no --clean flag limitation in a
:::note[Planned]callout -- Inline limitation prose is hard to find-and-remove when the flag ships; a callout is a one-block delete.
Architecture
classDiagram
direction LR
class ApmManifest {
<<SourceOfTruth>>
+dependencies list
+file apm.yml
}
class ApmLockfile {
<<SourceOfTruth>>
+resolved_graph dict
+integrity_hashes dict
+file apm.lock.yaml
}
class ApmModules {
<<Derived>>
+materialized_packages list
+dir apm_modules/
}
ApmManifest --> ApmLockfile : resolves to
ApmLockfile --> ApmModules : materializes via install
flowchart TD
A[apm.yml\ncommitted manifest] --> B[apm install\nresolution]
B --> C[apm.lock.yaml\ncommitted lockfile]
C --> D[apm install\nmaterialization]
D --> E[apm_modules/\nderived - gitignored]
E -->|discardable| F[recreate via apm install]
Recommendation
Merge after folding the auto-add contradiction fix and the apm-deps-clean reference (first two followups). The remaining three are valuable but can land as a fast follow without blocking this contribution. The PR is a net positive for onboarding and answers a real first-funnel question.
Full per-persona findings
Python Architect
No findings.
CLI Logging Expert
No findings.
DevX UX Expert
-
[nit] Consider linking to a quickstart/init docs page that auto-generates the gitignore entry at
docs/src/content/docs/reference/lockfile-spec.md
Users should not have to remember to manually add the gitignore entry; linking to an init command or quickstart would complete the flow. -
[nit] Reframe the 'no --clean flag' paragraph as an action rather than an absence at
docs/src/content/docs/reference/lockfile-spec.md
A more cargo-like framing: 'To remove materialized sources after use, runapm deps cleanas a post-step.' States the action, not the absence of a flag.
Supply Chain Security Expert
-
[recommended] The CI reinstall paragraph should state that apm install verifies content against the lockfile commit-SHA at
docs/src/content/docs/reference/lockfile-spec.md
Without this, a reader could wonder whether re-fetching from a remote guarantees integrity. The lockfile is not merely a convenience cache key -- it is an integrity control.
Suggested: Add: 'Because the lockfile pins each dependency to an exact commit SHA, apm install verifies that materialized content matches the recorded identity before deployment.' -
[nit] Cleanup paragraph could note that cleanup should occur after all consuming tools have finished at
docs/src/content/docs/reference/lockfile-spec.md
Avoids a potential TOCTOU-style gap where a later pipeline step references a now-deleted dependency.
OSS Growth Hacker
- [nit] Mention actions/cache keyed on lockfile hash for faster CI at
docs/src/content/docs/reference/lockfile-spec.md
CI users coming from npm/pnp expect a caching pattern. A one-liner referencing actions/cache with hashFiles('apm.lock.yaml') would complete the mental model and give them a copy-pasteable win.
Auth Expert -- inactive
PR #2601 touches only docs/src/content/docs/reference/lockfile-spec.md -- a documentation clarification about apm_modules being derived. No auth-related files or flows affected.
Doc Writer
-
[recommended] The new section omits that APM auto-adds apm_modules/ to .gitignore on first install at
docs/src/content/docs/reference/lockfile-spec.md
install-packages.md line 134 states 'APM adds the entry automatically on first install.' The new section implies users must add it manually, creating a contradiction. Either add 'APM adds this entry automatically on first install' or replace the snippet with a cross-reference to install-packages.md. -
[recommended] Use 'package cache' instead of 'install cache/materialization directory' for corpus consistency at
docs/src/content/docs/reference/lockfile-spec.md
The rest of the docs corpus uses 'package cache' consistently (install-packages.md:133, troubleshooting/install-failures.md, package-anatomy.md).
Suggested: Replace opening sentence with: 'apm_modules/ is the package cache -- installed dependency source, not a source of truth.' -
[recommended] Link to
apm deps cleaninstead of implying manual directory removal atdocs/src/content/docs/reference/lockfile-spec.md
reference/cli/deps.md:134 documentsapm deps cleanwhich removes apm_modules/ without touching apm.yml or apm.lock.yaml.
Suggested: Replace 'remove the directory as a separate cleanup step' with 'runapm deps cleanas a separate cleanup step'. -
[recommended] Wrap the 'no --clean flag' limitation in a callout block for easier future removal at
docs/src/content/docs/reference/lockfile-spec.md
Inline prose about a temporary limitation is harder to remove when the flag ships. A:::note[Planned]callout makes future removal a one-block delete. -
[nit] Add cross-link to integrations/ci-cd.md from the CI paragraph at
docs/src/content/docs/reference/lockfile-spec.md
The CI paragraph covers the same territory as integrations/ci-cd.md but does not link to it. -
[nit] Add cross-link to consumer/install-packages.md at the gitignore recommendation at
docs/src/content/docs/reference/lockfile-spec.md
install-packages.md has the full 'what to commit' table; a cross-reference keeps the lockfile-spec page lean.
Test Coverage Expert -- inactive
documentation-only PR -- no runtime code paths to defend
Performance Expert -- inactive
documentation-only PR; no hot-path code changed and no performance claims in the diff
This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.
|
Thank you for contributing this pull request. APM starts with an This PR closes #2064, which is still open, but that issue is not This is not merge approval, assignment, or a request for further Generated by autopilot-pr-triage-worker. This comment is AI-generated and may contain errors. |
Preserve the original contributor commit and reconcile with current consumer documentation before the bounded microsoft#2064 docs review. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Preserve Copilot marketplace output, unmatched-skill handling and SSH resolution changes before documenting installed-content lifetime. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Address the prior docs panel and the renewed microsoft#2064 documentation scope: distinguish committed intent and resolved state from regenerable content, clarify native plugin lifetime, and link safe cleanup guidance without promising new flags. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Preserve the canonical Claude user-scope cleanup and related documentation without changing the approved docs-only PR scope. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Preserve newly landed changes without extending the approved documentation-only scope. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| Doc Writer | 0 | 0 | 0 | Accurate artifact roles, explicit live-consumer lifetime limits, and discoverable cleanup guidance. |
B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.
Top 2 follow-ups
- [APM CEO] Completed: The PR body uses the repository template and relates to apm.yml + apm.lock.yaml + apm_modules left after installation #2064 without closing it. The broader issue remains open.
- [APM CEO] Completed: Actual technical workflows passed after the reviewed candidate was pushed; evidence and revision boundaries are below.
Recommendation
The CEO's content recommendation is ship_now. Its two mechanical prerequisites are now complete. No in-scope content follow-up remains. This is advisory, not merge authorization; existing reviewer ownership is unchanged.
Full per-persona findings
Doc Writer
No findings. The genuine affected-docs delta was retained across faithful main integration; a second broad panel was not run. Docs-sync's deterministic docs-only L0 classification was no_change.
This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.
Folded in this run
- (Prior panel) Reconcile automatic
.gitignorehandling and add consumer/reference/CI cross-links -- resolved ind6588c7136. - (Prior panel) Link the existing
apm deps cleanreference and require all consumers to finish first -- resolved ind6588c7136. - (Prior panel) Explain frozen reinstall against locked state and source availability without promising blanket content-integrity verification -- resolved in
d6588c7136. - (Prior panel, reconciled with renewed scope) Replace disposable-cache/planned-flag framing with installed dependency content and an explicit native-plugin lifetime caution -- resolved in
d6588c7136.
The historical proposal to advertise a planned cleanup flag is not a deferred implementation commitment. Runtime cleanup and automatic closure of the broader issue are outside the renewed scope. README was not changed.
Copilot signals reviewed
Two classification rounds found no inline comments or review threads. The two existing Copilot overview reviews belong to the original head; no new Copilot review was requested or represented as current-head coverage.
Lint contract
All eight current local gates passed on ccf2fad385184f028b7a20f049dcecbcce2c9edd, integrated with f8e59dc43bc527c6ccd1a44709d2efbacd512134: Ruff check and format, pylint R0801, auth boundary, architecture boundary, YAML I/O safety, portable relative paths, and the 2100-line limit.
Ruff commands used uv run --frozen --extra dev ruff check and ruff format --check, each over src/ tests/ scripts/lint_architecture_boundaries.py scripts/architecture_linter/ scripts/windows_native_symlink_probe_entry.py. Both exited 0 without diagnostics. The macOS grep-based safety checks used equivalent deterministic Python scans with the CI exclusions.
cd docs && npm run build passed: 126 pages; 1081 relative links, none broken. No local full runtime pytest suite was run for this two-page docs-only change. Deterministic owner detection found zero touched runtime owners.
CI
On pushed head ccf2fad385184f028b7a20f049dcecbcce2c9edd, all five applicable technical workflows completed successfully: CI, technical readiness, CodeQL, NOTICE, and docs build. Zero CI recovery iterations. Normal PR documentation deployment was skipped.
Actual CodeQL uploads 1965967432 (Python) and 1965965034 (Actions) have zero results and no analysis error. They analyzed synthetic merge e554bcd92ff7c44fc14fa40a8d6d13462c80030e, whose parents are the tested base and pushed head. These uploads do not certify newer main bd672981210f7751381d88eba4d9d9354d2a44ea; that revision has a separate strict compatibility preview only.
Mergeability status
Live snapshot: 2026-10-16T08:54:28.127413+00:00.
| PR | head SHA | CEO stance | iters | folds | defers | Copilot rounds | CI | mergeable | mergeStateStatus | notes |
|---|---|---|---|---|---|---|---|---|---|---|
| #2601 | ccf2fad385 |
ship_now | 2 | 4 | 0 | 2 | green | MERGEABLE | Policy requirements outstanding | Strict conflict-free preview against bd672981; reviewed patch unchanged and all #3190 content retained. Newer base not executed. |
Convergence
2 outer iterations including retained recovery; 2 Copilot rounds. Final panel recommendation: ship_now.
Ready for maintainer review. No merge, queue operation, reviewer request, review approval, issue closure, or policy change was performed.
Generated by autopilot-pr-merge-worker. This comment is AI-generated and may contain errors.
77555d3
into
microsoft:main
document(docs): clarify derived dependency content and its safe lifetime
Description
TL;DR
Clarify the purpose and version-control treatment of
apm.yml,apm.lock.yaml, andapm_modules/. Installed content is regenerable, but native plugins and linked resources must remain available while their consumers use them. This completes only the approved documentation slice and preserves Aryan Singh K.'s original contribution.Important
This PR does not implement automatic cleanup or complete the broader cleanup request in #2064.
Problem (WHY)
The clarification concentrates on that non-obvious lifetime constraint rather than another installation tutorial: "Add what the agent lacks, omit what it knows".
Approach (WHAT)
.gitignore.apm deps cleanwithout promising a new automatic cleanup flag.Implementation (HOW)
reference/lockfile-spec.mdconsumer/install-packages.mdDiagrams
The diagram shows the existing resource relationship documented here, not new runtime behavior: cleanup follows the end of every consumer's required lifetime.
flowchart LR subgraph Source["Committed state"] M["apm.yml: dependency intent"] L["apm.lock.yaml: resolved and managed state"] end subgraph Installed["Installed content"] D["apm_modules: regenerable"] end subgraph Lifetime["Required lifetime"] C["Native agents and other consumers"] F["All consumers finished"] end M --> D L --> D D --> C C --> F F --> X["Optional cleanup"]Trade-offs
Benefits
Issue and approved scope
Issue: Related #2064
Human scope-approval comment: #2064 (comment)
Does this PR complete the issue, or what remains?
Only the documentation slice is complete. Automatic cleanup and any broader lifecycle design remain outside this PR; #2064 must remain open. The current scope record preserves the original approved fields and identifies Daniel Meppiel (@danielmeppiel) as review contact.
Type of change
Testing
Validation
Executed on
ccf2fad385184f028b7a20f049dcecbcce2c9edd, integrating mainf8e59dc43b(including the intervening documentation dependency updates). Full runtime tests were not run locally for this docs-only change. Remote CI is observed separately after push.Exact local commands and outcomes
uv run --frozen --extra dev ruff check src/ tests/ scripts/lint_architecture_boundaries.py scripts/architecture_linter/ scripts/windows_native_symlink_probe_entry.py- passed:uv run --frozen --extra dev ruff format --check src/ tests/ scripts/lint_architecture_boundaries.py scripts/architecture_linter/ scripts/windows_native_symlink_probe_entry.py- passed:uv run --frozen --extra dev python -m pylint --disable=all --enable=R0801 --min-similarity-lines=10 --fail-on=R0801 src/apm_cli/ scripts/lint_architecture_boundaries.py scripts/architecture_linter/ scripts/windows_native_symlink_probe_entry.py- passed:bash scripts/lint-auth-signals.sh- passed,[+] auth-signal lint clean.bash scripts/lint-architecture-boundaries.sh- passed, exit 0 with no output.CI-equivalent Python scans for YAML file-I/O safety, raw
str(relative_to)use, and the 2100-line covered-file limit - all passed, zero violations. These used the same regexes/exclusions as CI because macOS grep lacks-P.cd docs && npm run build- passed: 126 pages built; all internal links valid.mmdc -i body-lifetime.mmd -o body-lifetime.png --quiet- passed, exit 0; diagram visually checked.Exact-base/head canonical-owner detection - passed; only the two documentation paths changed, zero touched owners.
How to test
cd docs && npm ci && npm run build; expect the build and link checks to pass.apm installexiting.apm deps cleanlinks.Spec conformance (OpenAPM v0.1)
If this PR changes behaviour that an OpenAPM v0.1
req-XXXcovers,confirm the three-step ritual in the
development guide:
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.
Co-authored-by: Copilot [email protected]