Repository navigation
docs(agents): wpm package contracts and install-path invariants - #1191
Merged
Merged
Conversation
Recording the rules that were learned by shipping packages that broke, so a future agent does not have to rediscover them: - layouts and where payloads live, and why <root>/bin - not <root>/usr/bin - is the PATH entry directory; - every package command gets <root>/bin/<cmd>.exe as a hardlink to the payload (never a launcher, never a link into .wpm/staging), recorded in the receipt so install/update/uninstall keep the set in sync (unixwin/niubash#376); - install-path invariants: source file mappings from the payload, replace files through a POSIX unlink, prune the staging tree; - version ordering including the Debian-style packaging revision; - release-flow and machine traps (stale tags, lagging index caches).
caomengxuan666
force-pushed
the
docs/agents-wpm-contracts
branch
from
October 16, 2026 09:49
101e247 to
6d2284b
Compare
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.
Adds an agent guide section to
AGENTS.mdcovering the contracts that today's packaging work kept tripping over:shim(payload underopt/<pkg>, dispatcher hardlinks inusr/bin) vsflat(the binary is the entry); when to pick which, with the measured 12.7 ms vs 32.2 ms cost of a link vs a forwarding launcher;<root>\usr\bin(packaging/winuxcmd.iss) and the niubash layout has<root>\binon PATH — so neither is a private place, private DLLs must never land in either (a flat OpenSSH droppedlibcrypto.dllinto a PATH directory), and wpm materializes<root>/bin/<cmd>.exeas a hardlink to the real binary, recorded in the receipt so install/update/links rebuild/uninstall keep the set in sync ([design][installer] PATH entry dir: hardlinks only, usr\bin stays off PATH, and the entry set must include sh niubash#376 rule 5);.wpm/staging([bug] niugit payload duplicated: usr/bin/git.exe links into .wpm/staging while the manifest declares opt/niugit #1188), refuse an install that cannot replace every destination (a held file cannot be replaced on Windows at all — the old path left packages half-updated), prune the extraction tree, and what the reconcile may and may not delete;5.4.1-unixwin2>5.4.1-unixwin1>5.4.1) and the index-as-contract rule;Documentation only. The user-facing counterpart lives in #1192.