Skip to content

perf(integrate): build the link resolver only for primitives with files (#5838 slice 2a) - #5842

Open
Daniel Meppiel (danielmeppiel) wants to merge 111 commits into
mainfrom
fix-5838-slice2a-lazy-link-resolver
Open

Daniel Meppiel (danielmeppiel) wants to merge 111 commits into
mainfrom
fix-5838-slice2a-lazy-link-resolver

Conversation

@danielmeppiel

@danielmeppiel Daniel Meppiel (danielmeppiel) commented Dec 3, 2026 •

Copy link
Copy Markdown
Collaborator

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 5d2ed207fca934ed488d8f7b035896cba375b6ed

Dimension Assessment Rationale
Change confidence 9/10 ↑ Red-first 16df5a5 fails on #5841's head (discover_primitives 44 vs 14) and passes after the fix.
↑ The sibling-link lifecycle module (agents, instructions, prompts and commands linking deployed siblings) stays 10/10; removing the agent integrator's init turns 3 of its cells red, so the resolver is still built before rendering wherever there are files.
↑ The plugins14 parity cells (deployed bytes, receipts, lock rows) stay green.
↓ CI on this head is not observed yet.
↓ test_hook_shared_scope_claims.py::...[no-memo-control] fails on #5841's head without this change; it is not addressed here.

Description

Slice 2a of #5838. Stacked on #5841 (slice 3), which is stacked on #5839 (slice 1).

The agent, prompt and instruction integrators built a target link resolver (primitive discovery plus the planned skill files) before they looked for files to deploy. They did it in the commit gate's dry run and again in the real run. On the 14-plugin world, whose plugins ship only skills, that was 44 resolver builds for 14 plugins and about 26% of integrate time (cProfile). The three integrators now look for files first, as the command integrator already did, and build the resolver right before rendering. Rendered output is unchanged.

No change to the commit gate, the write seam or the overwrite evidence: the dry run still runs every gated integrator. A planned_skill_files memo was approved as an option but is not needed: after this change it runs once per plugin, which is the floor without a cross-integrator cache.

cost: 0 extra I/O. Calls table on the plugins14 world (platform-independent, budget rows in tests/perf/count_budgets.json):

Counter #5841 head 7c9fff7 this PR
discover_primitives, fresh 14 44 14
planned_skill_files, fresh 14 42 14
discover_primitives, re-pass 23 71 23
planned_skill_files, re-pass 23 69 23

Issue and approved scope

Issue: Refs #5838 (slice 2a of the floor plan)

Human scope-approval comment: #5838 (comment)

Does this PR complete the issue, or what remains? It does not. Other floor-plan slices remain. Whether the full plan/apply rewrite (slice 2b) is still worth it is decided on the before/after of this PR.

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally
  • All existing tests pass
  • Added tests for new functionality (if applicable)
promise: P-PERF-count-budgets -- a local multi-plugin install builds one link resolver per primitive that has files to deploy (source: #5838 scope record)
cell: OP=install SCOPE=user SRC=local PRIM=skill(plugin) TGT=opencode, fresh 14 and re-pass 23   owner: BaseIntegrator.init_target_link_resolver callers (agent, prompt, instruction integrators)
instrument: today test -> tests/integration/test_local_plugin_install_cost.py::test_link_resolver_inits_only_for_primitives_with_files (extends the #5838 cost module) + calls rows on both plugin journeys
oracles: [call counts, byte parity, sibling-link lifecycle]  decisive: discover_primitives == planned_skill_files == 14 (fresh) / 23 (re-pass)
failing-before: 16df5a5b -> assert 44 == 14
passing-after: 1 passed; sibling-link lifecycle 10 passed
guard+mutation: eager init (the change reverted) -> 44/42 and 71/69; init removed from the agent integrator -> 3 sibling-link cells red     ledger: n/a (performance)
hints executed: none printed

All local runs went through the host local-test.sh guard, with APM_E2E_TESTS=1:

  • pytest tests/unit/integration tests/integration/test_local_plugin_install_cost.py tests/integration/test_sibling_skill_agent_link_lifecycle.py tests/unit/test_perf_count_budgets.py: 3,677 passed. The 1 failure is test_hook_shared_scope_claims.py::...[no-memo-control], which fails on perf(install): per-run memos for discovery, registry config and lockfile reads (#5838 slice 3) #5841's head without this change.
  • Lint mirror, all clean: ruff@0.15.12 check and format; pylint R0801 (src and scripts); lint-auth-signals.sh; complexity ratchet; taxonomy --changed; architecture boundaries.

Changelog

  • One fragment per section, changelog.d/<pr>.<section>.md, holding
    one line: user-visible effect first, 25 words or fewer, ending with
    (#PR); breaking changes only under upgrade notes; no Highlights; no
    new lines under ## [Unreleased]. See changelog.d/README.md and
    .github/instructions/changelog.instructions.md.
  • N/A -- internal-only change (CI, tests, refactor).

Spec conformance (OpenAPM v0.1)

  • Spec edit: docs/src/content/docs/specs/openapm-v0.1.md updated
    (new/changed <a id="req-XXX"></a> 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.

…t collected fails

A required cell in tests/quality/harness_conformance.json must earn a passing
receipt. Until now ReceiptWitnessPlugin only checked witnesses that passed, so
a skipped witness left its required cell unproven without failing anything.

- ReceiptWitnessPlugin fails a skipped or xfailed witness of a required cell
  (setup or call phase), naming every cell and the skip reason. A cell that no
  longer applies leaves through the contract (applies()), not a run-time skip.
  Skips of nodes that witness no required cell stay skips.
- harness_ratchet.uncollected_witnesses(): every required witness node must be
  collected (pytest --collect-only over the witness modules), so a renamed or
  unparametrized witness is refused.
- Mutation tests: a required witness that skips fails the gate (pytester), a
  skip outside required cells stays a skip, and a dropped node is named as
  not collected.

Refs #5796

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…easured; plain skips and untracked xfails fail

Refs #5796

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…quired cells

A required cell's witness passes with a receipt, or is a strict
KnownFailure listed in required_known_failing whose tracking equals the
ledger issue, whose issue is open (closed-issue gate), and whose failure
matches. Any other xfail, a skip in any phase, an uncollected node or a
strict XPASS fails. The ledger only shrinks against the merge-base; a
base without the section compares against the frozen 8-cell #5797 set.

Refs #5796

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Adds src/apm_cli/lens/: model.py, the stdlib-only interface contract of the
apm list inventory (frozen dataclasses Source, Evidence, HarnessRef,
Location, Item, CoverageCell, NotVisible, Inventory), and verdict.py, the
only evidence -> state judgment (state, folder_content, item_state).

Registers the lens-observation owner with guard
registry-delegation-lens-observation: model.py imports only the standard
library, only verdict.py writes an APM health state, and no lens module
writes, deletes, spawns or opens a socket. One mutation case proves it.

Refs #5754

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
J13 step 1 now runs 'apm run --list' against an O1 golden captured from
today's 'apm list' (the 0.39 scripts table), and asserts it runs nothing.
Step 4's diagnose advice moves to 'apm run --list'.

Refs #5756

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
'apm run --list' prints the 'apm list' scripts table or the No scripts
found panel byte-for-byte, exits 0 and runs nothing, so bare 'apm list'
can switch to the agent-config inventory. The script-not-found hint and
the docs now point to 'apm run --list'.

Refs #5756

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Refs #5756

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Adds the test-only R0 layer of the apm list test plan: structured oracles,
pending-witness promises, laws, schema, mutations and static guards. No
committed cells: every HC-LIST promise stays pending-witness, so the
harness ratchet is untouched.

- oracles.Evidence gains json_equal and rows_equal (parsed path plus
  expected value), checked inside check_obligation; a mismatch or an
  unparseable output fails with no receipt.
- tests/lifecycle/list_oracle.py is the one parser of apm list output
  (schema-validated JSON views; text rows by header column spans; summary
  and footer by exact clause and line).
- HC-LIST-01..15 and HC-LIST-03.targets appended to harness_contract.py
  as pending-witness; HC-LIST-07 carries scopes=(user,) with a citation.
- P-LAW-list.* laws in the property catalog as forward laws citing #5745;
  the ledger guard accepts a law only when bug-referenced or forward with
  a cited issue.
- JSON Schema plus 4 outcome fixtures; S137 AST guard; C6 clone proof;
  tests/lifecycle/mutations/list.yaml.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
lens/apm_layers.py reads one scope's lockfile once and turns its deployment
ledger rows into logical items: kind and name come from the target layout,
rows for one physical path are deduped (targets kept apart), and
projections of one package item collapse into one item with several
locations. Each unique physical file is classified once through
deps/file_provenance.classify_file (made public at its owner). Folder items
get a bounded recursive name walk without link following: a file outside
the record makes the folder modified, a partial walk leaves it
unverifiable. Recorded values that escape their root are rejected
lexically, before any filesystem call. 'orphaned' is not produced in 0.40
(declared is 'yes' for every locked owner).

Refs #5754

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
'apm run --list' no longer imports from list_cmd, whose scripts body goes
away when bare 'apm list' switches to the inventory. The renderer lives
in run.py (a new module would need an architecture owner); output stays
byte-identical. The list_cmd unit cases are ported to test_run_list.py.

Refs #5756

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
lens/inventory.build(ctx) reads each requested scope's APM layer once, asks
the reader package for native observations (an empty scan until the readers
land) and joins them: a native observation at or inside a path an APM item
lists is dropped, so one physical path is one location; a scope whose
lockfile is unreadable turns its native items into not-checked. APM
locations take HARNESSES from the reader records and keep ledger targets
apart. --target and NAME selection run before states are summarised, and
under exactly one --target same-name copies get the documented ORDER
(higher/lower with order_rank, coexist, or unknown; a missing copy is
never ranked). The context carries the keys the renderer needs.

Refs #5754

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…es detection

The build input key for the --target selection is 'harnesses' (the target
vocabulary guard rejects a raw targets read in src). build() resolves the
detected harnesses (signal folders at the project and home roots, apm.yml
targets and ledger targets, kept to harness reader records) and passes the
selection and the detected set to the readers' scan. ORDER under one target
now uses the readers' tier_of and the record's ranked/coexist/unknown rule:
copies in one tier tie, and a copy whose tier cannot be read is unknown.

Refs #5754

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
MCP ledger rows (uri locators under target mcp, one per runtime) become MCP
claims instead of file items. The inventory joins each claim to the
readers' observation of that server name for that runtime at that scope:
the location takes the observed config path and entry pointer, the
observation is claimed (not listed again as unrecorded), and the entry is
compared with the recorded fingerprint through the ownership owner's
mcp_native_hash, imported only when an entry is compared. Entry values are
read only for that comparison and never returned; the item carries the
readers' keys-only shape. An entry not observed is unverifiable.

Refs #5754

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Mark test_run_list.py as component (it writes apm.yml and drives Click),
and keep the docs truthful while bare 'apm list' still lists scripts.

Refs #5756

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Run tests/quality/test_list_{conformance_guards,oracle}.py in the
  ratchet contracts job (ci.yml and merge-train.yml, kept identical).
- P-LAW-list.* forward laws are phase 0: no spine transition covers them
  until the list observation invariant lands.
- list_oracle: the command kind and Commands section; an empty inventory
  summary has no clause; rows() refuses -v detail lines, and details()
  attaches them to the row above.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
User-scope APM items now say they are declared in the $APM_HOME manifest,
shown as ~/.apm/apm.yml when it sits under the home root; project items
keep apm.yml.

Refs #5754

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Refs #5754

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The oracle unit test credited a pending-witness cell id; use a neutral
cell id so the pending-witness leak guard stays clean.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Under -g the project scope has no root, so context.roots values may be
null. Reader order rules name the item kind (skill), unlike sources
(skills); HC-LIST-10 now applies where a skill rule is recorded.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…paths

- Item names drop any extension the registry gives the primitive, so one
  instruction deployed as name.instructions.md and name.md is one item.
- ORDER ranks each copy by the tier of its best location the target reads;
  only copies sharing a best tier tie.
- Recorded paths that map to no primitive layout, and paths not confined to
  their root, are coverage cells, never a made-up 'file' item; 'canvas'
  joins the kind vocabulary.
- User-scope rows under $HOME are matched under the target root install
  resolves (root variables such as CLAUDE_CONFIG_DIR honoured).
- Path dedupe and the ancestor manifest hint are separator-agnostic
  ('../apm.yml' on every OS).
- The folder walk cap is a read_layer parameter, so tests pass it instead
  of patching the owner.

Refs #5754

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Refs #5746, #5754

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Refs #5746, #5754

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…rows

Refs #5746, #5754

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Link ownership through path_security.user_owned_link, native activation keys
from native_plugins.settings, no target-vocabulary reads, records.py counted
as registry data by the harness-literal guard, and a vendor file name is not
the removed plugin-lifecycle symbol.

Refs #5746, #5754

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…eeps its teeth

Refs #5746, #5754

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Refs #5746, #5754

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…olders by descriptor

Folds AUD F1-F3: the managed-settings ownership gate is re-checked on fstat,
subfolders below a root are opened O_NOFOLLOW and listed by descriptor, and the
tombstone exemption applies only to the quoted installed_plugins.json name.

Refs #5746, #5754

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… evidence

not_visible[].os and record OS rows use linux, macos and windows (sys.platform
mapped once). A plugin activation entry in a settings file now sets configured
and evidence_source on the install record with the same plugin id (narrowest
scope, then the file read last); an entry with no install record is one plugin
item with present no. Install records carry plugin@marketplace ids. Tests are
Windows-safe (bytes for frontmatter, absolute tmp system paths).

Refs #5746, #5754

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Refs #5746, #5754

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ine bypass

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
fs.lockfile_reads for the local plugin world, red on #5839's head:
- install-g-14-plugins: 19 -> 13 (budget 14);
- install-g-23-plugins-repass: 24 -> 9 (budget 10).
LockFile.read now builds each document version once per run. Counted
on the same hermetic world (base 19 / 25, head 13 / 9); lstat moves by
about 4% here, inside the 5% slack, so its rows stay.

Refs #5838

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…rst)

The calls table now counts discover_primitives (one per link resolver
build) and planned_skill_files. On the 14-plugin world the commit gate's
dry run and the real run build 44 resolvers (71 on the 23-plugin
re-pass) for skills-only plugins; the cell and budget rows expect one
per plugin.

Refs #5838

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The agent, prompt and instruction integrators built a target link
resolver (primitive discovery plus the planned skill files) before they
looked for files to deploy, in the commit gate's dry run and again in
the real run. They now look first, as the command integrator already
did, and build it right before rendering. Rendered output is unchanged.

Refs #5838

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Mutate a recalled copy, not only the object the build returned, and
assert the next recall and a fresh read still hold every row. A recall
that shared one object per snapshot now fails. Test-only; src is
unchanged.

Refs #5838

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@danielmeppiel Daniel Meppiel (danielmeppiel) added the full-integration Run the full integration suite (ci-integration.yml) on this PR before merge label Dec 3, 2026
…istic

Resolve copies local packages on parallel workers. The calls table kept
one shared nesting depth and an unlocked increment, so concurrent copies
were counted or dropped at random (9 and 13 on Linux CI for the same
build). Depth is now per thread and increments are locked. Copytree is
exactly one per local plugin: 14 and 23, against 28 and 46 on main.

Refs #5838

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…memo

test_n_shared_configs_with_deep_paths_read_the_other_lock_once pins that
the command (invocation) memo reads the other scope's lockfile once
across N configs, with a no-memo control reading it N times. The run's
LockFile.read memo (#5838) now also dedupes those opens, which made the
control read once. Clear that memo before each call in both arms, so
the one-versus-N contrast stays the command memo's alone. Test-only.

Refs #5838

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@danielmeppiel
Daniel Meppiel (danielmeppiel) changed the base branch from perf-5838-slice3 to main December 3, 2026 15:36
test_bundle_lockfile_reads_have_one_registered_owner pins the
read-only-lockfile-path owner's selectors; lockfile_read_memo.py (#5838)
now sits last among them, beside the regular-file reader.

Refs #5838

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Windows CI showed stat signatures cannot tell a same-size in-place
rewrite apart: NTFS mtime ticks are 100 ns and os.stat's st_ctime is
the creation time there; Linux's coarse kernel clock leaves the same
gap within a tick. Per AUD (K1-K4):
- LockFile._read_document reads the text through read_lockfile_text on
  every read (its link and regular-file refusals included) and recalls
  only when the full text is identical; only parse, validation, build
  and adoption are memoized;
- the key also carries adoption's other inputs: whether the path is the
  user scope root, and the home directory;
- the registry YAML memo reads the file each call and reparses only
  when its text changed;
- staged-entry identity, the forget on commit/remove/restore, pickled
  independent copies and the clear at pipeline start are kept.

The plugin journeys' fs.lockfile_reads rows return to #5839's values:
every read now reads the file, and the saving is the build (19 reads
build 5 LockFile objects on the 14-plugin world, 19 on #5839).

cost: one raw read per LockFile.read, as before #5838; no stat calls.

Refs #5838

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Resolve normalizes a local plugin in a staging directory with an opaque
name. Normalization names a root-declared skill, and a manifest without
a name, after the directory it runs in, so reusing that image deployed
the root skill a second time under the staging name. Reuse now refuses
an image whose synthesized paths or metadata carry the staging name;
integrate normalizes it at its destination as before.

Refs #5838

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Resolve normalizes a local plugin in an opaque staging slot. A
root-declared skill installed at user and project scope deploys once,
under the plugin's name, and is normalized again at its destination.
Red at bcd7a45 (the slot name deployed as a second skill).

Refs #5838

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The staging-name check read only apm.yml and the top-level .apm
metadata. It now reads every file normalization added, by path and by
content; a file that cannot be read as text still refuses reuse.

Refs #5838

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Dec 3, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@danielmeppiel
Daniel Meppiel (danielmeppiel) marked this pull request as ready for review December 3, 2026 17:12
Copilot AI balanced review requested due to automatic review settings December 3, 2026 17:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The lockfile cache can retain stale profile-specific paths, while receipt assertions and the static guard fail to enforce complete receipt coverage and reuse safety checks.

3 open issues
What changed in this PR

Reduces repeated work during local plugin installation for #5838. This slice delays link-resolver initialization until files need deployment; the stacked changes also optimize normalization, scanning, and cached reads.

Changes:

  • Skip resolver construction for empty primitive types.
  • Reuse validated plugin images and unchanged parsed data.
  • Add performance budgets and regression coverage.
File Description
tests/​unit/​test_install_run_memos.py Tests memo reuse and freshness.
tests/​unit/​test_content_scanner_cost.py Checks scanner parity and bounded calls.
tests/​unit/​integration/​test_hook_shared_scope_claims.py Isolates command-memo measurements.
tests/​unit/​install/​test_sources_selection.py Updates context mocks.
tests/​unit/​install/​test_sources_materialisation.py Updates materialization mocks.
tests/​unit/​install/​test_local_plugin_image.py Tests image-reuse admission.
tests/​quality/​promise-catalog.json Registers performance promises.
tests/​perf/​count_budgets.json Adds plugin-install budgets.
tests/​integration/​test_remaining_modules_coverage.py Updates source context mocks.
tests/​integration/​test_perf_count_budgets.py Adds plugin performance journeys.
tests/​integration/​test_local_plugin_install_cost.py Checks counts and deployment parity.
tests/​integration/​test_install_sources_classification.py Updates classification mocks.
tests/​integration/​test_architecture_pack_lockfile_read.py Includes the memo owner.
tests/​integration/​test_architecture_lockfile_write_authority.py Updates guarded reader name.
tests/​fixtures/​perf/​plugins.py Builds deterministic plugin fixtures.
tests/​fixtures/​perf/​counters.py Adds function-call counters.
tests/​fixtures/​perf/​count_budgets.py Registers journeys and call metrics.
tests/​benchmarks/​spawn_counter/​sitecustomize.py Instruments calls with thread-safe counting.
src/​apm_cli/​utils/​content_hash.py Exposes hashed payload paths.
src/​apm_cli/​security/​content_scanner.py Uses regex-based character scanning.
src/​apm_cli/​primitives/​discovery.py Shares one discovery inventory.
src/​apm_cli/​integration/​prompt_integrator.py Defers resolver initialization.
src/​apm_cli/​integration/​instruction_integrator.py Defers resolver initialization.
src/​apm_cli/​integration/​agent_integrator.py Defers resolver initialization.
src/​apm_cli/​install/​sources.py Reuses eligible plugin images.
src/​apm_cli/​install/​source_helpers.py Avoids duplicate digest recording.
src/​apm_cli/​install/​run_memos.py Centralizes memo reset.
src/​apm_cli/​install/​pipeline.py Resets memos at pipeline entry.
src/​apm_cli/​install/​phases/​resolve.py Records reusable plugin images.
src/​apm_cli/​install/​phases/​finalize.py Skips unnecessary hint discovery.
src/​apm_cli/​install/​local_plugin_image.py Implements guarded image reuse.
src/​apm_cli/​install/​context.py Stores resolved plugin records.
src/​apm_cli/​deps/​registry/​config_loader.py Memoizes registry parsing by content.
src/​apm_cli/​deps/​lockfile.py Reuses unchanged lockfile snapshots.
src/​apm_cli/​deps/​lockfile_write_authority.py Invalidates snapshots after writes.
src/​apm_cli/​deps/​lockfile_read_memo.py Stores independent read snapshots.
scripts/​architecture_linter/​checks/​contracts_lockfile_write_authority.py Retargets staged-read guard.
scripts/​architecture_linter/​checks/​contracts_lockfile_regular_read.py Retargets regular-read guard.
scripts/​architecture_linter/​checks/​contracts_lockfile_generator.py Retargets version-warning guard.
changelog.d/​5842.fixed.md Documents deferred resolver construction.
changelog.d/​5841.fixed.md Documents per-run reuse.
changelog.d/​5839.fixed.md Documents normalization and scanning improvements.
.apm/​architecture/​owners/​install-deployment.json Registers image-reuse and reset modules.
.apm/​architecture/​owners/​contracts-tooling.json Registers lockfile memo ownership.

Review effort: Balanced

"src/apm_cli/deps/github_downloader.py",
"src/apm_cli/install/phases/local_content.py"
"src/apm_cli/install/phases/local_content.py",
"src/apm_cli/install/local_plugin_image.py"
"""*payload* plus the inputs adoption reads besides the bytes (user scope, home)."""
from ..core.scope import is_user_scope_root

return (kind, payload, (is_user_scope_root(path.parent), str(Path.home())))
Comment on lines +177 to +182
receipted = {Path(path).name for path in receipts}
assert receipted, receipts
for physical, recorded in receipts.items():
path = Path(physical)
if path.is_file() and ".config/opencode/skills/" in path.as_posix():
assert compute_file_hash(path) == recorded, physical
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

# Conflicts:
#	tests/quality/promise-catalog.json
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Dec 3, 2026
Re-measured every fs.scandir_calls and fs.open_reads row on the composed
train-5 tip ace1dbb (Linux PR CI Lifecycle Smoke), budget = measured + 5%.
The earlier rows were measured on this PR's own base, which lacked the
train links underneath. Bisected per link:
- #5837 (train 3 B3) lists each deployed skill root once more:
  install-50-skills 654 -> 704 (+50), cold/warm installs +40,
  install-g-50-skills +50, plugin journeys +78 / +132;
- #5842 (train 5 B5) removes listings: install-g-50-skills -160,
  install-g-14-plugins -543, repass -1031; plugin reads -27 / -44;
- no other link moves these counters; other open_reads moves are
  run-to-run variation of up to 3.

Refs #5838

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Dec 3, 2026
Train order #5841 -> #5842 -> #5847: #5847's composed-tree rows need
#5842's reductions underneath to hold on its own CI. No conflicts; the
composed-tree fs rows are unchanged and #5842 adds only its calls rows.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-integration Run the full integration suite (ci-integration.yml) on this PR before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants