Repository navigation
Description
In one sentence: APM already makes sure the bytes it installs match the lockfile; in 0.40 it also checks the copy of a plugin that the harness (the coding agent tool, such as Claude Code, GitHub Copilot or Codex) actually loads, and apm status reports that copy as matches, differs or unknown.
Why
The lockfile (apm.lock.yaml) records the exact version and a content hash of every package APM installs: skills, plugins and MCP servers (tool servers an agent can call). Agent configuration runs with the developer's permissions, so these bytes matter like application code.
The lock covers what APM writes, not what the harness loads. Some harnesses copy an enabled plugin into their own cache and load it from there. An edited or tampered file in that copy goes unnoticed.
Sam is the security lead at a company where 300 developers use Claude Code and GitHub Copilot. An auditor asks: "Show that the code-review plugin your agents run is the version security approved." Sam can show the lockfile, but not that each harness's copy still has those bytes.
Why now. Claude Code and GitHub Copilot now let companies lock agents down with managed settings (files IT deploys that users cannot override) and approved plugin marketplaces (catalogs of allowed plugins). That controls which plugins run, not which bytes. Shared standards (Agent Plugins, Agent Skills in .agents/skills, AGENTS.md, MCP mcpServers) send one plugin to several harnesses, and each keeps its own copy.
What
apm status, a new read-only command planned for 0.40 in its own epic, shows the result in its CONTENT column. apm status --check fails on any difference.
Illustrative (planned for 0.40; output format not final):
$ apm install # locks superpowers v2 with a content hash
$ echo "# tweak" >> .agents/plugins/superpowers/skills/x/SKILL.md
$ apm status --check; echo $?
HARNESS SCOPE NAME DECLARED PRESENT CONFIGURED CONTENT VERDICT
claude project superpowers v2 yes yes differs (1 file) drift
copilot project superpowers v2 yes yes matches ok
windsurf user - - - - unknown unknown (no readable state)
1
$ git checkout HEAD~1 -- apm.yml apm.lock.yaml && apm install
[!] superpowers: local edit in .agents/plugins/... replaced by locked v1 bytes
Columns: DECLARED is in the lockfile; PRESENT means files sit where the harness looks; CONFIGURED means the harness's own settings enable it; CONTENT compares bytes with the lock.
flowchart LR
A["apm.yml"] --> B["apm install"]
B --> C["apm.lock.yaml: version + content hash"]
B --> D["files APM deploys"]
D --> E["harness copy it loads from"]
C --> F["apm status: compare hashes"]
E --> F
F --> G["matches"]
F --> H["differs: --check exits 1"]
F --> I["unknown: location not documented or unreadable"]
What it includes
- 0.40: check the harness's copy against the lockfile hash.
- Identical content hashes on Linux, macOS and Windows (done).
- Registry proxies and mirrors that keep package bytes intact.
- MCP server definitions that reject undeclared fields; private MCP servers from GitHub repositories.
- Lockfile guards: an older APM refuses a newer lockfile (done); declarative overrides of single items in a package.
What it does not include
- Running the harness to see what it loaded. That is the real-harness proof epic ([EPIC] Prove that real harnesses load what APM installed, through upgrades and rollbacks #5197); runtime facts stay
unknownhere. - Repairs from
apm status, which only reads.apm installrestores locked bytes and says so. - Reading a harness copy the vendor does not document.
- Org policy rules ([EPIC] Policy compile: turn one APM policy into each harness's managed settings, and check them before install #3618) and registry API design.
How
The check reuses the lockfile's own hash function, so "same bytes" has one definition. The shared apm status reader opens only the paths each harness documents. Those paths are data in each harness's adapter record (its description, #3616), so a new harness needs a record entry, not new code. CONTENT is evidence; the verdict is computed separately. Undocumented or unreadable means unknown.
Value
- Developers: a local tweak inside a plugin shows up before it silently changes the agent.
- Admins and security leads: audit evidence that the bytes agents load are the locked bytes.
- Package authors: users run exactly what was published, on every harness.
- Ecosystem: vendors need not build their own verification; the check reads the files they already document.
How it fits APM's principles
- One manifest, one lockfile, one policy: one lockfile hash is the reference for every harness copy.
- Unbound from harness binaries: APM reads the copy from disk; it never runs the harness.
- Honest evidence: an unreadable copy is
unknown, notmatches. - Promises before features: the check lands as a failing test first.
- Backward-compatible YAML: no new
apm.ymlkeys.
Promises you can verify
- When the harness's copy has the locked bytes,
apm statusshowsmatches. When any file differs, it showsdifferswith the file count, andapm status --checkexits 1.
How we verify it: an automated test edits one file in the harness's copy and checks output and exit code; a nightly run repeats it with the real Claude Code and GitHub Copilot. - When APM cannot read the copy,
apm statusshowsunknown, nevermatches.
How we verify it: tests make each kind of harness state file unreadable in turn. apm statusnever changes a file and never starts the harness.
How we verify it: the test compares the file system before and after, and a process monitor counts zero process starts.- After a rollback to an older lockfile and
apm install, the harness's copy matches the older locked bytes, and APM names any local edit it replaced.
How we verify it: a nightly upgrade-and-rollback journey checks that the real harness loads the expected version marker.
Child issues
apm listshows whether a harness's plugin cache still matches the lockfile #5767: the lockfile check covers the plugin copy the harness loads (0.40).- MCP extra passthrough: tighten to explicit
extra:-only (fail-closed) with deprecation path #1806: MCP server definitions accept extra fields only when declared. - [FEATURE] Private MCP servers sourced from GitHub repos + consumer token-env trust policy #1869: private MCP servers from GitHub repositories, with a consumer trust policy.
- [FEATURE] Declarative, deterministic primitive overrides (dependencies.overrides) — distinct from the #739/#1120 namespacing effort #2413: declarative, deterministic overrides of single items in a package.
- [BUG] Registry proxy (PROXY_REGISTRY_URL) fails to install repos that contain in-repo symlinks; error reported as a misleading HTTP 404 #3110: installs through a registry proxy keep symlinks and report real errors.
- Already done: Fail closed when CLI is older than lockfile apm_version #2334, [BUG] Package
content_hashdiffers on Windows when the dependency repository setstext=autoin.gitattributes#3270, [BUG] Package content hash differs on Windows for packages with in-repo symlinks, so --frozen fails #3457, [BUG] Re-downloaded marketplace-plugin trees stay unstamped, so lockfile hashes fail on fresh installs #3585, Commit admission: attribute a commits-API tip observation to the Git destination it admits #5056, install -g refuses skills when CLAUDE_CONFIG_DIR is HOME itself #5096, Hook cleanup should replace a merged hook config instead of writing through a link #5181, deps: fetch a default-branch dependency by its admitted commit, not by name #5199.
For contributors and agents
0.40 slice (from the 0.40 epic package, rev 3)
- Epic verdict: KEEP, cache-vs-lock slice. Wave W2. Stories S2 (Diego: Claude + Copilot + Cursor) and S5 (Sam: security lead). Size M. Milestone 0.40.
- New child
apm listshows whether a harness's plugin cache still matches the lockfile #5767 "Lock verifies the vendor plugin cache": done whenstatusshowscontent: matches | differs | unknownand P-LAWlockfile.vendor_cache_matches_lock(red-first in J29 step 3) passes. - Deps: P1 (
apm statusepic, lens reader over F0state_sources). - J29 flagship (owned by F1 [EPIC] Prove that real harnesses load what APM installed, through upgrades and rollbacks #5197): clean clone -> activation -> upgrade -> local edit -> rollback; green owners F1 (activation, upgrade) and [EPIC] Supply-chain integrity: what your agents load is exactly what you locked #3619 (content). Step 3 is the local edit;
apm status --checkmust reportcontent: differs (1 file)and exit 1. Rollback overwrites the edited deployment with locked bytes and says so (I7: nothing replaced silently);export-patchon native plugin edits is not relied on (replay checks the deployed fingerprint first). - Evidence columns (P1): DECLARED (APM lock), PRESENT (on disk where the harness looks), CONFIGURED (harness settings such as
enabledPlugins,mcpServers;n/aif the harness has no such key), CONTENT (hash vs lock). VERDICT is computed only from evidence (status.evidence_not_verdict). Runtime-only facts areunknown. - APM never runs a harness binary (P-LAW
status.no_spawn,harness.never_spawns; guardlens.no_subprocess). Cache paths come from F0state_sources(FILE_GLOB, SETTINGS_KEY, MANAGED_FILE by OS), each citing the harness doc or source URL; uncited ->unknown. - Red-first mechanics: journey rows add strict
known_cellsentries (Vtests/lifecycle/journeys/test_journeys.py:70,264); laws addproperty_catalog/<id>.jsonwith a seeded negative control ([TEST] Oracle adequacy gate: seeded-fault negative controls per oracle, and receipts that record exercised dimensions #5511); real-harness cells land inscripts/real_harness/expected.jsonwith today's verdict. J29 admission needs F2 child Journey index: admit J28, J29, E07, P05 (lift the 27 pin) #5753 (journey index pins 27, Vtests/quality/test_journey_index.py:3).
Original epic body (rev 3)
Outcome. What APM installs is exactly what was locked: content hashes are stable on every platform, proxies and mirrors preserve package bytes, MCP server definitions fail closed on untrusted input, and lockfiles cannot be silently downgraded or overridden.
| Pillar | Horizon |
|---|---|
| Govern | Next |
In scope:
- Cross-platform content hash stability (line endings, symlinks)
- Registry proxy and mirror fidelity
- MCP trust: explicit passthrough, private servers and their trust policy
- Lockfile version guards and declarative overrides
Out of scope:
- Organization policy rules (E5)
- Registry API design (E4)
Sub-issues: #1806, #1869, #2334, #2413, #3110, #3270, #3457, plus #3585, #5056, #5096, #5181, #5199, #5767.
Tracked on the APM Roadmap.
Legend
- Epic codes: F0 = [EPIC] New harness = one data record plus one shared checklist #3616 (declarative harness adapters), F1 = [EPIC] Prove that real harnesses load what APM installed, through upgrades and rollbacks #5197 (real-harness proof), F2 = [EPIC] Every promise tested; real harnesses prove upgrades and rollbacks #5509 (promise engine), P1 = new
apm statusepic, P2 = [EPIC] Policy compile: turn one APM policy into each harness's managed settings, and check them before install #3618 (policy compile), P3 = [EPIC] Marketplace-first distribution: pack once, publish to your organization's approved marketplace #3297 (marketplace-first distribution). - Evidence key: V = verified in code at
regent/main20bd83d, I = inferred, D = vendor docs. - Oracles: O1..O16 and invariants I1..I9 are the lifecycle engine's oracle catalog ([EPIC] Every promise tested; real harnesses prove upgrades and rollbacks #5509).
This epic body is a plan, not a scope approval. Sub-issues carry their own scope approval; see CONTRIBUTING.
Sub-issues
Collapse Sub-issuesSub-issues
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTodo
Activity
extra:-only (fail-closed) with deprecation path #1806content_hashdiffers on Windows when the dependency repository setstext=autoin.gitattributes#3270danielmeppiel commentedon Nov 23, 2026
Progress update for v0.39.0 (cut 2026-11-24). Hardening fixes landed or in flight under this epic:
Related, tracked under the crash-recovery epic #5105: #5039 (local-bundle hook sidecar writes keep config file records current, fixed by #5042) and #5111 (crash recovery restores the recorded mode, fixed by #5117).
github-actions commentedon Nov 25, 2026
Advisory triage (not a maintainer decision): this is a
trackingepic that already carries its pillar label. It looks like a roadmap container rather than directly implementable work, so no scope approval is implied. Each sub-issue listed in the body needs its own scope approval per CONTRIBUTING. Suggested next step: keep the epic open as a tracker and triage the children individually.danielmeppiel commentedon Dec 2, 2026
0.40 slice
New child: "Lock verifies the vendor plugin cache" -- done when
statusshowscontent: matches | differs | unknownand P-LAWlockfile.vendor_cache_matches_lock(red-first inJ29 step 3) passes. Size M. Deps P1.
apm listshows whether a harness's plugin cache still matches the lockfile #5767[-][EPIC] Supply-chain integrity[/-][+][EPIC] Supply-chain integrity: what your agents load is exactly what you locked[/+]apm listshows whether a harness's plugin cache still matches the lockfile #5767danielmeppiel commentedon Dec 2, 2026
0.40 plan: a small gap remains, then this epic parks. #5767 moved to #5745 (on-disk evidence only). Remaining here: #1806 and #1869 (design), #2413 (deferred), and #3110, where only the diagnostic shipped and the rest needs a new scope record.