Skip to content

docs: address documentation audit findings from 2026-05-04 #281

@claude

Description

@claude

Documentation Audit Report - 2026-05-04

Automated audit of docs/ against source code and writing conventions.

SUMMARY

  • Freshness: 2 gaps
  • Correctness: 5 issues (1 Blocker, 2 Major, 2 Minor)
  • Readability: 15 issues (3 Blocker, 6 Major, 6 Minor)

FRESHNESS (window: 2026-04-20 to 2026-05-04)

15 PRs reviewed, 9 doc-worthy, 2 coverage gaps.

F-001 [P1] keyless-deploy.md Spec History and frontmatter not updated for Rex5 trailing-bytes rule

  • Source: PR 270 fix(sandbox): reject trailing bytes in keyless tx RLP decoding #270 (merged 2026-04-24)
  • What changed: Rex5 adds rule that RLP encoding must contain no trailing bytes (reverts with MalformedEncoding()). Normative condition added to keyless-deploy.md line 73, but Spec History not updated and frontmatter still reads spec: Rex4. Rex5 upgrade page also omits this change.
  • Target: docs/spec/system-contracts/keyless-deploy.md, docs/spec/upgrades/rex5.md
  • Fix: (1) Add Rex5 Spec History entry. (2) Bump frontmatter to spec: Rex5. (3) Add to rex5.md What Changed section.

F-002 [P2] sequencer-registry.md missing code hash and ActivationBlockTooLarge error

  • Source: PR 267 feat: pack RotationRecord in one storage slot #267 (merged 2026-04-22)
  • What changed: Bytecode updated; new code hash 0x2dd91bc339d4dadc8cec5a7096213af7cacb02bbbd97308e168564ee5357fb65. New ActivationBlockTooLarge() revert for schedule*Change calls where activationBlock > type(uint96).max.
  • Target: docs/spec/system-contracts/sequencer-registry.md
  • Fix: (1) Add code hash under Version 1.0.0. (2) Add ActivationBlockTooLarge() to Interface block.

CORRECTNESS (62 claims checked)

Verified: 57 | Incorrect: 1 | Stale: 3 | Ambiguous: 0 | Version-dependent: 1

C-001 [Blocker/Incorrect] Oracle v2.0.0 code hash mismatch in docs/spec/system-contracts/oracle.md

  • Doc says: 0xcdc4cffc96a152777dd4952a5446bc5402fcfeec16a6b4b458ddee2e0b7af525
  • Source says: 0x71a65239db8d0f1bb765fad36e34f57600420d103a4401ef7555bd50b229dc55
  • Source: crates/system-contracts/src/generated/oracle_artifacts.rs:19
  • Fix: Replace the code hash in oracle.md Bytecode / Version 2.0.0

C-002 [Major/Stale] hardfork-spec.md REX5 section says no behavioral changes defined yet

  • Page: docs/spec/hardfork-spec.md, Spec Summary / REX5
  • Doc says: No behavioral changes have been defined yet.
  • Source says: Rex5 introduces SequencerRegistry, Oracle v2.0.0, dynamic system address, caller-account dedup fix
  • Fix: Replace placeholder text with Rex5 behavioral summary (upgrades/rex5.md already has the correct content)

C-003 [Major/Stale] upgrades/overview.md Rex5 row says no behavioral changes defined yet

  • Page: docs/spec/upgrades/overview.md, Hardfork History / Rex5
  • Doc says: No behavioral changes defined yet.
  • Source: docs/spec/upgrades/rex5.md:16-74
  • Fix: Replace with: SequencerRegistry contract, Oracle v2.0.0 (dynamic system address), caller-account KV/data-size deduplication fix

C-004 [Minor/Stale] AGENTS.md Test Organization missing rex5/ directory

  • Doc says: tests organized under equivalence/, mini_rex/, rex/, rex2/, rex3/, rex4/, block_executor/
  • Source says: crates/mega-evm/tests/rex5/ also exists (frame_target_updated_dedup.rs)
  • Fix: Add rex5/ to the list

C-005 [Minor/Version-dependent] evm/overview.md system contracts table omits SequencerRegistry even as unstable

  • Page: docs/spec/evm/overview.md, Built-In Protocol Interfaces
  • Fix: Add SequencerRegistry row inside a details block labeled Rex5 (unstable)

READABILITY (43 pages evaluated)

Pass: 28 | Fail: 15 | Total findings: 15
Structural Lint: Pass | Page Structure: Fail 2 | Normative Language: Fail 2
Constants/Formulas: Pass | Spec Versioning: Fail 8 | Cross-Linking: Fail 1 | Formatting: Fail 2

R-001 [Blocker] keyless-deploy.md Rex5 trailing-bytes rule in main prose without details block

  • Rule: Spec Versioning - unstable spec behavior MUST be in details blocks
  • Line 73: (Rex5+) the encoding contains no trailing bytes... in main Specification prose. Page is spec: Rex4.
  • Fix: Wrap in details block; remove inline (Rex5+) annotation.

R-002 [Blocker] system-tx.md Rex5 dynamic resolution uses blockquote instead of details block

  • Rule: Spec Versioning
  • Lines 20-27 use > Unstable blockquote instead of details block
  • Fix: Wrap dynamic-resolution paragraph in details summary Rex5 (unstable): Dynamic system address resolution

R-003 [Blocker] resource-accounting.md Rex5 dedup fix in main Specification; frontmatter spec: Rex5 (unstable)

  • Rule: Spec Versioning - main content MUST describe latest stable spec only
  • Page frontmatter is spec: Rex5 (unstable). Account Update Deduplication sections describe Rex5-corrected behavior as plain normative rules.
  • Fix: Wrap Rex5 dedup rules in details block. Change frontmatter to spec: Rex4.

R-004 [Major] oracle.md Version 2.0.0 uses blockquote instead of details block for Rex5 content

  • Line 54: > Unstable - Rex5 semantics... instead of details block
  • Upgrade storage semantics paragraphs also appear as main prose without details
  • Fix: Wrap Version 2.0.0 and Upgrade storage semantics in details summary Rex5 (unstable): Oracle v2.0.0

R-005 [Major] hardfork-spec.md uses MUST in Backward Compatibility section outside Specification

  • Lines 40, 47 in Backward Compatibility (under Spec Progression, not Specification section)
  • Fix: Move to Specification section or rewrite using plain English

R-006 [Major] hardfork-spec.md references Rust type names MegaHardfork and MegaSpecId in normative definitions

  • Lines 15-16: Represented as MegaHardfork/MegaSpecId in the reference implementation.
  • Fix: Remove Represented as clauses; move to Rationale if desired.

R-007 [Major] upgrades/overview.md description frontmatter says through Rex4 but page covers Rex5

  • Fix: Update description to ...from MiniRex through Rex5 with activation dates and behavioral deltas.

R-008 [Major] overview.md spec progression omits REX5

  • Progression code block and bullet list end at REX4
  • Fix: Add -> REX5 and a REX5 bullet with unstable label

R-009 [Major] glossary.md Spec entry progression stops at REX4

  • Fix: Update to ...-> REX4 -> REX5 and note REX5 is current unstable spec

R-010 [Major] glossary.md Detained limit entry leads with pre-Rex4 absolute-cap semantics

  • Primary definition states Rex3-and-earlier absolute-cap behavior; Rex4 relative-cap is only an aside
  • Fix: Reorder so Rex4+ relative-cap definition leads; pre-Rex4 noted as historical

R-011 [Major] resource-accounting.md frontmatter spec: Rex5 instead of Rex4 (see R-003)

  • Fix: Change to spec: Rex4

R-012 [Minor] block-environment.md uses absolute URL for internal gas-detention spec page

  • Fix: Replace with relative link ../../spec/evm/gas-detention.md

R-013 [Minor] mega-access-control.md and mega-limit-control.md include Source: links to Solidity files in Specification section

  • Fix: Remove Source: line; source files belong in References

R-014 [Minor] upgrades/rex5.md References lists internal crate file paths

  • Lines 97-99 list crates/... file paths
  • Fix: Replace with links to spec pages or remove

R-015 [Minor] glossary.md MEGA_SYSTEM_ADDRESS missing (Rex5, unstable) inline marker on Rex5 bullet

  • Fix: Prefix Rex5 bullet with (Rex5, unstable)

Metadata

Metadata

Assignees

Labels

agentGenerated by AI agentscomp:docChanges in the documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions