Skip to content

Add contract boundary guidance to CLAUDE.md#14821

Closed
xingbowang wants to merge 1 commit into
facebook:mainfrom
xingbowang:2026_06_05_claude_md
Closed

Add contract boundary guidance to CLAUDE.md#14821
xingbowang wants to merge 1 commit into
facebook:mainfrom
xingbowang:2026_06_05_claude_md

Conversation

@xingbowang

@xingbowang xingbowang commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a contract-boundaries section to the RocksDB code review checklist in CLAUDE.md.
  • Document common review prompts for keeping caller-specific policy out of reusable lower layers.
  • Add "Contract Boundary Leaks" to the common review feedback patterns.

Testing

CI

@meta-cla meta-cla Bot added the CLA Signed label Jun 5, 2026
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

✅ clang-tidy: No findings on changed lines

Completed in 0.0s.

@meta-codesync

meta-codesync Bot commented Jun 5, 2026

Copy link
Copy Markdown

@xingbowang has imported this pull request. If you are a Meta employee, you can view this in D107652555.

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

🟡 Codex Code Review

Auto-triggered after CI passed — reviewing commit e925209


Codex review failed before producing findings.

WARNING: proceeding, even though we could not update PATH: Refusing to create helper binaries under temporary dir "/tmp" (codex_home: AbsolutePathBuf("/tmp/codex-home"))
error: the argument '--base <BRANCH>' cannot be used with '[PROMPT]'

Usage: codex exec review --commit <SHA> --base <BRANCH> --title <TITLE> --model <MODEL> --config <key=value> --dangerously-bypass-approvals-and-sandbox --output-last-message <FILE> [PROMPT]

For more information, try '--help'.

ℹ️ About this response

Generated by Codex CLI.
Review methodology: claude_md/code_review.md

Limitations:

  • Codex may miss context from files not in the diff
  • Large PRs may be truncated
  • Always apply human judgment to AI suggestions

Commands:

  • /codex-review [context] — Request a code review
  • /codex-query <question> — Ask about the PR or codebase
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

✅ Claude Code Review

Auto-triggered after CI passed — reviewing commit e925209


Summary

Documentation-only change adding "Contract Boundaries" guidance to the CLAUDE.md review checklist and common feedback patterns. The content is well-written, actionable, and addresses a real code review concern (layering violations / abstraction leaks). No correctness, performance, or compatibility risk.

No high-severity findings.

Full review (click to expand)

Findings

🔴 HIGH

None.

🟡 MEDIUM

None.

🟢 LOW / NIT

L1. Checklist placement — new section inserted before Correctness

The new "Contract Boundaries" checklist section is inserted before the existing "Correctness" section. The existing ordering (Correctness, Testing, Performance, API and Compatibility, Code Quality) follows a natural priority from most critical to least critical. Placing "Contract Boundaries" first implicitly elevates it above correctness in the visual hierarchy.

  • Suggested fix: Consider moving "Contract Boundaries" after "API and Compatibility" or after "Code Quality", since layering concerns are a design/style issue rather than a correctness-critical check. Alternatively, if the intent is to emphasize this as a top-priority review concern, the current placement is defensible — just worth a conscious decision.
L2. Minor formatting in item #11

In the "Common Review Feedback Patterns" addition (item #11), "use-case" and "specific" are split across lines without the hyphen:

...plumbs a new option or use-case
specific behavior through multiple subsystems...

This reads as "use-case\nspecific" rather than "use-case-specific".

  • Suggested fix: Join as "use-case-specific" on one line, or hyphenate at the line break.

Cross-Component Analysis

Not applicable — documentation-only change with no code impact.

Positive Observations

  • The guidance is well-motivated and addresses a genuine recurring review pattern (boolean parameters accumulating multiple meanings, caller-specific comments in generic code).
  • The examples are concrete and RocksDB-relevant (compaction I/O modes, FileOptions, cache policy).
  • Checklist items are phrased as actionable questions, consistent with existing style.
  • Content is concise and avoids over-prescription.

ℹ️ About this response

Generated by Claude Code.
Review methodology: claude_md/code_review.md

Limitations:

  • Claude may miss context from files not in the diff
  • Large PRs may be truncated
  • Always apply human judgment to AI suggestions

Commands:

  • /claude-review [context] — Request a code review
  • /claude-query <question> — Ask about the PR or codebase
@meta-codesync

meta-codesync Bot commented Jun 5, 2026

Copy link
Copy Markdown

@xingbowang merged this pull request in 10e4f47.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

1 participant