Skip to content

perf(install): integrate takes the local-plugin seal made this command - #5877

Draft
Daniel Meppiel (danielmeppiel) wants to merge 3 commits into
perf-5838-slice5from
perf-5838-slice5b
Draft

Daniel Meppiel (danielmeppiel) wants to merge 3 commits into
perf-5838-slice5from
perf-5838-slice5b

Conversation

@danielmeppiel

Copy link
Copy Markdown
Collaborator

TL;DR

Stacked on #5876. On a same-HOME re-pass, integrate walks and hashes every local-plugin image again, even though resolve sealed it moments earlier in the same command (23 payload walks and 23 digest walks on the 23-plugin world). Integrate now takes the payload and digests from the seal resolve registered for that exact (install_path, dep_key). The copy-time SealedImageChangedError stays as the backstop. The plan, the scanner and the plugin.json reader are bound to the sealed bytes.

Refs #5838

Note

Draft. Step 1 (red-first cells) is pushed at 719e5bba. The fix and the rows follow.

Cells (S1-S5, AUD conditions)

Cell Before After
unchanged re-pass: package_payload_paths / package_digests calls 23 / 23 0 / 0
S1 delete after seal recovered by re-copy fails closed, nothing written
S2 add after seal recovered by re-copy fails closed, nothing written
S3 unseal/reseal after seal walks walks (mutant "always use record" -> red)
S4 plugin.json swapped after seal not parsed not parsed
S5 scanner on a member swapped after the seal scans the swapped bytes refused

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

…s command

Integrate re-walks and re-hashes every image resolve sealed on a same-HOME
re-pass (23 payload walks and 23 digest walks for the 23-plugin world).
The cells pin the target and the conditions it keeps:
- an unchanged re-pass makes no package_payload_paths/package_digests call;
- a sealed image is reused without a second walk, and an image unsealed or
  resealed after it (a re-copy) never takes the record (S3);
- a member edited, deleted or added after the resolve seal fails closed with
  nothing deployed or recorded (S1, S2);
- a parsed-not-copied plugin.json swapped after the seal never takes effect (S4);
- the pre-deploy scan judges the sealed bytes, not a member swapped after them (S5).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
An image a same-HOME re-pass verified and sealed this command is reused by
integrate without walking or hashing it again: the payload and digests come
from the record bound to the exact seal token registered for
(install_path, dep_key). An unsealed or resealed image takes the walk.

Every later reader is bound to the sealed bytes through one reader,
sealed_files.read_sealed (read once, hash that buffer, return it):
- the copy (write_seam.copy2), the pre-deploy scanner and the plugin.json
  schema reader;
- the deployable-source plan refuses a sealed skill directory whose walked
  files are not exactly its verified members (a delete or an add).
A member changed, deleted or added after the seal stops the install with one
message (sealed_files.changed_error) that names the member path; nothing is
deployed or recorded, and the printed 'apm install' reinstalls from source.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant