Repository navigation
fix(transcripts): report auto-start shutdown warnings - #131381
Conversation
Configured captures now report failed summary exports and provider-stop warnings while preserving saved notes and sibling cleanup. Refs #131375.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Land-ready verification for 8b0ccce561016e93aa90cf50ec28bf6715bb7acf. The root cause is the auto-start lifecycle consumer discarding fulfilled stop results. The repair replaces that catch-only path with one diagnostic reporting flow for export warnings, provider-stop warnings, and rejections. Saved notes remain successful, lifecycle ownership/skips and sibling cleanup are preserved, and logs contain bounded/redacted diagnostics rather than transcript or summary payloads. Best-fix verdict: the lifecycle owner is the correct boundary; neither storage-level logging nor converting export degradation into rejection would preserve these semantics. Observed before/after: after normal capture and a persisted utterance, a real file obstruction at the export-directory path causes native Completed validation:
Exact focused commands: node scripts/run-vitest.mjs src/agents/tools/transcripts-tool.auto-start.test.ts src/agents/tools/transcripts-tool.test.ts src/agents/tools/transcripts-tool.import.test.ts src/agents/tools/transcripts-tool.account-ownership.test.ts src/transcripts/store.test.ts src/cli/program/register.transcripts.test.ts src/meeting-bot/transcripts-bridge.test.tsnode scripts/run-vitest.mjs src/agents/tools/transcripts-tool.auto-start.test.tsnode scripts/check-changed.mjs -- src/agents/tools/transcripts-tool.ts src/agents/tools/transcripts-tool.auto-start.test.ts docs/cli/transcripts.mdnode scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/agents/tools/transcripts-tool.auto-start.test.ts src/agents/tools/transcripts-tool.tsnode_modules/.bin/oxfmt --check src/agents/tools/transcripts-tool.ts src/agents/tools/transcripts-tool.auto-start.test.ts docs/cli/transcripts.mdgit diff --checkpnpm buildProduction LOC: +36/-13 (net +23); tests: +229/-0; docs: +12/-4 (net +8). The production growth implements the two missing fulfilled-warning outcomes and shared safe diagnostic rendering; no generic framework or parallel lifecycle was introduced. Proof limits: the real in-process lifecycle/store/log boundary was exercised with a fixture external provider, not a live Discord/meeting connection, Gateway service, UI, or Windows execution. No external provider API changed. The completed ClawSweeper review has now been checked; its before-merge items are addressed below. Existing thrown-provider retry ownership and the aggregate Gateway shutdown warning summary remain separate follow-ups. Storage/schema, transcript ID admission, fs-safe classification, dependencies, and live operator gateways are unchanged. Completed ClawSweeper follow-through: The exact-head review reports no actionable correctness or security findings. There is no separate Rank-up moves list; both before-merge items are resolved here. The +23 production lines are accepted for the two existing structured warning classes and shared safe diagnostic rendering. The review's stored-data detector does not describe a persistence change in this diff: only diagnostic imports/formatting and the auto-start result consumer changed in production. Canonical writes, schema, stored shapes, manual result fields, and export ownership remain unchanged, so no migration is required or introduced. Its verification runner reported a failed output expectation because the command did not print the exact describe-title string |
|
Codex review: needs maintainer review before merge. Reviewed August 27, 2026, 9:51 PM ET / August 28, 2026, 01:51 UTC. ClawSweeper reviewWhat this changesThe PR logs safe, actionable warnings when configured transcript auto-start shutdown preserves a summary but cannot export it, or when a provider returns a stop warning. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep this focused member-authored repair open for ordinary maintainer review. The introduced result-handling path restores warnings that current main discards, and no blocking correctness defect was found. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherConfigured transcript auto-start creates capture sessions during Gateway startup and stops them during Gateway shutdown. Stopping persists the canonical summary in SQLite, optionally exports files, and reports recoverable problems through the Gateway logger. flowchart LR
A[Configured capture] --> B[Auto-start lifecycle]
B --> C[Stop active session]
C --> D[Persist summary in SQLite]
C --> E[Provider stop result]
D --> F[Optional artifact export]
E --> G[Safe operator warning]
F --> G
Before merge
Agent review detailsSecurityNone. PR surfaceSource +23, Tests +229, Docs +8. Total +260 across 3 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Merge the single lifecycle reporting flow after exact-head checks complete; its positive production delta is justified by preserving two structured warning classes while using existing redaction and terminal-safety helpers. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main's catch-only loop drops fulfilled result details, and the submitted regression fixture exercises the real service, SQLite store, filesystem export, and logger boundary. Is this the best way to solve the issue? Yes. Consuming the existing structured result at the auto-start lifecycle owner avoids changing persistence, provider contracts, or the manual tool path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b82dae06c9bb. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Configured captures now report failed summary exports and provider-stop warnings while preserving saved notes and sibling cleanup. Refs openclaw#131375.
Closes #131375 (transcript auto-start shutdown warning loss).
What Problem This Solves
Fixes an issue where operators using configured transcript auto-start captures would receive no warning when shutdown saved meeting notes but failed to export their files. The same unattended stop path also discarded fulfilled provider-stop warnings.
Why This Change Was Made
Refactor the existing auto-start stop loop into one result/error reporting flow. Consume the existing structured warning fields rather than discarding fulfilled tool results; reuse the existing logger with redacted, escaped, bounded diagnostic values. Export warnings distinguish a saved summary from a failed artifact, label the intended path, and explain how to retry after correcting the destination.
Canonical summary persistence remains successful, healthy sibling captures still finish, and intentional skipped ownership outcomes remain quiet. The manual tool result, lifecycle/stop tokens, storage/schema, transcript ID admission, fs-safe classification, provider cleanup/retry policy, and Gateway shutdown ordering are unchanged. No new configuration, dependency, or public API is introduced.
User Impact
Operators now get actionable warnings in the normal Gateway logging surface instead of discovering missing exported summaries later. Notes remain durable when export fails, and warning logs do not include transcript or summary payloads. The transcripts CLI documentation now explains this distinction and explicit export recovery.
Evidence
AI-assisted implementation with direct owner/caller/sibling inspection and an independent Codex autoreview; no accepted/actionable findings from the blocking review pass.
ENOTDIRexport obstruction, SQLite close/reopen, and the actual subsystem file logger. Summary durability, unchanged obstruction, sibling continuation, repeated stop, manual result fields, and warning delivery were verified. All task-owned state and database handles were cleaned up.git diff --checkpassed.check-changedrun passed without skipped guards: production types, all 14 core test type graphs, changed-file lint/format, unused-export scans, plugin boundaries, schema/storage guards, runtime-loader checks, and import cycles. Initial test-only type/lint compatibility errors were repaired using existing helpers and supported assertions, without compiler, guard, dependency, or baseline changes. The final path-quoting assertion and documentation clarification were separately rechecked with the focused seven-case suite, typed lint, formatting, and diff checks.pnpm buildpassed all phases, including CLI bootstrap, plugin SDK exports, and Control UI sidecar/budget checks. No ineffective dynamic import warning was emitted; runtime source was unchanged by subsequent test/docs refinements.Focused command:
Observed transcript warning progression (isolated paths abbreviated):
Production LOC: +36/-13 (net +23). Tests: +229/-0. Docs: +12/-4 (net +8). The old catch-only reporting path is replaced rather than retained. Production growth implements the missing two-stage lifecycle warning reporting and bounded/redacted rendering; no unrelated deletion was used to reduce the count.
Proof boundary: the real in-process lifecycle/store/log sink was exercised with a fixture external provider; no real Discord/meeting connection, live Gateway service, or UI was used. No external provider API changed. The existing rejected-provider-stop cleanup-retention behavior and aggregate Gateway shutdown warning summary remain separate follow-ups, not changes in this PR.
Release-note context: transcript auto-start shutdown now reports failed summary exports and provider-stop warnings while preserving saved notes and continuing sibling cleanup.