diff --git a/contracts/seats/mesh-catalog/fixtures/events.json b/contracts/seats/mesh-catalog/fixtures/events.json new file mode 100644 index 00000000..f0d61ef2 --- /dev/null +++ b/contracts/seats/mesh-catalog/fixtures/events.json @@ -0,0 +1,111 @@ +[ + { + "name": "a trunk revision kept, on the seat's subject", + "of": "event:catalog-revision", + "subject": "mesh.seat.mesh-catalog.event.catalog-revision.main", + "given": { + "v": 1, + "revision": 12, + "kind": "trunk", + "source": 3589, + "entries": 2, + "changed": [ + "xclip" + ], + "at": "2026-11-09T19:00:00Z", + "branch": "main" + } + }, + { + "name": "a candidate's revision kept", + "of": "event:catalog-revision", + "subject": "mesh.seat.mesh-catalog.event.catalog-revision.main", + "given": { + "v": 1, + "revision": 13, + "kind": "candidate", + "source": 3589, + "group": "feat/47-G", + "heads": "0123456789ab", + "entries": 2, + "branch": "main" + } + }, + { + "name": "the store past 80 % of its cap", + "of": "event:filling", + "subject": "mesh.seat.mesh-catalog.event.filling", + "given": { + "store": "catalog-revisions", + "bytes": 450000000, + "cap": 536870912, + "at": "2026-11-09T19:00:00Z" + } + }, + { + "name": "the store full, naming what it refuses", + "of": "event:full", + "subject": "mesh.seat.mesh-catalog.event.full", + "given": { + "store": "catalog-revisions", + "bytes": 536870912, + "cap": 536870912, + "at": "2026-11-09T19:00:00Z", + "refused": "the next revision; source revision 3590 held pending with the reason objects full" + } + }, + { + "name": "the store back below its cap", + "of": "event:room", + "subject": "mesh.seat.mesh-catalog.event.room", + "given": { + "store": "catalog-revisions", + "bytes": 300000000, + "cap": 536870912, + "at": "2026-11-09T19:00:00Z" + } + }, + { + "name": "a registration changed on its warrant", + "of": "event:registration-changed", + "subject": "mesh.seat.mesh-catalog.event.registration-changed", + "given": { + "v": 1, + "module": "nats", + "version": 2, + "moved": [ + "nats:program unit: required -> bypass" + ], + "by": "operator@shanks", + "warrant": "ask-m2kx9a1b3c4d5e", + "at": "2026-11-10T10:00:00Z" + } + }, + { + "name": "a version released", + "of": "event:version-released", + "subject": "mesh.seat.mesh-catalog.event.version-released", + "given": { + "v": 1, + "module": "mesh-sdk", + "version": "0.1.15", + "artifacts": [ + { + "artifact": "mesh-sdk:go", + "digest": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" + } + ], + "source": 3589 + } + }, + { + "name": "the versions filled", + "of": "event:versions-filled", + "subject": "mesh.seat.mesh-catalog.event.versions-filled", + "given": { + "v": 1, + "at": "2026-11-11T10:00:00Z", + "modules": 120 + } + } +] diff --git a/contracts/seats/mesh-catalog/fixtures/states.json b/contracts/seats/mesh-catalog/fixtures/states.json index 43af3306..c3c1aacc 100644 --- a/contracts/seats/mesh-catalog/fixtures/states.json +++ b/contracts/seats/mesh-catalog/fixtures/states.json @@ -219,5 +219,376 @@ "repository": "novox/mesh-catalog" } } + }, + { + "name": "a watched branch's catalog graph revision", + "of": "state:catalog-revisions/.", + "given": { + "v": 1, + "revision": 12, + "kind": "trunk", + "source": 3589, + "trunk": [ + { + "repository": "novox/mesh-catalog", + "commit": "f469eb387a3015569d9b16c66ed418e9dd098f64" + } + ], + "definitions": [ + { + "seat": "node-build-go", + "digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + ], + "at": "2026-11-09T19:00:00Z", + "entries": [ + { + "module": "mesh-build-go", + "digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + { + "module": "xclip", + "digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + ], + "branch": "main" + } + }, + { + "name": "a candidate's catalog graph revision", + "of": "state:catalog-revisions/candidate..", + "given": { + "v": 1, + "revision": 13, + "kind": "candidate", + "source": 3589, + "trunk": [ + { + "repository": "novox/mesh-catalog", + "commit": "f469eb387a3015569d9b16c66ed418e9dd098f64" + } + ], + "definitions": [ + { + "seat": "node-build-go", + "digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + ], + "at": "2026-11-09T19:00:00Z", + "entries": [ + { + "module": "mesh-build-go", + "digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + { + "module": "xclip", + "digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + ], + "group": "feat/47-G", + "heads": "0123456789ab" + } + }, + { + "name": "a catalog graph entry (xclip)", + "of": "state:catalog-revisions/entry.", + "given": { + "v": 1, + "module": "xclip", + "repository": "novox/mesh-catalog", + "path": "modules/xclip", + "commit": "f469eb387a3015569d9b16c66ed418e9dd098f64", + "manifest": { + "module": "xclip", + "version": "1" + }, + "verdict": "accepted", + "fp": "src2:b427bdde1f100e2f52490cfa9df0c5112dd3700226b4892349f0c14a15a4af56", + "inputs": { + "from": { + "tree": "4b825dc642cb6eb9a060e54bf8d69288fbee4904", + "bases": [ + "arch" + ], + "locks": { + "go.sum": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "packages": [ + "git.novox.be/novox/mesh-sdk/go@v0.0.0-20261101000000-f469eb387a30" + ] + }, + "toolchains": { + "go": { + "language": "go", + "version": "1.26.0", + "recipe": "1" + } + }, + "src": 41, + "fp-src": 41 + }, + "bases": [ + "arch" + ], + "packages": { + "git.novox.be/novox/mesh-sdk/go": "v0.0.0-20261101000000-f469eb387a30" + }, + "toolchains": { + "go": { + "module": "mesh-build-go", + "version": "1.26.0", + "recipe": "1" + } + }, + "invokes": [ + "node-files.read" + ] + } + }, + { + "name": "an acting part's entry carries the rule of the seat it claims", + "of": "state:catalog-revisions/entry.", + "given": { + "v": 1, + "module": "mesh-build-go", + "repository": "novox/mesh-catalog", + "path": "modules/mesh-build-go", + "commit": "f469eb387a3015569d9b16c66ed418e9dd098f64", + "manifest": { + "module": "mesh-build-go", + "version": "1" + }, + "verdict": "accepted", + "fp": "src2:b427bdde1f100e2f52490cfa9df0c5112dd3700226b4892349f0c14a15a4af56", + "serves": [ + "node-build-go.run" + ], + "left-out": [ + "mesh-catalog.revision" + ], + "needs": [ + "form:setting", + "word:claims" + ], + "awaits": [ + "database" + ], + "main": "cmd/mesh-build-go", + "acts": [ + { + "seat": "node-build-go", + "step": "build", + "on": "go", + "bound": "60m" + } + ] + } + }, + { + "name": "a module's registration", + "of": "state:registrations/", + "given": { + "v": 1, + "module": "nats", + "origin": "novox/mesh-catalog", + "path": "modules/nats/module.json", + "branches": [ + "main" + ], + "policy": { + "steps": { + "lint": "required", + "unit": "required", + "integration": "required", + "composition": "required", + "review": "optional", + "approval": "bypass" + }, + "artifacts": { + "program": { + "unit": "bypass" + } + } + }, + "version": 2, + "by": "operator@shanks", + "warrant": "ask-m2kx9a1b3c4d5e", + "at": "2026-11-10T10:00:00Z" + } + }, + { + "name": "one version kept in the history", + "of": "state:registration-history/.", + "given": { + "v": 1, + "module": "nats", + "origin": "novox/mesh-catalog", + "path": "modules/nats/module.json", + "branches": [ + "main" + ], + "policy": { + "steps": { + "lint": "required", + "unit": "required", + "integration": "required", + "composition": "required", + "review": "optional", + "approval": "bypass" + }, + "artifacts": { + "program": { + "unit": "bypass" + } + } + }, + "version": 2, + "by": "operator@shanks", + "warrant": "ask-m2kx9a1b3c4d5e", + "at": "2026-11-10T10:00:00Z" + } + }, + { + "name": "an entry with its artifacts and the edges into them, per artifact", + "of": "state:catalog-revisions/entry.", + "given": { + "v": 1, + "module": "mesh-grants", + "repository": "novox/mesh-catalog", + "path": "modules/xclip", + "commit": "f469eb387a3015569d9b16c66ed418e9dd098f64", + "manifest": { + "module": "mesh-grants", + "version": "1" + }, + "verdict": "accepted", + "fp": "src2:b427bdde1f100e2f52490cfa9df0c5112dd3700226b4892349f0c14a15a4af56", + "inputs": { + "from": { + "tree": "4b825dc642cb6eb9a060e54bf8d69288fbee4904", + "bases": [ + "arch" + ], + "locks": { + "go.sum": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "packages": [ + "git.novox.be/novox/mesh-sdk/go@v0.0.0-20261101000000-f469eb387a30" + ] + }, + "toolchains": { + "go": { + "language": "go", + "version": "1.26.0", + "recipe": "1" + } + }, + "src": 41, + "fp-src": 41 + }, + "bases": [ + "arch" + ], + "packages": { + "git.novox.be/novox/mesh-sdk/go": "v0.0.0-20261101000000-f469eb387a30" + }, + "toolchains": { + "go": { + "module": "mesh-build-go", + "version": "1.26.0", + "recipe": "1" + } + }, + "invokes": [ + "node-files.read" + ], + "artifacts": [ + { + "ref": "mesh-grants:program", + "language": "go" + }, + { + "ref": "mesh-grants:tools", + "language": "go" + } + ], + "edges": [ + { + "from": "mesh-grants:program", + "to": "node-tools:runtime", + "kind": 6, + "why": "seat mesh-grants verb grants" + }, + { + "from": "node-tools:runtime", + "to": "mesh-grants:tools", + "kind": 4, + "why": "the tool runner runs the tools" + }, + { + "from": "mesh-sdk:go", + "to": "mesh-grants:program", + "kind": 1, + "why": "git.novox.be/novox/mesh-sdk/go" + }, + { + "from": "nats:program", + "to": "mesh-grants:program", + "kind": 4, + "declared": true, + "why": "declared in needs" + } + ] + } + }, + { + "name": "a released version", + "of": "state:versions/.", + "given": { + "v": 1, + "module": "mesh-sdk", + "version": "0.1.15", + "source": 3589, + "artifacts": [ + { + "artifact": "mesh-sdk:go", + "digest": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" + } + ], + "edges": [ + { + "kind": 1, + "stale": true, + "word": "imports", + "part": "mesh-contracts:go-nodeengine", + "version": "0.1.4", + "digest": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" + } + ] + } + }, + { + "name": "a build of another branch", + "of": "state:build-edges/.", + "given": { + "v": 1, + "fp": "src2:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef", + "source": 3589, + "edges": [ + { + "kind": 1, + "stale": true, + "word": "imports", + "part": "mesh-contracts:go-nodeengine", + "version": "0.1.4", + "digest": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" + } + ] + } + }, + { + "name": "an input", + "of": "state:inputs/