Skip to content

feat: add write command model#24

Merged
wizzomafizzo merged 2 commits into
mainfrom
feat/write-command
May 23, 2026
Merged

feat: add write command model#24
wizzomafizzo merged 2 commits into
mainfrom
feat/write-command

Conversation

@wizzomafizzo
Copy link
Copy Markdown
Member

@wizzomafizzo wizzomafizzo commented May 23, 2026

Summary

  • add official write ZapScript command constant
  • add CmdWriteArgs model with payload positional argument
  • cover parsing quoted write payloads

Validation

  • go test ./...
  • task lint-fix

Summary by CodeRabbit

  • New Features

    • Introduced the "write" command to ZapScript, enabling users to execute write operations with customizable payloads in their automation workflows.
  • Tests

    • Added comprehensive parser test coverage for the new "write" command, including validation of payload arguments and command formatting.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 23, 2026

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 42be41c2-743b-465b-9dac-de6afd8a6a83

📥 Commits

Reviewing files that changed from the base of the PR and between 7f17da5 and fda385e.

📒 Files selected for processing (2)
  • models.go
  • parser_test.go

📝 Walkthrough

Walkthrough

The PR introduces a new write command to Zapscript by adding a command constant and argument struct definition, then validates the parser's handling of the new command through a test case that confirms payload content with embedded delimiters is preserved intact.

Changes

Write Command Support

Layer / File(s) Summary
Write command contract
models.go
Adds ZapScriptCmdWrite constant ("write") and CmdWriteArgs struct with Payload field to define the command identifier and required argument structure.
Write command parsing test
parser_test.go
Validates that the parser recognizes **write:'...' syntax and preserves the entire quoted payload string, including embedded || separators, as a single argument.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A fresh command hops into place,
With payload held in structured grace,
The parser tests its jumping stride,
And writes with joy, both deep and wide!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add write command model' clearly and concisely summarizes the main change: adding a new write command with its associated model structure, which aligns with the changes in models.go and parser_test.go.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/write-command

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

@codecov
Copy link
Copy Markdown

codecov Bot commented May 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@wizzomafizzo wizzomafizzo merged commit 7e7488b into main May 23, 2026
11 of 12 checks passed
@wizzomafizzo wizzomafizzo deleted the feat/write-command branch May 23, 2026 10:11
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.

1 participant