Skip to content

refactor: consolidate directive and config parsing owners - #173394

Merged
steipete merged 3 commits into
mainfrom
deslop/z15-family-directives-config-20261015
Oct 15, 2026
Merged

steipete merged 3 commits into
mainfrom
deslop/z15-family-directives-config-20261015

Conversation

@steipete

@steipete steipete commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Speech providers repeated directive alias/policy dispatch, and Voice Call rebuilt defaults already owned by its schema.

User Impact

No intended user-visible change, migration, or required action. Provider aliases, policy gates, validators, warning text, independent mutable defaults, and external-input validation remain protected. No config keys, schemas, protocols, dependencies, security effect checks, or durability behavior change. The standalone session memory backend is untouched.

What changed

One lightweight speech directive dispatcher serves all bundled parsers and the compatible-provider factory. Providers retain their value contracts; the TTS host retains patch accumulation. Voice Call's existing schema owns defaulting and external validation once, while typed consumers use its parsed result. A browser helper also drops redundant undefined coalescing.

The coordinator-directed CI cut restores every changed source file reachable from either failing Gateway test to origin/main. Dropped: all channel secret-assignment consolidation, shared record omission and its provider-normalization callers, reply/CLI cleanup, TTS layered/status cleanup, video duration consolidation, and meeting-config consolidation with its registrations/tests/docs. These changes are preserved separately on deslop/z15-parked-cron-auth-20261015 with the failing-test note; no PR is proposed for that branch.

Best-effort tradeoffs accepted

  • Providers return directive patches without copying unrelated accumulated overrides; the TTS host already owns accumulation. The original parser split (fix(talk): avoid full plugin imports during cold catalog discovery #138483) and helper sharing (refactor: share repeated core and plugin paths #167205) do not establish a separate accumulation contract or human-reported incident requiring those copies. ElevenLabs still merges nested voice settings; host-boundary coverage protects accumulation.
  • Voice Call trusts already-parsed internal config instead of cloning and reconstructing schema defaults at each consumer. Previous normalization work (refactor(voice-call): deslop voice-call #165276 and commit3087893ef96) is code provenance, not a human incident requiring repeated parsing. Malformed raw input still fails at the canonical schema boundary; typed internal callers supply its parsed result.
  • No concurrency/recovery/security guard was removed. Browser undefined coalescing is a redundant absence conversion, not a fallback contract.

Size

155 net production lines removed, counting registration metadata and excluding tests, docs, fixtures, generated files, and the exact assertion-baseline shrink. The coordinator waived the size floor for this reduced branch. All other inventoried family candidates are retained for named distinct contracts or parked by the CI drop rule; no additional sound unattempted cut remains.

Evidence

Reduced-cut local proof: extension production type graph passes, covering the core speech consumers; static SCC/madge reports zero cycles. Runtime-cycle proof reports zero cycles and remains input-valid after the sole subsequent runtime import change removed Microsoft's now-unused speech SDK edge. Fresh source-frozen tests pass 30 directive/host assertions and all 3 mandatory lint-suppression assertions, with final input verification and clean wrapper exit (1491.64s, dominated by worker preparation on the loaded host). Formatting and git diff --check pass. No remaining runtime or registration reference names either removed shared helper.

Fresh independent review completed against the final staged candidate. Its sole P2 requested provider-record copies in Voice Call, alleging a new mutation regression. Declined after source verification: the base normalizer already returned { ...defaults, ...config, ... } without overriding telnyx/twilio/plivo, and the base resolver then performed the same credential assignments. Thus existing provider records were already retained by reference. The sole production runtime caller receives schema-parsed, plugin-owned config from registration. No new caller-immutability or environment-refresh contract is introduced here; adding copies for a pre-existing, unreported scenario would not repair a regression in this cut. The review found no directive-dispatch defect. No accepted actionable finding remains; the tool's original finding is not mislabeled scoped-clean.

Prior focused, input-qualified proof covers provider parsers, host accumulation, and Voice Call configuration/webhooks. Earlier exact-head hosted run38797189603 passed production/test types, all extension-lint shards, guards, build/SDK/package boundaries, security review, and native screenshots. That is prior-head evidence only; the reduced pushed head must finish its own CI.

Known local gap retained: extension lint's unchanged declaration prerequisite previously failed with plugin-sdk boundary dts timed out after 300000ms. This is not claimed as a local pass. No timeout, retry, skip, suppression, or budget was widened. Expensive baseline Gateway replay never reached assertions and is not attribution evidence; the coordinator explicitly selected import-graph removal without another baseline run.

Gateway failure cut

Read both failing tests completely. A conservative source graph includes static imports/exports (also type edges), literal dynamic imports, mock/original imports, tsconfig aliases, the test-instance subprocess bridge into the CLI, and channel sidecars loaded by artifact name. It deliberately over-approximates imports, not executed lines.

  • Cron failure: test/gateway.multi.e2e.test.ts, scheduler-disabled Gateway edit, cron.add rejects missing route-compatible OpenAI auth.
  • Recovery failure: src/gateway/server.sessions.create.durability.test.ts, acknowledged control-UI first turn with worktree, chat.send timeout followed by hook/cleanup timeouts.
  • Example witness: durability test → worktree service → config validation → secret target registry → channel-contract API → official fallback → channel-secret basic runtime. The contract API also loads each actual channel sidecar. Another direct witness reaches normalization-core record-coerce through session-pending-input-history.
  • Both roots reach nineteen changed files. All nineteen source files now match fetched origin/main; their dependent family members were dropped as complete cuts. The package registration restoration also drops the meeting-config family. Retained speech dispatch and Voice Call normalization are outside this resolved source graph.

Prior-head failure attribution (not relabeled green)

Job on run38797189603 Attribution
checks-ui-e2e (5/9),116637379730 Exact update-run:225 locator timeout matches scheduled main run38794323475/job116627031569. Main fixture repair59d3a4a36cdb89b3c3d75ae36911cdff4a60622d (#173438). No UI changes here.
checks-node-changed-compact-small-12,116637385450 All101 assertions pass, then native SQLite retirement fails with transaction admission refused. Main run38794323475/job116627036841 has the same unchanged retirement owner/line295, lifecycle520, broker/reply575 and refusal through another cleanup caller. No SQLite changes here.
checks-node-changed-29,116637390824 Cron-auth failure: reachable family hunks dropped, not asserted inherited.
checks-node-changed-compact-large-20,116637385416 First-turn recovery timeout: reachable family hunks dropped, not asserted inherited.
openclaw/ci-gate,116645718122 Downstream aggregate of those four failures; no independent failure.

Landed outcome

Merged by normal pinned squash as 8d4e374169beb205e70986e02caa9da4d6f144b8; ancestry verified on fetched origin/main. Actual squash delta is 155 net production lines removed (463 added/618 deleted), with the requested parked snapshot preserved separately.

Exact head 88fb128ee3cdcf7241471e7dc9531d93a69f1e03 passed CI run38816293090, including openclaw/ci-gate. All 144 exact-head check runs were enumerated: no failed jobs; 11 cancelled non-test auto-response jobs were superseded by successful auto-response job116702009648. The CI run itself had no cancelled job or test failure. Production/test types, all three extension-lint shards, selected Node suites, UI E2E, guards/boundaries and security checks pass. Conditional unselected jobs are not claimed as executed. No inherited-red exception, CI rerun, further push, or rebase was needed for the reduced head. The earlier local declaration-lint timeout remains a documented local gap, now covered by green hosted extension lint on this head.

@clawsweeper

clawsweeper Bot commented Oct 15, 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.

@clawsweeper clawsweeper Bot added the P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. label Oct 15, 2026
@clawsweeper

clawsweeper Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR consolidates speech directive dispatch, channel secret assignment, meeting configuration parsing, and Voice Call defaults into shared owners.

Example: Parse [[tts:provider=example voice=speaker speed=1.25]].

  • Before: Provider-specific dispatch produces overrides that the TTS host accumulates.
  • After: Shared dispatch produces patches, and the same host retains voice=speaker and speed=1.25.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, coherent consolidation with no identified code defect; supplied validation is primarily in-process, broad gates remain incomplete, and upgrade compatibility is not yet demonstrated.
Proof confidence 🦐 gold shrimp (3/6) Maintainer authorship exempts this PR from the ordinary contributor media gate; supplied tests exercise parsing owners, while historical catalog media covers another change. Configuration-loading compatibility still requires fresh-install and latest-stable upgrade evidence with retained settings and data; redact credentials and non-public endpoints from captures.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Repeated parsing and default reconstruction make provider and account behavior harder to maintain consistently.
Reason: The maintainer-authored direction removes substantial duplicate production code while retaining specialized policies and existing runtime owners.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep this useful maintainer-authored refactor open; no discrete correctness or security defect was found, and GitHub reports a conflict on the reviewed draft.

Priority: P3
Reviewed head: 3902d61c00bcf1f44c2bfeadcededc11dd1b4be1

Before merge

  • Complete next step - Resolve GitHub’s reported merge conflict while preserving newer main changes, then mark this PR ready when authoring is complete.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

None.

Tests

  • Missing end-to-end proof: No fresh-install and v2026.10.3 upgrade run through plugin loading demonstrates preserved Voice Call settings, routes, credentials, and runtime defaults.
Agent review details

How this fits together

Reply directives and plugin configuration enter parsing and secret-collection owners, which produce provider overrides, deferred credential assignments, and normalized meeting or call settings for existing runtimes.

flowchart TD
  A[Reply directives] --> B[Shared speech dispatcher]
  B --> C[Provider policies]
  C --> D[TTS host accumulation]
  E[Plugin configuration] --> F[Shared config and secret owners]
  F --> G[Existing meeting and call runtimes]
Loading

Technical review

Best possible solution:

Keep the shared parsing owners while preserving released configuration behavior and provider-specific policies.

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

This is a behavior-preserving refactor rather than a reported defect; source inspection confirms the repeated implementations, and no target code was executed during this read-only review.

Is this the best way to solve the issue?

The shared owners fit existing boundaries, preserve provider-local policy, and remove duplicate implementations without introducing a competing runtime owner.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Speech directive parsing and accumulation changes intended behavior with a stated reason (52644b7: Provider factories supported lightweight capability discovery; the existing TTS host already accumulates returned patches.)
  • Voice Call runtime defaults changes intended behavior with a stated reason (3087893: Normalization supplied nested runtime defaults and independent default containers; the PR explicitly transfers normalization to the existing schema.)
  • Meeting audio command construction changes intended behavior with a stated reason (7d40666: Linux talk-back required platform-specific audio commands while Google Meet registration remained lightweight.)
  • Channel secret contract scaffolding keeps the original intent (44aaaa7: Share discovery and account-surface preparation while channels retain activation rules, inheritance, identities, assignment order, and warning text.)
  • Video duration validation keeps the original intent (02e70ab: Reject invalid durations before dispatch while preserving rounding, omission, and provider-supported selection.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Pinned introduction reviewed: Reviewed the introduced merge-base-to-head hunks separately from base movement; the checkout remained clean. (3902d61c00bc)
  • Current main retains separate implementations: Fetched main still contains provider-local directive parsers, Google Meet's audio command builder, and Voice Call's cloned default reconstruction. (extensions/voice-call/src/config.ts:515, ebca33e13c5c)
  • Accumulation remains host-owned: The real TTS directive consumer merges each returned patch into accumulated provider overrides; ElevenLabs retains its nested voice-settings merge. (src/tts/directives.ts:261, 3902d61c00bc)
  • Accepted internal tradeoffs: The maintainer-authored body explicitly accepts patch-only parser returns, schema-owned Voice Call normalization, removal of the blanket meeting-builder fallback, and trusting typed internal records; source inspection confirms the stated boundaries. (extensions/voice-call/src/config.ts:498, 3902d61c00bc)
  • Earlier contracts checked: Read the prior channel contract consolidation, Voice Call cleanup, Azure endpoint repair, and duration validation repair; their central policies remain represented in the changed paths. (3902d61c00bc)
  • Prepared media is historical context: Inspected all three downloaded images: they show the earlier Talk catalog discovery work, not this parsing refactor. That item's video preparation reports ffprobe ENOENT, and no browser playback tool is available; this does not create a contributor proof defect.

Likely related people:

  • Peter Steinberger: Raw commit 44aaaa7 adds src/secrets/channel-secret-basic-runtime.ts:91 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 44aaaa7c5753; files: src/secrets/channel-secret-basic-runtime.ts)
  • Vincent Koc: Raw commit dfb6c9c adds src/secrets/channel-secret-basic-runtime.ts:26 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: dfb6c9c92079; files: src/secrets/channel-secret-basic-runtime.ts)
  • Mariano: Raw commit 9fa2a21 adds extensions/voice-call/src/config.ts:291 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 9fa2a214dde1; files: extensions/voice-call/src/config.ts)

PR surface

Source -498, Tests +268, Docs +27, Config +10, Other -1. Total -194 across 61 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 44 912 1410 -498
Tests 9 291 23 +268
Docs 3 29 2 +27
Config 2 12 2 +10
Generated 0 0 0 0
Other 3 2 3 -1
Total 61 1246 1440 -194

Review metrics

Metric Value Why it matters
Production versus test TypeScript Production +909/-1410; tests +291/-23 The consolidation removes 501 net production lines; added coverage exercises accumulation, credential ownership, configuration defaults, and parsing contracts.

Labels

Label changes:

  • add P3: This is maintenance consolidation with no intended user-visible behavior change or established urgent defect.
  • add merge-risk: 🚨 compatibility: The PR extends the public channel-secret callback contract and adds private SDK helpers; maintainer authorship approves the direction, and no shipped API removal was identified.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: This is maintenance consolidation with no intended user-visible behavior change or established urgent defect.
  • merge-risk: 🚨 compatibility: The PR extends the public channel-secret callback contract and adds private SDK helpers; maintainer authorship approves the direction, and no shipped API removal was identified.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 15, 2026, 3:06 PM ET / 19:06 UTC.

@steipete
steipete marked this pull request as ready for review October 15, 2026 19:08
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T22:23:21.390877Z 88fb128 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Security-sensitive guard cleared

Current revision: 88fb128ee3cdcf7241471e7dc9531d93a69f1e03

This PR no longer changes files in the maintainer security-review tier.

Separate CODEOWNERS requirements still apply to security policy and enforcement files.

@steipete
steipete force-pushed the deslop/z15-family-directives-config-20261015 branch from d3ec3b8 to e77c891 Compare October 15, 2026 19:20
@openclaw-barnacle openclaw-barnacle Bot removed channel: googlechat Channel integration: googlechat channel: matrix Channel integration: matrix channel: msteams Channel integration: msteams channel: nostr Channel integration: nostr channel: slack Channel integration: slack cli CLI command changes scripts Repository scripts plugin: google-meet plugin: file-transfer extensions: microsoft extensions: openrouter channel: buzz labels Oct 15, 2026
@steipete
steipete merged commit 8d4e374 into main Oct 15, 2026
136 of 147 checks passed
@steipete
steipete deleted the deslop/z15-family-directives-config-20261015 branch October 15, 2026 22:31
steipete added a commit that referenced this pull request Oct 16, 2026
Complete the retained configuration family from #173394. Preserve main's cron and restart fixture fixes, and exclude the four UI-reachable changes plus their dependent omission migration. Keep provider precedence, account ownership, meeting defaults, TTS layering, and duration policies.
steipete added a commit that referenced this pull request Oct 16, 2026
* refactor: consolidate secret and meeting configuration

Complete the retained configuration family from #173394. Preserve main's cron and restart fixture fixes, and exclude the four UI-reachable changes plus their dependent omission migration. Keep provider precedence, account ownership, meeting defaults, TTS layering, and duration policies.

* refactor(config): keep independent meeting configuration consolidation

Restore the nine changed core files reachable from failed runtime tests and
their dependent provider migrations. Keep the shared meeting configuration
owner, typed Fish/MiniMax reads, Slack record predicate, and existing-behavior
Google Chat regression coverage.

Preserve public configuration, credential policy, provider defaults, and
shipped SDK contracts. The excluded family remains on the preservation branch.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
…#173947)

* refactor: consolidate secret and meeting configuration

Complete the retained configuration family from openclaw#173394. Preserve main's cron and restart fixture fixes, and exclude the four UI-reachable changes plus their dependent omission migration. Keep provider precedence, account ownership, meeting defaults, TTS layering, and duration policies.

* refactor(config): keep independent meeting configuration consolidation

Restore the nine changed core files reachable from failed runtime tests and
their dependent provider migrations. Keep the shared meeting configuration
owner, typed Fish/MiniMax reads, Slack record predicate, and existing-behavior
Google Chat regression coverage.

Preserve public configuration, credential policy, provider defaults, and
shipped SDK contracts. The excluded family remains on the preservation branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: voice-call Channel integration: voice-call docs Improvements or additions to documentation extensions: browser extensions: elevenlabs extensions: fish-audio Extension: fish-audio extensions: google extensions: gradium extensions: inworld Extension: inworld extensions: minimax extensions: openai extensions: volcengine extensions: vydra extensions: xai extensions: xiaomi merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. plugin: azure-speech Azure Speech plugin rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant