chore: Added Prompt for code rabbit on how to review src/hiero_sdk_python/file#1713
chore: Added Prompt for code rabbit on how to review src/hiero_sdk_python/file#1713mukundkumarjha wants to merge 2 commits intohiero-ledger:mainfrom
Conversation
Signed-off-by: mukundkumarjha <mukundiiitg@gmail.com>
Signed-off-by: mukundkumarjha <mukundiiitg@gmail.com>
WalkthroughConfiguration and documentation updates adding architecture-centric review guidance for file transaction modules in CodeRabbit configuration, with a corresponding changelog entry. No functional code changes or new features introduced. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
exploreriii
left a comment
There was a problem hiding this comment.
This is a solid improvement, but is too generic, it still won’t reliably catch multi-chunk lifecycle and signature bugs, which are the highest-risk failures in this module.
File transactions have a parent of transaction
File queries have a parent of query
These should be handled differently
Overall, you can be much more specific as to what you'd consider safe behaviour in a file PR
| This module handles: | ||
| - File creation | ||
| - File append (chunking logic) | ||
| - File update |
There was a problem hiding this comment.
File queries (info & contents)
There was a problem hiding this comment.
you can add a separate file query instruction area, and explain how this differs from file transaction services
| - Memo handling | ||
| - Large content segmentation | ||
|
|
||
| This is a critical SDK component. Review must be architecture-aware. |
There was a problem hiding this comment.
Reviews must be architecture-aware and transaction-lifecycle aware, not just stylistic.
|
|
||
| Context: | ||
| - SDK uses protobuf-based transaction bodies | ||
| - Follows builder pattern across transactions |
There was a problem hiding this comment.
maybe be specific eg
Uses a builder pattern
Transactions follow freeze() → sign() → execute()
| - Must preserve backward compatibility | ||
| - Supports freeze(), sign(), and execution logic | ||
| - Chunked operations must be deterministic | ||
|
|
There was a problem hiding this comment.
Any change to transaction identity (transaction ID, node account, chunk index) requires rebuilding body bytes and invalidates old signatures.
| - Must preserve backward compatibility | ||
| - Supports freeze(), sign(), and execution logic | ||
| - Chunked operations must be deterministic | ||
|
|
There was a problem hiding this comment.
Any change to transaction identity (transaction ID, node account, chunk index) requires rebuilding body bytes and invalidates old signatures.
| - No unvalidated input | ||
| - No replay issues with transaction IDs | ||
|
|
||
| Output format: |
There was a problem hiding this comment.
- Query-Specific Safety (File Queries)
we need a section on query file services rather than just rtansaction file services
| - Serialization format unchanged | ||
|
|
||
| 6) Test Coverage | ||
| Ensure tests exist for: |
There was a problem hiding this comment.
can you specify some extent of what these tests should look like and best practices
|
|
||
| 6) Test Coverage | ||
| Ensure tests exist for: | ||
| - Large file chunking |
There was a problem hiding this comment.
be more specific what you are looking for so code rabbit knows
| @@ -293,6 +293,82 @@ reviews: | |||
| - Instead, aggregate all out-of-scope issues into a single comment with a list of recommendations for one or more follow-up issues that can be created. | |||
There was a problem hiding this comment.
This is a solid improvement, but is too generic, it still won’t reliably catch multi-chunk lifecycle and signature bugs, which are the highest-risk failures in this module.
File transactions have a parent of transaction
File queries have a parent of query
These should be handled differently
Overall, you can be much more specific as to what you'd consider safe behaviour in a file PR
You have to be explicit to an untrained reviewer, so they know what is correct and not correct
| - Regression cases | ||
|
|
||
| 7) Performance | ||
| - Avoid unnecessary byte copying |
There was a problem hiding this comment.
I would recommend changing some of the file transaction and queries, and see how your prompt is doing - see if code rabbit picks up on the errors in a useful way
aceppaluni
left a comment
There was a problem hiding this comment.
@mukundkumarjha This is great work!
Once feedback is addressed happy to do another review
|
Hi, this is MergeConflictBot. Please resolve these conflicts locally and push the changes. Quick Fix for CHANGELOG.md ConflictsIf your conflict is only in CHANGELOG.md, you can resolve it easily using the GitHub web editor:
For all other merge conflicts, please read: Thank you for contributing! |
Description:
Related issue(s):
Fixes #1697
Notes for reviewer:
Checklist