Repository navigation
Add campaign reschedule CLI command - #40
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f81a7c8b0d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const scheduledAt = flags.now | ||
| ? null | ||
| : parseCampaignSchedule(flags['scheduled-at']) |
There was a problem hiding this comment.
Reject normalized invalid calendar dates
When --scheduled-at contains an impossible date such as 2026-02-31T12:00:00Z, parseCampaignSchedule relies on Date.parse, which normalizes it to March 3 rather than rejecting it. The command therefore sends a valid but unintended timestamp, so a user can silently reschedule a campaign to the wrong day; validate that the parsed calendar components match the supplied ISO instant before transport.
Useful? React with 👍 / 👎.
A waiting campaign can move its scheduled start through
polymorfa campaign reschedule. The command accepts one of--scheduled-at(ISO instant or Unix milliseconds) and--now, sends a generated or caller-supplied idempotency key, and reports the accepted lifecycle operation. It uses the typed Messaging SDK method and refuses browser client tokens before transport. A known 409 conflict is reported after one request.This is a draft because the API and SDK are not merged or published. The command was checked locally against SDK PR #310 head
16318f057c62192f36933878fb0a48a74f9f56c1, which follows API PR #321 headbb97a3a425110b2eea056735cd3b680f53a98d46. The registry dependency remains at the existing version; after the SDK release is verified, pin its exact published version and regenerate the lockfile before merging this CLI PR.campaigns.reschedulemethod. SDK publication and registry integrity remain unverified.scheduledAt; the CLI adds no staff action or Admin state.Local verification with the unpublished SDK draft: 22 campaign command tests, CLI typecheck, build, lint, formatting, and diff check pass. The tests cover time parsing,
--now, invalid flags, client-token refusal and one-request 409 handling. Remote CI cannot verify the typed method against the old registry pin until SDK publication.Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.