feat(sheets): add --inherit-from-before to sheets insert#658
Conversation
|
Codex review: needs maintainer review before merge. Reviewed May 30, 2026, 1:57 PM ET / 17:57 UTC. Summary Reproducibility: yes. for the source-level behavior: current main only derives Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the focused flag and validation after maintainer review, with release-note handling kept intentional and live Sheets proof requested only if maintainers want provider-visible confirmation beyond dry-run output and request-level tests. Do we have a high-confidence way to reproduce the issue? Yes for the source-level behavior: current main only derives Is this the best way to solve the issue? Yes, the pointer bool flag is a narrow maintainable fit because omitted preserves the current default while explicit true/false maps directly to the Sheets API field. The remaining questions are proof depth and release-note handling, not the core implementation shape. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 28e29cdfd0df. Label changesLabel changes:
Label justifications:
Evidence reviewedAcceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
7fbb0a1 to
929e26b
Compare
73aa8c9 to
d9695c4
Compare
|
@clawsweeper re-review — reopened with real-behavior proof (help + dry-run showing the tri-state |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
`gog sheets insert` always derived InsertDimensionRequest.inheritFromBefore from --after, so there was no way to insert columns/rows with plain formatting next to a formatted neighbour (the reported case: plain 0–100 score columns inserted beside a currency column first rendered as currency). Add a tri-state `--inherit-from-before` flag (*bool): omitted keeps the prior default (inherit only with --after), `--inherit-from-before=false` forces plain formatting, and `--inherit-from-before` forces inheritance on a before-insert. Regenerate the command reference (make docs-commands) so the flag is documented. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
d9695c4 to
d1da0e6
Compare
Fixes #655.
Problem
gog sheets insertalways derivedInsertDimensionRequest.inheritFromBeforefrom--after:So there was no way to insert rows/columns with plain formatting next to a formatted neighbour — the reported case: plain 0–100 score columns inserted immediately after a currency-formatted column rendered as currency until the format was manually cleared.
Change
Add a tri-state
--inherit-from-beforeflag (*bool):--afteris set;--inherit-from-before=false— force plain formatting (the reported need);--inherit-from-before— force inheritance even on a before-insert.Maps straight through to
InsertDimensionRequest.inheritFromBefore. Command reference regenerated viamake docs-commands.Real-behavior proof (built from this branch)
gog sheets insert --help:--dry-runshows the flag controllinginherit_from_before(no API call):Review follow-ups addressed
make docs-commands;docs/commands/gog-sheets-insert.mdnow lists the flag.Tests: added two subtests over the existing httptest Sheets stub asserting wire-level
InheritFromBeforefor both override directions.make fmt+make lint+go test ./internal/cmd/green.