D7: a catalog entry carries its class
The seat mesh-catalog's CatalogEntry gains class, core or leaf; an entry without it reads as leaf. The indexer writes it from the manifest. The seat's form rises to 3; regenerated with seatgen, -check clean. Builds: design 47 H2 §810; H-A-394 (1), H-A-431 (1)
This commit is contained in:
@@ -14,13 +14,13 @@ const Seat = "mesh-catalog"
|
||||
|
||||
// Form is the form of the seat's values, events and answers this contract was generated at (design 47 H2 §780):
|
||||
// a reader of a value of another form says "form N, this reader knows M".
|
||||
const Form = 2
|
||||
const Form = 3
|
||||
|
||||
// The forms and the digest of the fields this contract was generated from: the generator's compare fails a definition
|
||||
// whose fields changed while its forms did not (design 47 H2 §780).
|
||||
const (
|
||||
generatedForms = "2"
|
||||
generatedFieldsDigest = "ActingRule=8a83ce7e0457 Artifact=78b05c1a9ec3 ArtifactPackage=2a3a660a934d ArtifactRef=a2f06147f4b6 BuildEdge=76f0684e254a BuildEdges=d2b95000259e BuildEdgesByModuleBranchValue=4fdf7cc1e723 CandidatesByGroupValue=9ea8c6c580d2 CandidatesByGroupValuePullsItem=90fb03643258 CandidatesByGroupValuePullsItemFpsValue=4c6783201aa3 CatalogEntry=d154f232237b CatalogRevision=d1ecaaa484af CatalogRevisionDefinitionsItem=77fcff620d48 CatalogRevisionEvent=710cbc5bfff1 CatalogRevisionsByBranchRevisionValue=17e54f635d35 CatalogRevisionsByCandidateGroupHeadsValue=17e54f635d35 CatalogRevisionsByEntryDigestValue=8755036a3051 DependentsAnswer=7538f2f5e68e Edge=7242732afaef EntryAnswer=805c2ff28e1c EntryInputs=76a7f8690dd2 EntryRef=ff109e5089e1 Fill=80f442916429 FillingEvent=5bd4df78ed84 FingerprintInputs=99a6df7f991f FullEvent=5bd4df78ed84 Head=774b4bf88ba4 InputAnswer=cd41ee65565d InputsByTimeDigestValue=a2f06147f4b6 ManifestsByDigestValue=51b3822b29c6 ModuleAnswer=499a03ce9b27 ModuleAnswerModule=c0f679e09f08 ModulesAnswer=6d119571c69e ModulesAnswerModulesItem=a70f39c60b67 ModulesByModuleValue=fc7530ba893a ModulesByModuleValueInputs2=99a6df7f991f Outdated=e820214f66bc OutdatedAnswer=275fb25266b9 OutdatedDependency=dc35dca1b683 PackagesByModuleValue=2b62574b709f PackagesByModuleValuePackagesItem=a7d30558470d PackagesByPackageSeriesValue=07421d8d3411 PackagesByPackageSeriesValueNewest=aba144994370 PackagesByPackageSeriesValueNewestContents=eca2ccf56913 PackagesByPackageSeriesValueNewestContentsPackagesItem=a7d30558470d PackagesByPackageSeriesValueNumbered=c8ffc628599c PackagesByPackageSeriesValueNumberedContents=0def6c0794ee PackagesByPackageSeriesValueNumberedContentsPackagesItem=a7d30558470d Policy=719e2f460c6f PolicyAnswer=46cdf8430557 PredefinedByListValue=ec8e3febe8ac ProvidesAnswer=7538f2f5e68e RegisterAnswer=46cdf8430557 Registration=ef03d1b2e73f RegistrationAsked=55adba349c24 RegistrationChangedEvent=99a3268edf41 RegistrationHistoryByModuleVersionValue=0999b5bb7dc7 RegistrationHistoryBySourceOwnerNameVersionValue=0999b5bb7dc7 RegistrationsAnswer=8849ef618cf3 RegistrationsByModuleValue=0999b5bb7dc7 RegistrationsBySourceOwnerNameValue=0999b5bb7dc7 RevisionAnswer=258ea5124931 RoomEvent=5bd4df78ed84 SeatDefinitionChangedEvent=e271d24d58f7 SeatDefinitionRemovedEvent=f7d6171111e6 SeatDefinitionsAnswer=0fd6a59fec59 SeatDefinitionsAnswerEntry=d006f68d2be5 SeatDefinitionsAnswerSeatsItem=e271d24d58f7 SeatListAnswer=912c0cebcf0a SourceCheck=d1ed7cbbd579 StepStatuses=4f50aa633e61 TakeInEntry=545ec1528499 ToolchainUsed=43b6d42376fb UnwatchAnswer=46cdf8430557 VersionArtifact=438c49a392b0 VersionEdge=b0f80e83f4dc VersionEntry=33f5b00dbda9 VersionReleasedEvent=4ccf1ea90e7f VersionsAnswer=b59e6e057e7b VersionsByModuleVersionValue=e546dfadb913 VersionsFilledEvent=4cc437912dc3 WatchAnswer=46cdf8430557"
|
||||
generatedForms = "3"
|
||||
generatedFieldsDigest = "ActingRule=8a83ce7e0457 Artifact=78b05c1a9ec3 ArtifactPackage=2a3a660a934d ArtifactRef=a2f06147f4b6 BuildEdge=76f0684e254a BuildEdges=d2b95000259e BuildEdgesByModuleBranchValue=4fdf7cc1e723 CandidatesByGroupValue=9ea8c6c580d2 CandidatesByGroupValuePullsItem=90fb03643258 CandidatesByGroupValuePullsItemFpsValue=4c6783201aa3 CatalogEntry=c0a4ea25d523 CatalogRevision=d1ecaaa484af CatalogRevisionDefinitionsItem=77fcff620d48 CatalogRevisionEvent=710cbc5bfff1 CatalogRevisionsByBranchRevisionValue=17e54f635d35 CatalogRevisionsByCandidateGroupHeadsValue=17e54f635d35 CatalogRevisionsByEntryDigestValue=8755036a3051 DependentsAnswer=7538f2f5e68e Edge=7242732afaef EntryAnswer=805c2ff28e1c EntryInputs=76a7f8690dd2 EntryRef=ff109e5089e1 Fill=80f442916429 FillingEvent=5bd4df78ed84 FingerprintInputs=99a6df7f991f FullEvent=5bd4df78ed84 Head=774b4bf88ba4 InputAnswer=cd41ee65565d InputsByTimeDigestValue=a2f06147f4b6 ManifestsByDigestValue=51b3822b29c6 ModuleAnswer=499a03ce9b27 ModuleAnswerModule=c0f679e09f08 ModulesAnswer=6d119571c69e ModulesAnswerModulesItem=a70f39c60b67 ModulesByModuleValue=fc7530ba893a ModulesByModuleValueInputs2=99a6df7f991f Outdated=e820214f66bc OutdatedAnswer=275fb25266b9 OutdatedDependency=dc35dca1b683 PackagesByModuleValue=2b62574b709f PackagesByModuleValuePackagesItem=a7d30558470d PackagesByPackageSeriesValue=07421d8d3411 PackagesByPackageSeriesValueNewest=aba144994370 PackagesByPackageSeriesValueNewestContents=eca2ccf56913 PackagesByPackageSeriesValueNewestContentsPackagesItem=a7d30558470d PackagesByPackageSeriesValueNumbered=c8ffc628599c PackagesByPackageSeriesValueNumberedContents=0def6c0794ee PackagesByPackageSeriesValueNumberedContentsPackagesItem=a7d30558470d Policy=719e2f460c6f PolicyAnswer=46cdf8430557 PredefinedByListValue=ec8e3febe8ac ProvidesAnswer=7538f2f5e68e RegisterAnswer=46cdf8430557 Registration=ef03d1b2e73f RegistrationAsked=55adba349c24 RegistrationChangedEvent=99a3268edf41 RegistrationHistoryByModuleVersionValue=0999b5bb7dc7 RegistrationHistoryBySourceOwnerNameVersionValue=0999b5bb7dc7 RegistrationsAnswer=8849ef618cf3 RegistrationsByModuleValue=0999b5bb7dc7 RegistrationsBySourceOwnerNameValue=0999b5bb7dc7 RevisionAnswer=258ea5124931 RoomEvent=5bd4df78ed84 SeatDefinitionChangedEvent=e271d24d58f7 SeatDefinitionRemovedEvent=f7d6171111e6 SeatDefinitionsAnswer=0fd6a59fec59 SeatDefinitionsAnswerEntry=d006f68d2be5 SeatDefinitionsAnswerSeatsItem=e271d24d58f7 SeatListAnswer=912c0cebcf0a SourceCheck=d1ed7cbbd579 StepStatuses=4f50aa633e61 TakeInEntry=545ec1528499 ToolchainUsed=43b6d42376fb UnwatchAnswer=46cdf8430557 VersionArtifact=438c49a392b0 VersionEdge=b0f80e83f4dc VersionEntry=33f5b00dbda9 VersionReleasedEvent=4ccf1ea90e7f VersionsAnswer=b59e6e057e7b VersionsByModuleVersionValue=e546dfadb913 VersionsFilledEvent=4cc437912dc3 WatchAnswer=46cdf8430557"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -679,6 +679,8 @@ type CatalogEntry struct {
|
||||
Awaits []string `json:"awaits,omitempty"`
|
||||
// the images and modules it is built on
|
||||
Bases []string `json:"bases,omitempty"`
|
||||
// core or leaf: core when its manifest claims a seat, leaf when it claims none; an entry without it reads as leaf (design 47 H2 H-A-394, H-A-431)
|
||||
Class string `json:"class,omitempty"`
|
||||
// the merge commit it was last changed at
|
||||
Commit string `json:"commit"`
|
||||
// the requirements the manifest's contributes object names as keys, sorted, its local names not carried; each is also in requires (design 47 G section 709)
|
||||
|
||||
@@ -83,6 +83,12 @@ func TestFixtures(t *testing.T) {
|
||||
err := json.Unmarshal(b, &v)
|
||||
return v, err
|
||||
}, subjectIs: nil},
|
||||
{name: "a seat-claiming module's entry carries its class core (H-A-394, H-A-431)", subject: "", given: "{\"acts\":[{\"bound\":\"60m\",\"on\":\"go\",\"seat\":\"node-build-go\",\"step\":\"build\"}],\"awaits\":[\"database\"],\"class\":\"core\",\"commit\":\"f469eb387a3015569d9b16c66ed418e9dd098f64\",\"fp\":\"src2:b427bdde1f100e2f52490cfa9df0c5112dd3700226b4892349f0c14a15a4af56\",\"left-out\":[\"mesh-catalog.revision\"],\"main\":\"cmd/mesh-build-go\",\"manifest\":{\"module\":\"mesh-build-go\",\"version\":\"1\"},\"module\":\"mesh-build-go\",\"needs\":[\"form:setting\",\"word:claims\"],\"path\":\"modules/mesh-build-go\",\"repository\":\"novox/mesh-catalog\",\"serves\":[\"node-build-go.run\"],\"v\":1,\"verdict\":\"accepted\"}", wire: "{\"acts\":[{\"bound\":\"60m\",\"on\":\"go\",\"seat\":\"node-build-go\",\"step\":\"build\"}],\"awaits\":[\"database\"],\"class\":\"core\",\"commit\":\"f469eb387a3015569d9b16c66ed418e9dd098f64\",\"fp\":\"src2:b427bdde1f100e2f52490cfa9df0c5112dd3700226b4892349f0c14a15a4af56\",\"left-out\":[\"mesh-catalog.revision\"],\"main\":\"cmd/mesh-build-go\",\"manifest\":{\"module\":\"mesh-build-go\",\"version\":\"1\"},\"module\":\"mesh-build-go\",\"needs\":[\"form:setting\",\"word:claims\"],\"path\":\"modules/mesh-build-go\",\"repository\":\"novox/mesh-catalog\",\"serves\":[\"node-build-go.run\"],\"v\":1,\"verdict\":\"accepted\"}",
|
||||
decode: func(b []byte) (any, error) {
|
||||
var v CatalogRevisionsByEntryDigestValue
|
||||
err := json.Unmarshal(b, &v)
|
||||
return v, err
|
||||
}, subjectIs: nil},
|
||||
{name: "a module's registration", subject: "", given: "{\"at\":\"2026-11-10T10:00:00Z\",\"branches\":[\"main\"],\"by\":\"operator@workstation\",\"module\":\"nats\",\"origin\":\"novox/mesh-catalog\",\"path\":\"modules/nats/module.json\",\"policy\":{\"artifacts\":{\"program\":{\"unit\":\"bypass\"}},\"steps\":{\"approval\":\"bypass\",\"composition\":\"required\",\"integration\":\"required\",\"lint\":\"required\",\"review\":\"optional\",\"unit\":\"required\"}},\"v\":1,\"version\":2,\"warrant\":\"ask-m2kx9a1b3c4d5e\"}", wire: "{\"at\":\"2026-11-10T10:00:00Z\",\"branches\":[\"main\"],\"by\":\"operator@workstation\",\"module\":\"nats\",\"origin\":\"novox/mesh-catalog\",\"path\":\"modules/nats/module.json\",\"policy\":{\"artifacts\":{\"program\":{\"unit\":\"bypass\"}},\"steps\":{\"approval\":\"bypass\",\"composition\":\"required\",\"integration\":\"required\",\"lint\":\"required\",\"review\":\"optional\",\"unit\":\"required\"}},\"v\":1,\"version\":2,\"warrant\":\"ask-m2kx9a1b3c4d5e\"}",
|
||||
decode: func(b []byte) (any, error) {
|
||||
var v RegistrationsByModuleValue
|
||||
|
||||
@@ -345,6 +345,46 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a seat-claiming module's entry carries its class core (H-A-394, H-A-431)",
|
||||
"of": "state:catalog-revisions/entry.<digest>",
|
||||
"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"
|
||||
}
|
||||
],
|
||||
"class": "core"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a module's registration",
|
||||
"of": "state:registrations/<module>",
|
||||
|
||||
@@ -1686,6 +1686,10 @@
|
||||
"type": "string",
|
||||
"description": "its manifest's verdict: accepted, refused or held"
|
||||
},
|
||||
"class": {
|
||||
"type": "string",
|
||||
"description": "core or leaf: core when its manifest claims a seat, leaf when it claims none; an entry without it reads as leaf (design 47 H2 H-A-394, H-A-431)"
|
||||
},
|
||||
"fp": {
|
||||
"type": "string",
|
||||
"description": "its fingerprint (src2: and 64 hex digits); absent when it has none"
|
||||
@@ -2721,5 +2725,5 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"form": 2
|
||||
"form": 3
|
||||
}
|
||||
|
||||
@@ -236,6 +236,8 @@ export interface CatalogEntry {
|
||||
"awaits"?: string[];
|
||||
/** the images and modules it is built on */
|
||||
"bases"?: string[];
|
||||
/** core or leaf: core when its manifest claims a seat, leaf when it claims none; an entry without it reads as leaf (design 47 H2 H-A-394, H-A-431) */
|
||||
"class"?: string;
|
||||
/** the merge commit it was last changed at */
|
||||
"commit": string;
|
||||
/** the requirements the manifest's contributes object names as keys, sorted, its local names not carried; each is also in requires (design 47 G section 709) */
|
||||
|
||||
Reference in New Issue
Block a user