work needed for adding coin 3 and coin 4 inputs#31
Conversation
📝 WalkthroughWalkthroughThis PR extends ZapScript's coin input command support by adding two new command constants ( ChangesCoin Input Command Extension
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
There was a problem hiding this comment.
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 `@models.go`:
- Around line 59-60: The new public constants ZapScriptCmdInputCoinP3 and
ZapScriptCmdInputCoinP4 lack unit tests; add tests that parse/serialize these
command strings and assert round-trip equality and parser acceptance (e.g., a
test that feeds "input.coinp3" and "input.coinp4" into the existing parser and
verifies the produced model uses the corresponding constant and that serializing
the model yields the same command string), include negative/edge cases if your
parser supports variations, and place tests alongside existing model/parser
tests so future changes to ZapScriptCmdInputCoinP3 and ZapScriptCmdInputCoinP4
will be caught.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| ZapScriptCmdInputCoinP3 = "input.coinp3" | ||
| ZapScriptCmdInputCoinP4 = "input.coinp4" |
There was a problem hiding this comment.
Add tests for the new input command constants.
These new public command values should be covered by tests (at least parser acceptance / model round-trip) so support for input.coinp3 and input.coinp4 doesn’t regress silently.
As per coding guidelines: “Do not skip writing tests for new features or bug fixes” and “Write tests for all new code with comprehensive coverage required.”
🤖 Prompt for 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.
In `@models.go` around lines 59 - 60, The new public constants
ZapScriptCmdInputCoinP3 and ZapScriptCmdInputCoinP4 lack unit tests; add tests
that parse/serialize these command strings and assert round-trip equality and
parser acceptance (e.g., a test that feeds "input.coinp3" and "input.coinp4"
into the existing parser and verifies the produced model uses the corresponding
constant and that serializing the model yields the same command string), include
negative/edge cases if your parser supports variations, and place tests
alongside existing model/parser tests so future changes to
ZapScriptCmdInputCoinP3 and ZapScriptCmdInputCoinP4 will be caught.
other part of ZaparooProject/zaparoo-core#859
Summary by CodeRabbit
Release Notes
New Features
Documentation