Skip to content

WS-18: fix(workstation): reword-head rewrites HEAD without the confirmation its sibling amend-head requires #1872

Description

@gfargo

File: src/workstation/runtime/inkWorkflows.ts (registry entry for reword-head)

What's wrong: Enumerating the registry against HISTORY_REWRITE_WORKFLOW_IDS
(useWorkflowAction.ts:157-168) shows exactly one history-rewriting workflow with no
requiresConfirmation:

--- history-rewriting workflows WITHOUT requiresConfirmation ---
  reword-head {"kind":"normal","label":"Reword HEAD commit message"}

All 9 siblings (amend-head, reset-to-commit, cherry-pick-commit, revert-commit,
fixup-into-commit, autosquash-rebase, interactive-rebase, execute-rebase-plan,
rebase-onto-branch) gate on a y-confirm.

Impact: reword-head rewrites the HEAD commit (invalidating any push) with no confirmation
step. Consent is arguably implicit because the flow opens an input prompt for the new message, but
the asymmetry with amend-head — which also prompts and confirms — means the same class of
rewrite has two different safety levels.

Suggested fix: Either add requiresConfirmation: true for parity, or document the
"prompt implies consent" rule and drop it from amend-head too. Add a registry-invariant test
asserting every id in HISTORY_REWRITE_WORKFLOW_IDS follows the chosen rule.

Confidence: high (the asymmetry is verified; whether it is wrong is a product call)



Extracted from a repo audit performed 2026-07 (the audit doc it came from was proposed via an unmerged docs PR).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions