Skip to content

fix(gmail): keep setup command failures readable - #131502

Merged
steipete merged 6 commits into
mainfrom
steipete/jovial-mendel-06df0f
Aug 28, 2026
Merged

steipete merged 6 commits into
mainfrom
steipete/jovial-mendel-06df0f

Conversation

@steipete

@steipete steipete commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Closes #131478.

Problem and repair

Gmail setup and watch-registration failures could bury useful details in progress output, omit stdout, or lose the subprocess termination reason. The separate Tailscale formatter kept the beginning of output and discarded the final diagnostic.

This moves Gmail failures to the existing process-owned formatter from #131420. It preserves bounded, labeled tails from both streams, normalizes ANSI/progress output without splitting UTF-16 pairs, and records exit/signal/termination metadata. Safe operation labels do not echo argument vectors; invalid-JSON errors retain their cause. Successful output, auth/install fallback, provisioning, and watcher retry decisions remain unchanged. Command output can still contain sensitive information and must be redacted before sharing.

CI repairs included

The Gmail diagnostic cases share the existing utility root rather than adding a root beyond the unchanged 720 cap. All 31 utility cases remain. The real binary-availability cases from #131617 use the actual filesystem/cache owner; only diagnostics and decision cases install a scoped owner spy. The subsequent temp-helper change from #131712 is preserved.

Two small test-only repairs address failures exposed while validating this PR:

  • Brave cancellation now happens inside the mocked transport after its abort listener is installed, and the test awaits terminal rejection. This is the exact canonical patch from commit 697040a81eeb26a8ea947cec01b544125c3d98c0, coordinated with fix(gateway): preserve pending config restarts across repeated writes and reverts #128127. Its unrelated Gateway changes are not included. The old one-second poll could abandon a request during DNS/runtime preparation and leak it into the next test's fetch mock. Existing deadlines, SDK mocks, and assertions remain unchanged.
  • OpenShell's temporary directory prefix is shortened so the nested Unix-socket fixture fits macOS's 104-byte sun_path field. Only the prefix and an explanatory comment change; production behavior and assertions do not.

The next exact-head run exposed an inherited core-ingress lint failure (703 counted lines against 700). The approved cleanup reuses the existing isStopped() owner in three adjacent catch guards, preserving disposal/abort/settled short-circuit order and the unchanged finally release. It removes six production lines without changing queue, retry, cancellation, or timing policy. The identical type-aware lint command changed from failure to success at 697 lines; 85 tests across nine ingress/lifecycle/monitor files, core types, formatting, diff checks, and a fresh isolated Codex P0 review passed. All eleven earlier PR files are byte-identical to the previously published head.

The native pipe-test repair is tracked separately in #131409; our duplicate native test change was dropped. Only the CI documentation correction remains: one Swift invocation, parallel on automatic first attempts and serial on manual dispatches/reruns. Gateway repairs are owned upstream by #131515, #131545, and #131625. There is no Gateway or native source/test delta here, and no dependency, configuration, persistence, or cleanup-authority change.

Evidence

The original Gmail reproduction had 15 intended failures. Real-subprocess setup fixtures execute fake gcloud/gog binaries in isolated temporary state: login/watch failures retain both tails and termination metadata in 903/907-character errors, without writing config. ClawSweeper independently passed both fixtures. No authenticated Gmail, real login, or cloud-resource test is claimed.

The reconciled focused group passed 130 tests across eight files: utility 31, integration 2, operations 16, watcher 22, formatter 4, Git 37, shared binary owner 17, and skill-loading sibling 1.

OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/hooks/gmail-setup-utils.test.ts src/hooks/gmail-setup.integration.test.ts src/hooks/gmail-ops.test.ts src/hooks/gmail-watcher.test.ts src/process/command-error.test.ts src/infra/git-exec.test.ts src/shared/config-eval.test.ts src/skills/loading/config-binary.test.ts

The naive global-mock merge failed both real-probe cases; the scoped spy passed them. Substituting the actual pre-cache-fix owner made the creates-binary case fail again, with the missing-binary control passing; current production bytes were restored exactly. The 130-test proof predates the final mechanical import reconciliation with #131712; a fresh 31/31 utility run passed afterward.

Historical root proof was 721/720 red → 720 green. The later 130-test snapshot passed the actual guard with 7,752 roots assigned exactly once, owning shard 648/720, with no cap increase. Targeted owning types, formatting, lint, and guards passed. After the final mechanical rebase, the actual root guard passed again with 7,760 canonical roots and 648/720 in the owning shard; the owning typecheck also passed.

Brave's independently released 2,500ms DNS fault gave 3 failed/30 passed → 33 passed, with no request reaching a later mock after repair. OpenShell gave 1 failed/12 passed → 13 passed, reducing the observed socket path from 114 to 100 bytes. The corrected full extension-misc shard passed 68 files/1,259 tests on macOS 27/Node 26.7, preserving the repository's non-isolated execution and two workers. This used a task-only offline DNS preload and a verified sandbox permitting intended loopback while denying external network and the operator Gateway port; it is not an unmodified environment or Linux/Node 24 CI. An earlier task sandbox incorrectly denied intended loopback and that failed run is not counted as green. Exact scoped commands and local evidence bindings are in the existing proof comment.

Fresh isolated Codex reviews passed at P0 scope, with no actionable findings, before the meaningful Gmail resolution and the Brave/OpenShell commits. Review isolation and credential scanning remained intact. The final rebase changed only the upstream temp-helper/import integration; other commit patches and retained production/test bytes were verified unchanged.

Publication and gates

Head a350a364e8f188d6d47bb4305bfb67c81748a981; base 4d9187a6187447c7c6cbc316cbc2cd778ba1dd9b; tree 0a498b62950457e894d1d3511b15c5e262fea024. 12 files: production +40/-71 (net −31), tests +413/-92 (net +321), docs +3/-1.

Historical CI run 33158612333 failed the Brave shard and consequential aggregate gate; its root, dependency/dead-export, and type gates passed. The Brave failure is repaired locally as described above. A prior local Knip run reached its unchanged 600-second deadline and is not a pass.

Previous exact-head CI33164713331, on 9d2de7b239e637f26f7fa1012f62fe62ca4671d5, finished with 166 successful, 16 skipped, and 2 failed jobs: core lint and its aggregate gate. The previously failing Brave extension-config-5 job passed. The lint failure at src/channels/message/ingress-drain.ts:823:2 is addressed by the reviewed stop-guard cleanup above; no limit, suppression, or assertion changed.

Fresh exact-head CI passed: run33166000417 on a350a364e8f188d6d47bb4305bfb67c81748a981 completed with 168 successful jobs, 16 skipped, and zero failures; all 184 jobs are terminal. The aggregate gate98834714134, core-lint-4, and previously failing Brave extension-config-5 jobs passed. No prepare or merge has run. ClawSweeper's real-probe reconciliation/capacity requests are addressed. The single review-only refresh was already requested for the added test surface; this mechanical lint cleanup does not trigger another request. The latest actual ClawSweeper review (10:55 UTC, 5/6) found no blocking correctness/security issues and lists no remaining source changes. The mechanical ingress cleanup has its own clean P0 review. Parent merge verification remains required.

AI-assisted with Codex. No transcripts, live credentials, or operator resources are included.

@steipete steipete self-assigned this Aug 28, 2026
@clawsweeper

clawsweeper Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Aug 28, 2026
@steipete
steipete marked this pull request as ready for review August 28, 2026 04:03
@openclaw-barnacle openclaw-barnacle Bot added size: M maintainer Maintainer-authored PR labels Aug 28, 2026
@steipete

steipete commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Updated proof for head a350a364e8f188d6d47bb4305bfb67c81748a981, tree 0a498b62950457e894d1d3511b15c5e262fea024, based on 4d9187a6187447c7c6cbc316cbc2cd778ba1dd9b.

Current state: published; exact-head CI passed. No prepare or merge has run. Twelve files: production +40/-71 (net −31), tests +413/-92 (net +321), docs +3/-1. Gateway/native source and test diffs are empty.

Gmail uses the shared process diagnostic owner, retaining bounded stdout/stderr tails and recorded termination metadata without changing successful output or auth/install/provisioning/retry decisions. The original reproduction had 15 intended failures. Real subprocess login/watch fixtures run 2/8 fake commands, retain both tails in 903/907-character failures, and leave config unchanged. ClawSweeper independently passed both fixtures. This is isolated fake-command proof, not authenticated Gmail or cloud proof.

Gmail reconciliation: all 31 utility cases remain, including both upstream real filesystem/cache probes. A naive global-mock merge produced the expected two failures (installer 0 and missing-binary false success); the scoped actual-owner spy passed. The creates-binary case still failed against the actual pre-cache owner 2d625dad30e168133a9d6d4491ab2c2bc8b97efa, with the missing-binary control passing; current production bytes were restored exactly. Main's later #131712 temp-helper change was retained through a mechanical import conflict; its two cases are byte-identical to current upstream, and 31/31 utility tests passed again afterward.

OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/hooks/gmail-setup-utils.test.ts -t 'ensureDependency binary availability'
OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/hooks/gmail-setup-utils.test.ts
OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/hooks/gmail-setup-utils.test.ts src/hooks/gmail-setup.integration.test.ts src/hooks/gmail-ops.test.ts src/hooks/gmail-watcher.test.ts src/process/command-error.test.ts src/infra/git-exec.test.ts src/shared/config-eval.test.ts src/skills/loading/config-binary.test.ts
node --import ./scripts/tsx.mjs scripts/check-tsgo-core-boundary.mts
node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.plugins-platform.json --noEmit
node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.services.json --noEmit

The full focused group passed 130 tests in eight files/five sequential shards before the final mechanical rebase. The utility 31 rerun, root guard, and owning typecheck passed after it. Historical capacity proof was 721/720 red → 720 green; the subsequent reconciliation guard assigned all 7,752 roots exactly once with 648/720 in the owning shard. After the final mechanical rebase, the guard passed again with 7,760 canonical roots assigned exactly once and 648/720 in the owning shard. No cap was raised. Formatting, lint, and applicable guards passed.

Brave and OpenShell: the exact Brave test patch from 697040a81eeb26a8ea947cec01b544125c3d98c0 in #128127 is included with provenance; no Gateway code from that PR was taken. Cancelling inside the transport after listener installation and awaiting rejection prevents the old one-second poll from abandoning requests during DNS/runtime preparation. The same independently released 2,500ms DNS fault produced 3 failed/30 passed → 33 passed, with no request entering a later mock after repair. OpenShell's shorter existing temp prefix reduced the observed socket path from 114 to 100 bytes: 1 failed/12 passed → 13 passed. The SDK header and compiled probe confirmed the 104-byte field. No production code, deadlines, or assertions changed.

The corrected owning extension-misc shard passed 68 files/1,259 tests, including Brave 33, OpenShell 13, OTEL and Searxng. Exact command:

OPENCLAW_VITEST_MAX_WORKERS=2 \
OPENCLAW_VITEST_FS_MODULE_CACHE_PATH=/tmp/gmail-brave-fix-r95c4pcv/fs-cache \
NODE_OPTIONS='--import /tmp/gmail-brave-fix-r95c4pcv/shard-offline-preload.mjs' \
sandbox-exec -f /tmp/gmail-brave-fix-r95c4pcv/loopback-verified.sb \
node scripts/run-vitest.mjs run \
  --config /tmp/gmail-brave-fix-r95c4pcv/vitest.config.ts

node scripts/check-changed.mjs -- \
  extensions/brave/src/brave-web-search-provider.test.ts \
  extensions/openshell/src/mirror.test.ts

This was macOS 27/Node 26.7 proof with a task-only offline DNS preload and sandbox, not Linux/Node 24 CI or an unmodified environment. The temporary config imports the current repository shard configuration, retaining non-isolation, two workers, and deadlines. An earlier sandbox incorrectly denied intended loopback and its 34 failures are not counted as green. The corrected profile was behaviorally verified with owned IPv4/IPv6 listeners, blocked numeric non-loopback destinations, and equivalent protected-port rules exercised only on owned ports. The actual operator Gateway port was never probed; no host ACL changed.

Local evidence: /tmp/gmail-fixture-reconciliation-binding.json, /tmp/gmail-final-rebase-utility.log, /tmp/gmail-final-root-guard.log, and /tmp/gmail-brave-fix-r95c4pcv/final-proof-binding.json with independent-red.log, independent-green.log, openshell-red.log, openshell-green.log, extension-misc-corrected.log, and changed-final-gates.log. These local paths are provenance references, not public downloads. The reviewed Brave/OpenShell diff SHA256 is 8313674ad52cf18128956fdda2bbea9ba2393c0f48cd803ae3cccdc40e20683e; Brave blob 3ae67db8f4862497b64e7e20c70caa286c7b5221 exactly matches the canonical commit. Owned proof resources are stopped/cleaned.

Isolated Codex P0 reviews passed, no actionable findings, before the meaningful Gmail resolution and Brave/OpenShell commits. Normal reviewer sandbox/credential scanning remained intact. The final rebase preserved those patches except upstream temp-helper/import integration; no redundant review of unchanged bytes was run.

Historical CI 33158612333 had 166 success/16 skipped/2 failed jobs: Brave's cancellation/cache shard and the consequential aggregate. Root/dependency/dead-export/types passed there, but those are not new-head gates. A previous local Knip 600-second timeout is not a pass. The old conflict and Brave failure are repaired locally; fresh hosted CI remains mandatory. No historical Gateway Testbox or native 18-test result is presented as proof of this patch.

The latest ClawSweeper reconciliation/capacity requests are addressed; green exact-head CI and parent merge verification remain. One review-only refresh was already requested for the added test surface: #131502 (comment). No repeat request for the mechanical lint cleanup. Canonical native work remains separate in #131409. No live Gmail/provider credentials or operator Gateway resources were used.

The subsequent CI33164713331 on 9d2de7b239e637f26f7fa1012f62fe62ca4671d5 finished with 166 success/16 skipped/2 failed, all 184 jobs terminal. The failures were check-lint-core-4/job98827393767 and the consequential aggregate 98830338706. The Brave extension-config-5 job 98827396356 passed. Core lint reported 703 lines in the inherited ingress owner against 700.

Ingress lint cleanup, commit a350a364e8f188d6d47bb4305bfb67c81748a981: reuse the existing isStopped() guard and retain the adjacent settled check. Disposal, abort, and settled short-circuit order and finally root-work release are unchanged. Six production lines removed; no imports/exports, queue/retry/timing/cancellation policy, limit, or suppression changes. All previous eleven PR-file bytes are unchanged.

The same type-aware lint command failed at 703 and passed at 697. Core types, format/diff, and 85 tests/nine files passed in 14.22s; fresh isolated Codex P0 review passed with no findings and normal sandbox/credential scanning. Installed Node AbortSignal types and native getter behavior were checked for boolean equivalence. Exact commands:

node scripts/run-oxlint.mjs --type-aware --tsconfig config/tsconfig/oxlint.core.json src/channels/message/ingress-drain.ts
node scripts/run-tsgo.mjs -p tsconfig.core.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core.tsbuildinfo
OPENCLAW_VITEST_MAX_WORKERS=16 node scripts/run-vitest.mjs   src/channels/message/ingress-drain.test.ts   src/channels/message/ingress-drain.cancellation.test.ts   src/channels/message/ingress-drain.debounce-failure.test.ts   src/channels/message/ingress-drain.watchdog.test.ts   src/channels/message/ingress-drain-lanes.test.ts   src/channels/message/ingress-drain-lifecycle.test.ts   src/channels/message/ingress-drain-supersede.test.ts   src/channels/message/ingress-retry-policy.test.ts   src/channels/message/ingress-monitor.test.ts

Local evidence: /tmp/gmail-land-ingress-lint-result.md, /tmp/gmail-ingress-lint-red.log, /tmp/gmail-ingress-lint-green.log, /tmp/gmail-ingress-line-count.log, /tmp/gmail-ingress-tests.log, /tmp/gmail-ingress-tsgo-core.log, /tmp/gmail-ingress-autoreview.log. These are local provenance paths, not public downloads. Fresh hosted CI for the new head has now passed; no old run is counted as new-head proof.

Final exact-head CI: run33166000417, head a350a364e8f188d6d47bb4305bfb67c81748a981, completed successfully: 168 successful/16 skipped/0 failed, all 184 jobs terminal. Aggregate gate98834714134, core lint98831656819, dependencies98831656901, and previously failing extension-config-5/job98831659301 passed. macos-swift was skipped; no new Swift proof is claimed.

The rollup watcher separately encountered a cancelled ClawSweeper Dispatch job98831770304. That was auxiliary review publishing, not a CI payload failure; another dispatch succeeded and no repeated review request was posted. The latest actual review 5448425746 (10:55 UTC, on 9d2de7b) rates 5/6, finds no blocking correctness/security defect, independently passes both fake-command subprocess fixtures, and lists no Before merge source items. The subsequent mechanical ingress cleanup has its fresh P0 review. Final landing remains the parent's decision; prepare/merge have not run.

@clawsweeper

clawsweeper Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 7:17 AM ET / 11:17 UTC.

ClawSweeper review

What this changes

Routes Gmail setup and watch-registration failures through shared bounded diagnostics, adds subprocess and decision-path regressions, and includes small test and CI-documentation corrections.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

The branch is technically sound on the reviewed head: Gmail setup and watcher failures now use the shared bounded formatter while preserving existing setup, provisioning, and renewal decisions. No introduced correctness or security defect was found; keep it open for exact-head CI and an authorized maintainer landing decision.

Priority: P2
Reviewed head: a350a364e8f188d6d47bb4305bfb67c81748a981
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) PR readiness rating was derived from proof quality, review findings, security review, and reviewer confidence.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): ClawSweeper live verification passed on the reviewed terminal surface.
Patch quality 🦀 challenger crab (6/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): ClawSweeper live verification passed on the reviewed terminal surface.
Evidence reviewed 7 items Reviewed PR identity: The local reviewed head is a350a36 with pinned merge base 4d9187a.
Shared formatter owns the repair: The formatter strips terminal control text, retains bounded final output, and records exit/termination facts for both stderr and stdout.
Gmail callers retain their behavior: The watcher logs formatted command failures and still continues to start serving and schedule renewals after registration failure.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs src/hooks/gmail-setup.integration.test.ts

Result: PASS (completed)

[test] starting test/vitest/vitest.hooks.config.ts

 RUN  v4.1.11 /tmp/clawsweeper-live-proof-131502-OC1joA/target

stdout | src/hooks/gmail-setup.integration.test.ts › Gmail setup diagnostics through real command execution › propagates a bounded login failure without writing
 config
fixture login: 2 commands; error chars=903; stdout tail=true; stderr tail=true; exit metadata=true
fixture login diagnostic: gcloud auth login failed (code=7, termination=exit)

 ✓  hooks  src/hooks/gmail-setup.integration.test.ts › Gmail setup diagnostics through real command execution › propagates a bounded login failure without writi
ng config 417ms
stdout | src/hooks/gmail-setup.integration.test.ts › Gmail setup diagnostics through real command execution › propagates a bounded watch failure without writing
 config
fixture watch: 8 commands; error chars=907; stdout tail=true; stderr tail=true; exit metadata=true
fixture watch diagnostic: gog gmail watch start failed (code=7, termination=exit)

 ✓  hooks  src/hooks/gmail-setup.integration.test.ts › Gmail setup diagnostics through real command execution › propagates a bounded watch failure without writi
ng config 934ms

 Test Files  1 passed (1)
      Tests  2 passed (2)
   Start at  11:18:04
   Duration  11.45s (transform 7.99s, setup 1.05s, import 8.67s, tests 1.35s, environment 0ms)

[test] passed 1 Vitest shard in 18.68s

























Assertions:

  • PASS expect_output: fixture login:
  • PASS expect_output: fixture watch:

How this fits together

Gmail setup and the Gmail watcher run local helper commands, then surface failures to operators through setup errors or logs. The shared process formatter turns their command results into bounded, readable diagnostics without changing the command outcome.

flowchart LR
  A[Gmail setup or watcher] --> B[Local helper command]
  B --> C[Command result]
  C --> D[Shared diagnostic formatter]
  D --> E[Setup error or watcher log]
  E --> F[Operator troubleshooting]
Loading

Decision needed

Question Recommendation
Should this maintainer-labelled PR land after the required checks for a350a36 are green? Land after exact-head CI: Merge once all required checks for the reviewed head are green, since the code review found no introduced defect.

Why: The protected maintainer label and incomplete exact-head CI require an authorized human landing decision rather than automated closure or merge.

Before merge

  • Resolve merge risk (P1) - Required CI for a350a36 is still incomplete, so merge readiness is not yet established.
Agent review details

Security

None.

PR surface

Source -31, Tests +321, Docs +2. Total +292 across 12 files.

View PR surface stats
Area Files Added Removed Net
Source 5 40 71 -31
Tests 5 413 92 +321
Docs 2 3 1 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 12 456 164 +292

Review metrics

Metric Value Why it matters
Production versus test delta production +40/-71; tests +413/-92; docs +3/-1 Production is net-negative through shared-owner consolidation; added tests cover subprocess output and Gmail decision boundaries.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #131478
Summary: This PR is the candidate repair for the canonical Gmail diagnostic issue; related formatter and fixture PRs are supporting history rather than competing fixes.

Members:

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

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain the single shared formatter and land only after required exact-head CI is green, preserving the existing Gmail decision paths and focused regression coverage.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain the single shared formatter and land only after required exact-head CI is green, preserving the existing Gmail decision paths and focused regression coverage.

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

Yes: the integration fixture runs Gmail setup against temporary fake gcloud and gog executables, drives login and watch failures, and verifies bounded readable errors with unchanged config; it needs no Gmail credentials or cloud resources.

Is this the best way to solve the issue?

Yes: reusing the shared process formatter removes Gmail-specific rendering while leaving each caller's established success, auth, provisioning, and renewal decisions intact.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 640d73e3d452.

Labels

Label justifications:

  • P2: This is a bounded repair to operator-visible Gmail setup diagnostics without evidence of a broad outage, data loss, or security bypass.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦀 challenger crab.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): ClawSweeper live verification passed on the reviewed terminal surface.
  • proof: sufficient: Contributor real behavior proof is sufficient. ClawSweeper live verification passed on the reviewed terminal surface.

Evidence

What I checked:

  • Reviewed PR identity: The local reviewed head is a350a36 with pinned merge base 4d9187a. (a350a364e8f1)
  • Shared formatter owns the repair: The formatter strips terminal control text, retains bounded final output, and records exit/termination facts for both stderr and stdout. (src/process/command-error.ts:6, 62966ff2278b)
  • Gmail callers retain their behavior: The watcher logs formatted command failures and still continues to start serving and schedule renewals after registration failure. (src/hooks/gmail-watcher.ts:43, 62966ff2278b)
  • Behavioral regression coverage: The integration test runs setup against temporary executable files, exercises login and watch failures, checks bounded clean output from both streams, and verifies config is unchanged. (src/hooks/gmail-setup.integration.test.ts:8, 62966ff2278b)
  • Documentation matches CI and runtime: The webhook documentation describes bounded diagnostics and sensitive-output handling; the Swift CI text matches the workflow's first-attempt parallel and rerun/manual serial selection. Public docs: docs/cli/webhooks.md. (docs/cli/webhooks.md:97, a350a364e8f1)
  • Current-main necessity check: The repair commit is not an ancestor of fetched main 640d73e, so current main does not already contain this PR's central formatter repair. (640d73e3d452)

Likely related people:

  • steipete: Current formatter and Gmail repair history attributes the relevant commits to Peter Steinberger, whose repository handle is steipete. (role: shared formatter and Gmail-area contributor; confidence: high; commits: b29f97590b05, 62966ff2278b; files: src/process/command-error.ts, src/hooks/gmail-setup-utils.ts, src/hooks/gmail-ops.ts)

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 (6 earlier review cycles)
  • reviewed 2026-08-28T04:10:45.503Z sha cf85191 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-28T04:39:30.431Z sha cf85191 :: needs real behavior proof before merge. :: [P1] Rebalance test roots before merging
  • reviewed 2026-08-28T05:27:54.519Z sha cf85191 :: found issues before merge. :: [P1] Rebalance test roots before adding these Gmail tests
  • reviewed 2026-08-28T09:24:03.079Z sha 5447698e3271323dc6c521149cd6d8c0bb056cd9 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-28T10:07:10.715Z sha 5447698e3271323dc6c521149cd6d8c0bb056cd9 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-28T10:55:08.938Z sha 9d2de7b :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: needs maintainer proof decision A ClawSweeper-authored PR needs a maintainer proof capture or override decision. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. proof: sufficient ClawSweeper judged the real behavior proof convincing. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: needs maintainer proof decision A ClawSweeper-authored PR needs a maintainer proof capture or override decision. labels Aug 28, 2026
@steipete
steipete force-pushed the steipete/jovial-mendel-06df0f branch from cf85191 to 5447698 Compare August 28, 2026 09:15
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 28, 2026
The in-flight cancellation fixture polled for fetch within one second, but
first-use runtime and DNS preparation can exceed that deadline. The first
case then exited without aborting or awaiting its request, leaking it into
the next case's global fetch mock (CI run 33118704789).

Abort from the existing mocked transport after its listener is registered,
await terminal rejection, and retain exact call-count and aborted-signal
assertions. No production behavior, timeout, or SDK mock changes.

(cherry picked from commit 697040a81eeb26a8ea947cec01b544125c3d98c0)
The wrapper's canonical macOS temp root makes the nested socket fixture
exceed the 104-byte sockaddr_un.sun_path field, failing at listen before
mirror reconciliation. Shorten the existing temporary-directory prefix
without changing the socket name, assertions, cleanup, or production code.
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The Gmail utility conflict is reconciled with real binary probes preserved and the unchanged root cap passing. Head 9d2de7b239e637f26f7fa1012f62fe62ca4671d5 also includes reviewed test-only Brave cancellation and OpenShell socket-path repairs beyond the prior review surface. Please refresh the review; exact-head CI is being tracked. This is a review-only request, not repair or automerge.

@clawsweeper

clawsweeper Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete merged commit ca59305 into main Aug 28, 2026
245 of 247 checks passed
@steipete
steipete deleted the steipete/jovial-mendel-06df0f branch August 28, 2026 11:33
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 29, 2026
* fix(gmail): keep setup command failures readable

* test(gmail): consolidate setup diagnostics coverage

* docs(ci): clarify Swift test execution policy

* test(brave): cancel requests at the transport boundary

The in-flight cancellation fixture polled for fetch within one second, but
first-use runtime and DNS preparation can exceed that deadline. The first
case then exited without aborting or awaiting its request, leaking it into
the next case's global fetch mock (CI run 33118704789).

Abort from the existing mocked transport after its listener is registered,
await terminal rejection, and retain exact call-count and aborted-signal
assertions. No production behavior, timeout, or SDK mock changes.

(cherry picked from commit 697040a81eeb26a8ea947cec01b544125c3d98c0)

* test(openshell): keep mirror socket fixtures within platform limits

The wrapper's canonical macOS temp root makes the nested socket fixture
exceed the 104-byte sockaddr_un.sun_path field, failing at listen before
mirror reconciliation. Shorten the existing temporary-directory prefix
without changing the socket name, assertions, cleanup, or production code.

* refactor(channels): reuse ingress stop guard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation extensions: brave extensions: openshell maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: L 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.

Gmail setup failures lose useful diagnostics and termination reasons

1 participant