Skip to content

fix: correct stale docs, wrong test commands, and inaccurate API surface#274

Closed
Th0rgal wants to merge 1 commit intomainfrom
fix/docs-accuracy-stale-api-and-test-commands
Closed

fix: correct stale docs, wrong test commands, and inaccurate API surface#274
Th0rgal wants to merge 1 commit intomainfrom
fix/docs-accuracy-stale-api-and-test-commands

Conversation

@Th0rgal
Copy link
Member

@Th0rgal Th0rgal commented Feb 17, 2026

Summary

Fixes multiple documentation inaccuracies that would cause developers to fail when following the guides:

  • core.mdx: ContractState struct was missing 4 fields (storageMapUint, storageMap2, knownAddresses, events) and the storage operations table was incomplete (missing getMappingUint/setMappingUint, getMapping2/setMapping2, emitEvent, and context accessors)
  • compiler.mdx: allSpecs was shown as List (ContractSpec × List Nat) (tuple with manual selectors) but the actual code is List ContractSpec — selectors are computed automatically by computeSelectors
  • getting-started.mdx: Incorrectly claimed forge test works for property tests without FOUNDRY_PROFILE=difftest. All property tests use deployYul()vm.ffi()solc, which requires FFI enabled
  • first-contract.mdx: Test commands missing FOUNDRY_PROFILE=difftest, which would fail on first use
  • examples.mdx: File layout section was stale (missing Proofs/<Name>/Basic.lean and Correctness.lean); ReentrancyExample code had unbalanced parenthesis
  • test/README.md: Claimed forge test runs "unit + property tests" but property tests require FFI; fixed all commands to include FOUNDRY_PROFILE=difftest

Verification

Each fix was verified against the actual codebase:

  • ContractState fields checked against Verity/Core.lean:37-48
  • allSpecs type checked against Compiler/Specs.lean:453
  • All Property*.t.sol files confirmed to import YulTestBase (which uses vm.ffi)
  • foundry.toml confirms ffi = false in default profile, ffi = true in difftest

Test plan

  • Docs site builds successfully
  • No Lean code was modified — existing proofs and CI unaffected
  • Verify the docs site renders correctly at verity.thomasm.ar

🤖 Generated with Claude Code


Note

Low Risk
Docs-only changes that correct API descriptions and required Foundry commands; no runtime or proof logic is modified.

Overview
Updates documentation to match the current codebase and prevent broken setup steps. The compiler docs now show allSpecs : List ContractSpec and clarify that function selectors are computed automatically during compilation.

Core docs are corrected to include the full ContractState surface (additional mapping types, address tracking, and event log) and to document the missing storage/event operations. Guides and test docs are updated to consistently run Foundry with FOUNDRY_PROFILE=difftest (and explain the vm.ffi() requirement), and examples.mdx is refreshed for the new proofs layout plus a small syntax fix in the ReentrancyExample snippet.

Written by Cursor Bugbot for commit c66405b. This will update automatically on new commits. Configure here.

- core.mdx: update ContractState to include storageMapUint, storageMap2,
  knownAddresses, events fields; add full storage operation table
- compiler.mdx: fix allSpecs to show List ContractSpec (not tuple with
  selectors); note that selectors are computed automatically
- getting-started.mdx: fix incorrect claim that property tests work
  without FOUNDRY_PROFILE=difftest (all property tests use deployYul
  which calls vm.ffi)
- first-contract.mdx: add FOUNDRY_PROFILE=difftest to test commands
  and explain why it's required
- examples.mdx: update contract file layout to show Proofs/Basic.lean
  and Proofs/Correctness.lean; fix unbalanced paren in ReentrancyExample
- test/README.md: fix incorrect claim that forge test runs property
  tests without FFI; add FOUNDRY_PROFILE=difftest to all relevant commands

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Feb 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dumbcontracts Ready Ready Preview, Comment Feb 17, 2026 4:28pm

Request Review

@Th0rgal
Copy link
Member Author

Th0rgal commented Feb 17, 2026

Closing — all changes in this PR have been merged via later PRs:

@Th0rgal Th0rgal closed this Feb 17, 2026
@Th0rgal Th0rgal deleted the fix/docs-accuracy-stale-api-and-test-commands branch February 17, 2026 17:59
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