Skip to content

feat(docs): add named range commands#727

Merged
steipete merged 2 commits into
mainfrom
feat/docs-named-ranges-692
Jun 10, 2026
Merged

feat(docs): add named range commands#727
steipete merged 2 commits into
mainfrom
feat/docs-named-ranges-692

Conversation

@steipete

Copy link
Copy Markdown
Collaborator

Summary

  • add tab-aware docs named-range create/list/delete/replace commands
  • support UTF-16 index ranges and literal-text --at resolution
  • enforce unique names while accepting exact name or ID for mutations
  • preserve segment IDs, stable JSON/plain output, dry-run, safety profiles, and generated docs

Replacement is plain text only. Complex-content or Markdown fallback is intentionally out of scope.

Verification

  • DEVELOPER_DIR=/Library/Developer/CommandLineTools make ci
  • autoreview clean after accepted fixes for generated docs, safety profiles, segment IDs, post-replace metadata, and TSV output
  • live disposable Google Docs smoke with [email protected]:
    • create by text in a secondary tab
    • create by explicit UTF-16 indexes
    • list JSON and headerless plain TSV
    • replace by ID with post-mutation range readback
    • delete by ID and name
    • duplicate-name rejection
    • disposable document cleanup

Fixes #692.

@clawsweeper

clawsweeper Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 10, 2026, 2:34 AM ET / 06:34 UTC.

Summary
The PR adds tab-aware Google Docs named-range create/list/delete/replace commands with generated command docs, dry-run coverage, safety-profile entries, and a changelog note.

Reproducibility: not applicable. as a bug reproduction; this PR implements a new command surface. Source inspection confirms current main lacks the top-level Docs named-range commands, while the branch adds the requested implementation and tests.

Review metrics: 1 noteworthy metric.

  • Diff surface: 15 files changed, +1195/-1. The PR is a user-facing command addition with generated docs, tests, safety profiles, and changelog surface to review together.

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.

Next step before merge

  • No automated repair lane is needed because the review found no narrow defect to fix; this should stay in the normal maintainer review and merge path.

Security
Cleared: The diff adds Go command code, tests, generated docs, and restrictive safety-profile entries, with no new dependencies, CI changes, secret handling, downloads, or package execution paths.

Review details

Best possible solution:

Keep the PR open for normal maintainer review and merge once repository checks are acceptable.

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

Not applicable as a bug reproduction; this PR implements a new command surface. Source inspection confirms current main lacks the top-level Docs named-range commands, while the branch adds the requested implementation and tests.

Is this the best way to solve the issue?

Yes. The PR uses existing Docs tab-loading, --at resolution, dry-run, output, and safety-profile patterns instead of creating a parallel command framework.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against e51f6be9dc38.

Label changes

Label changes:

  • add P2: This is a normal priority user-facing Docs capability addition in an existing supported product area.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this collaborator-authored PR; the body nevertheless reports make ci and live disposable Google Docs smoke coverage.

Label justifications:

  • P2: This is a normal priority user-facing Docs capability addition in an existing supported product area.
  • 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: The external-contributor proof gate does not apply to this collaborator-authored PR; the body nevertheless reports make ci and live disposable Google Docs smoke coverage.
Evidence reviewed

What I checked:

  • Repository policy read: AGENTS.md was read in full; its PR-review guidance to inspect with gh pr view / gh pr diff without switching branches and its stdout/stderr output contract were applied where relevant. (AGENTS.md:1, e51f6be9dc38)
  • Current main lacks the command surface: Current main has Docs raw named-range projection and Docs sed bookmark internals, but no top-level docs named-range command registration before this branch. (internal/cmd/docs.go:54, e51f6be9dc38)
  • Branch command registration: The PR adds DocsNamedRangesCmd under docs with named-range, named-ranges, namedranges, and nr command names. (internal/cmd/docs.go:57, edeee6874802)
  • Branch implementation: The new implementation wires list/create/delete/replace to Google Docs named-range API requests, uses existing tab and --at helpers, preserves JSON/plain TSV output, and uses revision write controls for mutations. (internal/cmd/docs_named_ranges.go:17, edeee6874802)
  • Branch coverage: The added tests cover tab-aware JSON/plain listing, UTF-16 create-by-text, duplicate-name rejection, delete and replace by ID, empty replacement text force-send, TSV escaping, and ambiguous-name rejection. (internal/cmd/docs_named_ranges_test.go:63, edeee6874802)
  • Safety profiles updated: The branch adds readonly and agent-safe profile entries that allow listing named ranges while denying create/delete/replace mutations in restrictive baked profiles. (safety-profiles/readonly.yaml:161, edeee6874802)

Likely related people:

  • steipete: Git history and blame show Peter Steinberger authored the current Docs command registration area, tab-aware raw work, current content enumerators, and foundational Docs helper files this PR builds on. (role: recent Docs command contributor and helper owner; confidence: high; commits: e51f6be9dc38, 0a7e6425384b, 71a8504d0add; files: internal/cmd/docs.go, internal/cmd/docs_at_anchor.go, internal/cmd/docs_mutation.go)
  • sebsnyk: The linked feature request at feat(docs): named-range create / list / delete / replace-content commands #692 provides the named-range command motivation, API references, and acceptance criteria that this PR implements. (role: feature requester; confidence: medium)
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.

@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 Jun 10, 2026
@steipete
steipete merged commit b34e303 into main Jun 10, 2026
11 checks passed
@steipete
steipete deleted the feat/docs-named-ranges-692 branch June 10, 2026 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

feat(docs): named-range create / list / delete / replace-content commands

1 participant