fix(report): keep issue filing dry-run unless --yes is passed#28
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Non-technical summary
i reportwas writing to GitHub by default as soon as a user confirmed an interactive prompt, even though the spec says the command should stay in dry-run mode unless--yesis passed. This change restores that contract so users can inspect proposed issue/comment actions without mutating GitHub unless they explicitly opt into execution.This matters now because
reportis one of the repo's most safety-sensitive subcommands: it bridges natural language into external writes. After this change, the default path is once again non-mutating and the mutating path is explicit.Technical summary
applyReportMatchesso the write gate is isolated and testable--yes, instead of posting comments after an interactive confirmation--yes, while still showing filtered labels and body previews--yesas the execution gate for both comment and create paths--yesis presentRelevant intent being strengthened:
docs/SPEC.mdsection 10, which saysi reportis dry-run by default unless--yesis passed.Tests:
PATH="/opt/homebrew/bin:$PATH" go test ./internal/cli/...PATH="/opt/homebrew/bin:$PATH" go test ./...PATH="/opt/homebrew/bin:$PATH" go vet ./...PATH="/opt/homebrew/bin:$PATH" make buildBreaking changes: behaviorally, yes for anyone relying on interactive default writes from
i report, but this is an intentional spec-alignment correction onmainrather than a new contract.Additional notes
Trade-off: this removes a convenience path for interactive report filing, but that path was violating the documented safety boundary.
Intentionally deferred:
offerSynthesizedProposal, which still has its own degraded confirmation UX and may deserve a follow-up alignment passreportergonomics or GitHub transport changes outside the default dry-run contractRemaining gap to the fuller vision:
reportstill depends onghCLI availability and has some fallback UX edges, but the default mutation boundary now matches the published spec again.