[codex] Harden reading artifact posture#319
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTest suite enhancements to validate CBOR wire encoding for Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
|
Note Docstrings generation - SUCCESS |
Docstrings generation was requested by @flyingrobots. * #319 (comment) The following files were modified: * `crates/warp-core/src/observation.rs`
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@crates/echo-wasm-abi/src/lib.rs`:
- Around line 611-632: The test
test_reading_residual_posture_wire_names_are_distinct currently only asserts
decoded text and round-trip decoding, which won't catch regressions in the
canonical CBOR encoding; update the test to pin the exact canonical CBOR byte
sequence for each ReadingResidualPosture variant by computing or hardcoding the
expected bytes and assert that encode_cbor(&posture).unwrap() == expected_bytes,
while keeping the existing decode_cbor checks for round-trip equality; reference
the functions ReadingResidualPosture, encode_cbor, decode_value, and decode_cbor
to locate where to replace the Value::Text check with a direct bytes equality
assertion.
In `@crates/warp-wasm/src/warp_kernel.rs`:
- Around line 1283-1296: The test currently asserts only observer_plan,
parent_basis_posture, and residual_posture on artifact.reading; add assertions
for the remaining reading-envelope defaults—observer_basis, budget_posture, and
rights_posture—to the same end-to-end ABI test so a WASM-side default drift
fails loudly (use the same expected enum variants as emitted in
crates/warp-wasm/src/lib.rs around the default block). Locate the assertions
around artifact.reading in the test (symbols: artifact.reading,
AbiReadingObserverPlan, AbiObservationBasisPosture, AbiReadingResidualPosture)
and add checks that artifact.reading.observer_basis equals the expected
AbiObservationBasis (default), artifact.reading.budget_posture equals the
expected AbiBudgetPosture (default), and artifact.reading.rights_posture equals
the expected AbiRightsPosture (default).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 46759ffe-9c86-46ca-b754-9f22898bec85
📒 Files selected for processing (7)
crates/echo-wasm-abi/src/kernel_port.rscrates/echo-wasm-abi/src/lib.rscrates/warp-core/src/observation.rscrates/warp-wasm/src/warp_kernel.rsdocs/BEARING.mddocs/spec/SPEC-0004-worldlines-playback-truthbus.mddocs/spec/SPEC-0009-wasm-abi.md
|
Feedback resolution summary:
Local verification:
|
Summary
ReadingResidualPosturevalues forresidual,plurality, andobstructedalongside the existingcompleteposture.warp-coreconversion and adds ABI/core/WASM coverage so consumers can distinguish bounded reading posture from generic state payloads.Impact
Built-in observations still emit
complete; this does not add suffix admission or new non-clean emission paths. It makes the ABI vocabulary explicit so external consumers can handle future bounded non-clean readings without guessing from payload shape.Verification
cargo fmt --all -- --checkcargo test -p echo-wasm-abi --libcargo test -p warp-core --lib observationcargo test -p warp-wasm --lib --features enginecargo clippy -p warp-core --all-targets -- -D warnings -D missing_docspnpm docs:buildpnpm docs:buildsucceeds with the existing local Node engine warning (v25.9.0vs requested>=18 <25).Summary by CodeRabbit