Implement manifest schema 8, first-party module roots, and install marker v4 - #40
Merged
Conversation
ivanopcode
force-pushed
the
feat/schema-8-module-roots
branch
from
August 24, 2026 15:15
7fec2da to
a14a3a2
Compare
Adopt the schema-8 additions of Curator Protocol core sections 4.1.1, 4.2.3, and 10 against curator-spec candidate/schema-8-rc.9. Manifest schema 8 admits two optional fields. A local go-v1 build command may declare `modules`, the first-party Go modules of the same package that its build root replaces. A script command may select the enforced execution policy with the co-required `execution_policy` and `interpreter` pair, whose value spaces are closed. Schemas 1 through 7 reject all three fields at the top level and on every command; schema 1 rejects them through its reserved-field check because it keeps its deployed extension behavior. Module roots follow the manager profile's fixed order. The declaration is validated against the frozen snapshot alone before the fixed `go list`: portable relative path other than ".", unique, real link-free directory, `go.mod` directly inside, pairwise disjoint from every other declared module, every build root, and every runtime root under exact and platform-path comparison. After `go list` returns and before `go build`, the effective replace set is read only from `<build root>/vendor/modules.txt`, selection annotations are reconciled against their unversioned-left directives, every versioned side and every module-to-module redirect is rejected, and the one-to-one correspondence with the declaration is checked in both directions. A package resolving through a replacement is then admitted exactly on the bijected set, the scan surface extends over the declared directories and their vendor copies, and the audited-vendor allowance is withheld from a module carrying a replacement. No build input, cache key, receipt, or artifact path changes. csk implements no script execution policy, so a command selecting `script-worker-v1` is refused with `script_execution_policy_unsupported` at `csk check` and at install, and the single shim publication point refuses it however it is reached. Downgrading such a command to a declared-only shim would run package code the manifest says is contained. Install marker v4 carries marker-v3 meaning over a schema-8 manifest: same object shape, same build-entry semantics, same top-level build_source and build_roots rules. A schema-8 mutation writes v4, schema 7 still writes v3, schemas 1 through 6 still write v2, and markers 1 through 4 are read.
ivanopcode
force-pushed
the
feat/schema-8-module-roots
branch
from
August 24, 2026 15:31
a14a3a2 to
1c6b68e
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.
Adopts the schema-8 additions of Curator Protocol core sections 4.1.1, 4.2.3, and 10, against curator-spec
candidate/schema-8-rc.9at6001dc33281b94a4ec7442ab15278550dd0f51d9.Manifest schema 8
agent-skill.jsonandcsk-skill.jsonacceptschema_version: 8with two optional fields:moduleson a localgo-v1build command: the first-party Go modules of the same package that the build root replaces. Absent or empty keeps the schema-6 and schema-7 meaning of a single-module build root.execution_policy+interpreterpair on a script command. Both value spaces are closed (script-worker-v1;python3-v1andnode-v1), and a manifest declaring one without the other is invalid.Schemas 1 through 7 reject all three fields at the top level and on every command. Schemas 2 through 7 reject them as unknown fields; schema 1 rejects them through its reserved-field check, because schema 1 keeps its deployed extension behavior.
Module roots
New
src/csk/builds/module_roots.pyowns the three steps of the manager profile's fixed order so they stay separable:go list, the declaration is validated against the frozen snapshot alone: portable relative path other than., unique, real link-free directory,go.moddirectly inside, and pairwise disjoint from every other declared module, every declared build root, and every runtime root under exact and platform-path comparison.go listreturns and beforego build, the effective replace set is read only from<build root>/vendor/modules.txt. Selection annotations reconcile against their unversioned-left directives, which is what rejects a versioned left side without parsinggo.mod. Only directory form is admitted, and the correspondence with the declaration is checked in both directions._validate_moduleno longer rejects everyModule.Replace; it admits one exactly on the bijected set.Module.Replace.Dirand.GoModare never read as evidence a path exists. No build input, cache key, receipt identity, or artifact-relative path changes.Diagnostics:
build_module_root_declaration_invalid,build_module_root_containment_invalid,build_module_root_directive_form_unsupported,build_module_root_directive_undeclared,build_module_root_declaration_unused.Fail-closed script execution policy
csk implements no script execution policy. A command selecting
script-worker-v1is refused withscript_execution_policy_unsupportedatcsk checkand at install, before any mutation, andinstaller.install_runtime_commandsrefuses it however it is reached. It is never downgraded to a declared-only shim, because that shim would run package code the manifest says is contained.Install marker v4
InstallMarkerV3and the newInstallMarkerV4share one body: same object shape, same build-entry semantics, same top-levelbuild_sourceandbuild_rootsrules. v4 bindsskill_schema_version8 exactly, v3 still binds 7 exactly. A schema-8 mutation writes v4, schema 7 writes v3, schemas 1 through 6 write v2, and markers 1 through 4 are read.Verification
python -m mypyexit 0.python -m pytest -q -n 8exit 0: 1630 passed, 244 skipped.CURATOR_CONFORMANCE_ROOTpointed at the curator-spec ref this repo's CI pins (0c81c1f) exit 0: 2735 passed, 84 skipped.agent-skill-v8/csk-skill-v8schema cases throughskillspec.load_skill_spec: 0 mismatches. It caught the one real defect found after the first pass, an explicitnullbeing read as absence formodules,execution_policy, andinterpreter.New test modules:
tests/test_module_roots.py,tests/test_skillspec_schema8.py,tests/test_install_marker_v4.py,tests/test_install_schema8.py.test_csk_skill_future_schema_failsmoved fromschema_version: 8to9, because 8 is now supported.Known gap, not introduced here
The candidate
install-marker-v4schema cases disagree with csk on 4 of 27. The identical 4 of 27 fail forinstall-marker-v3against both the candidate root and the pinned rc.6 root, so they are pre-existing schema-7 external-repository substitution gaps that marker v4 inherits along with marker v3's body: abranchsubstitution ref is rejected, alocal-pathsubstitution against anetwork-giteffective identity is accepted, and a substitution revision whose hex width contradictsobject_formatis accepted.tests/test_protocol_conformance.pydrives schema cases only for the names inIN_SCOPE_SCHEMA_NAMES, which contains no install-marker-v3 entry, so CI does not surface them. Fixing them means changing schema-7 substitution validation, a different manifest band whose correct expectations live in the rc.9 candidate suite. Recorded inLOGBOOK.md.Out of scope
The rc.9 candidate conformance consumer and the CI candidate-lane ref generalization are separate tasks. This branch does not touch
.github/workflows/ci.yml.