Skip to content

feat(sheets): add basic filter creation command#902

Merged
steipete merged 4 commits into
mainfrom
clawsweeper/issue-openclaw-gogcli-899
Jul 6, 2026
Merged

feat(sheets): add basic filter creation command#902
steipete merged 4 commits into
mainfrom
clawsweeper/issue-openclaw-gogcli-899

Conversation

@clawsweeper

@clawsweeper clawsweeper Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add gog sheets filter set <spreadsheetId> <range> for creating a Sheets basic filter.
  • Resolve A1 and named ranges through the existing Sheets range catalog helpers.
  • Send a focused SetBasicFilterRequest through Spreadsheets.BatchUpdate, with dry-run and JSON output matching neighboring Sheets mutation commands.
  • Regenerate command docs with make docs-commands.

Validation

  • make fmt
  • go test ./internal/cmd -run 'TestSheetsFilter|TestDryRunE2E_CommandsSkipAuthAPIAndFileWrites'
  • make docs-commands
  • make ci

Closes #899

@clawsweeper clawsweeper Bot added clawsweeper Tracked by ClawSweeper automation clawsweeper:autogenerated PR created automatically by ClawSweeper clawsweeper:autofix Bounded ClawSweeper-reviewed autofix without merge labels Jul 5, 2026
@clawsweeper

clawsweeper Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Codex review: passed. Reviewed July 6, 2026, 2:03 AM ET / 06:03 UTC.

Summary
The PR adds gog sheets filter set <spreadsheetId> <range>, generated command docs, a Sheets skill listing entry, range-catalog basic-filter metadata, dry-run/replacement guard behavior, and focused tests.

Reproducibility: not applicable. as a bug reproduction; this is a feature implementation PR. Source search on current main and v0.32.0 confirms there is no existing Sheets basic-filter command, and this PR is the linked implementation candidate.

Review metrics: 2 noteworthy metrics.

  • Changed files: 11 files affected. The PR spans one new command, shared Sheets range metadata, generated command docs, a skill listing, and focused tests.
  • Release-owned edits: 0 CHANGELOG.md edits remaining. The earlier policy finding is resolved; the current diff no longer edits the release-owned changelog.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #899
Summary: This PR is the open candidate fix for the canonical Sheets setBasicFilter feature request.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Risk before merge

  • [P1] No live Google Sheets API smoke proof is attached; the current evidence is source review plus mocked HTTP request-shape tests, so maintainers should still wait for required checks and ordinary review before merge.

Maintainer options:

  1. Decide the mitigation before merge
    Land the bounded command after required checks pass, preserving the replacement guard, generated docs, and no release-owned changelog edit.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P2] No repair lane is needed because the prior changelog issue is fixed and no new actionable patch defect was found.

Security
Cleared: Cleared: the diff adds bounded Go CLI code, generated docs, a skill listing, and tests; it does not change dependencies, CI, credentials, install scripts, or package execution paths.

Review details

Best possible solution:

Land the bounded command after required checks pass, preserving the replacement guard, generated docs, and no release-owned changelog edit.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a bug reproduction; this is a feature implementation PR. Source search on current main and v0.32.0 confirms there is no existing Sheets basic-filter command, and this PR is the linked implementation candidate.

Is this the best way to solve the issue?

Yes: the PR reuses existing Sheets range resolution and mutation patterns, adds dry-run and replacement confirmation behavior, and includes generated docs plus focused tests. I found no duplicate supported command path on current main or the latest release.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 088198a28077.

Label changes

Label justifications:

  • P2: The PR implements a bounded Sheets feature gap linked to an open request, with limited blast radius and focused tests.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Not applicable: this is a ClawSweeper bot/autofix PR, so the external-contributor real behavior proof gate does not apply.
Evidence reviewed

What I checked:

  • Repository policy read: AGENTS.md was read fully; its PR-review guidance applied because this was inspected read-only without changing branches or files. (AGENTS.md:37, 088198a28077)
  • Current-main feature gap: Current main's Sheets command registry lists the existing Sheets subcommands and has no filter/basic-filter command surface. (internal/cmd/sheets.go:33, 088198a28077)
  • Latest release feature gap: The v0.32.0 tree has no matches for SetBasicFilter, BasicFilter, basic-filter, sheets filter, or SheetsFilter under internal/docs/agents paths. (f20a26cd9e26)
  • PR implementation path: The PR head validates spreadsheet/range inputs, exits before auth/API work on dry-run, resolves the range, builds SetBasicFilterRequest, and sends it through BatchUpdate. (internal/cmd/sheets_filter.go:20, 4eb708278d85)
  • Replacement guard: The PR fetches basicFilter(range) metadata into the shared range catalog and refuses to replace an existing sheet filter without confirmation or --force. (internal/cmd/sheets_range_resolve.go:31, 4eb708278d85)
  • Focused tests: Tests cover SetBasicFilter request shape, sheetId zero serialization, dry-run service skipping, replacement refusal, and forced replacement output. (internal/cmd/sheets_filter_test.go:17, 4eb708278d85)

Likely related people:

  • steipete: Current-main blame points the Sheets command registry and shared mutation/range helpers at the release commit, while older reachable commits show steipete authored the shared mutation runner and adjacent data-validation command work; steipete also authored the PR commits that added the replacement guard and dry-run safety repair. (role: recent area contributor and likely follow-up owner; confidence: high; commits: f20a26cd9e26, a394c1c7b015, e1be268f70a6; files: internal/cmd/sheets.go, internal/cmd/sheets_mutation_helpers.go, internal/cmd/sheets_range_resolve.go)
  • TheCrazyLex: GitHub commit metadata shows TheCrazyLex authored the named-range support and range resolver behavior that this new filter command reuses for named range resolution. (role: introduced adjacent behavior; confidence: medium; commits: 1da21969a825; files: internal/cmd/sheets_named_ranges.go, internal/cmd/sheets_range_resolve.go, internal/cmd/sheets.go)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (4 earlier review cycles)
  • reviewed 2026-07-05T05:26:11.761Z sha dba7ddb :: passed. :: none
  • reviewed 2026-07-06T05:41:01.230Z sha d6253e9 :: passed. :: none
  • reviewed 2026-07-06T05:46:20.545Z sha 4454c21 :: needs changes before merge. :: [P3] Remove the release-owned changelog entry
  • reviewed 2026-07-06T05:58:45.216Z sha 4eb7082 :: passed. :: none

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal priority bug or improvement with limited blast radius. labels Jul 5, 2026
@steipete
steipete force-pushed the clawsweeper/issue-openclaw-gogcli-899 branch from dba7ddb to d6253e9 Compare July 6, 2026 05:36
@clawsweeper

clawsweeper Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

🦞🔧
ClawSweeper applied a repair to this PR branch.

Repair: kept the fix on this contributor branch instead of opening a replacement PR.
Validation: git diff --check
Updated head: 4eb708278d85
Run: https://github.com/openclaw/clawsweeper/actions/runs/28770446554

Current state: exact-head review queued immediately; GitHub checks and the review verdict gate final merge.

Automerge progress:

  • 2026-07-06 05:41:57 UTC review passed d6253e9f446f (structured ClawSweeper verdict: pass (sha=d6253e9f446f7215130a6ca5b35ccec598262...)
  • 2026-07-06 05:47:15 UTC review requested repair 4454c2160cbc (structured ClawSweeper marker: fix-required (finding=review-feedback sha=4454c2...)
  • 2026-07-06 05:55:20 UTC review queued 4eb708278d85 (after repair)

@steipete
steipete merged commit b609c22 into main Jul 6, 2026
9 checks passed
@steipete
steipete deleted the clawsweeper/issue-openclaw-gogcli-899 branch July 6, 2026 06:20
@steipete

steipete commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Landed in b609c221f4f612616d19a0ee77ea3e26c75c8cea.

Validation:

  • Source-blind live Sheets E2E with [email protected]: disposable spreadsheet creation, dry-run with zero remote mutation, exact basic-filter readback, non-interactive replacement refusal with state preserved, forced replacement with replaced: true and exact readback, empty-range rejection, and artifact cleanup to trash. All 6 contract clauses passed.
  • Local: make test; focused filter, dry-run, and destructive-confirmation contract tests; make ci.
  • Autoreview: full branch and follow-up CI fix both clean with no accepted/actionable findings.
  • Hosted CI: exact head 4eb708278d858634474300f5781b3e2d5774c10d; both Linux, macOS, Windows, and worker matrices plus Docker all passed.

The maintainer follow-up also guards replacement of an existing sheet filter behind confirmation or --force, preventing silent loss of its criteria and sort settings.

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

Labels

clawsweeper:autofix Bounded ClawSweeper-reviewed autofix without merge clawsweeper:autogenerated PR created automatically by ClawSweeper clawsweeper Tracked by ClawSweeper automation P2 Normal priority bug or improvement with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gog sheets should support creating filters (setBasicFilter)

1 participant