Skip to content

Conversation

@Adityarya11
Copy link
Contributor

Description:
Configures CodeRabbit to apply maintainer-level review standards to the /examples directory.

  • Adds path_instructions for examples/**/*.
  • Enforces correct transaction lifecycle (freeze -> sign -> execute).
  • Enforces role-based naming conventions.
  • Prioritizes run-ability and explicitness for user documentation.

Related issue(s):

Fixes #1180

Copilot AI review requested due to automatic review settings December 22, 2025 10:04
@Adityarya11 Adityarya11 changed the title ci: Add custom CodeRabbit instructions for examples feat: Add custom CodeRabbit instructions for examples Dec 22, 2025
@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1189   +/-   ##
=======================================
  Coverage   91.26%   91.26%           
=======================================
  Files         139      139           
  Lines        8447     8447           
=======================================
  Hits         7709     7709           
  Misses        738      738           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR configures CodeRabbit to apply maintainer-level review standards specifically to the /examples directory, ensuring SDK examples work correctly when users copy-paste them.

Key Changes:

  • Adds path-specific instructions for reviewing examples with focus on transaction lifecycle correctness
  • Enforces role-based naming conventions and proper method chaining patterns
  • Validates import paths and flags non-existent module references

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.coderabbit.yaml Adds comprehensive path_instructions for examples/**/* with 5-priority review framework covering correctness, transaction lifecycle, naming, consistency, and user experience
CHANGELOG.md Documents the addition of CodeRabbit review instructions for examples directory

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai
Copy link

coderabbitai bot commented Dec 22, 2025

📝 Walkthrough

Walkthrough

This pull request extends the CodeRabbit configuration to include custom review instructions for the examples directory, specifying quality criteria for example code including correctness, transaction lifecycle management, clarity, and consistency with the rest of the codebase.

Changes

Cohort / File(s) Summary
CodeRabbit Configuration
\.coderabbit.yaml
Added a new path_instructions block under reviews targeting the /examples directory, with detailed prompt instructions for CodeRabbit to review example code with emphasis on correctness, explicit transaction patterns, clarity, consistency, and proper naming conventions.
Changelog
CHANGELOG.md
Added entry in the "Unreleased → Added" section documenting the addition of CodeRabbit review prompt configuration for the examples directory.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Consideration areas:
    • Verify that the CodeRabbit prompt instructions align with the stated objectives in issue #1180
    • Ensure the instructions are clear, actionable, and cover the key quality criteria mentioned (transaction lifecycle, naming, consistency, clarity)
    • Confirm the CHANGELOG entry accurately reflects the change

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding custom CodeRabbit instructions for the examples directory.
Description check ✅ Passed The description is directly related to the changeset, explaining the purpose and scope of the CodeRabbit configuration additions.
Linked Issues check ✅ Passed The PR successfully implements the core requirements from #1180: adding path_instructions for examples directory with custom review standards including transaction lifecycle enforcement, naming conventions, and user-focused guidance.
Out of Scope Changes check ✅ Passed All changes are directly within scope: modifications to .coderabbit.yaml and CHANGELOG.md align with the objective of configuring CodeRabbit for the /examples directory.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b97935d and dfdce91.

📒 Files selected for processing (2)
  • .coderabbit.yaml
  • CHANGELOG.md
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
CHANGELOG.md

59-59: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Agent
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: StepSecurity Harden-Runner
  • GitHub Check: run-examples
  • GitHub Check: build-and-test (3.13)
  • GitHub Check: build-and-test (3.10)
  • GitHub Check: build-and-test (3.12)
  • GitHub Check: build-and-test (3.11)
🔇 Additional comments (7)
.coderabbit.yaml (7)

21-25: LGTM! Well-structured path instructions.

The path_instructions configuration correctly follows the CodeRabbit schema. The glob pattern examples/**/* appropriately targets all files in the examples directory, aligning with the PR objective to apply maintainer-level review standards across all examples.


28-32: Excellent correctness priorities.

These instructions directly address the core PR objectives around transaction lifecycle correctness. The emphasis on verifying method existence against the actual codebase is particularly valuable for preventing hallucinated APIs.


34-39: LGTM! Comprehensive transaction lifecycle checks.

The transaction lifecycle instructions are thorough and aligned with SDK best practices. The error handling pattern ResponseCode(receipt.status).name is consistent with recent codebase changes documented in the CHANGELOG (line 87).


41-45: Strong naming conventions aligned with PR objectives.

The role-based naming requirements directly implement the PR objective for clear variable names (owner, spender, treasury, receiver). The suffix conventions (_id for AccountId, _key for PrivateKey) provide clear type differentiation, which is valuable for users copying these examples.


47-53: Import rules successfully address PR objectives.

The import validation logic correctly implements the PR goal of accepting both import styles while preventing hallucinated import paths. The specific example flagging hiero_sdk_python.keys as non-existent is helpful.

One minor clarification: Line 51's instruction to "Compare against other files in /examples or your knowledge of the SDK file tree" assumes CodeRabbit can access the full codebase structure during review, which should work as expected.


55-58: User-focused review philosophy.

These guidelines correctly prioritize the user experience, aligning with the PR objective to avoid "nitpicky suggestions that can be handled by linters." The distinction between users and contributors is crucial for maintaining example quality without over-engineering.


60-64: Philosophy aligns perfectly with PR objectives.

The philosophy section effectively captures the maintainer-level review approach requested in issue #1180. The emphasis on "explicitness over brevity" and avoiding linter-catchable suggestions directly implements the PR objectives for example code quality.

@exploreriii exploreriii merged commit 4ade123 into hiero-ledger:main Dec 22, 2025
27 of 29 checks passed
@exploreriii
Copy link
Contributor

Really really amazing PR! Fantastic job
You have taken a few ideas and didn't just repeat that -- you innovated and created a much superior solution which is technically correct - picking things out faster and more accurate in many ways than human reviewers
Wow!
Met the issue objectives fully and surpassed expectations here
cc @nadineloepfe @manishdait
Can't wait to see this in action and fine-tuning it further

@Adityarya11
Copy link
Contributor Author

Really really amazing PR! Fantastic job You have taken a few ideas and didn't just repeat that -- you innovated and created a much superior solution which is technically correct - picking things out faster and more accurate in many ways than human reviewers Wow! Met the issue objectives fully and surpassed expectations here cc @nadineloepfe @manishdait Can't wait to see this in action and fine-tuning it further

Couldn't been possible without you thanks for help and support ✌️🥳

prishajaiswal75 pushed a commit to prishajaiswal75/hiero-sdk-python that referenced this pull request Dec 22, 2025
@Adityarya11 Adityarya11 deleted the feat/coderabbit-examples-config#1180 branch December 23, 2025 06:25
prishajaiswal75 pushed a commit to prishajaiswal75/hiero-sdk-python that referenced this pull request Jan 4, 2026
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.

[Advanced]: Prompt Coderabbit on how to review /examples

2 participants