Repository navigation
Add the composition lock and the kit installer - #5
Conversation
kit.lock.json pins six standalone ingredients by annotated tag, peeled commit SHA, and tree hash (protean-tree-v1). install.sh, a thin entrypoint over build/install.py, resolves a selection, computes the hard requires closure, fetches and verifies each pin, stages and installs in dependency order, runs each ingredient's own gates in place, and reads every written file back against its cached blob. Two gates join the release run: build/check-lock.py validates the lock, the pin allowlist, the closure, install target collisions, and each pin's contract parity, and recomputes every tree hash with --verify. build/check-ingredient-contract.py checks each pinned ingredient at its pinned commit for its README contract line, its committed license, its descriptor, its entrypoint, its declared gates, and a non-empty tests directory. Exit codes are fixed at 0 to 6: usage, lock invalid, dependency, integrity, install, post-install verification. A run that installs part of the selection exits non-zero and never reports a partial success as success. The installer contains no ingredient payload and the composer uses no submodule. Order resolution reads the lock's installOrder and validates it against the dependency graph before use; a declaration that is not a valid topological order of the selection is reported and the resolver's own order is used. A requires cycle is a hard failure with the cycle path printed. Documentation: LICENSING.md is re-titled and re-scoped to the composer, names aska-digital/protean-kit as the source of truth, and states the three-zone model plus the ingredient-license boundary; the README documents the distribution, the dependency behaviour, the offline cache, staging and read-back, the exit table, and the limits. Evidence: build/verify-all.py runs ten gates, all passing; tests/test_kit_lock.py covers the lock, the resolver, the cache, the stage and promote path, the read-back, and the exit codes against fixture repositories, offline.
Base moved under this branch: rebase and re-verification requiredThis branch was cut from Consequence: this pull request reports as Affected paths, by class:
Everything recorded in the body above was produced against this branch's own tree This pull request is left open and unready. It is not merged, not closed, and not Recorded for the reviewer: no workflow run is registered on this branch, so the |
Resolve PR #5 conflicts against origin/main (1f14eec) per the six-path table: - verify.yml, CHANGELOG.md, build/verify-all.py: kept the HEAD (branch) composition versions (modify/delete). - install.sh: took main's version (identical blob 6256d73, mode 100755). - kit.lock.json: took main's 7-pin version (six PR pins byte-identical; protean-handoff added). - LICENSING.md: content merge from the branch composition-layer version plus main's canonical-site (https://proteus.askaconsult.com/) and Protean Team host wording; repository stays aska-digital/protean-kit. - README.md: accepted git's auto-merge. - All other paths: accepted the merge default (main deletions stay deleted).
Add the composition lock and the kit installer
The composer gains the two pieces a distribution needs: a manifest that pins every
ingredient, and one command that installs and verifies the set.
What this adds
kit.lock.json- six ingredients pinned by annotated tag, peeled commit SHA,and tree hash (
protean-tree-v1), with the hard and soft edges and the resolvedinstall order. A pin is immutable: a moved tag is an integrity failure, never a
silent upgrade.
install.shandbuild/install.py- resolve the selection, compute the hardrequiresclosure, fetch and verify each pin, stage each ingredient, run itsown gates in place, promote it, and re-hash every written file against the
cached blob.
build/check-lock.py- validates the lock, the host and owner allowlist, theclosure, install target collisions, version and contract parity, the absence of
a submodule or vendored tree, and with
--verifyrecomputes every pin's tagpairing and tree hash.
build/check-ingredient-contract.py- checks every pinned ingredient at itspinned commit for its README contract line, its committed license, its machine
descriptor, its standalone entrypoint, its declared gates, and a non-empty
tests/directory.tests/test_kit_lock.py- the lock, the resolver, the cache, the stage andpromote path, the read-back, and the exit codes, all exercised offline against
fixture repositories.
LICENSING.mdre-titled and re-scoped to this repository, bothREADME.mdandLICENSING.mdnamingaska-digital/protean-kitas the sourceof truth, and the README documenting the distribution.
Behaviour
Exit codes are fixed at
0to6:0ok,1usage or input,2lock invalid,3dependency,4integrity,5install,6post-install verification. A runthat installs five of six ingredients exits non-zero, and a partial success is
never reported as success.
The composer contains no ingredient payload and no submodule: composition is
manifest-only.
Order resolution reads the lock's
installOrderand validates it against thedependency graph before using it. A declaration that is not a valid topological
order of the selection is reported, and the resolver's own topological order is
used instead. A
requirescycle is a hard failure with the cycle path printed,and it is never resolved by dropping an edge.
Evidence register
Recorded from a clean clone of this branch, Python 3.9.6, macOS.
python3 build/verify-all.pypython3 build/check-lock.py kit.lock.jsoncheck-lock: PASS ingredients=6 order=protean-doctrine -> protean-ops -> protean-drafts -> protean-github-flow -> protean-sym2p -> protean-control-planepython3 build/check-lock.py kit.lock.json --verify --offline --cache <cache>python3 build/check-ingredient-contract.py --lock kit.lock.json --verify --offline --cache <cache>PASS ingredients=6 unverified=0python3 -m unittest tests.test_kit_lockbash install.sh --all --target <fresh dir> --cache <cache>bash install.sh --ingredient protean-drafts --target <fresh dir>bash install.sh --ingredient protean-control-plane --target <fresh dir>bash install.sh --ingredient protean-control-plane --no-deps --target <fresh dir>degradedbash install.sh --all --target <fresh dir> --offline --cache <cache>bash install.sh --all --target <fresh dir> --offline --cache <empty>offline cache unavailable for protean-doctrine at the pinned shabash install.sh --all --target ./protean-installed --dry-runThe fixture suite that runs offline covers the negative paths as well: a branch
ref, a duplicate slug, an owner outside the allowlist, an install target
collision, a moved tree hash, a
requirescycle, a missing closure member, afailing post-install gate, and a read-back difference.
Continuous integration on this pull request is PENDING at the time of writing.
This body records only what was observed locally; it does not report a
continuous-integration result.
Notes on the pins
protean-doctrineis pinned atv1.0.2. That repository'sv1.0.0shipped aworkflow matrix expression that would not have run, and
v1.0.1corrected it.Because a published tag is never re-pointed, the correction was released as a new
tag, and
v1.0.2then synchronised the descriptor version with the tag itbelongs to. The other five ingredients are pinned at
v1.0.0.What this does not do
what was published, not what was approved.
Posted by the build agent; the review and the merge decision are the reviewer's.