Repository navigation
perf(talk): use published authority for foreign voice writes - #177533
Conversation
Use bound session and membership publication predicates when an opaque callback selects the native voice writer. Keep the live predicate check after callbacks at existing mutation and commit boundaries, so revoked foreign authority still rolls back the mutation without native reads. Keep same-store predicates in their transaction and preserve native fallback for unbound SDK predicates. Ordinary worker writes retain the existing admission-once contract.
|
🦞👀 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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR uses existing published authority for foreign-store voice writes with native callbacks while retaining live revocation checks. Example: Creating voice session admitted-membership from custom.sqlite while a native commit callback removes the caller's membership.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR provides a focused performance improvement that current main lacks, with no actionable code defect found; the required CI gate remains red. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Talk Gateway handler prepares caller and session authority, then passes it to the existing voice writer, which commits voice records and returns a result for authorized disclosure. flowchart TD
A[Talk client create request] --> B[Sharing authority owner]
B --> C[Prepared source predicates]
C --> D[Voice writer]
D --> E[Native callback]
E --> F[Live publication check]
F --> G[Commit or rollback]
Technical reviewBest possible solution: Retain this small extension of the existing publication owner and resolve the required CI gate before landing. Do we have a high-confidence way to reproduce the issue? Current main visibly routes opaque foreign authority through synchronous validation; the PR reports a base regression observing 17 SQLite API calls versus zero after the change, but no target code was executed during this review. Is this the best way to solve the issue? The patch is the smallest complete fix: reuse bound publications, retain their live checks for native compositions, and preserve transaction-local checks and the generic unbound SDK fallback. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b8f91cb249b8. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +6, Tests +52, Docs +2. Total +60 across 3 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 19, 2026, 1:41 PM ET / 17:41 UTC. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e6e738cedf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (admitPublishedSessionSource(check.predicate)) { | ||
| // Opaque guards keep live checks through native commit; ordinary writes admit once. | ||
| if (!canAdmitOnce) { | ||
| publishedChecks.push(check); | ||
| } | ||
| continue; |
There was a problem hiding this comment.
Preserve native routing for opaque wrapper checks
When a bound foreign predicate is combined with an authority that has hasOpaqueCheck but neither nativeSource nor opaqueCommitGuard (for example, an unbound/native-compatibility Gateway request whose transport wrapper has no explicit callback), this branch removes the predicate from foreign and returns no nativeSource marker. mutateAuthorizedClientVoiceSession therefore takes the worker path even though PreparedSessionSourceAuthority.hasOpaqueCheck explicitly requires a native transaction, leaving a window between the final host admission callback and the worker commit in which transport authority can be revoked while the write still commits. Keep this case routed through the native writer, either by retaining the foreign/native marker or propagating hasOpaqueCheck into writer selection.
AGENTS.md reference: AGENTS.md:L64-L65
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 38cf544. When every foreign check uses published authority, native routing is retained only when published foreign checks remain; ordinary same-store and callback-absent requests keep worker preparation. This preserves the opaque foreign wrapper transaction and rollback contract without forcing ordinary creation onto native transactions. The same-store and cross-store real-handler suites pass all 54 cases, including membership/session revocation, wrapper rollback, and unchanged authority. Covered foreign authority checks execute zero main-thread SQL.
* commit '08e32fdb4df002c9d4eea158b855d6521dd1e916': (52 commits) test(gateway): restore local probe deferred import fix(agents): release prompt diagnostics for retired sessions (#177614) fix(release): tag restart plugin cohorts consistently (#177725) refactor(ui): inline single-caller detail requests (#177705) chore(i18n): refresh native locales (#177721) refactor(codex): drop unread private runtime reports (#177689) refactor(ui): consolidate static artwork registries (#177692) refactor(ui): derive settings schema analysis in the view (#177624) refactor(media): consolidate capability defaults and compression grids (#177665) refactor(auth): bind OAuth managers to native provider operations (#177676) refactor(ui): remove redundant component rendering layers (#177607) fix(ios): model sign-in is a permanent row under the composer instead of an item in the model menu (#166082) fix(agents): report failed secret input prompt delivery (#177688) refactor(ui): share chat message render contracts (#177668) fix(ui): settle model status after overlapping publication (#177667) refactor(gateway): reuse native workspace and lifecycle facts (#177670) refactor(runtime): rely on canonical async lifecycle owners (#177635) refactor: fold private operation helpers into their callers (#177655) refactor(ui): remove unused chat leaf element adapters (#177582) perf(talk): use published authority for foreign voice writes (#177533) ...
#167350) * fix(pr): retain the admitted workflow across maintainer commands * fix: refresh the reviewed correction baseline Baseline-Refresh: a89bd166b79d54b343b93ad374f8ebfa4f3d1163 * fix(pr): preserve cold workflow admission and repository identity * chore(pr): integrate canonical main CI repair * commit '08e32fdb4df002c9d4eea158b855d6521dd1e916': (52 commits) test(gateway): restore local probe deferred import fix(agents): release prompt diagnostics for retired sessions (#177614) fix(release): tag restart plugin cohorts consistently (#177725) refactor(ui): inline single-caller detail requests (#177705) chore(i18n): refresh native locales (#177721) refactor(codex): drop unread private runtime reports (#177689) refactor(ui): consolidate static artwork registries (#177692) refactor(ui): derive settings schema analysis in the view (#177624) refactor(media): consolidate capability defaults and compression grids (#177665) refactor(auth): bind OAuth managers to native provider operations (#177676) refactor(ui): remove redundant component rendering layers (#177607) fix(ios): model sign-in is a permanent row under the composer instead of an item in the model menu (#166082) fix(agents): report failed secret input prompt delivery (#177688) refactor(ui): share chat message render contracts (#177668) fix(ui): settle model status after overlapping publication (#177667) refactor(gateway): reuse native workspace and lifecycle facts (#177670) refactor(runtime): rely on canonical async lifecycle owners (#177635) refactor: fold private operation helpers into their callers (#177655) refactor(ui): remove unused chat leaf element adapters (#177582) perf(talk): use published authority for foreign voice writes (#177533) ... Co-authored-by: Vincent Koc <[email protected]>
…w#177533) Reuse current published foreign session and membership facts at voice mutation effects. Keep same-store checks in their destination transaction and reject unavailable published authority. Covered native checks fall from 9 MAIN statements on success and 11 on revocation to zero, with no additional worker requests. Real-handler rollback and unavailable-authority regressions pass alongside 55 affected owner tests; final-head CI passes. Whole-workload savings are not claimed; the rare voice effect is absent from the census workload.
openclaw#167350) * fix(pr): retain the admitted workflow across maintainer commands * fix: refresh the reviewed correction baseline Baseline-Refresh: a89bd166b79d54b343b93ad374f8ebfa4f3d1163 * fix(pr): preserve cold workflow admission and repository identity * chore(pr): integrate canonical main CI repair * commit '4f8617589b6c71d754171052b603fe534901bfa1': (52 commits) test(gateway): restore local probe deferred import fix(agents): release prompt diagnostics for retired sessions (openclaw#177614) fix(release): tag restart plugin cohorts consistently (openclaw#177725) refactor(ui): inline single-caller detail requests (openclaw#177705) chore(i18n): refresh native locales (openclaw#177721) refactor(codex): drop unread private runtime reports (openclaw#177689) refactor(ui): consolidate static artwork registries (openclaw#177692) refactor(ui): derive settings schema analysis in the view (openclaw#177624) refactor(media): consolidate capability defaults and compression grids (openclaw#177665) refactor(auth): bind OAuth managers to native provider operations (openclaw#177676) refactor(ui): remove redundant component rendering layers (openclaw#177607) fix(ios): model sign-in is a permanent row under the composer instead of an item in the model menu (openclaw#166082) fix(agents): report failed secret input prompt delivery (openclaw#177688) refactor(ui): share chat message render contracts (openclaw#177668) fix(ui): settle model status after overlapping publication (openclaw#177667) refactor(gateway): reuse native workspace and lifecycle facts (openclaw#177670) refactor(runtime): rely on canonical async lifecycle owners (openclaw#177635) refactor: fold private operation helpers into their callers (openclaw#177655) refactor(ui): remove unused chat leaf element adapters (openclaw#177582) perf(talk): use published authority for foreign voice writes (openclaw#177533) ... Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Creating a browser voice session with a foreign session store and an opaque commit callback re-reads the source database synchronously, although the source already has current published authority.
User Impact
Covered foreign session and membership checks use their existing publication owner without main-thread SQLite reads. Revoking membership or replacing the session during the native callback still rejects and rolls back the voice mutation. No configuration or migration is needed.
Why This Change Was Made
Use bound publication predicates in both voice writer modes. Ordinary worker writes retain their existing admission-once contract; opaque/native compositions recheck the published predicate after their original callbacks at the existing mutation and commit boundaries. Same-store predicates remain in the destination transaction. Unbound foreign predicates retain the native reader required by the supported generic SDK contract.
The removed branch tied publication use to worker-only admission. No SQL shape, schema, request, transaction envelope, or cross-store commit ordering changes. An already-admitted ordinary durable write may finish after source revocation; subsequent effects still reauthorize.
Production: +20/-6 lines (net +14); tests: +118/-29; documentation: +9/-7. The small retained predicate list is needed only for native callback compositions.
Evidence
Final-head CI 39313354981, head
1fba80fe09c342fef2df373da413d950f6b3dff1, completed successfully: 37 jobs passed and 27 skipped. Both required CI gate entries are green. Source contracts, baseline ratchets, changed-boundary tests, production/test types, lint, and architecture checks pass. The earlier unrelated formatting failure is fixed on main and does not affect this run.Authority review approved the final head, including the fail-closed guard: a publication predicate that is no longer admitted throws instead of allowing the effect. Its real-handler regression fails on the preceding head with a persisted voice record and successful response, and passes with rollback after the correction. It retains zero foreign-source SQL.
The frozen-v3.1 interim census covers two alternating pairs against a combined voice/conversation candidate, not this final head. Both revisions have causal warm medians of 51 SQL / 15 requests / 0 MAIN. Whole-workload medians are 3042.5 [3025–3060] SQL / 853 [844–862] requests / 101 [100–102] MAIN on base and 3050 [3040–3060] / 856.5 [853–860] / 100.5 [100–101] on the combined candidate. The +7.5 SQL / +3.5 requests remains unattributed, including candidate-correlated initial cleanup +5 SQL / +2 requests. The third baseline arm was interrupted and its candidate arm was unrun; neither is counted. Final three-pair proof remains outstanding. No whole-workload or latency saving is claimed; the targeted real-handler measurements above establish this PR's effect-time savings.