diff --git a/README.md b/README.md index a317396..3015895 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,8 @@ the exact source and target snapshots, records what was preserved or lost, and cites evidence for the relationship. The Rust core inspects reviews offline. **Status:** Experimental native v0.1 source, maintained by Hypler. The Rust -packages are unpublished. Stable 1.0 release and consumer qualification are +packages are unpublished. The [crate archive checks](docs/validation.md#experimental-crate-archives) +cover both packages offline. Stable 1.0 release and consumer qualification are tracked in the [implementation roadmap](docs/implementation-plan.md). ## Current implementation and historical assets @@ -16,9 +17,9 @@ tracked in the [implementation roadmap](docs/implementation-plan.md). | Component | What it provides | | --- | --- | | [Native specification](docs/vusl-v0.1-specification.md) | A bounded mapping-review format with scoped native references, term-level fidelity and loss, and evidence-qualified relationships. | -| [Rust core](crates/vusl-core/Cargo.toml) | Offline inspection with typed results, canonical bytes, a stable document ID, and an assessment of declared required meaning. | +| [Rust core](crates/vusl-core/README.md) | Offline inspection with typed results, canonical bytes, a stable document ID, and an assessment of declared required meaning. | | [Authoring schema](schemas/vusl.mapping-review.v0.1.schema.json) | A JSON Schema 2020-12 structural check for authoring. The native inspector determines conformance. | -| [Independent coverage](crates/vusl-coverage/Cargo.toml) | Checks whether a review includes every source term required by a caller-selected policy and keeps those terms marked as required. | +| [Independent coverage](crates/vusl-coverage/README.md) | Checks whether a review includes every source term required by a caller-selected policy and keeps those terms marked as required. | | [Reference consumer](examples/reference-consumer/README.md) | Redacted CLI diagnostics, versioned semantic results, and offline examples for saved revisions, exact mapping, and multi-edge review. | Historical RUSL/D0a artifacts are retained for [provenance](PROVENANCE.md). diff --git a/crates/vusl-core/Cargo.toml b/crates/vusl-core/Cargo.toml index e39b050..865ab2e 100644 --- a/crates/vusl-core/Cargo.toml +++ b/crates/vusl-core/Cargo.toml @@ -4,7 +4,12 @@ version.workspace = true edition.workspace = true rust-version.workspace = true license.workspace = true +description = "Offline inspection and canonicalization of experimental VUSL mapping reviews" +repository = "https://github.com/hypler-dev/vusl" +readme = "README.md" publish = false +# The native driver depends on the repository conformance corpus. +exclude = ["/tests/native_driver.rs"] [dependencies] serde.workspace = true diff --git a/crates/vusl-core/LICENSE b/crates/vusl-core/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/crates/vusl-core/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/crates/vusl-core/README.md b/crates/vusl-core/README.md new file mode 100644 index 0000000..f0d4c1f --- /dev/null +++ b/crates/vusl-core/README.md @@ -0,0 +1,22 @@ +# vusl-core + +`vusl-core` inspects the bytes of an experimental VUSL v0.1 mapping review +offline. A successful inspection returns an immutable checked review, its +canonical bytes, a document ID, and an assessment of the meaning declared +as required by that review. Invalid input returns a typed refusal. + +```rust +fn review_id(input: &[u8]) -> Result { + let checked = vusl_core::inspect(input)?; + Ok(checked.document_id().to_owned()) +} +``` + +The caller supplies the review bytes and is responsible for resolving native +references and establishing evidence trust, freshness, and execution authority. +Applications with an independent inventory of required source terms can use +`vusl-coverage` to check that inventory against the review. + +This experimental crate requires Rust 1.99.1 and uses the Apache License 2.0. +See the [native specification](https://github.com/hypler-dev/vusl/blob/main/docs/vusl-v0.1-specification.md) +for the input format and conformance rules. diff --git a/crates/vusl-coverage/Cargo.toml b/crates/vusl-coverage/Cargo.toml index 0217799..26677f4 100644 --- a/crates/vusl-coverage/Cargo.toml +++ b/crates/vusl-coverage/Cargo.toml @@ -4,7 +4,10 @@ version.workspace = true edition.workspace = true rust-version.workspace = true license.workspace = true +description = "Caller-selected required term coverage for checked VUSL mapping reviews" +repository = "https://github.com/hypler-dev/vusl" +readme = "README.md" publish = false [dependencies] -vusl-core = { path = "../vusl-core" } +vusl-core = { path = "../vusl-core", version = "=0.1.0-dev.1" } diff --git a/crates/vusl-coverage/LICENSE b/crates/vusl-coverage/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/crates/vusl-coverage/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/crates/vusl-coverage/README.md b/crates/vusl-coverage/README.md new file mode 100644 index 0000000..dede83c --- /dev/null +++ b/crates/vusl-coverage/README.md @@ -0,0 +1,18 @@ +# vusl-coverage + +`vusl-coverage` checks whether a caller-selected inventory of required source +terms is represented as required in a checked VUSL review. It binds the review +to the profile and exact source and target snapshots selected by the caller. + +1. Inspect the native review with `vusl_core::inspect`. +2. Construct a `CoveragePolicy` from the host's snapshot references, catalog ID + and revision, and independent list of required source terms. +3. Call `evaluate` to get binding failures and indexed findings for missing or + downgraded terms. Use `CoverageReport::require_covered_preserved` when both + independent coverage and declared preservation must pass. + +Coverage and declared preservation are separate facts. The host still owns +evidence trust, native readback and freshness, and execution authority. + +This experimental crate requires Rust 1.99.1 and uses the Apache License 2.0. +It uses the matching experimental version of `vusl-core`. diff --git a/crates/vusl-coverage/tests/coverage.rs b/crates/vusl-coverage/tests/coverage.rs index 193dd25..d830458 100644 --- a/crates/vusl-coverage/tests/coverage.rs +++ b/crates/vusl-coverage/tests/coverage.rs @@ -6,9 +6,8 @@ use vusl_coverage::{ PolicyInput, SnapshotRef, }; -const BASE: &[u8] = include_bytes!("../../../conformance/native-v0.1/canonical/NV-BASE-0001.json"); -const OPTIONAL: &[u8] = - include_bytes!("../../../conformance/native-v0.1/canonical/NV-BASE-0002.json"); +const BASE: &[u8] = include_bytes!("fixtures/NV-BASE-0001.json"); +const OPTIONAL: &[u8] = include_bytes!("fixtures/NV-BASE-0002.json"); fn source() -> SnapshotRef<'static> { SnapshotRef { diff --git a/crates/vusl-coverage/tests/fixtures/NV-BASE-0001.json b/crates/vusl-coverage/tests/fixtures/NV-BASE-0001.json new file mode 100644 index 0000000..4fa26a8 --- /dev/null +++ b/crates/vusl-coverage/tests/fixtures/NV-BASE-0001.json @@ -0,0 +1 @@ +{"facets":[{"evidence":[{"contract":"fixture.review","contract_version":"1","native_id":"review-1","revision":"r1","scope":"test","system":"sample-a"}],"fidelity":"preserved","loss":null,"note":"Selected action meaning retained.","required":true,"source_term":"action","target_term":"operation"}],"profile":"vusl.mapping-review.v0.1","relationship":{"basis":"content_review","evidence":[{"contract":"fixture.review","contract_version":"1","native_id":"review-1","revision":"r1","scope":"test","system":"sample-a"}],"state":"evidenced","uncertainty":[]},"source":{"contract":"fixture.tool","contract_version":"1","native_id":"tool-1","revision":"r1","scope":"test","system":"sample-a"},"target":{"contract":"fixture.tool","contract_version":"2","native_id":"tool-9","revision":"r2","scope":"test","system":"sample-b"}} \ No newline at end of file diff --git a/crates/vusl-coverage/tests/fixtures/NV-BASE-0002.json b/crates/vusl-coverage/tests/fixtures/NV-BASE-0002.json new file mode 100644 index 0000000..ffc8da0 --- /dev/null +++ b/crates/vusl-coverage/tests/fixtures/NV-BASE-0002.json @@ -0,0 +1 @@ +{"facets":[{"evidence":[{"contract":"fixture.review","contract_version":"1","native_id":"review-1","revision":"r1","scope":"test","system":"sample-a"}],"fidelity":"preserved","loss":null,"note":"Selected action meaning retained.","required":true,"source_term":"action","target_term":"operation"},{"evidence":[{"contract":"fixture.review","contract_version":"1","native_id":"review-1","revision":"r1","scope":"test","system":"sample-a"}],"fidelity":"transformed","loss":"approximation","note":"Target title omits source display nuance.","required":false,"source_term":"label","target_term":"title"}],"profile":"vusl.mapping-review.v0.1","relationship":{"basis":"content_review","evidence":[{"contract":"fixture.review","contract_version":"1","native_id":"review-1","revision":"r1","scope":"test","system":"sample-a"}],"state":"evidenced","uncertainty":[]},"source":{"contract":"fixture.tool","contract_version":"1","native_id":"tool-1","revision":"r1","scope":"test","system":"sample-a"},"target":{"contract":"fixture.tool","contract_version":"2","native_id":"tool-9","revision":"r2","scope":"test","system":"sample-b"}} \ No newline at end of file diff --git a/crates/vusl-coverage/tests/fixtures/README.md b/crates/vusl-coverage/tests/fixtures/README.md new file mode 100644 index 0000000..7f0c041 --- /dev/null +++ b/crates/vusl-coverage/tests/fixtures/README.md @@ -0,0 +1,10 @@ +# Required term coverage fixtures + +These are byte-identical copies of the canonical `NV-BASE-0001.json` and +`NV-BASE-0002.json` reviews in [the native corpus at f6b2f58](https://github.com/hypler-dev/vusl/tree/f6b2f58acd10da5e598f703759eea7cbaac82b7d/conformance/native-v0.1/canonical). +The copies let the packaged tests run without a repository checkout. + +| Fixture | SHA-256 | +| --- | --- | +| `NV-BASE-0001.json` | `e732b74ed58a51c96718aaa534020d30e6204199d37c6364862907fdfe95685e` | +| `NV-BASE-0002.json` | `6c72f608acf92a000d231691229bbb03a7c94297f6e050c42a036edbecb1d8b1` | diff --git a/docs/implementation-plan.md b/docs/implementation-plan.md index f6a28f6..713e6bc 100644 --- a/docs/implementation-plan.md +++ b/docs/implementation-plan.md @@ -3893,3 +3893,42 @@ owning pull request records the published commit, hosted checks, and merge state. The native v0.1 profile and historical extraction provenance retain their existing pins. The package and host-integration gates are separate from this source publication. + +## Experimental Rust crate prerelease + +This local packet prepares `vusl-core` and `vusl-coverage` at +`0.1.0-dev.1` from main `f6b2f58acd10da5e598f703759eea7cbaac82b7d`. +Each crate has a description, repository URL, package README and a +byte-identical copy of the root Apache-2.0 license. The coverage manifest +uses the local core path in the workspace and the exact +`=0.1.0-dev.1` requirement in the packaged manifest. + +The core archive includes its self-contained integration tests. The +repository-only native driver remains part of source qualification. +Coverage embeds two byte-identical native corpus fixtures inside its crate +so the same integration tests run from source and from the archive. +The [validation guide](validation.md#experimental-crate-archives) +records the offline packaging and locked archive test commands. + +The source and archive checks use the existing experimental version. +Both manifests retain `publish = false`. The local archive checks use an +unpacked core archive in place of a registry download. Registry +publication, stable release and host integration retain separate gates. + +Offline validation with Rust 1.99.1 on macOS passed for both unpacked +archives. Core ran seven integration tests and six doctests. Coverage ran +nine integration tests and six doctests. A separate consumer using both +unpacked crates passed a shared checked-review smoke test. The workspace +passed formatting, Clippy and tests. Three downstream source manifests +built with their existing locks. Native conformance passed 4,911 cases +(475 accepts and 4,436 refusals). Repository integrity, 20 validator tests, +seven case-plan tests and whitespace checks passed. + +The public APIs, native wire behavior and checked-in lockfiles are unchanged. +The offline coverage archive is test evidence with a locally patched +lockfile. A separately approved registry run must qualify the coverage +package against the published core at the exact version. + +OpenAI GPT-6.2-Sol prepared the packet. Independent read-only review by +`gpt_reviewer` using OpenAI GPT-5.6-Terra found no actionable issues. +The pull request records the commit and hosted validation for this packet. diff --git a/docs/validation.md b/docs/validation.md index d45e19f..582f6ee 100644 --- a/docs/validation.md +++ b/docs/validation.md @@ -35,6 +35,57 @@ python3 -B scripts/test_native_v01.py \ --require-python 3.11.17 --output /tmp/vusl-native-v01-results.json ``` +## Experimental crate archives + +With Rust 1.99.1 and the root workspace dependencies cached as above, run +this from the repository root. The commands build both `.crate` archives, +then test their actual contents outside the source tree. + +```bash +( + set -eu + vusl_version=0.1.0-dev.1 + vusl_checkout="$PWD" + vusl_package_dir="$(mktemp -d /tmp/vusl-packages.XXXXXX)" + export CARGO_TARGET_DIR="$vusl_package_dir/target" + mkdir -p "$vusl_package_dir/source/crates" "$vusl_package_dir/unpacked" + cp Cargo.toml Cargo.lock "$vusl_package_dir/source/" + cp -R crates/vusl-core crates/vusl-coverage "$vusl_package_dir/source/crates/" + + cd "$vusl_package_dir/source" + cargo package -p vusl-core --locked --offline + tar -xzf "$CARGO_TARGET_DIR/package/vusl-core-$vusl_version.crate" \ + -C "$vusl_package_dir/unpacked" + vusl_core_archive="$vusl_package_dir/unpacked/vusl-core-$vusl_version" + vusl_core_patch="patch.crates-io.vusl-core.path=\"$vusl_core_archive\"" + + cargo package -p vusl-coverage --offline --config "$vusl_core_patch" + tar -xzf "$CARGO_TARGET_DIR/package/vusl-coverage-$vusl_version.crate" \ + -C "$vusl_package_dir/unpacked" + + cd "$vusl_package_dir/unpacked" + for vusl_crate in vusl-core vusl-coverage; do + cmp "$vusl_checkout/LICENSE" "$vusl_crate-$vusl_version/LICENSE" + test -s "$vusl_crate-$vusl_version/README.md" + done + for vusl_fixture in NV-BASE-0001.json NV-BASE-0002.json; do + cmp "$vusl_checkout/conformance/native-v0.1/canonical/$vusl_fixture" \ + "vusl-coverage-$vusl_version/tests/fixtures/$vusl_fixture" + done + + cargo test --manifest-path "vusl-core-$vusl_version/Cargo.toml" --locked --offline + cargo test --manifest-path "vusl-coverage-$vusl_version/Cargo.toml" --locked --offline \ + --config "$vusl_core_patch" +) +``` + +The coverage archive declares an exact registry version of `vusl-core`. +The command-line patch connects that dependency to the unpacked core archive +for local verification. Cargo may update the scratch source lockfile when +preparing coverage with this patch. The unpacked test runs use each archive's +lockfile. The native corpus driver runs from the repository checkout with +the source validation commands above. + ## Downstream compatibility The independent consumer workspaces are outside the root Cargo workspace;