Skip to content

docs: describe value representation and WIT crate coupling in AGENTS.md - #232

Merged
davidmytton merged 1 commit into
mainfrom
rei/fix/ENG-1399-agents-value-representation
Oct 5, 2026
Merged

davidmytton merged 1 commit into
mainfrom
rei/fix/ENG-1399-agents-value-representation

Conversation

@arcjet-rei

Copy link
Copy Markdown
Contributor

AGENTS.md described I32FromU32/U32FromI32 as the only conversion rule and listed wit-bindgen-core at 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/uint64 conversions in both directions, float lowerings depend on Direction, 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 the memory example covers the memory paths. It also drops the stale version number and records that wit-bindgen, wit-bindgen-core and wit-component must move as one matched set, as #202 showed.

🤖 Generated with Claude Code

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>
@arcjet-rei
arcjet-rei requested a review from a team as a code owner October 3, 2026 17:10

@arcjet-review arcjet-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@arcjet-review arcjet-review Bot removed the needs review Awaiting human review label Oct 5, 2026
@davidmytton
davidmytton merged commit 917957b into main Oct 5, 2026
4 checks passed
@davidmytton
davidmytton deleted the rei/fix/ENG-1399-agents-value-representation branch October 5, 2026 18:57
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.

2 participants