Skip to content

feat(wesley): consume canonical requirements artifacts#344

Merged
flyingrobots merged 2 commits into
mainfrom
feat/wesley-requirements-artifact-import
May 15, 2026
Merged

feat(wesley): consume canonical requirements artifacts#344
flyingrobots merged 2 commits into
mainfrom
feat/wesley-requirements-artifact-import

Conversation

@flyingrobots
Copy link
Copy Markdown
Owner

@flyingrobots flyingrobots commented May 15, 2026

Summary

  • bump echo-wesley-gen to wesley-core 0.0.4
  • import Wesley-owned OpticAdmissionRequirementsArtifact bytes, codec, and digest directly instead of adapter-local canonical JSON staging
  • extend warp-core opaque OpticAdmissionRequirements with codec and digest fields while keeping warp-core free of a wesley-core dependency
  • update runtime optic import/registry tests and docs/changelog
  • tighten local verification so warp-core optic artifact and causal fact source changes run exact integration-test targets instead of broad Cargo name-filter runs

Validation

  • RED: cargo test -p echo-wesley-gen imports_wesley_owned_requirements_artifact_without_reserializing_requirements failed before the runtime payload exposed codec/digest
  • cargo test -p echo-wesley-gen
  • cargo test -p warp-core optic_artifact
  • cargo test -p warp-core --test optic_invocation_admission_tests
  • cargo test -p warp-core --test causal_fact_publication_tests
  • cargo check --workspace --all-targets
  • cargo clippy -p echo-wesley-gen -p warp-core --all-targets -- -D warnings
  • cargo clippy -p echo-wesley-gen --all-targets -- -D warnings
  • bash tests/hooks/test_verify_local.sh
  • git diff --check
  • pre-commit staged crate verification
  • pre-push broad local gate
  • pre-push tooling-only local gate

Boundary

Wesley owns compiler truth for canonical requirements bytes. Echo imports those bytes, stores them opaquely, and still owns runtime registration handles. This PR does not add admission enforcement, grants, tickets, witnesses, or directive renaming.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 15, 2026

📝 Walkthrough

Walkthrough

Wesley optic artifact import upgraded from v0.0.3 to v0.0.4. The adapter now imports Wesley-owned canonical requirement metadata (codec, digest, bytes) directly into warp-core without reserializing. OpticAdmissionRequirements struct extended with codec and digest fields. Import logic validates digest matching and copies Wesley metadata verbatim. Adapter-local canonicalization staging removed.

Changes

Wesley optic artifact import with native metadata

Layer / File(s) Summary
Warp-core OpticAdmissionRequirements extension
crates/warp-core/src/optic_artifact.rs
OpticAdmissionRequirements now stores codec: String and digest: String fields to hold Wesley-computed canonical requirement metadata alongside opaque bytes.
Echo-wesley-gen adapter import logic
crates/echo-wesley-gen/src/lib.rs
import_runtime_optic_artifact validates that artifact.requirements_digest matches artifact.requirements_artifact.digest, then copies Wesley requirement codec, digest, and bytes directly into warp_core::OpticAdmissionRequirements without reserializing.
Wesley core version and generator constants
crates/echo-wesley-gen/Cargo.toml, crates/echo-wesley-gen/src/main.rs
Dependency bumped from 0.0.3 to 0.0.4 in Cargo.toml; WESLEY_CORE_VERSION constant updated to match in main.rs.
Import behavior validation tests
crates/echo-wesley-gen/tests/runtime_optic_import.rs
Test imports cleaned up; new assertions validate imported requirements codec, digest, and bytes match Wesley artifact metadata directly; determinism test rewritten to compile fixture twice and compare artifacts; tampered digest rejection test added; removed staging codec checks.
Test fixture metadata updates
crates/warp-core/tests/causal_fact_publication_tests.rs, crates/warp-core/tests/optic_artifact_registry_tests.rs, crates/warp-core/tests/optic_invocation_admission_tests.rs
Fixtures updated to populate codec and digest fields in OpticAdmissionRequirements with wesley.requirements.canonical-json.v0 identifier.
Documentation and changelog
CHANGELOG.md, crates/echo-wesley-gen/README.md
Changelog and README clarified: Wesley-owned canonical requirement bytes, codec id, and digest are imported as opaque registry payloads; Echo does not reserialize Wesley requirement structs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested labels

tooling


Wesley's truth lives in bytes we carry,
no staging, no rewrites—direct and airy.
Codec and digest travel intact,
a contract compressed into optic artifact.
Echo receives, but does not rewrite.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat(wesley): consume canonical requirements artifacts' accurately describes the main change: importing Wesley-owned requirement artifacts instead of local canonicalization.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/wesley-requirements-artifact-import

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@flyingrobots flyingrobots merged commit 31c77c1 into main May 15, 2026
33 checks passed
@flyingrobots flyingrobots deleted the feat/wesley-requirements-artifact-import branch May 15, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant