From fe7dd8fbe1355357a810a5d19b5471fa000cf567 Mon Sep 17 00:00:00 2001 From: coela-oss <147021942+coela-oss@users.noreply.github.com> Date: Fri, 16 Oct 2026 18:09:42 +0900 Subject: [PATCH] refactor: keep operational catalogs free of linguistic frames --- Cargo.lock | 71 +++++++++-- Cargo.toml | 4 + README.md | 8 ++ hat.package.json | 192 ++---------------------------- tests/catalog_frame_retirement.rs | 17 +++ 5 files changed, 102 insertions(+), 190 deletions(-) create mode 100644 tests/catalog_frame_retirement.rs diff --git a/Cargo.lock b/Cargo.lock index 0b131d4..08d4a64 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -154,13 +154,12 @@ dependencies = [ [[package]] name = "hat-specifications" version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ce904179eeffddae2a40087a500e4aa78f72ff17332161b6b16011f57e50723" +source = "git+https://github.com/hathq/hat-specifications?rev=8123222df96a289e4f4a4aa0c605b94b1905a60b#8123222df96a289e4f4a4aa0c605b94b1905a60b" dependencies = [ "serde", "serde_json", "sha2 0.10.9", - "toml", + "toml 1.1.8+spec-1.1.0", "zixcel-revision", ] @@ -402,6 +401,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7523beb55eece201a2356bee0bbca0d1ab466c14c07703b2e0ee6d42cb0c2c" +dependencies = [ + "serde_core", +] + [[package]] name = "sha2" version = "0.10.9" @@ -495,11 +503,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", - "serde_spanned", - "toml_datetime", + "serde_spanned 0.6.9", + "toml_datetime 0.6.11", "toml_edit", ] +[[package]] +name = "toml" +version = "1.1.8+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20489e00e4d8741d6be680764cc12e270655e375a20d1011e844a9c3379e678d" +dependencies = [ + "indexmap", + "serde_core", + "serde_spanned 1.1.2", + "toml_datetime 1.1.2+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 1.0.4", +] + [[package]] name = "toml_datetime" version = "0.6.11" @@ -509,6 +532,15 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "1.1.2+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b86d767906c6c42421dcba507eb9d203e779497710a47782a224bb871653053" +dependencies = [ + "serde_core", +] + [[package]] name = "toml_edit" version = "0.22.27" @@ -517,10 +549,19 @@ checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ "indexmap", "serde", - "serde_spanned", - "toml_datetime", + "serde_spanned 0.6.9", + "toml_datetime 0.6.11", "toml_write", - "winnow", + "winnow 0.7.15", +] + +[[package]] +name = "toml_parser" +version = "1.1.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baa693a8032d7e1cada7d0041e96126df243179ff061456783ac7f12bda4744c" +dependencies = [ + "winnow 1.0.4", ] [[package]] @@ -529,6 +570,12 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" +[[package]] +name = "toml_writer" +version = "1.1.3+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06bdbd8cfc056b8d2e2e85f29b56a3bdbecb527cef81eb39e3e7b98af4652770" + [[package]] name = "typenum" version = "1.20.1" @@ -574,6 +621,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "winnow" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" + [[package]] name = "writeable" version = "0.6.4" @@ -673,7 +726,7 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.9", - "toml", + "toml 0.8.23", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 8f47599..518b19c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,3 +26,7 @@ unsafe_code = "forbid" [lints.clippy] all = "warn" pedantic = "warn" + +# One current source identity across direct and transitive operational contracts. +[patch.crates-io] +hat-specifications = { git = "https://github.com/hathq/hat-specifications", rev = "8123222df96a289e4f4a4aa0c605b94b1905a60b" } diff --git a/README.md b/README.md index 442b54d..5532c9b 100644 --- a/README.md +++ b/README.md @@ -38,3 +38,11 @@ credential, implicit permission, or provider mutation is supplied by this worker [OSS responsibility and source completion](docs/oss-source-contract.md) defines the supported package boundary and required acceptance. It does not declare unexecuted source, distribution or production checks complete. Dependency updates: [repository policy](docs/dependency-updates.md). + +## Operational catalog source contract + +The current source package has no linguistic clause frames. Its catalog and +foundation dependency digests follow the declared HatSpec source dependency. +This source change does not replace previously signed release bytes. A new +immutable release identity and consumer acceptance are required before distributing +the changed package; language meaning/adoption remains with sem-lang. diff --git a/hat.package.json b/hat.package.json index f42a534..c9510af 100644 --- a/hat.package.json +++ b/hat.package.json @@ -357,7 +357,7 @@ "identity": { "catalog_id": "hat-github-operator", "version": 1, - "digest_sha256": "039aebeebbfc70c707576f00a69363622c8dfb5216010a481b9561f47bdd588d" + "digest_sha256": "865140abacd2668e1a8053b8b07832c1d7eb75c0c80ef0bde35fa12fa10f59df" }, "owner_repository_id": "hat-github-operator", "foundation": false, @@ -365,12 +365,12 @@ { "catalog_id": "hathq.foundation", "version": 1, - "digest_sha256": "6b618dff030e551bafd6b1a70fe6daf71e2873de9c2230f4cf71e9ac9fbf2c0f" + "digest_sha256": "7ed387a86fe00a320784c181a2128da856ccb3e5e3930040ca39d9f5b627a465" }, { "catalog_id": "hathq.communication", "version": 1, - "digest_sha256": "94991adae8e6847fe853628a613e2d55d7c3a257ed0703dcf0500ef6ec8ff47a" + "digest_sha256": "4bfafe8c5864f06b2f2eaea44c947d9bfe375165905a8a871e2d5bcde2cee932" } ], "incompatibilities": [], @@ -378,7 +378,7 @@ { "reference": { "catalog_id": "hat-github-operator", - "catalog_digest_sha256": "039aebeebbfc70c707576f00a69363622c8dfb5216010a481b9561f47bdd588d", + "catalog_digest_sha256": "865140abacd2668e1a8053b8b07832c1d7eb75c0c80ef0bde35fa12fa10f59df", "term_id": "hathq://vocabulary/action/create-private-github-repository/v1", "version": 1, "definition_digest_sha256": "0710ff4b43861b4602ca0000955e39096db1df177e586b9dc15d365f48f253f4", @@ -394,7 +394,7 @@ { "reference": { "catalog_id": "hat-github-operator", - "catalog_digest_sha256": "039aebeebbfc70c707576f00a69363622c8dfb5216010a481b9561f47bdd588d", + "catalog_digest_sha256": "865140abacd2668e1a8053b8b07832c1d7eb75c0c80ef0bde35fa12fa10f59df", "term_id": "hathq://vocabulary/action/push-github-repository-snapshot/v1", "version": 1, "definition_digest_sha256": "eeccdb18989e0c392030c63ccc1b1f93f6140f0f13d1564263be0e4bc02aed84", @@ -410,7 +410,7 @@ { "reference": { "catalog_id": "hat-github-operator", - "catalog_digest_sha256": "039aebeebbfc70c707576f00a69363622c8dfb5216010a481b9561f47bdd588d", + "catalog_digest_sha256": "865140abacd2668e1a8053b8b07832c1d7eb75c0c80ef0bde35fa12fa10f59df", "term_id": "hathq://vocabulary/action/create-github-issue/v1", "version": 1, "definition_digest_sha256": "38390e00a12888cc46693a4ccbe7137a35f338e91dc194c9a31eccfcd974a7b6", @@ -426,7 +426,7 @@ { "reference": { "catalog_id": "hat-github-operator", - "catalog_digest_sha256": "039aebeebbfc70c707576f00a69363622c8dfb5216010a481b9561f47bdd588d", + "catalog_digest_sha256": "865140abacd2668e1a8053b8b07832c1d7eb75c0c80ef0bde35fa12fa10f59df", "term_id": "hathq://vocabulary/action/create-github-pull-request/v1", "version": 1, "definition_digest_sha256": "7e137ec06b8cbb6dd8829363ff706bfa4f867e89d5cb7199c14e1a2319296f67", @@ -442,7 +442,7 @@ { "reference": { "catalog_id": "hat-github-operator", - "catalog_digest_sha256": "039aebeebbfc70c707576f00a69363622c8dfb5216010a481b9561f47bdd588d", + "catalog_digest_sha256": "865140abacd2668e1a8053b8b07832c1d7eb75c0c80ef0bde35fa12fa10f59df", "term_id": "hathq://vocabulary/action/dispatch-github-workflow/v1", "version": 1, "definition_digest_sha256": "b28fcf9ec92870ae44f7abe6f5a98636c66aef7181b9e032a346e22d09c9160f", @@ -458,7 +458,7 @@ { "reference": { "catalog_id": "hat-github-operator", - "catalog_digest_sha256": "039aebeebbfc70c707576f00a69363622c8dfb5216010a481b9561f47bdd588d", + "catalog_digest_sha256": "865140abacd2668e1a8053b8b07832c1d7eb75c0c80ef0bde35fa12fa10f59df", "term_id": "hathq://vocabulary/event/github-operation-completed/v1", "version": 1, "definition_digest_sha256": "c473d02ddc0f8f92d1a1e4fb54983bf0ab956b0e6078eedf1836b70cbe1c4c68", @@ -474,7 +474,7 @@ { "reference": { "catalog_id": "hat-github-operator", - "catalog_digest_sha256": "039aebeebbfc70c707576f00a69363622c8dfb5216010a481b9561f47bdd588d", + "catalog_digest_sha256": "865140abacd2668e1a8053b8b07832c1d7eb75c0c80ef0bde35fa12fa10f59df", "term_id": "hathq://vocabulary/action/delete-github-repository/v1", "version": 1, "definition_digest_sha256": "e39bff3445fce07d841212833c3e266aba1469689dd415c95d98a93ae7694046", @@ -488,176 +488,6 @@ "range": [] } ], - "lexicalizations": [], - "frames": [ - { - "frame_id": "create-private-repository-procedure-frame", - "definition_digest_sha256": "bad2ef345930a352fdf920a73d62aaa25a90f1d1ceabef4f42569d63021d50f5", - "predicate": { - "catalog_id": "hat-github-operator", - "catalog_digest_sha256": "039aebeebbfc70c707576f00a69363622c8dfb5216010a481b9561f47bdd588d", - "term_id": "hathq://vocabulary/action/create-private-github-repository/v1", - "version": 1, - "definition_digest_sha256": "0710ff4b43861b4602ca0000955e39096db1df177e586b9dc15d365f48f253f4", - "kind": "action" - }, - "roles": [ - { - "role": "actor", - "required": true, - "accepted_kinds": [ - "entity-type" - ] - }, - { - "role": "object", - "required": true, - "accepted_kinds": [ - "concept" - ] - } - ] - }, - { - "frame_id": "push-repository-snapshot-procedure-frame", - "definition_digest_sha256": "c11151757875e9a3a299a946be2015cbd77e18c5e12ccc350a911befbaf043e2", - "predicate": { - "catalog_id": "hat-github-operator", - "catalog_digest_sha256": "039aebeebbfc70c707576f00a69363622c8dfb5216010a481b9561f47bdd588d", - "term_id": "hathq://vocabulary/action/push-github-repository-snapshot/v1", - "version": 1, - "definition_digest_sha256": "eeccdb18989e0c392030c63ccc1b1f93f6140f0f13d1564263be0e4bc02aed84", - "kind": "action" - }, - "roles": [ - { - "role": "actor", - "required": true, - "accepted_kinds": [ - "entity-type" - ] - }, - { - "role": "object", - "required": true, - "accepted_kinds": [ - "concept" - ] - } - ] - }, - { - "frame_id": "create-github-issue-procedure-frame", - "definition_digest_sha256": "c475daac0f62d57b28b36f49cb67f4adb948fb5af545da634d26e757e126cbb7", - "predicate": { - "catalog_id": "hat-github-operator", - "catalog_digest_sha256": "039aebeebbfc70c707576f00a69363622c8dfb5216010a481b9561f47bdd588d", - "term_id": "hathq://vocabulary/action/create-github-issue/v1", - "version": 1, - "definition_digest_sha256": "38390e00a12888cc46693a4ccbe7137a35f338e91dc194c9a31eccfcd974a7b6", - "kind": "action" - }, - "roles": [ - { - "role": "actor", - "required": true, - "accepted_kinds": [ - "entity-type" - ] - }, - { - "role": "object", - "required": true, - "accepted_kinds": [ - "concept" - ] - } - ] - }, - { - "frame_id": "create-github-pull-request-procedure-frame", - "definition_digest_sha256": "4c4e9811a08a08a67c5ff295d841a1f1797df90c19deeb08afb2a9da69b21ca5", - "predicate": { - "catalog_id": "hat-github-operator", - "catalog_digest_sha256": "039aebeebbfc70c707576f00a69363622c8dfb5216010a481b9561f47bdd588d", - "term_id": "hathq://vocabulary/action/create-github-pull-request/v1", - "version": 1, - "definition_digest_sha256": "7e137ec06b8cbb6dd8829363ff706bfa4f867e89d5cb7199c14e1a2319296f67", - "kind": "action" - }, - "roles": [ - { - "role": "actor", - "required": true, - "accepted_kinds": [ - "entity-type" - ] - }, - { - "role": "object", - "required": true, - "accepted_kinds": [ - "concept" - ] - } - ] - }, - { - "frame_id": "dispatch-github-workflow-procedure-frame", - "definition_digest_sha256": "f11053efd9b2f66611811f8dac3e61fe00ca4a4b2bb7c563dbdc02c23e7661ac", - "predicate": { - "catalog_id": "hat-github-operator", - "catalog_digest_sha256": "039aebeebbfc70c707576f00a69363622c8dfb5216010a481b9561f47bdd588d", - "term_id": "hathq://vocabulary/action/dispatch-github-workflow/v1", - "version": 1, - "definition_digest_sha256": "b28fcf9ec92870ae44f7abe6f5a98636c66aef7181b9e032a346e22d09c9160f", - "kind": "action" - }, - "roles": [ - { - "role": "actor", - "required": true, - "accepted_kinds": [ - "entity-type" - ] - }, - { - "role": "object", - "required": true, - "accepted_kinds": [ - "concept" - ] - } - ] - }, - { - "frame_id": "delete-repository-procedure-frame", - "definition_digest_sha256": "6ecde3fbd9757f1e90767321d294a8230de807f28a602734607d8ef9b83fa46e", - "predicate": { - "catalog_id": "hat-github-operator", - "catalog_digest_sha256": "039aebeebbfc70c707576f00a69363622c8dfb5216010a481b9561f47bdd588d", - "term_id": "hathq://vocabulary/action/delete-github-repository/v1", - "version": 1, - "definition_digest_sha256": "e39bff3445fce07d841212833c3e266aba1469689dd415c95d98a93ae7694046", - "kind": "action" - }, - "roles": [ - { - "role": "actor", - "required": true, - "accepted_kinds": [ - "entity-type" - ] - }, - { - "role": "object", - "required": true, - "accepted_kinds": [ - "concept" - ] - } - ] - } - ] + "lexicalizations": [] } } diff --git a/tests/catalog_frame_retirement.rs b/tests/catalog_frame_retirement.rs new file mode 100644 index 0000000..3d20227 --- /dev/null +++ b/tests/catalog_frame_retirement.rs @@ -0,0 +1,17 @@ +// Modified by the Hatter downstream project, 2026. +// Purpose: validate the exact producer package against the current operational contract. +#[test] +fn current_package_has_no_language_frames_and_uses_current_foundation() { + let package = hat_specifications::parse_package(include_str!("../hat.package.json")) + .expect("current package shape"); + let result = hat_specifications::validate_package(&package); + assert!(result.valid, "{:?}", result.findings); + assert!( + package + .catalog + .dependencies + .contains(&hat_specifications::foundation_semantic_catalog().identity) + ); + let value = serde_json::to_value(&package.catalog).expect("catalog"); + assert!(value.get("frames").is_none()); +}