Repository navigation
docs: describe value representation and WIT crate coupling in AGENTS.md - #232
Conversation
Replace the I32FromU32 note with the rule codegen now follows: integer lowerings emit uint32/uint64 conversions in both directions, float lowerings depend on Direction, integer lifts are Go conversions, and every store writes its own width. Say that changing the Go type an instruction produces means checking every instruction that consumes it, and point at the memory example that covers the memory paths. Drop wit-bindgen-core's stale version number, and note that wit-bindgen, wit-bindgen-core and wit-component must move as one matched set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Arcjet Review — 🟢 Low Risk
Decision: Checked
Rationale: This is a documentation-only change to AGENTS.md. It updates stale implementation guidance about canonical ABI value representation and replaces a hardcoded wit-bindgen-core version with guidance to use the pinned Cargo.toml version, plus dependency-coupling notes. No security-sensitive code, auth, dependency manifests, CI, infrastructure, or database files are changed. The security review found no hardcoded secrets, injection risks, auth changes, cryptography changes, or OWASP-relevant issues. Documentation review found no blocking documentation gap because this PR itself updates internal contributor documentation and does not introduce a functional behavior change requiring docs/ or an ADR.
Summary of Changes
Updates AGENTS.md to document current value representation rules for integer/float lowering and lifting, store-width expectations, consumer checks when instruction output types change, memory example coverage, and matched-version handling for wit-bindgen-related crates.
Notes
The AI assessed this PR as approvable, but the trust level (1) does not allow auto-approval. A human reviewer must approve this PR.
Review: a08e4b61 | Model: openai/gpt-5.5 | Powered by Arcjet Review
AGENTS.md described
I32FromU32/U32FromI32as the only conversion rule and listedwit-bindgen-coreat v0.53.1. Neither matches how codegen represents values now, and the gap let #141 change import-side float lowering without checking the store instructions that consume those values, which #228 then had to fix.This replaces the old note with the rule codegen follows: integer lowerings emit
uint32/uint64conversions in both directions, float lowerings depend onDirection, integer lifts are Go conversions, and every store writes exactly its own width. Changing the Go type an instruction produces means checking every instruction that consumes it, and thememoryexample covers the memory paths. It also drops the stale version number and records thatwit-bindgen,wit-bindgen-coreandwit-componentmust move as one matched set, as #202 showed.🤖 Generated with Claude Code