Skip to content

feat(cli): replace mutation plans with gog-style dry-run UX - #203

Merged
KalebCole merged 4 commits into
mainfrom
fix/issue-201-dry-run-confirmation
Sep 6, 2026
Merged

KalebCole merged 4 commits into
mainfrom
fix/issue-201-dry-run-confirmation

Conversation

@KalebCole

Copy link
Copy Markdown
Owner

Summary

  • replace the two-step plan/apply workflow with one-command mutations
  • add consistent --dry-run, --force, and --no-input behavior across all 11 mutation commands
  • require TTY confirmation only for destructive actions
  • keep validation, permission checks, read-before-write safeguards, redaction, and one-attempt submission behavior
  • remove persisted mutation plans, plan tokens, expiry handling, and stale-plan errors
  • update schemas, help, docs, and the bundled skill for the new workflow

Why

The existing plan token made ordinary writes awkward without providing a useful operator boundary. Callers had to submit the same payload twice, and events create rejected token-only apply with TITLE_REQUIRED.

This follows the interaction model used by gog: use --dry-run to preview, run the command normally to execute, prompt only for destructive actions, use --force to skip that prompt, and use --no-input to fail instead of hanging.

Safety retained

  • dry runs make no remote mutation and do not persist refreshed credentials
  • preview output redacts private IDs and message bodies
  • destructive commands still validate and read current state before prompting
  • --force skips only the prompt
  • remote writes still make one attempt and never retry an uncertain completion
  • remote response validation remains fail closed

Validation

  • go test ./...
  • go test -race ./...
  • go vet ./...
  • go build ./...
  • go mod verify
  • git diff --check
  • scripts/pii-guard.sh
  • compiled smoke test for events create --dry-run with an empty HOME
  • schema sweep across all 11 former plan-gated commands

Stack

This PR is based on fix/issue-200-command-help and targets that branch. Merge #202 first, then retarget this PR to main.

Closes #201 after merge.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 9dda450e-e671-4cef-9e2c-740ea170b711


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.

❤️ Share

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

@github-actions

github-actions Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-06 00:01 UTC

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

--no-input is introduced as a global flag but is not honored by auth login’s interactivity gate, so partiful --no-input auth login can still attempt prompting (see stored comment [ID: 001]).

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Lite
Findings: 1 Medium severity

New issues introduced by this change (1)
Severity Finding
Medium severity internal/​app/​app.go — --no-input is introduced as a global flag here, but auth login only gates interactivity on…
What changed in this PR

This PR updates the Partiful CLI mutation UX to a single-invocation model modeled after gog, replacing the prior plan/apply token workflow while preserving validation, read-before-write safeguards, redaction, and one-attempt dispatch semantics.

Changes:

  • Remove persisted mutation plan storage and the --apply/--plan/--confirm lifecycle; introduce consistent mutation flags --dry-run, --force, and --no-input.
  • Implement dry-run previews (redacted, no-write) and enforce TTY confirmation only for destructive commands (events.cancel, cohosts.remove, cohosts.revoke-invite, cohosts.link.revoke).
  • Update schemas/help/docs/tests and add new confirmation + dry-run test coverage.
File Description
skills/​partiful/​SKILL.md Updates agent guidance from plan/apply to dry-run + destructive confirmation semantics.
skills/​partiful/​references/​text-blasts.md Reframes blast flow as --dry-run preview then one execution run (no tokens).
skills/​partiful/​references/​rsvps-and-interest.md Updates RSVP mutation guidance to dry-run preview + one-shot dispatch.
skills/​partiful/​references/​posters-and-images.md Updates event create/update guidance to poster resolution previews via --dry-run.
skills/​partiful/​references/​guests-invitations-and-cohosts.md Updates invites/cohosts/link docs to dry-run + destructive confirmation model.
skills/​partiful/​references/​events.md Updates events create/update/cancel docs for dry-run and destructive confirmation.
skills/​partiful/​references/​cli-output-and-safety.md Documents new mutation flag semantics and destructive confirmation behavior.
README.md Adds “Mutation safety” section describing --dry-run, --force, and noninteractive behavior.
internal/​mutation/​mutation.go Removes the mutation plan persistence/token authority implementation.
internal/​auth/​auth.go Adds “AcquireSessionWithoutPersistence” to support dry-run auth refresh without saving credentials.
internal/​app/​session.go Adds mutation-session acquisition that can suppress credential persistence on dry-run.
internal/​app/​rsvp_set.go Replaces RSVP plan/apply with dry-run preview output and one-shot dispatch.
internal/​app/​rsvp_input.go Removes --apply/--plan from RSVP parsing/schema; adds preview-safe fields.
internal/​app/​help_test.go Updates help expectations to show new mutation safety flags and wording.
internal/​app/​guests.go Replaces guests.invite plan/apply with dry-run preview and one-shot dispatch.
internal/​app/​guests_execute_test.go Updates guests.invite tests for preview + one-shot execution behavior.
internal/​app/​execute_test.go Updates schema projection tests for new safety.destructive shape.
internal/​app/​events_write_test.go Updates event write tests to preview (--dry-run) and one-shot dispatch model.
internal/​app/​event_write.go Refactors event create/update/cancel to preview + dispatch and adds destructive confirmation gating.
internal/​app/​event_write_input.go Removes apply/plan/confirm flags from event input parsing and updates success schemas.
internal/​app/​dryrun_test.go Adds tests asserting schema/help changes and destructive confirmation safety behavior.
internal/​app/​confirmation.go Introduces confirmer interface, destructive confirmation gating, and prompt sanitization.
internal/​app/​confirmation_test.go Adds unit tests for destructive prompt action naming and sanitization.
internal/​app/​cohosts.go Replaces cohost plan/apply with dry-run preview + destructive confirmation + one-shot dispatch.
internal/​app/​cohosts_execute_test.go Updates cohost tests for preview + one-shot execution and destructive confirmation.
internal/​app/​cohost_input.go Removes apply/confirm parsing/schema from cohost commands; updates success schemas.
internal/​app/​blasts.go Replaces blast plan/apply with dry-run preview and one-shot dispatch flow.
internal/​app/​blasts_test.go Updates blast tests for preview and one-shot execution; ensures message body stays private.
internal/​app/​app.go Adds global mutation flag parsing, updates command flags/safety schema, and updates help text.
docs/​research/​2026-08-12-event-write-mapping-public-assets.md Marks plan-token behavior as historical and notes new dry-run/confirmation approach.
docs/​index.html Updates website marketing copy/examples from plan/apply to dry-run previews.
docs/​CLI-PRODUCT-CONTRACT.md Updates product contract to remove plan tokens and define dry-run + destructive confirmation.
docs/​adr/​0001-greenfield-go-module-seams.md Marks ADR as superseded for mutation execution; notes new workflow.
DESIGN.md Updates design guidance to describe dry-run previews rather than mutation plans.
CONTEXT.md Updates terminology from plan/token to dry-run preview and destructive confirmation.
cmd/​partiful/​main.go Wires in a confirmer implementation and removes mutation plan dependency wiring.
cmd/​partiful/​confirmation.go Implements terminal-based confirmer used for destructive confirmation prompts.
AGENTS.md Updates agent-facing safety bullets to the dry-run + destructive confirmation model.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread internal/app/app.go Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

It makes broad, safety-critical behavioral changes across all mutation commands (auth refresh persistence, confirmation gating, and schema/help contracts) that warrant final human verification despite strong test coverage.

Review tier: Lite
Findings: None

Issues resolved since last review (1)
Severity Finding
Medium severity internal/​app/​app.go — --no-input is introduced as a global flag here, but auth login only gates interactivity on… View resolved comment

@KalebCole
KalebCole force-pushed the fix/issue-201-dry-run-confirmation branch from 81de1eb to ff9bdb4 Compare September 5, 2026 23:59
@KalebCole
KalebCole changed the base branch from fix/issue-200-command-help to main September 5, 2026 23:59
@KalebCole
KalebCole merged commit edbdd4d into main Sep 6, 2026
3 checks passed
@KalebCole
KalebCole deleted the fix/issue-201-dry-run-confirmation branch November 14, 2026 22:35
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.

Replace mutation plan tokens with gog-style dry-run and confirmation UX

2 participants