Skip to content

fix(sheets): reject append responses without update metadata - #1142

Merged
steipete merged 2 commits into
openclaw:mainfrom
SebTardif:fix/f028-sheets-append-nil-updates
Sep 22, 2026
Merged

steipete merged 2 commits into
openclaw:mainfrom
SebTardif:fix/f028-sheets-append-nil-updates

Conversation

@SebTardif

@SebTardif SebTardif commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Sheets values append could panic after a successful HTTP response with missing update metadata. Reject that incomplete response before dereferencing it, while retaining the existing validation-copy diagnostic.

Regression coverage drives the Google Sheets client and parsed append command with absent and null metadata in human and JSON modes. It verifies an ordinary non-retryable error, no success output, and exactly one append request. The automation guide explains why callers should inspect the spreadsheet before retrying an uncertain write.

Validation: the original implementation panicked on the regression fixture; the expanded cases and validation-copy regression pass on AWS Crabbox. No live spreadsheet was changed.

Thanks @SebTardif for the fix.

The final make ci gate passes on AWS Crabbox, and independent Codex review found no actionable P0–P2 findings.

@clawsweeper

clawsweeper Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 20, 2026
@clawsweeper

clawsweeper Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed September 22, 2026, 1:21 AM ET / 05:21 UTC (Revision 2).

ClawSweeper review

What this changes

The PR makes Sheets append reject missing response metadata without crashing or retrying, adds regression coverage, and documents recovery guidance.

Merge readiness

⛔ Blocked before merge - 2 items remain

This remains a useful, focused fix that main and v0.40.0 still need. No actionable correctness defect was found, and the changelog follow-up is resolved; the previously requested runtime transcript remains outstanding.

Priority: P2
Reviewed head: d9732a842ee188e0b69518b57fded12dd051dfe0

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-correct with stronger regression coverage, but observable execution evidence remains incomplete.
Proof confidence 🦐 gold shrimp (3/6) Needs stronger real behavior proof before merge: Needs real behavior proof before merge: the body reports AWS Crabbox execution of the parsed append command through the real Sheets HTTP client, but supplies no request/response and returned-error transcript. A redacted trace showing the injected incomplete response, diagnostic, empty success output, and single append attempt would establish the changed behavior without live Google access. No stored-data contract changes. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: Needs real behavior proof before merge: the body reports AWS Crabbox execution of the parsed append command through the real Sheets HTTP client, but supplies no request/response and returned-error transcript. A redacted trace showing the injected incomplete response, diagnostic, empty success output, and single append attempt would establish the changed behavior without live Google access. No stored-data contract changes. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 8 items Pinned introduced change: The pinned merge-base-to-head diff changes four files and adds the guard before either output mode dereferences update metadata; the validation-copy diagnostic remains intact.
Current main still contains the defect: Without validation copying, an HTTP success response lacking updates reaches unconditional dereferences in JSON and human output.
Latest release still contains the defect: The inspected v0.40.0 implementation has the same unchecked output dereferences, so this is not an already-shipped fix.
Findings None None.
Security None None.

How this fits together

The Sheets append command sends rows through Google's Sheets client, then uses response metadata for optional validation copying and result output. This change guards that post-response processing.

flowchart TD
 A[Rows and target range] --> B[Sheets append command]
 B --> C[Google Sheets client]
 C --> D[Append response]
 D --> E{Update metadata present?}
 E -->|No| F[Return error without retry]
 E -->|Yes| G[Optional validation copy and result output]
Loading

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: Needs real behavior proof before merge: the body reports AWS Crabbox execution of the parsed append command through the real Sheets HTTP client, but supplies no request/response and returned-error transcript. A redacted trace showing the injected incomplete response, diagnostic, empty success output, and single append attempt would establish the changed behavior without live Google access. No stored-data contract changes. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Complete next step (P2) - Add a runtime transcript showing the real Sheets client receiving an incomplete HTTP success response and the append command returning the diagnostic without panic, success output, or a second append. Terminal screenshots or recordings are welcome; copied output and logs also count. Redact credentials, IP addresses, private endpoints, and other private details. Update the PR body to trigger re-review; if it does not run, ask a maintainer to comment @clawsweeper re-review.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Malformed-response coverage 3 response shapes × 2 output modes The regression checks both output paths while asserting that an uncertain write is not repeated.

Technical review

Best possible solution:

Retain the focused post-response guard, unchanged successful output, and explicit guidance against blindly retrying an uncertain write.

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

Yes, from source: HTTP 200 with {} leaves updates absent and reaches an unconditional dereference on main. The contributor reports a matching failing regression; this review did not execute it.

Is this the best way to solve the issue?

Yes. The guard follows the existing table-append convention, preserves the validation-copy diagnostic, and avoids retrying a potentially completed write.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against b2411fa43e33.

Labels

Label justifications:

  • P2: This bounded response-handling fix prevents an individual Sheets append command from panicking on missing metadata.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: Needs real behavior proof before merge: the body reports AWS Crabbox execution of the parsed append command through the real Sheets HTTP client, but supplies no request/response and returned-error transcript. A redacted trace showing the injected incomplete response, diagnostic, empty success output, and single append attempt would establish the changed behavior without live Google access. No stored-data contract changes. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Pinned introduced change: The pinned merge-base-to-head diff changes four files and adds the guard before either output mode dereferences update metadata; the validation-copy diagnostic remains intact. (internal/cmd/sheets.go:612, d9732a842ee1)
  • Current main still contains the defect: Without validation copying, an HTTP success response lacking updates reaches unconditional dereferences in JSON and human output. (internal/cmd/sheets.go:623, b2411fa43e33)
  • Latest release still contains the defect: The inspected v0.40.0 implementation has the same unchecked output dereferences, so this is not an already-shipped fix. (internal/cmd/sheets.go:623, a3065f53c38f)
  • Existing response-handling convention: Table append already uses the same nil-response and missing-updates guard. That separate table command does not protect ordinary range append. (internal/cmd/sheets_table_append.go:89, b2411fa43e33)
  • Regression boundary: Six cases cover {}, null updates, and a null response in human and JSON modes. They invoke the parsed production command and real Sheets HTTP client against an injected HTTP server, asserting the diagnostic, generic error classification, empty success output, and exactly one append request. This is a suitable production-path fault-injection boundary, but the supplied evidence does not include its request/response and resulting-error trace. (internal/cmd/sheets_validation_more_test.go:144, d9732a842ee1)
  • Captured proof and review continuity: The complete supplied body at sourceRevision 53429079c3f2fd54f0b55a84c46446f0d57c4845f364d69ed8d17de78140b3d5 reports AWS Crabbox regression and make ci success, without a runtime transcript or artifact link. The REST body matched the captured body and head. The previous review requested a redacted production-path trace; its changelog request is now satisfied. No target code or tests were executed during this read-only review. (d9732a842ee1)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Provide the redacted production-path request/response and resulting-error transcript requested by the prior review.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-20T20:10:01.361Z sha 90b1ca7 :: needs real behavior proof before merge. :: none

SebTardif and others added 2 commits September 21, 2026 22:12
Values append printed resp.Updates after a successful API call.
A missing updates object panicked. Guard like table-append.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
@steipete
steipete force-pushed the fix/f028-sheets-append-nil-updates branch from 90b1ca7 to d9732a8 Compare September 22, 2026 05:17
@steipete
steipete merged commit 3c4a710 into openclaw:main Sep 22, 2026
8 of 9 checks passed
@steipete

Copy link
Copy Markdown
Collaborator

Landed as 3c4a710. The old code panicked on a successful response with missing metadata. The expanded regression passes for absent/null metadata in human and JSON modes, with empty stdout and exactly one append. make ci passed on AWS Crabbox; independent review was clean through P2; all cross-platform CI passed on d9732a842ee188e0b69518b57fded12dd051dfe0. No live spreadsheet was changed. Thanks @SebTardif!

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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants