Skip to content

style: Update styleguide with type-field level doc recommendations - #416

Merged
bidzyyys merged 4 commits into
mainfrom
update-styleguide
Jun 30, 2026
Merged

style: Update styleguide with type-field level doc recommendations#416
bidzyyys merged 4 commits into
mainfrom
update-styleguide

Conversation

@0xNeshi

@0xNeshi 0xNeshi commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Documentation
    • Clarified conventions for user-facing abort messages: use plain quoted string literals and avoid including implementation or type/identifier names.
    • Strengthened required /// documentation for public types, fields (where applicable), events, and error constants, including standardized “Emitted by … when …” wording for events.
    • Expanded aborts documentation to include propagated abort causes and to explicitly label unreachable cases with an example note.

@0xNeshi 0xNeshi self-assigned this Jun 26, 2026
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 98cb7123-3409-4e00-aa3b-102e0fc7ace1

📥 Commits

Reviewing files that changed from the base of the PR and between b0cd3cf and e12bf67.

📒 Files selected for processing (1)
  • STYLEGUIDE.md
✅ Files skipped from review due to trivial changes (1)
  • STYLEGUIDE.md

📝 Walkthrough

Walkthrough

STYLEGUIDE.md now tightens abort-message wording, adds doc-comment requirements for public types, events, fields, and error constants, and expands abort documentation rules to include propagated internal or cross-module aborts marked as unreachable when applicable.

Changes

Styleguide documentation updates

Layer / File(s) Summary
Error constant wording
STYLEGUIDE.md
Abort messages must be plain user-facing string literals in English, avoid embedded identifiers or integer-type names, and keep abort codes append-only.
Public doc-comment rules
STYLEGUIDE.md
Public types, events, fields, and error constants gain mandatory /// documentation rules, including the event summary format and the id: UID exception.
Abort propagation notes
STYLEGUIDE.md
Documentation must list propagated aborts from internal or cross-module calls and label unreachable cases with a note.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested reviewers

  • ericnordelo
  • immrsd

Poem

A rabbit nibbled docs at dawn,
with aborts and comments neatly drawn.
No stray strings, just words so clear,
and tiny hops of style appear.
🐰✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning No PR description was provided, so the required issue reference, summary, and checklist are missing. Add the template sections: issue link, a brief change summary/context, and the PR checklist items for tests, documentation, and changelog.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: updating the styleguide with type and field-level documentation guidance.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update-styleguide

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.26%. Comparing base (acbd3e7) to head (5a37986).

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #416       +/-   ##
===========================================
+ Coverage   83.26%   96.26%   +12.99%     
===========================================
  Files          29       29               
  Lines        2307     2968      +661     
  Branches      732      731        -1     
===========================================
+ Hits         1921     2857      +936     
+ Misses        348       66      -282     
- Partials       38       45        +7     
Flag Coverage Δ
contracts/access 65.46% <ø> (ø)
contracts/allowance 52.00% <ø> (ø)
contracts/finance 25.57% <ø> (ø)
contracts/utils 44.09% <ø> (ø)
math/core 86.71% <ø> (?)
math/fixed_point 60.22% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@STYLEGUIDE.md`:
- Around line 279-282: Clarify the STYLEGUIDE guidance in the section about
propagated aborts so it explicitly states when unreachable cases must still be
listed. Update the wording around the propagated abort examples to say that
internal or cross-module aborts should be documented even if they are
unreachable in normal operation when they are required to preserve the full
error surface, and reference the same guidance block so authors can distinguish
this exception from the general rule against documenting impossible paths.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 40a5b339-4bfc-419d-b697-2a2cc90d0219

📥 Commits

Reviewing files that changed from the base of the PR and between 23af906 and b0cd3cf.

📒 Files selected for processing (1)
  • STYLEGUIDE.md

Comment thread STYLEGUIDE.md Outdated

@bidzyyys bidzyyys left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@ericnordelo ericnordelo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@bidzyyys
bidzyyys merged commit 3559c93 into main Jun 30, 2026
29 checks passed
@bidzyyys
bidzyyys deleted the update-styleguide branch June 30, 2026 11:24
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.

4 participants