Conversation
WalkthroughDocumentation update to the Contracts package README establishing module structure, directory organization conventions, file naming standards, test/mock contract usage guidelines, and production safety warnings. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@contracts/README.md`:
- Around line 7-18: The two unlabeled fenced code blocks in contracts/ README.md
(the directory tree block beginning with "contracts/" and the example module
block beginning with "<module>/") should be updated to include a language label
(e.g., text) after the opening triple backticks to satisfy MD040; locate the two
code fences and change ``` to ```text for both the directory tree block and the
module example block so the markdown linter stops flagging unlabeled fences.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: fd6cad6a-6c41-4f24-b462-e8d051eeb4b5
📒 Files selected for processing (1)
contracts/README.md
| ``` | ||
| contracts/ | ||
| ├── src/ # Source files | ||
| │ ├── access/ # Access control contracts | ||
| │ ├── security/ # Security utility contracts | ||
| │ ├── token/ # Token standard contracts | ||
| │ ├── utils/ # General utility contracts | ||
| │ ├── archive/ # Archived/deprecated contracts | ||
| │ └── test-utils/ # Shared test helpers | ||
| ├── artifacts/ # Compiled contract outputs (generated) | ||
| └── dist/ # Compiled TypeScript witness outputs (generated) | ||
| ``` |
There was a problem hiding this comment.
Add fenced code block languages to satisfy markdownlint (MD040).
Line 7 and Line 24 use unlabeled fences. Add a language (e.g., text) to avoid lint noise in docs CI.
Proposed fix
-```
+```text
contracts/
├── src/ # Source files
│ ├── access/ # Access control contracts
│ ├── security/ # Security utility contracts
│ ├── token/ # Token standard contracts
│ ├── utils/ # General utility contracts
│ ├── archive/ # Archived/deprecated contracts
│ └── test-utils/ # Shared test helpers
├── artifacts/ # Compiled contract outputs (generated)
└── dist/ # Compiled TypeScript witness outputs (generated)@@
- +text
/
├── .compact # Contract source
├── witnesses/ # TypeScript witness implementations
└── test/
├── .test.ts # Test suite
├── mocks/ # Mock contracts (test-only — see warning below)
└── simulators/ # Simulator helpers for testing
Also applies to: 24-32
🧰 Tools
🪛 markdownlint-cli2 (0.21.0)
[warning] 7-7: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@contracts/README.md` around lines 7 - 18, The two unlabeled fenced code
blocks in contracts/ README.md (the directory tree block beginning with
"contracts/" and the example module block beginning with "<module>/") should be
updated to include a language label (e.g., text) after the opening triple
backticks to satisfy MD040; locate the two code fences and change ``` to ```text
for both the directory tree block and the module example block so the markdown
linter stops flagging unlabeled fences.
There was a problem hiding this comment.
We dont use this tool
There was a problem hiding this comment.
@emnul, understood — I'll skip markdownlint-specific suggestions for this repository going forward. Thanks for clarifying!
✏️ Learnings added
Learnt from: emnul
Repo: OpenZeppelin/compact-contracts PR: 403
File: contracts/README.md:7-18
Timestamp: 2026-03-18T20:40:13.037Z
Learning: The OpenZeppelin/compact-contracts repository does not use markdownlint. Do not raise markdownlint-specific issues (e.g., MD040 fenced code block language) in code reviews for this repository.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
🧠 Learnings used
Learnt from: emnul
Repo: OpenZeppelin/compact-contracts PR: 366
File: packages/compact/README.md:26-26
Timestamp: 2026-02-11T18:46:22.809Z
Learning: PR `#366` ("upgrade-contracts-versions-0.28.0") is actually targeting Compact version 0.29.0, not 0.28.0 as the branch name suggests. The README.md correctly shows version 0.29.0 in its examples.
The contracts README explains the structure of the contracts directory and includes an explicit warning not to use Mock contracts in a production application
Summary by CodeRabbit