Skip to content

DO NOT MERGE: scratch, #5876 rows on the composed train-14 tree - #5878

Closed
Daniel Meppiel (danielmeppiel) wants to merge 305 commits into
mainfrom
scratch-5876-rows-t14
Closed

Daniel Meppiel (danielmeppiel) wants to merge 305 commits into
mainfrom
scratch-5876-rows-t14

Conversation

@danielmeppiel

Copy link
Copy Markdown
Collaborator

Scratch measurement only (cbc2f38 + #5870c0b71ac + #58763859404, fs budgets zeroed). Closed and deleted once the values are read. Refs #5838

QL ruling on S137: 'line in <stream>.splitlines()' is exact only when
splitlines() is called on the stream itself, optionally after
replace('\r\n', '\n'). Case folding, stripping or any other transform
before it stays red; planted cells pin both sides.

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

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- the pi target (registry profile, catalog capability, .pi detection, skills
  in .agents/skills, commands in .pi/prompts, PI_CODING_AGENT_DIR user root,
  read verbatim), trust hint, init picker from the registry, unsupported
  primitive warning once, governance_dirs for unmanaged_files;
- project cleanup removes only roots that do not signal their target, and only
  roots that do are created before a write (materializes_root); an auto_create
  target's merged hook config is created with its root;
- the trust hint also fires for project-only .apm content;
- harness conformance: every applicable Pi cell is required, HC-PLUGIN-01
  .dryrun cells are required with an exact-line oracle, a known_failing
  section records non-required cells with a strict KnownFailure witness,
  PI_CODING_AGENT_DIR is scrubbed in tests/conftest.py, Pi journey variants
  and Pi receipts;
- real-harness Pi 1.6.0 lane with the cross-spawn and minimatch overrides.

apm-spec-waiver: adds the pi target as registry data on the shared target layer; no change to an OpenAPM v0.1 requirement
apm-spec-waiver: policy default scan dirs now come from registry data; the existing list is byte-identical and pi adds .pi

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… the 'not qualified' label

- finalize_native_plugin no longer claims native registration: the Copilot
  owner reports its own outcome (a refused name or fingerprint says 'not
  activated'), and this line names only the targets without a native Agent
  Plugins host. A failing-before test covers a refused plugin with pi,copilot.
- The Pi status is qualified against Pi 1.6.0: the real-harness lane loads the
  deployed skills and prompt templates at both scopes (4/4) and every applicable
  Pi conformance cell is required (zero baseline), so the 'packed, not
  qualified' wording goes from the targets matrix and the changelog fragment.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The unsupported-primitive warning used one per-run bool shared by every
flagged target, so with copilot-cowork,pi a Cowork warning for one package
silenced Pi's warning for a later package. The guard is now a per-target
set on InstallContext; cowork_nonsupported_warned keeps its meaning for
existing callers.

HC-PLUGIN-03.overlap now requires exactly one plugin skill copy, so a
cell that drops the skill no longer passes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Return before touching ctx when no target is flagged, and lazily
initialise unsupported_warned_targets so partial install contexts
(SimpleNamespace stubs) keep working.

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

known_failing (non-required cells new at the base) and required_known_failing
(the shrink-only ledger of required cells) never share a cell: the overlap
check refuses a required one, the ledger check an unrequired one. The
closed-issue gate (known_cells) reads both sections through load_ratchet.

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

The install summary prints each warning as '  [!] <message>'
(DiagnosticCollector._render_warning_group), so the exact-line oracle
anchors on that indent. The pi cells pass with receipts; changing the
emitted text in target_warnings.py turns them red.

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

Red-first: openclaw, grok-cloud and copilot-cowork listed in apm.yml
exit 2 on main even with their experimental flag enabled, while
--target accepts them. A disabled flag keeps the Unknown target error
for install and for compile.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ME; import budget

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ved workspace roots are unsupported

Refs #5754, #5746

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

The manifest token validator rejected every experimental target, so a
target that --target accepts with its flag enabled exited 2 when
listed in apm.yml. It now accepts an experimental target while its own
flag (the capability's experimental_flag, via is_enabled) is enabled;
a disabled one keeps the Unknown target error for every reader of the
declaration.

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

A malformed file documented for two harnesses yields one coverage cell per
harness; the text view now reports the file once. Paths recorded under the
unresolved HOME spelling (a symlinked home) shorten to ~ like the rest.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ets: (#5815)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The user lockfile reads a row under a target root outside $HOME (for
example CLAUDE_CONFIG_DIR elsewhere) as an absolute value. Such a value is
now admitted when it lies inside the target's root as install resolves it:
the '..' check stays lexical and only the admitted root is resolved, never
the recorded value. An APM MCP entry the readers did not observe now names
the lockfile it was read from as its location path, never an empty path.

Refs #5754

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The lens read-only guard reserves .replace( for Path.replace; check both
POSIX and Windows component forms instead.

Refs #5754

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
A registry server without a dependency overlay reaches the writers only
through _overlaid_server_infos; this pins that its mapping-form headers
are stored as list entries and render and judge like the list form.

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>
- HC-LIST-01..10, 13, 14, 15 and 03.targets are live; 348 cells move to
  required (never baseline) with witnesses in test_list_conformance.py
  and test_list_readers_conformance.py. HC-LIST-11, 12 and 16 stay
  pending-witness.
- The witness helper is check_witness (it calls check_obligation).

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

Manifest reconciliation classified declared targets with the stable-only
list, so an enabled experimental target removed from apm.yml stayed
deployed as supplemental. is_manifest_target in core/apm_yml.py is the
one answer for parsing and reconciliation. Adds lifecycle cells for that
and for install <pkg> --target openclaw while apm.yml also declares it.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
A recorded value with a .. component is refused even when it normalizes
back inside the target root, in POSIX and Windows spellings, and nothing
is looked up on it.

Refs #5754

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Claude's docs: with CLAUDE_CONFIG_DIR set, 'The same applies to .claude.json,
which otherwise sits at ~/.claude.json' (claude-directory). APM's claude
adapter writes user MCP there too (resolve_user_claude_unresolved_path).

Refs #5746, #5754

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…e first-run journey

- INV-L1 includes the project's own local deployed files, which list
  shows as APM items (spine mandatory replay green on every variant).
- imports.list is measured on an empty project with an empty HOME and a
  minimal environment, the journey the row was measured on.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
apm train and others added 25 commits December 3, 2026 22:48
one single train t1203224 (1 links, mechanical merges only)

Stack-Base: eed83f2

Queue-Base: 641743f
…isting a package

The live staging tree at the apm_modules root is scratch, not installed
content, so a global instruction inside a backup no longer raises the
hint. A recorded package root contributes its record after an lstat of
.git, without being listed. The no-record path uses the same walk.

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>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ing it

A local skills-only plugin that resolve sealed this run skips link-resolver
discovery and skill planning when its deploy is proven current
(install/local_plugin_replay.py):
- P3/CG1: the deployed path set is derived from the seal by the planner's
  own mapping (skill_preflight.skill_destinations), under this run's
  targets and deployment plan.
- RP2/CG3: it must equal the lock row's set exactly; anything else takes
  the full integrate.
- RP1/P7: each deployed file is read (regular, unlinked) and must hash to
  the sealed member digest, so a rendered member, a user edit or a
  missing file takes the full path.
- P4: any policy in effect disables replay for the run; frozen, dry-run,
  --force and skill selections do too.
- P5: a skill directory another package of this run deploys is never
  replayed.
- RP5: the scanner judges the sealed bytes; any finding takes the full
  path, which reports it as today.
- The commit gate keeps every replayed plan in its input.
A replayed package records the converged full path's outcome: the same
deployed values, completed reintegration and "(files unchanged)" line,
and it writes nothing.

Refs #5838

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

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

Test-only. Each cell fails on its mutant: following a directory symlink,
entering a universally skipped directory, accepting an int flag, and
dropping the entry cap.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- N1 (AUD): a replayed package hands the sealed digests it verified to
  the lockfile phase (ctx.package_verified_hashes), which records them
  instead of re-reading the deployed files. That saves one read per file
  and closes the window between verification and the lock write. Cell:
  bytes swapped into a deployed file after verification are never
  recorded (mutant: re-read -> red).
- The resolver never widens past the package root. Cell: a link into
  another plugin's root, which arrives in a later run, keeps the replayed
  render byte-equal to a fresh install.
- template.dependency_deployment_plan is the one plan builder for skill
  preflight and replay (R0801 on the composed tree).
- The changelog line is shortened.

Refs #5838

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- D1 (AUD): _holds computes both digests from one buffer: the raw sha256
  the seal binds, and content_hash_of_bytes, the CRLF->LF hash that
  compute_file_hash records and apm audit verifies (apm#1952). Cell: a
  CRLF SKILL.md replays, its lock hash equals compute_file_hash of the
  deployed file, and apm audit is clean (mutant: raw digest -> red).
- package_verified_hashes is write-once per dependency key.

Refs #5838

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
one single train t1204011 (1 links, mechanical merges only)

Stack-Base: 69f51bc

Queue-Base: 641743f
…run's seal

3d (#5866) built each verified package's hint list with
package_instruction_list. That rides integrate's discovery on the full
path, but parses every replayed package again (23 walks on the
re-pass). A replayed package now stages no fresh list. Finalize reads
its stored hint record under the content hash the seal verified this
run (K). A missing, corrupt or stale record walks the package (R), and
the record stays advisory (A, 3d P4).

Cells (3d's module, replay path): a kept record answers with no package
listed; a missing, corrupt or stale record walks and still prints the
hint; a forged record hides only the hint line, with deployed bytes
identical. Mutant (no replay branch): these cells and 3d's
test_the_install_hint_walks_no_recorded_package go red.

Refs #5838

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

Slice 5 of #5838, step 1. verify_unchanged_local_plugin walks the source
and its image several times on every unchanged re-pass. Two cells, red on
the train-11 tip cbc2f38:
- each tree is walked once and each file read once: a leaf directory of
  the source, the image's raw payload and its .apm copy is listed
  [4, 3, 3] times today, target [1, 1, 1];
- the source is classified once (detect_package_type: 2 calls, target 1).

Refs #5838

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

- install-g-23-plugins-repass rows re-measured on the train-11 tip
  cbc2f38 + #58707bed305 (scratch #5874, Linux Lifecycle Smoke run
  47241016951); budget = measured + max(1, 5%).
  - discover_primitives and planned_skill_files 23 -> 0
  - lstat 15233 -> 7877; stat 37297 -> 21034; scandir 5450 -> 4052
  - open_reads 4545 -> 2682; realpath 1204 -> 696
  - hashed_bytes 23.4 -> 13.8 MB; hash_objects 3365 -> 2065
  - lockfile_reads 24 -> 23; path_home 71 -> 49
- Closed-world owner rule install-deployment-package-hash-writer (AUD):
  only source_helpers.record_package_digests writes ctx.package_hashes,
  which keys the lock row and the replayed hint record. Registered in
  _EXPECTED_RULE_ID_TEXT, with one sorted MutationCase (a second writer
  -> red).

Refs #5838

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Slice 5 of #5838, step 2.
- scan_package_tree (utils/content_hash.py) walks a tree once without
  following links and reads each payload file once, yielding the payload
  set, each file's SHA-256, the package digests (legacy and framed, from
  the same bytes) and, for a strict scan, the link/special/hardlink/
  junction refusals.
- verify_unchanged_local_plugin scans the source and the image once each
  (leaf listings [4, 3, 3] -> [1, 1, 1]); the image's raw part is checked
  file by file against the source's digests and the .apm/skills copies
  against theirs, replacing the image package-digest pass and the member
  re-hash. Tamper reasons are unchanged.
- detect_package_type: the verifier reuses its eligibility detection, and
  the resolver hands its detection to validate_apm_package (consumed
  before any normalization; nothing is written in between). On the
  23-plugin re-pass 161 -> 115 calls; a run-wide path memo was rejected
  because normalization rewrites images in place.
- The #5837 bytecode prune reuses the copy's pre-walk (tree_file_hashes
  collects the outermost __pycache__ folders) instead of walking each
  deployed skill again; uninstall keeps its own walk.

The format-precedence rule pins the resolver's classification as
`detected = detect_package_type(install_path)`.

cost: verify reads each file once per tree; no extra syscall anywhere.

Refs #5838

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
scan_package_tree tests exclusions on the relative-part tuple it already
holds and reads with a plain open instead of building PurePath/Path
objects per file. Same views and digests; on the 23-plugin re-pass the
verifier's 46 scans now cost about their open and scandir calls.

Sequential verify of the 23 plugins on macOS: cbc2f38 about 460 ms,
this head about 225 ms.

Refs #5838

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

The prune of caches recorded by the copy walk skips any cache whose path
now crosses a link below the skill root, so a folder swapped to a link
after the walk cannot route the removal outside it. The tamper parametrize
gains same-path byte edits of a skill file, a reference and the plugin
manifest, which only the raw per-file compare catches.

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

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
# Conflicts:
#	tests/unit/install/test_local_plugin_image.py
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Dec 4, 2026
Re-measured on cbc2f38 + #5870c0b71ac + #5876 (scratch #5878, Linux
Lifecycle Smoke run 47256467695); budget = measured + max(1, 5%).
- install-g-23-plugins-repass: scandir 4052 -> 2691, stat 21034 -> 16333,
  hash_objects 2065 -> 1805, hashed_bytes 13758926 -> 11819456,
  open_reads 2682 -> 2394 (one walk per tree in the verifier).
- scandir on the skill journeys (the prune folds into the copy walk):
  install-50-skills 704 -> 654, install-g-50-skills 704 -> 599,
  install-g-50-skills-linked 652 -> 547, install-g-14-plugins 3279 -> 2884.
Rows within their slack, and the v0.39.2-anchored path rows, are unchanged.

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

Copy link
Copy Markdown
Collaborator Author

Scratch measurement read; values landed as #5876 rows at 8144006.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant