Repository navigation
fix(transcripts): preserve fixed and legacy capture history - #140563
Conversation
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
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 6, 2026, 9:49 PM ET / September 7, 2026, 01:49 UTC. ClawSweeper reviewWhat this changesRecord how meeting transcript IDs were assigned, preserve that fact in SQLite, and reopen only known generated captures while leaving supplied-ID and legacy archives intact. Merge readiness⛔ Blocked before merge - 2 items remain This remains a useful, maintainer-authored repair: current main lacks the ID-origin reopening guard. No blocking defect was found, and the updated Gateway evidence addresses the previous review’s proof request. Priority: P2 Review scores
Verification
How this fits togetherMeeting transcript capture receives configured occupancy events and provider speech, then saves sessions, utterances, and notes in SQLite. Reopening selection determines whether new speech continues an existing meeting or starts a separate archive. flowchart TD
A[Configured capture or import] --> B[Record ID origin]
B --> C[SQLite transcript archive]
D[Room becomes occupied] --> E[Select newest recent capture]
C --> E
E --> F{Known generated origin and existing checks pass}
F -->|Yes| G[Continue saved meeting]
F -->|No| H[Start fresh and preserve archive]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +34, Tests +148, Docs +21. Total +203 across 13 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep admission-owned ID provenance and the approved conservative legacy behavior, with archive preservation and restart compatibility documented and covered by the supplied Gateway proof. Do we have a high-confidence way to reproduce the issue? Yes, from source: switching a recently stopped supplied-ID source to occupancy capture on current main can select that archive because reopening lacks an origin check; this review did not execute the scenario. Is this the best way to solve the issue? Yes. Recording the fact at admission and preserving it at the store avoids guessing from ID spelling or current configuration while retaining the existing query, window, and ownership checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 940c359a3620. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…137098 * commit '8a540c252002878f3c3e9d8dfb837b83c8602a78': (2210 commits) perf(plugins): keep bundled catalog lookups lightweight (#140597) refactor: streamline skills JSON serialization (#140581) fix(feishu): expand quoted merged-forward messages (#136231) fix(talk): keep opaque realtime routes out of public config (#129144) fix(ci): avoid Linux packaging on pull requests (#140589) fix(usage): release completed request payloads (#140588) fix(tooling): omit Trae machine squash credit (#140562) fix(ui): stop catalog paging in hidden tabs (#140583) fix(portals): reach IPv6 loopback with IPv4-only localhost records (#140580) fix(transcripts): preserve fixed and legacy capture history (#140563) fix(ui): prevent Talk E2E audio capture stalls (#138803) fix(media): release completed document source buffers (#140561) fix(anthropic): preserve resumed CLI caches across Git changes (#140566) chore(ui): refresh control ui locales (#140586) fix(ui): keep usage exports bound to their session instance (#140573) refactor(exa): test response readers through tool execution (#140572) fix(macos): omit incompatible worker binaries from app bundles (#140557) fix: avoid retaining discarded tool output (#140570) refactor(gateway): share placement move matching (#140569) fix(gateway): preserve child turns during systemd drain (#140568) ... # Conflicts: # .agents/skills/release-openclaw-maintainer/SKILL.md # docs/reference/RELEASING.md
…#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
Related: #130860
What Problem This Solves
Fixes an issue where switching from a supplied transcript ID to occupancy-driven capture could reopen and append to that archived capture. Legacy records do not identify whether their IDs were supplied or generated, so ID spelling and current configuration cannot safely establish reopening eligibility.
Why This Change Was Made
Native capture and import admission record
sessionIdOriginin existing session metadata. Configured capture carries the original ID choice before supplying its selected ID; the meeting bridge records that its transcript ID was supplied by the meeting owner. The store preserves the original value, including missing or invalid legacy values, on later writes to the same identity. Provider results, mutated provider request metadata, and utterance text cannot establish that fact.Occupancy uses the existing source/window query and newest-row selection. Only an explicitly generated candidate can reopen after the existing ownership checks; a newer ineligible row does not cause a search for an older generated meeting. The persistence decision is approved in #130860.
User Impact
New generated captures still continue within the existing ten-minute window. Supplied IDs and legacy captures with unknown or invalid origin start fresh, leaving prior notes and identities unchanged. Some genuinely generated legacy meetings therefore split after upgrade or restart, as approved. Doctor restoration preserves recorded origins without inferring or backfilling them.
No schema, index, configuration option, protocol/package version, or retention policy changes. Session writes add a bounded primary-key read inside the existing transaction to preserve admission metadata. Older runtimes do not enforce this policy; downgrading also removes the fixed-history protection.
Evidence
Exact-head CI passed on
f69ef976d1b40eabeec85f91e1a35133d89a7734.The isolated live proof passed across three genuinely separate Gateway processes sharing fresh SQLite state. All capture admission and stopping used configured Gateway startup and
Gateway.close(), with actualtranscripts.status/get/listWebSocket readback. Generated history reopened in place; supplied/generated-looking and legacy absent/invalid histories started fresh; a newer supplied row prevented falling back to older generated history. The final ten rows, prior notes, raw IDs, selectors and archive responses matched the expected results. All 59 frozen source hashes were verified, and the owned Testbox is stopped.The provider's occupancy and text are synthetic. No external channel, model call, operator Gateway, or agent-turn authority is exercised. An earlier harness attempted the unavailable HTTP transcript-tool surface and failed before policy validation; its evidence is retained. The final proof uses the supported Gateway lifecycle and archive RPCs without changing product authorization.