Repository navigation
scratch: compose train-7 tip 23a15862 + #5849@44bd348e (do not merge) - #5863
Closed
Daniel Meppiel (danielmeppiel) wants to merge 264 commits into
Closed
Daniel Meppiel (danielmeppiel) wants to merge 264 commits into
Daniel Meppiel (danielmeppiel) wants to merge 264 commits into
Conversation
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>
The pure foreign_source_root cases move to a unit-marked tests/unit module, and the two session cases that spawn pytest (pytester and the real-conftest wiring proof) move to tests/integration/test_source_tree_guard_session.py, keeping the component mark and P-INV-I7 (QL on #5809: tm006 process spawn in tests/unit, AQ003 on return-value-only component cases). Refs #5808 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>
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>
…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>
…ine bypass Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…_helpers commands/__init__.py no longer imports deps; commands/deps/__init__.py resolves its Click commands lazily (PEP 562), which also breaks the _helpers <-> deps.cli import cycle that the eager init was hiding. apm list -f json: 565 -> 496 modules. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…e named once Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…N modes Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…nked home Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ot list shown once each Notices wrap only at a terminal width; piped output keeps each notice on one line. Coverage cells for recorded rows that match no layout or are not confined render one [!] line each, and a not-confined record's raw path is never echoed (text or JSON). Renderer tests move to tests/unit/lens as unit tests; command tests patch the producer at its lookup path. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
HC-MCP-02, HC-INIT-01, HC-INVENTORY-01, HC-LOCK-01 and the marketplace list read now match whole lines on the stream their owner writes to (CRLF-normalized) or a parsed field, never a token that a path, a target list or echoed input also carries. Each oracle goes red when its emit site in src changes one word. HC-UNSUP-01 asserts the exact unsupported-primitive warning through one test constant (UNSUPPORTED_PRIMITIVES_WARNING, TODO #5797). The 8 cells the old oracle receipted on incidental output (a [!] line followed by .agents/skills) are strict known failures citing #5797, per the QL S61 sweep ruling (surprise S137); #5797 returns them to required. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…pt (#5798) A stream-specific oracle that runs after check_obligation cannot keep the step from earning coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
AQ004: the C6 (a) clone proof patched harness_contract.PROMISES. It now asks the real owner (contract.applies) for each LIST promise over a registry holding the clone, and registers the clone's reader record as one data row (setitem), as a new harness would. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reuse must refuse a synthesized path that merely contains the staging slot (for example "<slot>-skill"), and the per-command root memo must not share an answer between two spellings of a relative root after a chdir. Refs #5838 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reuse now refuses a synthesized path that contains the staging slot anywhere, not only as a whole segment, and resolve_root keys its memo on the absolute path so two spellings of a relative root never share an answer. Both are AUD review nits, cost 0. Refs #5838 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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>
On a filesystem that can clone (APFS, btrfs, xfs), normalize still copied every skill file of a local plugin image into .apm/skills byte by byte. The cells expect no byte copy there, and an independent file with nlink 1 whether the clone runs or is refused. Refs #5838 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Normalize materializes .apm/skills with robust_copytree, which clones each file (clonefile on APFS, FICLONE on btrfs/xfs) and copies it where the filesystem cannot (ext4, Windows, any error). The view is always an independent file with nlink 1; nothing is hard-linked. Refs #5838 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ity once - The normalization build stamp moves out of the plugin image to <cache_root>/normalized-images/<sha256(resolved path)>.build. It stores the build stamp plus the resolved image path, which must match exactly. It is written with a same-directory temp file and os.replace, and refused below any linked cache component. It is read with lstat, S_ISREG, O_NOFOLLOW|O_NONBLOCK and a bounded read; anything else is a stale build. It is removed when APM rewrites, uninstalls or prunes the image. An APM-created .apm/ in the image made validation skip plugin normalization, so declared skills never deployed. - _build_identity is computed once per process under a lock, with an explicit reset seam for tests that edit the source tree. - Seal keys are normcase-normalized; on Windows the image walk reads st_nlink through lstat because scandir reports 0. - Re-pass warning parity: images with a skills declaration stay on the full path, so their normalization and shadowing warnings repeat. - POSIX-only image cells skip on Windows. Refs #5838 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
A Windows junction lstats as a directory with st_reparse_tag set; the image walk now refuses any entry carrying a reparse tag, so a junction inside the image reads IMAGE_DIFFERS. The local _linked_below shim is replaced by integration.skill_layout.linked_below. Refs #5838 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ing it The build stamp is a freshness hint: a stamp hit only lets the verifier try, and the source digests and the in-memory synthesis still decide. A frozen binary or an installed distribution reuses the verdict build identity; a source or editable tree is fingerprinted by each file's path, size and mtime (one lstat per file, no reads) instead of reading the whole package (~12 MB) once per process. Computed once per process under a lock, with reset_build_stamp for tests. Cells: concurrent stamps fingerprint once; a source-tree stamp reads no content; an installed build reuses the verdict identity; a plugin source edit that keeps size and mtime still fails the digest compare (unit and re-pass lifecycle). Refs #5838 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…o cells Refs #5838 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Seals exist only after install imports utils.sealed_files, so the manifest and receipt readers ask through yaml_io.sealed_bytes, which returns None when the registry was never loaded, and invocation_scope resets it only when present. Read-only commands such as apm list no longer import the registry (imports.list stays 111 on the train-7 tree). verdict_record stays within its LOC budget once composed. Refs #5838 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Re-measured install-g-14-plugins and install-g-23-plugins-repass on the train-7 tip 23a1586 with this change (scratch #5859, Linux Lifecycle Smoke run 47195071297); budget = measured + max(1, 5%). - Re-pass: copytree and normalize 23 -> 0, files_written 602 -> 58, lstat, stat, scandir, realpath and open_reads tightened. - Re-pass hashed_bytes and hash_objects raised for AUD's verification (sealed members + F1 dest digest); the redundant share is removed in slice 5 (c8ec3603 plan section 20). - Fresh lstat_calls raised for the source-tree stamp fingerprint (one lstat per apm_cli file, once per process; frozen and wheel installs stat once). At 97d4782 the same tree measured 183,956,207 / 586,664,850 hashed bytes and 24,100 / 74,006 open reads: red against these rows. Refs #5838 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Collaborator
Author
|
Composed check green; #5849 QL signed. Closing (scratch). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Composed-tree check for #5849 (train 8): merge(23a1586, 44bd348), no extra commits. Closed after CI reports. Do not merge. Refs #5838