Skip to content

fix(discord): preserve meeting logs through voice reconnects - #130860

Closed
steipete wants to merge 1 commit into
mainfrom
fix/discord-meeting-capture-9cf5e2
Closed

steipete wants to merge 1 commit into
mainfrom
fix/discord-meeting-capture-9cf5e2

Conversation

@steipete

@steipete steipete commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Split landing status (2026-09-07 UTC)

The reviewed implementation has landed through seven focused successors. This original PR is closed as superseded; its original head 8eb2d87c7215cea96fcb1561d5a7f43f3f349cdd and branch are preserved as historical context. The final successor implements the explicitly approved fixed-ID and legacy-history policy below.

Merged through the native maintainer workflow with green required CI:

  • #139484: processing-owned WAV cleanup, including rejected predecessor queues. Merge 91bcdd409803131e84a754bb078b9fd1e0fe5603.
  • #139572: transcript-domain capture ownership, failed-provider-stop cleanup, callback/retry fencing, and bounded model-visible handles. Merge e8c344525327e565678d03743ff7cadd2f7bd6ef.
  • #139658: independent Discord recording and conversation ownership, source replacement, bounded processing, and receipt-bound compatibility for realtime-only setups. Merge c6ef1f277e8b9466f051a7afe0c8224f46ec7323.
  • #140044: isolate Serve hello lifecycle assertions from the separately tested RPC inventory. Merge 4ec026a5bfc8946d57430453ca5c4ddb93a0b449.
  • #139875: authorized archive/status APIs, canonical SQLite paging/search, complete exports, provider metadata, and title-only configuration refresh. Legacy dates retain raw identity and unpaged clients keep their shipped 2,000-utterance window. Merge 3f123833e455f66fbec87553d08abed784e58aa2.
  • #140084: searchable Meetings library, summary/transcript reader, complete downloads and native capture settings. Independent summary reads preserve larger saved notes and valid downloads when speech paging exceeds its byte limit. Merge 6ce5c1df3e0f6d87d7f353a20bdf3000d0d442eb.
  • #140563: immutable capture ID origin, preserved fixed/unknown legacy history, and generated-only reopening of the newest candidate. Merge 44f047f9b608fab89ef32a8042a0278d5bae17e0.

The split removes coupled recording/conversation lifetimes and keeps stale transcription work from reaching replacement captures. Archive compatibility and UI summary access were repaired at their owners without weakening byte limits, assertions, CI gates or performance budgets. The approved ID-origin policy is implemented in existing metadata. No schema, index, configuration option or protocol/package version was added.

Live proof used isolated actual Gateways, SQLite and Chromium with synthetic data. The 55-session/310-utterance browser flow covered paging, search beyond loaded speech, deep links, stored notes, native source editing, title-only configuration apply and mobile navigation. Markdown/JSONL native downloads matched their RPC bytes. The final large-summary proof verified a 2,623,030-byte selector-only result, the unchanged 1 MiB page rejection, readable bounded preview, a 1,311,399-byte native download preserving all canonical notes, and ordinary 50+10-row paging. Its 58 source hashes bind the UI/runtime owners to the final candidate; exact-head CI separately validates the repository. Inspected before/after and regression media are attached to #140084.

The Gateway agent/tool/Discord-owner fixture separately proved capture, independent recording, stop, late-STT exclusion, a second capture and WAV cleanup with synthetic channel/model dependencies. Authenticated synthetic OpenAI speech generation and the real batch-transcription pipeline also passed. No new external Discord room conversation is claimed. Archive proof covered offset-date cursors, full-text modern paging, independent speaker IDs and the preserved legacy window. The relocated capture test passed; its wrapper's ANSI-summary parsing error is explicitly qualified in #139875.

CI exposed timezone and UI fixture assumptions, which were corrected without relaxing checks. Archive CI passed after one exact-job retry of an unchanged Android readiness race; final UI CI passed after the intended subtitle expectation and large-summary compatibility repair. All task-owned live-proof leases are stopped. The final history-policy successor passed 103 focused cases, core types, the full changed-code gate and independent P0–P2 review. Nine regressions failed before repair. Exact-head CI passed on f69ef976d1b40eabeec85f91e1a35133d89a7734. Its isolated live proof used three actual Gateway processes sharing fresh SQLite state and production archive WebSocket RPCs. Generated history reopened in place; supplied/generated-looking and absent/invalid legacy histories started fresh without changing prior notes; a newer ineligible row blocked fallback to older generated history. All 59 frozen source hashes and the expected ten final rows were verified. Provider occupancy and text were synthetic. An initial HTTP-tool harness failed before policy validation; the supported Gateway lifecycle/RPC proof passed without changing product authorization. The proposal and historical candidate evidence below are retained as context, not as the source or proof of these merged successors.

Accepted design: fixed IDs and legacy reopening

Accepted by @steipete on 2026-09-07 and implemented in merged #140563. Approval: “Approve starting fresh when a legacy capture’s ID origin is unknown.” The approved scope is the policy below, including preserving legacy records and using the existing metadata store without schema, index, configuration, or version changes. The already agreed rule is that a fixed custom ID admits one new capture per UTC day and its consumed history must not be silently reopened or replaced. Review found that changing a source from fixed-ID capture to generated occupancy capture could select and reopen that fixed archive; #140563 repairs that selection boundary.

Before #140563, the session descriptor did not record whether its ID was supplied or generated. Provider/source identity, titles, timestamps, current configuration, and ID spelling cannot establish that missing fact. Main also explicitly documents continuing a generated meeting across a Gateway restart within ten minutes. Consequently, preserving all legacy reopening and guaranteeing that no legacy fixed archive reopens are not simultaneously possible from the stored information.

Implemented behavior

Record an immutable ID-origin fact at the native admission owner in the existing session metadata. Live starts and new tool imports must derive it from the actual supplied-versus-generated choice; configured capture must carry that fact before it replaces the raw argument with its selected ID. Provider output and utterance text must not establish it. Retain the recorded fact through retries, title edits, stopping, and reopening.

Keep the current source/window query, ordering, and newest-row selection unchanged. Reopen the selected newest row only when its origin positively establishes generated admission and the existing ownership checks pass. Do not skip a newer fixed or unknown capture to extend an older meeting. Current fixed-ID configuration continues through its normal new-admission/conflict path without substitution.

For legacy rows with missing or invalid origin, leave the archive unchanged and readable, and start a fresh generated capture when the configuration requests generated mode. Do not backfill by guessing from ID shape or current configuration. Accepted tradeoff: some genuinely generated legacy meetings will split at upgrade/restart instead of reopening. No recorded notes are deleted or rewritten.

Store and rollout boundaries

The existing SQLite session metadata remains canonical. No new table, column, index, schema/protocol/package version, retention rule, or transaction/locking mechanism is proposed. Store the origin with the existing admission write, not a second asynchronous write. Existing source/window query cost and ordering remain unchanged.

Operator-controlled Doctor restoration already preserves complete descriptors and verifies them. Preserve an explicitly recorded origin through that existing metadata roundtrip; an absent or invalid origin stays unknown. New text imports record their actual new admission choice, not a claim extracted from transcript content. Public Markdown/JSONL content downloads do not become descriptor backups and need no new authority-bearing field.

Older runtimes can read the metadata, but they do not enforce this distinction. Rolling back the runtime therefore also rolls back the fixed-history protection; the metadata alone is not a rollback safety guarantee. No automatic migration or destructive backfill is proposed.

Completed validation covers fixed-to-generated switching, generated-looking fixed IDs, generated reopening across database and Gateway restarts, newest-fixed-or-unknown versus older-generated history, admission/retry/title/finalization preservation, and actual Doctor export/restoration. The independent failed-provider-stop cleanup finding is fixed in #139572. Runtime/UI proof, inspected media, exact-head CI and native landing gates are recorded in the successor PRs.

This proposal is recorded under the material persistence-change checkpoint. Relevant current code: occupancy selection, admission versus reopening, and the documented main restart contract.

The evidence below is the historical record for the preceding c3421dfc capture/readiness revision, not verification of the new candidate.


Original reported issue: #127426, which was already closed before these successor landings.

What Problem This Solves

Operators who explicitly enabled Discord meeting transcripts could lose capture after voice reconnects or account restarts, interfere with occupancy-controlled presence, or record only participants permitted to command the agent. Mixed realtime conversation finals lacked reliable per-speaker attribution. Automatically captured notes could also be invisible to the routed agent, and status withheld their actionable IDs from model-visible tool content.

Why This Change Was Made

The Discord transcript source now owns an exact account/guild/channel subscription independently of replaceable voice connections. One per-speaker PCM-to-batch-STT path supplies receiver identities, ingress timestamps, bounded uploads, processing-owned WAV cleanup and exact source-lifetime revocation. Removed paths include callback transfer, mixed realtime-to-durable publication, duplicate buffered decoding and timer-owned audio cleanup.

Configured capture resolves its normal channel-route owner after source-account resolution. Status exposes complete authorized capture IDs in bounded model content, while retaining full structured results. Voice promotion commits residency only after success, preserves surviving owners after failure, and keeps an already-ready recorder working during pending bootstrap/connect. Successful fresh joins and recovery reconcile already-speaking participants through the existing guarded receiver.

Manual caller/account authorization and historical ownership remain unchanged. Core stays provider-agnostic. No config key, dependency, protocol version, SQLite schema or storage format is added.

User Impact

Opted-in recording follows the existing voice.autoJoin/whenOccupied lifecycle and records participants without granting command or tool authority. Normal owner, wake-name, playback and tool policies remain intact. Standalone capture is silent; stopping it does not disconnect independently owned conversation. Stopped/replaced captures cannot append late utterances or redirect them to a replacement.

Recording remains explicit: voice.autoJoin alone does not enable it. Realtime conversation incurs additional batch STT while recording for correct speaker attribution. One capture can span multiple room occupations. Automatic per-meeting summaries and Discord posting are not added. See the Discord voice guide and transcripts guide.

Evidence

The maintainer proof comment contains exact commands, regression history, dependency evidence, review resolutions and deployment/CI status.

  • Regression-first proof covered source retirement, passive recording, continuous speech, source replacement, upload limits, WAV lifetime, command finalization, routed ownership and model-visible IDs.
  • Failed-promotion replay produced eight failures; pending-promotion recording separately failed twice before repair. The promotion/authorization/recovery suite passed 246 tests across 13 files.
  • Fresh-readiness reproduction produced six failures with zero subscriptions. The final readiness/capture/lifecycle/recovery suite passed 218 tests across 12 files, including 13 native-speaking-map readiness cases. Both scan/event orderings, cancelled/failed/replaced/emptied joins and no-capture modes are covered.
  • Full Discord shard after the real-I/O synchronization repair passed 3,021 tests across 234 files. Transcript status/ownership/storage/import/provider coverage passed 160 tests across 13 files. These are separate scoped runs, not an additive unique-test count.
  • Typed lint/typechecks, formatting, plugin boundaries and both cycle guards passed. Independent Codex reviews of the capture, status, promotion and readiness changes found no remaining actionable findings; the final review covered P0–P2.
  • The complete final build passed in 4m59.5s, with 341,196 B startup gzip under the unchanged 343,442 B ceiling and all 770 sidecars verified.
node scripts/run-vitest.mjs extensions/discord/src/voice/transcripts-readiness.test.ts extensions/discord/src/voice/transcripts-recording.test.ts extensions/discord/src/voice/transcripts-capture.test.ts extensions/discord/src/voice/transcripts-source.test.ts extensions/discord/src/voice/voice-session.startup.test.ts extensions/discord/src/voice/voice-session.lifecycle.test.ts extensions/discord/src/voice/voice-session.promotion.test.ts extensions/discord/src/voice/voice-auto-join.test.ts extensions/discord/src/voice/voice-receive.test.ts extensions/discord/src/voice/receive-recovery.test.ts extensions/discord/src/voice/capture-state.test.ts extensions/discord/src/voice/voice-following.test.ts --reporter=verbose
pnpm build

Initial CI exposed a concrete-manager type cycle and a one-second polling assertion around real large WAV I/O. Both were repaired at their owners, without weakening guards, extending timeouts or mocking success. A later boundary failure was fixed using the existing public deferred helper. An unrelated main textarea type error was repaired by canonical commit 8862a1746a5; fresh CI33069203610 then passed on the preceding head. Final-head CI33072836910 completed on c3421dfcb6b37a8c5a3f14848623d0cb51f3fb58: 125 jobs succeeded, 20 were skipped, and the artifact job plus aggregate gate failed. The remaining failure is plugins list --json startup RSS, 402.1 MB median against a 401 MB ceiling. Exact Linux artifacts/source identities are verified, but controlled measurement is blocked by unavailable Blacksmith Testbox authentication. No remote measurement ran, no budget or assertion has been weakened, and merge remains blocked.

An earlier inherited UI build-budget failure was resolved by a patch-identical rebase onto the already-landed custom-theme lazy-loading optimization, not a budget/baseline change or unrelated UI patch.

Live installation of the preceding production repair passed exact-build/plugin, health/channel, unchanged-policy and non-delivering agent checks. Configured capture restarted automatically. An actual transcripts/status tool response exposed a fresh generated handle to the model; the returned ID and routed owner matched durable state, without seeding the handle in the prompt. Final readiness head c3421dfcb6b37a8c5a3f14848623d0cb51f3fb58 is now deployed and passed the same actual-tool, automatic-restart and durable-owner checks. Its prepared transaction correctly waited for active work before cutover; no schema or permission change was used. No fresh human voice input was available on the headless verification host, so multi-speaker and injected-failure proof is explicitly boundary/regression evidence, not a claimed new live Discord conversation. A Gateway-backed synthetic WAV check separately verified the real batch-audio provider pipeline. No raw audio, meeting content, credentials or private operational identifiers are published.

Production LOC: +727/-406 (net +321). Tests/support: +2199/-654 (net +1545). Docs: +102/-5 (net +97). Test-support and moved lifecycle cases are not production growth. Added production surface implements source-lifetime authority, bounded per-speaker capture independent of command admission, actionable bounded status and correct promotion/readiness ownership. It reuses the existing recorder, route resolver, receiver and lifecycle instead of introducing parallel policy or storage.

Provenance

The replaceable-entry design was carried forward by the voice lifecycle split, authored and merged by @steipete on 2026-08-12. Its occupancy interaction became visible with occupied-room auto-join, authored and merged by @steipete on 2026-08-19. Automatic persistence and the agent-owner filter date to durable meeting transcripts, authored and merged by @steipete on 2026-07-23. Source-account binding, authored by @pgondhi987 and merged by @joshavant on 2026-08-15, tightened caller ownership; those checks are retained, not relaxed.

@clawsweeper

clawsweeper Bot commented Aug 27, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: discord Channel integration: discord agents Agent runtime and tooling size: XL maintainer Maintainer-authored PR labels Aug 27, 2026
@steipete
steipete marked this pull request as ready for review August 27, 2026 09:21
@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P2 Normal backlog priority 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. labels Aug 27, 2026
@clawsweeper

clawsweeper Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed September 6, 2026, 8:55 PM ET / September 7, 2026, 00:55 UTC.

ClawSweeper review

What this changes

The branch separates Discord recording from voice connections, adds searchable meeting archives and capture settings, and restricts reuse of custom capture IDs.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 17 items remain

Keep open for the explicitly approved fixed-ID/history repair. The merged successors cover substantial earlier work, but the preserved head still contains actionable defects and does not implement the accepted ID-origin policy. Maintainer ownership also precludes automatic closure.

Priority: P2
Reviewed head: 8eb2d87c7215cea96fcb1561d5a7f43f3f349cdd

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Substantial useful work and successor evidence remain, but the preserved implementation is not a safe landing candidate.
Proof confidence 🦐 gold shrimp (3/6) Needs stronger real behavior proof before merge: Authority-chain proof required: a landing candidate must preserve A's historical ownership and reject reassigned agent B before provider-stop or summary I/O. The reported Gateway/SQLite/Chromium successor runs provide useful evidence for their repaired paths, but do not validate this preserved head or the unimplemented ID-origin policy. Omitted body text remains unknown; no additional replay is required merely to retain this PR as a work record. 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 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: Authority-chain proof required: a landing candidate must preserve A's historical ownership and reject reassigned agent B before provider-stop or summary I/O. The reported Gateway/SQLite/Chromium successor runs provide useful evidence for their repaired paths, but do not validate this preserved head or the unimplemented ID-origin policy. Omitted body text remains unknown; no additional replay is required merely to retain this PR as a work record. 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 12 items Repository and introduced revision: Origin identifies openclaw/openclaw. The independently inspected delta is merge-base 57f1159 to the preserved head, not fetched-main versus head. The raw head record confirms that parent.
Accepted remaining scope: The captured PR body explicitly retains this PR for the fixed-ID/history implementation and records acceptance on September 7 of starting fresh for unknown legacy ID origins. It reports six merged successors while explicitly separating their proof from the preserved candidate. Captured body identity: f3bf837dd55d31a0c7fbee35c92ec811334fc3f7e2d6f40ba9a591998c903383.
Introduced ownership overwrite: The introduced route resolution supplies agentId during configured reopening, and descriptor construction overwrites existing metadata.agentId. Transcript tool selection uses that persisted agent to authorize stop and summarize; capture operations subsequently reach provider stop and summary generation.
Findings 7 actionable findings [P1] Preserve admitted ownership when reopening historical captures
[P2] Exclude consumed fixed captures from generated reopening
[P1] Extend the existing Meetings route instead of adding another reader
Security Needs attention Room reassignment overwrites historical capture authority: Configured reopening persists the newly routed agent over the admitted owner, and subsequent stop/summarize authorization consumes that value. Preserve A's ownership and reject B before provider-stop or summary I/O; approval of the ID-origin design does not approve this transfer.

How this fits together

Discord audio and configured room occupancy feed the transcript capture service, which saves meeting records in SQLite. Agent tools and the Control UI subsequently read, summarize, export, or stop those captures.

flowchart TD
  A[Discord audio and occupancy] --> B[Capture admission]
  C[Configured source and agent ownership] --> B
  B --> D{New or reopened capture}
  D --> E[SQLite meeting archive]
  E --> F[Agent transcript tools]
  E --> G[Meetings reader and downloads]
Loading

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: Authority-chain proof required: a landing candidate must preserve A's historical ownership and reject reassigned agent B before provider-stop or summary I/O. The reported Gateway/SQLite/Chromium successor runs provide useful evidence for their repaired paths, but do not validate this preserved head or the unimplemented ID-origin policy. Omitted body text remains unknown; no additional replay is required merely to retain this PR as a work record. 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.
  • Preserve admitted ownership when reopening historical captures (P1) - When a stopped room capture belongs to agent A and routing changes to B, the new configured-route resolution sets agentId to B and this spread overwrites A's stored ownership. canAccessTranscriptSession then permits B's stop/summarize operations and denies A. Preserve the admitted descriptor and reject mismatched reopening, as current main now does. This prior finding remains in the preserved head.
  • Exclude consumed fixed captures from generated reopening (P2) - After a fixed-ID capture stops, removing the configured ID makes this branch query recent history and reuse that fixed row as existingSession, bypassing new-admission conflict checking. Its consumed archive can receive new speech despite the stated fixed-ID guarantee. Implement the accepted immutable origin fact; fixed or unknown newest rows must produce a fresh generated capture without rewriting history.
  • Extend the existing Meetings route instead of adding another reader (P1) - The branch retains the shipped /meetings reader while introducing /transcripts for the same archive. Both call the transcript RPCs, but only the new surface gets search, paging, and downloads, creating competing navigation and divergent readers. Reuse the canonical Meetings surface, as the UI successor does.
  • Preserve the shipped unpaged transcript read contract (P1) - An existing transcripts.get caller requesting utterances without paging arguments now receives the first default page instead of the shipped newest 2,000-row window. Selector-only summary reads also acquire the new 1 MiB ceiling and can fail for previously readable saved notes. Preserve the existing unpaged behavior and bounds separately from explicit modern paging; current main contains this compatibility repair.
  • Include canonical stored Markdown in downloads (P2) - The download reads only summary and regenerates Markdown, discarding the stored markdown returned by the same owner. Markdown-only legacy notes disappear entirely, and notes differing from structured fields lose their saved content. Preserve canonical stored Markdown and append the complete transcript, matching the repaired successor.
  • Compare archive dates as instants while preserving identity (P2) - These filters compare raw stored timestamps with normalized UTC strings. A saved 2026-08-20T03:00:00-07:00 meeting is actually 10:00 UTC but is excluded by a 09:00 UTC lower bound. Use the same instant-based ordering for filters and cursors while retaining raw timestamps as identity; current-main regression coverage exercises this case.
  • Preserve speaker IDs independently of optional labels (P2) - The new public read path passes stored rows through utteranceFromRow, which drops the whole speaker when speaker_label is null. Previously the Gateway projected speaker_id independently, so valid ID-only historical speakers now lose attribution in reads and JSONL downloads. Use the independent public row projection already covered by the successor's ID-only speaker regression.
  • Resolve security concern: Room reassignment overwrites historical capture authority - Configured reopening persists the newly routed agent over the admitted owner, and subsequent stop/summarize authorization consumes that value. Preserve A's ownership and reject B before provider-stop or summary I/O; approval of the ID-origin design does not approve this transfer.
  • Resolve merge risk (P1) - The preserved reopening path can transfer historical mutation authority to the room's newly routed agent.
  • Resolve merge risk (P1) - Original-head archive reads change shipped unpaged behavior, and its exports can omit saved Markdown content.
  • Resolve merge risk (P1) - The approved legacy-origin implementation has no updated candidate here; upgrade, restart, import, and restoration behavior remain unverified for that implementation.
  • Resolve merge risk (P1) - No pinned three-way merge result is available, so these findings describe introduced original-head behavior rather than claiming that merging would delete successor fixes.
  • Resolve merge risk (P1) - The omitted body ranges and proof-comment tail could not be retrieved; successor proof is credited within its stated scope, but a complete artifact audit was not possible.
  • Complete next step (P2) - Complete the accepted fixed-ID/history repair in an updated candidate based on current main, resolve the preserved-head findings through that refresh, and supply upgrade and final-effect authorization evidence before landing.
  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.

Findings

  • [P1] Preserve admitted ownership when reopening historical captures — src/transcripts/capture.ts:537-540
  • [P2] Exclude consumed fixed captures from generated reopening — src/transcripts/auto-start.ts:348-355
  • [P1] Extend the existing Meetings route instead of adding another reader — ui/src/app-route-paths.ts:79
  • [high] Room reassignment overwrites historical capture authority — src/transcripts/capture.ts:539
Agent review details

Security

Needs attention: The original reopening change can transfer historical capture mutation authority across agents.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Judged code growth Production +4,098; tooling +29; tests/support +10,519 net lines Rename-aware classification excludes generated protocol files and docs; much of this growth implements archive capabilities now covered by successors.
Custom-ID admission 1 existing ID policy changed; 0 new configuration keys Same-day reuse becomes a conflict, making fixed-to-generated transitions and legacy restart behavior part of upgrade validation.

Stored data model

Persistent data-model change detected: unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Narrow the landing candidate to accepted remaining work (recommended)
    Use current main's repaired owners and archive implementation, then add the approved ID-origin rule with preservation and final-effect evidence.
  2. Retain the historical head while implementation continues
    Keep this PR as the approved work record without treating its preserved implementation or successor proof as merge readiness.

Technical review

Best possible solution:

Build the approved residual repair on current main, recording immutable ID origin in the existing admission write while retaining current ownership checks, canonical Meetings UI, and archive compatibility.

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

Yes, source establishes the remaining fixed-to-generated trigger: stop a fixed capture, switch the same source to generated occupancy capture within the reopen window, and its recent row remains eligible without an ID-origin check. No runtime reproduction was executed in this review.

Is this the best way to solve the issue?

No for the preserved branch as a landing candidate; it retains defects already repaired by successors. The accepted admission-owned metadata approach is appropriate because ID spelling or current configuration cannot recover a missing historical origin fact.

Full review comments:

  • [P1] Preserve admitted ownership when reopening historical captures — src/transcripts/capture.ts:537-540
    When a stopped room capture belongs to agent A and routing changes to B, the new configured-route resolution sets agentId to B and this spread overwrites A's stored ownership. canAccessTranscriptSession then permits B's stop/summarize operations and denies A. Preserve the admitted descriptor and reject mismatched reopening, as current main now does. This prior finding remains in the preserved head.
    Confidence: 0.99
  • [P2] Exclude consumed fixed captures from generated reopening — src/transcripts/auto-start.ts:348-355
    After a fixed-ID capture stops, removing the configured ID makes this branch query recent history and reuse that fixed row as existingSession, bypassing new-admission conflict checking. Its consumed archive can receive new speech despite the stated fixed-ID guarantee. Implement the accepted immutable origin fact; fixed or unknown newest rows must produce a fresh generated capture without rewriting history.
    Confidence: 0.99
  • [P1] Extend the existing Meetings route instead of adding another reader — ui/src/app-route-paths.ts:79
    The branch retains the shipped /meetings reader while introducing /transcripts for the same archive. Both call the transcript RPCs, but only the new surface gets search, paging, and downloads, creating competing navigation and divergent readers. Reuse the canonical Meetings surface, as the UI successor does.
    Confidence: 0.98
  • [P1] Preserve the shipped unpaged transcript read contract — src/transcripts/library.ts:167-172
    An existing transcripts.get caller requesting utterances without paging arguments now receives the first default page instead of the shipped newest 2,000-row window. Selector-only summary reads also acquire the new 1 MiB ceiling and can fail for previously readable saved notes. Preserve the existing unpaged behavior and bounds separately from explicit modern paging; current main contains this compatibility repair.
    Confidence: 0.99
  • [P2] Include canonical stored Markdown in downloads — src/transcripts/library.ts:209-216
    The download reads only summary and regenerates Markdown, discarding the stored markdown returned by the same owner. Markdown-only legacy notes disappear entirely, and notes differing from structured fields lose their saved content. Preserve canonical stored Markdown and append the complete transcript, matching the repaired successor.
    Confidence: 0.99
  • [P2] Compare archive dates as instants while preserving identity — src/transcripts/store-read.ts:258-269
    These filters compare raw stored timestamps with normalized UTC strings. A saved 2026-08-20T03:00:00-07:00 meeting is actually 10:00 UTC but is excluded by a 09:00 UTC lower bound. Use the same instant-based ordering for filters and cursors while retaining raw timestamps as identity; current-main regression coverage exercises this case.
    Confidence: 0.98
  • [P2] Preserve speaker IDs independently of optional labels — src/transcripts/store-read.ts:424
    The new public read path passes stored rows through utteranceFromRow, which drops the whole speaker when speaker_label is null. Previously the Gateway projected speaker_id independently, so valid ID-only historical speakers now lose attribution in reads and JSONL downloads. Use the independent public row projection already covered by the successor's ID-only speaker regression.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is active, bounded meeting-history work without evidence of a currently widespread emergency.
  • merge-risk: 🚨 compatibility: The original implementation changes shipped unpaged reads and custom-ID reuse semantics.
  • merge-risk: 🚨 session-state: Generated reopening can reuse a consumed fixed capture and append to its historical record.
  • merge-risk: 🚨 security-boundary: Reopening can overwrite the persisted agent used to authorize historical stop and summarize operations.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: Authority-chain proof required: a landing candidate must preserve A's historical ownership and reject reassigned agent B before provider-stop or summary I/O. The reported Gateway/SQLite/Chromium successor runs provide useful evidence for their repaired paths, but do not validate this preserved head or the unimplemented ID-origin policy. Omitted body text remains unknown; no additional replay is required merely to retain this PR as a work record. 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

Security concerns:

  • [high] Room reassignment overwrites historical capture authority — src/transcripts/capture.ts:539
    Configured reopening persists the newly routed agent over the admitted owner, and subsequent stop/summarize authorization consumes that value. Preserve A's ownership and reject B before provider-stop or summary I/O; approval of the ID-origin design does not approve this transfer.
    Confidence: 0.99

What I checked:

  • Repository and introduced revision: Origin identifies openclaw/openclaw. The independently inspected delta is merge-base 57f1159 to the preserved head, not fetched-main versus head. The raw head record confirms that parent. (8eb2d87c7215)
  • Accepted remaining scope: The captured PR body explicitly retains this PR for the fixed-ID/history implementation and records acceptance on September 7 of starting fresh for unknown legacy ID origins. It reports six merged successors while explicitly separating their proof from the preserved candidate. Captured body identity: f3bf837dd55d31a0c7fbee35c92ec811334fc3f7e2d6f40ba9a591998c903383.
  • Introduced ownership overwrite: The introduced route resolution supplies agentId during configured reopening, and descriptor construction overwrites existing metadata.agentId. Transcript tool selection uses that persisted agent to authorize stop and summarize; capture operations subsequently reach provider stop and summary generation. (src/transcripts/capture.ts:539, 8eb2d87c7215)
  • Current-main ownership repair and regression: Fetched main rejects an existing capture belonging to another agent and preserves its original source and metadata. Its occupancy regression reassigns the room from agent A to B, verifies a separate capture, rejects B's stop/summarize calls, and retains A's access. (src/transcripts/capture.ts:530, 2413c5e3dcde)
  • Fixed-to-generated reopening remains distinguishability gap: The preserved head selects recent history whenever the current configuration omits sessionId, without any recorded ID-origin check. Its fixed-ID regression retains fixed configuration throughout and does not cover switching to generated mode. Fetched main likewise selects recent history without an origin fact; the accepted residual work therefore remains necessary. (src/transcripts/auto-start.ts:340, 8eb2d87c7215)
  • Shipped archive contract: v2026.9.2 handles unpaged includeUtterances requests through readUtteranceEntries using the configured 2,000-row maximum, preserving the newest window and independently projecting speaker IDs. The proposed library instead defaults to the first bounded page. The release also already contains the Meetings route. (src/gateway/server-methods/transcripts.ts:79, 3928bad9badf)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • pgondhi987: 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.

  • Present the approved fixed-ID/history implementation against current main, retaining the successor repairs instead of replaying the historical branch.
  • Prove generated, fixed, and unknown-origin admission across restart/import/restoration, plus A's retained ownership and B's rejection before final I/O; attach redacted results to the updated PR body.

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 (15 earlier review cycles; latest 8 shown)
  • reviewed September 4, 2026, 10:16 PM ET / September 5, 2026, 02:16 UTC sha unknown :: blocked before merge. :: [P2] Validate dormant transcript targets before reporting success
  • reviewed 2026-09-05T08:42:47.892Z sha 8eb2d87 :: needs real behavior proof before merge. :: [P1] Preserve the admitted agent when reopening historical captures
  • reviewed 2026-09-05T10:04:33.685Z sha 8eb2d87 :: needs real behavior proof before merge. :: [P1] Preserve admitted ownership when reopening historical captures | [P2] Exclude consumed fixed captures from generated reopening
  • reviewed 2026-09-06T02:21:39.805Z sha 8eb2d87 :: needs real behavior proof before merge. :: [P1] Preserve admitted ownership when reopening historical captures | [P2] Exclude consumed fixed captures from generated reopening | [P1] Extend the existing Meetings route instead of adding a second reader
  • reviewed 2026-09-06T02:31:36.878Z sha 8eb2d87 :: needs real behavior proof before merge. :: [P1] Preserve admitted ownership when reopening historical captures | [P2] Exclude consumed fixed captures from generated reopening | [P1] Extend the existing Meetings route instead of adding a second reader
  • reviewed 2026-09-06T10:04:05.681Z sha 8eb2d87 :: needs real behavior proof before merge. :: [P1] Preserve admitted ownership when reopening historical captures | [P2] Exclude consumed fixed captures from generated reopening | [P1] Extend the existing Meetings route instead of adding a second reader | [P1] Preserve the existing unpaged transcript window | [P2] Preserve stored Markdown notes in downloads
  • reviewed 2026-09-06T11:10:59.544Z sha 8eb2d87 :: needs real behavior proof before merge. :: [P1] Preserve admitted ownership when reopening historical captures | [P2] Exclude consumed fixed captures from generated reopening | [P1] Extend the existing Meetings route instead of adding a second reader | [P1] Preserve the existing unpaged transcript window | [P2] Preserve stored Markdown notes in downloads | [P2] Compare archive dates as instants while preserving stored identity
  • reviewed 2026-09-06T13:00:28.818Z sha 8eb2d87 :: needs real behavior proof before merge. :: [P1] Preserve admitted ownership when reopening historical captures | [P2] Exclude consumed fixed captures from generated reopening | [P1] Extend the existing Meetings route instead of adding another reader | [P1] Preserve the shipped unpaged transcript read contract | [P2] Include canonical stored Markdown in downloads | [P2] Compare archive dates as instants without changing identity

@clawsweeper clawsweeper Bot added merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. 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. and removed 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. labels Aug 27, 2026
@steipete

steipete commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor Author

The reviewed failed-promotion finding and both rank-up moves are addressed in 10e68a9c4c4.

Normal-join ownership remains provisional until realtime activation succeeds. Failed promotion preserves an existing capture/manual/occupancy owner; if recording was stopped during the pending promotion and no owner remains, its connection closes. Cleanup checks the exact generation and transport. The regression suite covers both realtime modes, stop during and after failure, replacement capture, retry, cancellation, and late completion without disturbing a replacement.

The same investigation found a recording gap while promotion awaited bootstrap or connect. Both added cases first failed with zero utterances. The existing ready transport now remains eligible for recording during that transition, without granting conversational authority early; new, stopped, replaced, or wrong-generation transports remain fenced.

The two failures in the initial CI run were repaired rather than retried away. The transcript registry now owns a narrow structural manager contract, eliminating the concrete-class type cycle without changing either cycle guard. The long-speech test awaits decoder callbacks and actual WAV/processing-queue completion before asserting transcription, still before closing the input stream; no timeout increase or success mock was added.

A subsequent CI boundary guard caught that test importing the repo-only deferred helper. 9e6a715af50 switches it to the existing public openclaw/plugin-sdk/extension-shared helper. The test-boundary, exported-subpath, deprecated-API, and typed-lint checks plus all 19 recording tests passed. That commit changes only the test file; no SDK export or production behavior was added.

The preceding status fix also makes automatic capture IDs actionable from model-visible tool content. The added listing is bounded to five rows and 2,000 characters, omits whole oversized rows instead of clipping opaque IDs, and preserves authorization and complete structured details.

Validation:

  • Latest promotion/recording/authorization/recovery proof: 246 tests across 13 files passed. Before the ownership repair, the completed regression replay had eight failures; the additional pending-recording cases separately had two failures before their fix.
  • Full Discord shard after the CI synchronization repair: 3,021 tests across 234 files passed, with two workers and the original shard configuration.
  • Transcript status, source ownership, storage, import, and related provider coverage: 160 tests across 13 files passed.
  • Typed lint/typechecks passed. Both runtime and Madge cycle guards report zero cycles on the final head.
  • Complete build passed. Startup gzip is 341,183 B, below the unchanged 343,442 B ceiling; all 770 UI sidecars verified.
  • Fresh independent Codex review found no actionable P0–P2 defects in the promotion/continuity repair. The earlier capture and status changes also have clean independent review.

Latest focused command:

OPENCLAW_E2E_SKIP_BUILD=1 node scripts/run-vitest.mjs extensions/discord/src/voice/voice-session.promotion.test.ts extensions/discord/src/voice/transcripts-capture.test.ts extensions/discord/src/voice/transcripts-recording.test.ts extensions/discord/src/voice/transcripts-source.test.ts extensions/discord/src/voice/voice-auto-join.test.ts extensions/discord/src/voice/voice-session.lifecycle.test.ts extensions/discord/src/voice/voice-session.startup.test.ts extensions/discord/src/voice/voice-receive.test.ts extensions/discord/src/voice/receive-recovery.test.ts extensions/discord/src/voice/voice-following.test.ts extensions/discord/src/voice/manager.ready-listener.test.ts extensions/discord/src/voice/command.test.ts extensions/discord/src/voice/voice-runtime.e2e.test.ts
OPENCLAW_VITEST_MAX_WORKERS=2 node scripts/run-vitest.mjs run --config test/vitest/vitest.extension-discord.config.ts
pnpm check:import-cycles
pnpm check:madge-import-cycles
pnpm build

Data-model clarification: the voice session and capture registry are process-local objects, not serialized storage or vector metadata. The only persisted ownership value uses the existing transcript metadata.agentId/source field. No table, schema, migration, protocol, or config key is added; historical notes are not reassigned. Final judged LOC: production +727/-406 (net +321), tests/support +2199/-654 (net +1545), docs +102/-5. Test-support and moved lifecycle cases are not classified as production growth.

A live installation of production commit 10e68a9c4c4a043fb1ab1236f727bfa078838106 passed exact-build/plugin-version, health/channel, unchanged-policy, and non-delivering agent checks. Configuration-owned capture restarted automatically. The recorded agent turn called only transcripts with action: "status"; its model-visible tool output contained the fresh generated handle, which matched the durable capture and routed owner. That handle was not supplied in the prompt. The final readiness head c3421dfcb6b37a8c5a3f14848623d0cb51f3fb58 is now deployed through the same immutable owner. Its first cutover attempt correctly deferred for active work; the prepared transaction subsequently committed without rebuilding or bypassing suspension. Post-restart verification again observed automatic capture and an actual transcripts/status call whose content and model response contained the unseeded generated ID, matching durable ownership. Database schema, channel permissions and the active updater were preserved.

Proof limit: no fresh voice utterance was captured in that verification window. Multi-speaker audio and injected failure transitions are covered by the boundary/regression tests above, not claimed as a new live conversation test.

The unrelated HTMLElement | SVGElement textarea type error in the tested main baseline (failed typecheck job) was repaired by canonical commit 8862a1746a5. Fresh merge-ref CI33069203610 then passed on e085b37854f1c188c85db7ed806210837ba91ea4; the old failing run was not retried or bypassed.

Fresh-session readiness finding and rank-up moves

The latest reviewed finding is repaired by c3421dfcb6b. Native SpeakingMap.onPacket() emits start only at the beginning of continuous speech. A packet arriving before OpenClaw installs its listener therefore leaves no later start event to subscribe the participant. The successful join owner now invokes the existing current-speaker scan after committing the exact active generation and reconciling occupancy, only while the entry has a recording capability. Failed, cancelled, replaced, empty-room and no-capture entries do not acquire receive authority. This adds three executable lines and one ordering comment, not another receiver or fallback.

Before the production change, six readiness cases failed with zero subscriptions and six negative controls passed. Final coverage includes both event/scan orderings, the native dependency's speaking map, real streams/WAV materialization, exactly-once per-speaker publication and no conversational fallthrough. 218 tests across 12 files passed, including all 13 readiness cases. The replacement-capture regression also asserts that its retired pending connection cannot subscribe a pre-existing speaker.

node scripts/run-vitest.mjs extensions/discord/src/voice/transcripts-readiness.test.ts extensions/discord/src/voice/transcripts-recording.test.ts extensions/discord/src/voice/transcripts-capture.test.ts extensions/discord/src/voice/transcripts-source.test.ts extensions/discord/src/voice/voice-session.startup.test.ts extensions/discord/src/voice/voice-session.lifecycle.test.ts extensions/discord/src/voice/voice-session.promotion.test.ts extensions/discord/src/voice/voice-auto-join.test.ts extensions/discord/src/voice/voice-receive.test.ts extensions/discord/src/voice/receive-recovery.test.ts extensions/discord/src/voice/capture-state.test.ts extensions/discord/src/voice/voice-following.test.ts --reporter=verbose

Scoped typed lint, plugin test typecheck, formatting and diff checks passed. Fresh independent Codex review reported no actionable P0–P2 findings. The complete build passed in 4m59.5s with 341,196 B startup gzip under the unchanged 343,442 B ceiling and all 770 sidecars verified. Both latest rank-up moves are covered by the readiness repair and controlled boundary proof. No fresh live human voice input was available; these are not represented as a new live Discord conversation.

Final-head CI33072836910 completed with only build-artifacts and its aggregate gate failing. The artifact job measured plugins list --json startup RSS at 402.1 MB median against a 401 MB ceiling (samples 370.5, 402.1, 405.7); 125 jobs succeeded and 20 were skipped. The preceding green build already measured 399.3 MB. The command is metadata-only and never reaches the changed Discord join path; a local import trace also loaded no Discord voice runtime. Both exact Linux runtime artifacts and matching sources were downloaded and their build identities verified. Controlled runtime comparison is blocked because the configured Blacksmith Testbox backend is unauthenticated in this execution environment. No lease ID was returned and no remote measurement ran; concurrency remains a hypothesis, not a proven cause. No budget, baseline or assertion has been relaxed, and merge remains blocked. No raw production audio, transcripts, private identifiers, or credentials are published.

@clawsweeper

clawsweeper Bot commented Aug 27, 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:

@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. 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. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. 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. labels Aug 27, 2026
steipete added a commit that referenced this pull request Sep 6, 2026
Keep failed provider cleanup recoverable through the original admitted provider,
and fence late callbacks and stop work to the exact capture lifecycle.
Preserve stored agent, source, title, and retry identity during continuation.

Move lifecycle ownership into the transcript domain and leave tools as adapters.
Preserve current occupied-source ID handling and storage admission behavior.

Related: #130860
steipete added a commit that referenced this pull request Sep 6, 2026
…39572)

Keep failed provider cleanup recoverable through the original admitted provider,
and fence late callbacks and stop work to the exact capture lifecycle.
Preserve stored agent, source, title, and retry identity during continuation.

Move lifecycle ownership into the transcript domain and leave tools as adapters.
Preserve current occupied-source ID handling and storage admission behavior.

Related: #130860
steipete added a commit that referenced this pull request Sep 6, 2026
Keep explicit recording owned by its source across connection and manager
replacement. Receive each speaker once, retain packet-time capture authority,
and share completed batch transcription with authorized conversation.

Separate recording progress from conversation admission and replies, fence
incomplete or retired conversation input, and bound receive, conversation,
and queued WAV work. Retain WAV ownership through delayed processing and
cleanup, including when a retired recording hands off to conversation.

Preserve short authorized recording chunks and distinguish completed empty
transcription from omitted media input. Document lifecycle and limit behavior.

Split from #130860. Follows #139484 and #139572. Related: #127426.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 6, 2026
…law#139484)

Keep temporary WAV input alive through queued and in-flight transcription, then release the owning workspace on every completion or discard path. Failed writes release their partial workspace immediately. Extracted from openclaw#130860.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 6, 2026
…enclaw#139572)

Keep failed provider cleanup recoverable through the original admitted provider,
and fence late callbacks and stop work to the exact capture lifecycle.
Preserve stored agent, source, title, and retry identity during continuation.

Move lifecycle ownership into the transcript domain and leave tools as adapters.
Preserve current occupied-source ID handling and storage admission behavior.

Related: openclaw#130860
steipete added a commit that referenced this pull request Sep 6, 2026
Preserve existing per-speaker realtime finals when batch audio is disabled
or the actual media runtime confirms no backend is available. Carry packet
capture receipts through delayed admission and wait for every batch result;
successful, silent, failed, mixed, or incomplete input cannot duplicate or
authorize fallback notes. A provider continuity reset permanently retires
the recording owner until a fresh speaker connection establishes receipts.

Bound pending final text and surface limited coverage through /vc status.
Document the independent batch path and the narrower realtime-only contract.

Related to #130860 and #139658.
steipete added a commit that referenced this pull request Sep 6, 2026
)

* fix(discord): keep recording independent of voice conversations

Keep explicit recording owned by its source across connection and manager
replacement. Receive each speaker once, retain packet-time capture authority,
and share completed batch transcription with authorized conversation.

Separate recording progress from conversation admission and replies, fence
incomplete or retired conversation input, and bound receive, conversation,
and queued WAV work. Retain WAV ownership through delayed processing and
cleanup, including when a retired recording hands off to conversation.

Preserve short authorized recording chunks and distinguish completed empty
transcription from omitted media input. Document lifecycle and limit behavior.

Split from #130860. Follows #139484 and #139572. Related: #127426.

* fix(discord): keep package-boundary types portable

Spell the existing channel-resolution union within the plugin and type the
transcript fixture callback with its public SDK contract. This removes a
forbidden normalization-core import and prevents Vitest's private Procedure
type from leaking into generated declarations.

Validation: normalization import guard, all 123 plugin package boundaries,
extension and root integration types, 53 voice cases and two core provider
integrations, and scoped P0-P2 review.

* fix(discord): retain safely bound realtime-only recordings

Preserve existing per-speaker realtime finals when batch audio is disabled
or the actual media runtime confirms no backend is available. Carry packet
capture receipts through delayed admission and wait for every batch result;
successful, silent, failed, mixed, or incomplete input cannot duplicate or
authorize fallback notes. A provider continuity reset permanently retires
the recording owner until a fresh speaker connection establishes receipts.

Bound pending final text and surface limited coverage through /vc status.
Document the independent batch path and the narrower realtime-only contract.

Related to #130860 and #139658.

* test(discord): declare capture-only fixture capability

Keep fake transcript managers aligned with the required realtime capability
query. These integration fixtures have no realtime conversation and return
false without weakening the production interface.

Validation: canonical root test types, provider integration, scoped lint,
and independent P0-P2 review passed.

* refactor(discord): make recording contracts a type-only leaf

Move capture, packet-receipt, and segment-result contracts out of their
runtime owners, breaking the full import graph cycle. Narrow realtime
recording metadata to the three strings it consumes.

All six existing modules emit identical JavaScript; the new leaf emits
none. Validation: both import-cycle guards, three canonical type lanes,
18 focused tests, lint, full build, and scoped P0-P2 review passed.
steipete added a commit that referenced this pull request Sep 6, 2026
Add bounded archive search, paging, exports, and capture status over the existing
SQLite records. Preserve canonical stored Markdown, public projection privacy,
shared-archive access control, and original capture ownership during title edits.
Only complete plugin metadata can establish that a source is unavailable.

Compare stored dates by instant without rewriting their identity. Select bounded
page keys before projecting notes and participants. Keep storage admission,
schema, indexes, and current occupied-source ID behavior intact.

Related: #130860
Builds on #139572 and #139658.
steipete added a commit that referenced this pull request Sep 6, 2026
Supply a small method list to the handler and assert it in both original
and renewed hellos. Keep full advertised method inventory coverage in the
existing dedicated test, avoiding unrelated RPC additions in these three
Serve withdrawal cases.

Related to #130860 and #139875.
steipete added a commit that referenced this pull request Sep 6, 2026
Add bounded archive search, paging, exports, and capture status over the existing
SQLite records. Preserve canonical stored Markdown, public projection privacy,
shared-archive access control, and original capture ownership during title edits.
Only complete plugin metadata can establish that a source is unavailable.

Compare stored dates by instant without rewriting their identity. Select bounded
page keys before projecting notes and participants. Keep storage admission,
schema, indexes, and current occupied-source ID behavior intact.

Related: #130860
Builds on #139572 and #139658.
steipete added a commit that referenced this pull request Sep 6, 2026
* feat(transcripts): browse and export saved meeting archives

Add bounded archive search, paging, exports, and capture status over the existing
SQLite records. Preserve canonical stored Markdown, public projection privacy,
shared-archive access control, and original capture ownership during title edits.
Only complete plugin metadata can establish that a source is unavailable.

Compare stored dates by instant without rewriting their identity. Select bounded
page keys before projecting notes and participants. Keep storage admission,
schema, indexes, and current occupied-source ID behavior intact.

Related: #130860
Builds on #139572 and #139658.

* refactor(transcripts): distinguish stored and public notes readers

* fix(transcripts): preserve legacy archive reads and speaker identities

Preserve v2026.9.2 requests without paging arguments as the recent
2,000-row window, with UTF-16 clipping and the historical transport
ceiling. Keep modern pages and downloads on their separate byte bounds.

Map stored speaker IDs and labels independently through the public
read projection without parsing provider-only utterance metadata.

* test(transcripts): isolate timezone and cross-plugin E2E fixtures

Run native timezone coverage in a process started with the requested zone.
Keep hello lifecycle coverage on its supplied method list and move the
Gateway/Discord integration proof to the root E2E owner without changing
its assertions or resolved import targets.

* test(transcripts): include archive methods in current inventory

* refactor(transcripts): anchor methods after shipped catalog

Preserve the full v2026.9.2 catalog prefix and every named descriptor while letting later main method additions merge independently.
steipete added a commit that referenced this pull request Sep 6, 2026
Load saved summaries through their existing selector-only read contract,
independently of bounded speech pages. Keep valid notes and exports available
when a paged read exceeds its limit, with shared access revocation and stale
response fencing across both requests.

Cover the oversized-summary regression, both read lifecycles, and browser
reload request contracts. Align the Communications E2E subtitle with the
existing meeting-capture settings copy.

Validation: 32 reader cases, 11 browser E2E cases, 3 Chromium layout cases,
UI types, changed-code checks, and independent P0-P2 review.
Refs: #130860, #140084
steipete added a commit that referenced this pull request Sep 6, 2026
…40084)

* feat(control-ui): browse meeting notes and manage capture sources

Add a paginated Meetings library with stored notes, full-transcript search,
complete Markdown/JSONL downloads, and accessible mobile navigation. Keep
capture configuration in native Communications controls using the shared
provider metadata and Gateway configuration flow.

Separate route state, rendering, and capture editing from request ownership.
Fence asynchronous reads and exports to the active connection and selection,
clear denied content, preserve drafts, and keep feature copy lazy-loaded.
Retain existing capture IDs and reopening behavior.

Validation: focused UI/catalog tests, changed-code checks, UI build and
unchanged performance budgets, independent review, and isolated real
Gateway/SQLite/Chromium proof with complete native downloads.

Refs: #130860

* fix(control-ui): keep large saved meeting notes readable

Load saved summaries through their existing selector-only read contract,
independently of bounded speech pages. Keep valid notes and exports available
when a paged read exceeds its limit, with shared access revocation and stale
response fencing across both requests.

Cover the oversized-summary regression, both read lifecycles, and browser
reload request contracts. Align the Communications E2E subtitle with the
existing meeting-capture settings copy.

Validation: 32 reader cases, 11 browser E2E cases, 3 Chromium layout cases,
UI types, changed-code checks, and independent P0-P2 review.
Refs: #130860, #140084
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Sep 6, 2026
steipete added a commit that referenced this pull request Sep 7, 2026
Record generated or supplied ID origin at native admission and preserve it
through later same-identity writes. Reopen only the newest explicitly generated
occupancy candidate; keep supplied and unknown legacy history intact and start
fresh without falling back to an older meeting.

Keep provider metadata separate from admission facts and preserve origins
through existing Doctor restoration. No schema, index, configuration, or
version change. Older runtimes do not enforce the new history policy.

The legacy restart tradeoff was explicitly approved in #130860.
Validation: 103 focused cases, regression-first store/reopen proof, core and
test types, changed-code guards, lint, and independent review.
Refs: #130860
@steipete steipete closed this Sep 7, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
…claw#139658)

* fix(discord): keep recording independent of voice conversations

Keep explicit recording owned by its source across connection and manager
replacement. Receive each speaker once, retain packet-time capture authority,
and share completed batch transcription with authorized conversation.

Separate recording progress from conversation admission and replies, fence
incomplete or retired conversation input, and bound receive, conversation,
and queued WAV work. Retain WAV ownership through delayed processing and
cleanup, including when a retired recording hands off to conversation.

Preserve short authorized recording chunks and distinguish completed empty
transcription from omitted media input. Document lifecycle and limit behavior.

Split from openclaw#130860. Follows openclaw#139484 and openclaw#139572. Related: openclaw#127426.

* fix(discord): keep package-boundary types portable

Spell the existing channel-resolution union within the plugin and type the
transcript fixture callback with its public SDK contract. This removes a
forbidden normalization-core import and prevents Vitest's private Procedure
type from leaking into generated declarations.

Validation: normalization import guard, all 123 plugin package boundaries,
extension and root integration types, 53 voice cases and two core provider
integrations, and scoped P0-P2 review.

* fix(discord): retain safely bound realtime-only recordings

Preserve existing per-speaker realtime finals when batch audio is disabled
or the actual media runtime confirms no backend is available. Carry packet
capture receipts through delayed admission and wait for every batch result;
successful, silent, failed, mixed, or incomplete input cannot duplicate or
authorize fallback notes. A provider continuity reset permanently retires
the recording owner until a fresh speaker connection establishes receipts.

Bound pending final text and surface limited coverage through /vc status.
Document the independent batch path and the narrower realtime-only contract.

Related to openclaw#130860 and openclaw#139658.

* test(discord): declare capture-only fixture capability

Keep fake transcript managers aligned with the required realtime capability
query. These integration fixtures have no realtime conversation and return
false without weakening the production interface.

Validation: canonical root test types, provider integration, scoped lint,
and independent P0-P2 review passed.

* refactor(discord): make recording contracts a type-only leaf

Move capture, packet-receipt, and segment-result contracts out of their
runtime owners, breaking the full import graph cycle. Narrow realtime
recording metadata to the three strings it consumes.

All six existing modules emit identical JavaScript; the new leaf emits
none. Validation: both import-cycle guards, three canonical type lanes,
18 focused tests, lint, full build, and scoped P0-P2 review passed.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
Supply a small method list to the handler and assert it in both original
and renewed hellos. Keep full advertised method inventory coverage in the
existing dedicated test, avoiding unrelated RPC additions in these three
Serve withdrawal cases.

Related to openclaw#130860 and openclaw#139875.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
…#139875)

* feat(transcripts): browse and export saved meeting archives

Add bounded archive search, paging, exports, and capture status over the existing
SQLite records. Preserve canonical stored Markdown, public projection privacy,
shared-archive access control, and original capture ownership during title edits.
Only complete plugin metadata can establish that a source is unavailable.

Compare stored dates by instant without rewriting their identity. Select bounded
page keys before projecting notes and participants. Keep storage admission,
schema, indexes, and current occupied-source ID behavior intact.

Related: openclaw#130860
Builds on openclaw#139572 and openclaw#139658.

* refactor(transcripts): distinguish stored and public notes readers

* fix(transcripts): preserve legacy archive reads and speaker identities

Preserve v2026.9.2 requests without paging arguments as the recent
2,000-row window, with UTF-16 clipping and the historical transport
ceiling. Keep modern pages and downloads on their separate byte bounds.

Map stored speaker IDs and labels independently through the public
read projection without parsing provider-only utterance metadata.

* test(transcripts): isolate timezone and cross-plugin E2E fixtures

Run native timezone coverage in a process started with the requested zone.
Keep hello lifecycle coverage on its supplied method list and move the
Gateway/Discord integration proof to the root E2E owner without changing
its assertions or resolved import targets.

* test(transcripts): include archive methods in current inventory

* refactor(transcripts): anchor methods after shipped catalog

Preserve the full v2026.9.2 catalog prefix and every named descriptor while letting later main method additions merge independently.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
…enclaw#140084)

* feat(control-ui): browse meeting notes and manage capture sources

Add a paginated Meetings library with stored notes, full-transcript search,
complete Markdown/JSONL downloads, and accessible mobile navigation. Keep
capture configuration in native Communications controls using the shared
provider metadata and Gateway configuration flow.

Separate route state, rendering, and capture editing from request ownership.
Fence asynchronous reads and exports to the active connection and selection,
clear denied content, preserve drafts, and keep feature copy lazy-loaded.
Retain existing capture IDs and reopening behavior.

Validation: focused UI/catalog tests, changed-code checks, UI build and
unchanged performance budgets, independent review, and isolated real
Gateway/SQLite/Chromium proof with complete native downloads.

Refs: openclaw#130860

* fix(control-ui): keep large saved meeting notes readable

Load saved summaries through their existing selector-only read contract,
independently of bounded speech pages. Keep valid notes and exports available
when a paged read exceeds its limit, with shared access revocation and stale
response fencing across both requests.

Cover the oversized-summary regression, both read lifecycles, and browser
reload request contracts. Align the Communications E2E subtitle with the
existing meeting-capture settings copy.

Validation: 32 reader cases, 11 browser E2E cases, 3 Chromium layout cases,
UI types, changed-code checks, and independent P0-P2 review.
Refs: openclaw#130860, openclaw#140084
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
…#140563)

Record generated or supplied ID origin at native admission and preserve it
through later same-identity writes. Reopen only the newest explicitly generated
occupancy candidate; keep supplied and unknown legacy history intact and start
fresh without falling back to an older meeting.

Keep provider metadata separate from admission facts and preserve origins
through existing Doctor restoration. No schema, index, configuration, or
version change. Older runtimes do not enforce the new history policy.

The legacy restart tradeoff was explicitly approved in openclaw#130860.
Validation: 103 focused cases, regression-first store/reopen proof, core and
test types, changed-code guards, lint, and independent review.
Refs: openclaw#130860
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: android App: android app: web-ui App: web-ui channel: discord Channel integration: discord docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL 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.

1 participant