Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 12, 2025

Adds optional --requestid flag to buzz add command for safe retry of datapoint submissions. The requestid acts as an idempotency key scoped per goal: duplicate submissions are ignored, differing submissions with same requestid update the existing datapoint.

Changes

  • beeminder.go: Add requestid parameter to CreateDatapoint(), use url.Values for proper form encoding (fixes potential issue with special characters in comment/value fields)
  • main.go: Parse --requestid flag in handleAddCommand(), update help text
  • messages.go: Pass empty requestid from TUI (feature not needed there)
  • README.md: Document flag with usage examples
  • beeminder_test.go: Add test coverage for requestid parameter handling

Usage

# Idempotent submission - safe to retry
buzz add reading 3 'chapter 5' --requestid=abc123
buzz add reading 3 'chapter 5' --requestid=abc123  # No duplicate created

# Update with same requestid
buzz add reading 4 'chapter 6' --requestid=abc123  # Updates existing datapoint

Maps to Beeminder API's requestid parameter per API docs.

Original prompt

Let's add a new argument to allow the user to specify a request id when using buzz add


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 12, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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

Copilot AI changed the title [WIP] Add request id argument to buzz add command feat: add --requestid flag to buzz add for idempotent datapoint creation Dec 12, 2025
Copilot AI requested a review from narthur December 12, 2025 18:56
@narthur narthur marked this pull request as ready for review December 12, 2025 18:58
Copilot AI review requested due to automatic review settings December 12, 2025 18:58
@github-actions
Copy link

github-actions bot commented Dec 12, 2025

🚀 Pre-release Build Ready

Test builds are ready! Install directly using the bin command:

# Install the pre-release
bin install https://github.com/PinePeakDigital/buzz/releases/tag/pr-193-latest buzz-pr-193
# Run the pre-release
buzz-pr-193
# Uninstall the pre-release
bin remove buzz-pr-193

Direct Download Links

Or download binaries directly from the pre-release page:

💡 No GitHub login required for downloads!

🗑️ This pre-release will be automatically deleted when the PR is closed.

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@narthur narthur merged commit 6b40157 into main Dec 12, 2025
2 checks passed
@narthur narthur deleted the copilot/add-request-id-argument branch December 12, 2025 19:14
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.

2 participants