Skip to content

feat(docs): list pending suggestions#896

Merged
steipete merged 8 commits into
mainfrom
codex/docs-suggestions-list
Jul 3, 2026
Merged

feat(docs): list pending suggestions#896
steipete merged 8 commits into
mainfrom
codex/docs-suggestions-list

Conversation

@steipete

@steipete steipete commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Closes #876.

Summary

  • add gog docs suggestions list <docId> [--tab title-or-id]
  • request SUGGESTIONS_INLINE explicitly and emit pending insertions/deletions with suggestion ID, segment, UTF-16 range, and text when present
  • cover every current Docs suggestion-ID carrier: text and non-text paragraph elements, section/table/row/cell/TOC structures, and list/inline/positioned-object maps
  • combine contiguous runs, preserve nested IDs, traverse body/header/footer/footnote/tab content, and expose the read-only command in both baked safety profiles
  • add stable JSON/TSV output, generated command references and service-skill metadata, user docs, changelog, and focused regressions

Style-only suggestions and accept/reject mutation remain intentionally out of scope. The Docs API response does not expose suggestion authors.

Exact-head proof

Live-proof limit

Google's Docs API can read but cannot create a pending suggestion. The existing-profile Chrome bridge had no attached tabs, so an authenticated UI-created pending insertion/deletion could not be induced safely. Empty live reads, tab projection, read-only behavior, and cleanup are live-proven; actual pending-suggestion rendering is API-type-exhaustive and fixture-proven rather than backed by a live pending suggestion.

@clawsweeper

clawsweeper Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 3, 2026, 9:37 AM ET / 13:37 UTC.

Summary
The PR adds gog docs suggestions list <docId> [--tab] with inline Docs suggestions fetching, JSON/TSV output, docs, generated command references, safety-profile allowlist entries, and regression tests.

Reproducibility: not applicable. as a bug reproduction; this is a feature PR for a missing Docs suggestions surface. Source inspection confirms current main lacks the command and any SUGGESTIONS_INLINE request path, while the PR adds focused fixtures and command-path coverage.

Review metrics: 3 noteworthy metrics.

  • Changed surface: 14 files, +974/-1. The feature spans command code, tests, generated docs, user docs, skill metadata, safety profiles, and release notes.
  • Public command added: 1 command with JSON and TSV output. A new scriptable CLI surface needs maintainer acceptance before release because downstream callers may depend on the field semantics.
  • Safety profiles changed: 2 profiles changed. Bundled read-only profile behavior is a policy surface that green tests do not settle.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #876
Summary: This PR is the candidate implementation for the open read-only Docs suggestions request.

Members:

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

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🦐 gold shrimp
Patch quality: 🦐 gold shrimp
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:

  • Get explicit maintainer acceptance for the JSON/TSV command contract and baked safe-profile scope.
  • [P2] Add live pending-suggestion proof if maintainers do not accept the documented fixture-backed limitation.

Risk before merge

  • [P1] Merging publishes a new scriptable command and stable JSON/TSV fields that maintainers will need to support after release.
  • [P1] The baked readonly and agent-safe profiles would be able to read pending and deleted suggestion text, which is intentional but security-boundary-sensitive.
  • [P1] The PR body documents that actual pending-suggestion rendering is fixture-proven because safely creating a live pending suggestion was blocked, so maintainers need to accept that proof limit or require a live fixture.

Maintainer options:

  1. Accept the command and profile scope
    Maintainers can explicitly approve the new CLI/output contract plus the readonly and agent-safe ability to read pending/deleted suggestion text.
  2. Narrow the safe-profile exposure
    If pending/deleted suggestion text should not be available through baked safe profiles yet, remove those allowlist entries before merge while keeping the command available outside the profiles.
  3. Require live pending-suggestion proof
    If fixture coverage is not enough for this Docs API surface, hold the PR until a real document with pending insertion/deletion suggestions can be exercised or explicitly waive that gap.

Next step before merge

  • [P2] Manual review is needed because the remaining decision is maintainer acceptance of new public CLI/output and safe-profile read scope, not an automated code repair.

Security
Needs attention: No supply-chain issue was found, but the safe-profile allowlist change intentionally expands read access to pending/deleted suggestion text and needs maintainer acceptance.

Review details

Best possible solution:

Land after maintainers explicitly accept the read-only command/output contract and the safe-profile exposure, keeping accept/reject mutation and style-only suggestions out of this PR.

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

Not applicable as a bug reproduction; this is a feature PR for a missing Docs suggestions surface. Source inspection confirms current main lacks the command and any SUGGESTIONS_INLINE request path, while the PR adds focused fixtures and command-path coverage.

Is this the best way to solve the issue?

Yes, if maintainers accept the product and safety scope: a dedicated read-only suggestions list command using SUGGESTIONS_INLINE is a narrow implementation for the linked request. The safer alternative, if the profile exposure is too broad, is to ship the command without adding it to baked safe profiles yet.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 65e1c851ee5f.

Label changes

Label changes:

  • add merge-risk: 🚨 security-boundary: The PR expands baked safe-profile read access to pending/deleted Docs suggestion text, which can expose content outside the accepted document body.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The external-contributor proof gate does not apply to this collaborator-authored PR; the PR body nevertheless records exact-head local/CI/live read proof and clearly documents the blocked live pending-suggestion fixture.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P2: This is a bounded Docs CLI feature in an existing area with limited blast radius but real maintainer-facing contract decisions.
  • merge-risk: 🚨 security-boundary: The PR expands baked safe-profile read access to pending/deleted Docs suggestion text, which can expose content outside the accepted document body.
  • merge-risk: 🚨 other: Green CI does not settle the new public command/output contract or the documented live pending-suggestion proof gap.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The external-contributor proof gate does not apply to this collaborator-authored PR; the PR body nevertheless records exact-head local/CI/live read proof and clearly documents the blocked live pending-suggestion fixture.
Evidence reviewed

Security concerns:

  • [medium] Accept safe-profile suggestion text exposure — safety-profiles/readonly.yaml:147
    The diff adds docs.suggestions.list to both bundled read-only profiles, which lets those profiles read pending/deleted suggestion text that normal document text reads may not show; maintainers should accept or narrow that policy before merge.
    Confidence: 0.83

What I checked:

  • Repository policy read: AGENTS.md was read fully; its PR review guidance to inspect with gh pr view and gh pr diff without switching branches was applied. (AGENTS.md:37, 65e1c851ee5f)
  • No maintainer notes present: The checkout has skill files under .agents/, but no .agents/maintainer-notes/ files matching the touched Docs, generated-docs, or safety-profile surfaces. (65e1c851ee5f)
  • Current main lacks the suggestions surface: A current-main search found no docs suggestions command registration, no SuggestionsViewMode( setter, and no suggested insertion/deletion renderer in the inspected command/docs/profile paths. (65e1c851ee5f)
  • Latest release shares the missing Docs surface: No relevant Docs command/read/docs/profile files differ between v0.31.1 and current main, so the latest release also lacks this suggestions command. (608aa46e7b9c)
  • PR implements the read path: The PR head adds DocsSuggestionsListCmd, calls Documents.Get(...).SuggestionsViewMode("SUGGESTIONS_INLINE"), optionally includes tab content, and emits JSON/table output. (internal/cmd/docs_suggestions.go:43, cdcd3019d995)
  • PR covers the reviewed suggestion carriers: The added tests cover text runs, structural table/row/cell/TOC IDs, non-text paragraph elements, section breaks, positioned objects, inline-object maps, list maps, request parameters, tab projection, and output formatting. (internal/cmd/docs_suggestions_test.go:15, cdcd3019d995)

Likely related people:

  • steipete: Current-main blame and history tie the Docs command registry, raw/tab projection, recent Docs command expansion, safety-profile surface, and this PR's implementation to this person. (role: recent Docs command/read area contributor; confidence: high; commits: 608aa46e7b9c, 0a7e6425384b, 454d116856f1; files: internal/cmd/docs.go, internal/cmd/docs_read.go, internal/cmd/docs_helpers.go)
  • alexknowshtml: History shows the core Docs tab support and read/edit command structure that this PR's --tab suggestions path builds on dates to the tab support feature work. (role: Docs tabs/read feature introducer; confidence: medium; commits: 2f5131995552; files: internal/cmd/docs.go, internal/cmd/docs_commands_test.go)
  • johnbenjaminlewis: History shows adjacent per-tab Google Doc export and tab flag naming work relevant to the PR's tab-selection contract. (role: adjacent tab export contributor; confidence: medium; commits: 26e01cfa972a, 50f506dd3aad; files: internal/cmd/docs_tab_export.go, internal/cmd/docs.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.

@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 1, 2026
@steipete
steipete force-pushed the codex/docs-suggestions-list branch from eed3903 to d0e30f7 Compare July 1, 2026 09:12

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d0e30f7ef2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/cmd/docs_suggestions.go
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. and removed 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. labels Jul 1, 2026
@steipete
steipete force-pushed the codex/docs-suggestions-list branch from d0e30f7 to 3b20615 Compare July 3, 2026 11:45

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3b2061527e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/cmd/docs_suggestions.go Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bf87d4b189

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/cmd/docs_suggestions.go
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jul 3, 2026
@steipete
steipete merged commit 76fb1ee into main Jul 3, 2026
12 of 13 checks passed
@steipete
steipete deleted the codex/docs-suggestions-list branch July 3, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(docs): read-only surface for suggested edits (tracked changes) — docs suggestions list / --suggestions

1 participant