Skip to content

[Experimental] chore: prune generated and vendored surfaces - #78558

Merged
steipete merged 8 commits into
mainfrom
experimental/generated-surface-pruning
May 7, 2026
Merged

steipete merged 8 commits into
mainfrom
experimental/generated-surface-pruning

Conversation

@steipete

@steipete steipete commented May 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Experimental PR. Canvas is low-use, so this moves Canvas out of core ownership and into a bundled experimental plugin while preserving Canvas as an app/client feature.

The latest pass removes the runtime compatibility layers that were still keeping Canvas wired into core: legacy top-level canvasHost runtime reads/schema, Canvas-specific gateway hello fields, and the Canvas capability refresh RPC. The doctor/fix migration for old canvasHost configs is intentionally kept so users can still repair old config files into plugins.entries.canvas.config.host.

What changed

  • Removed vendored vendor/a2ui; Canvas consumes @a2ui/[email protected] from npm.
  • Moved Canvas runtime ownership into extensions/canvas: tool, host/A2UI serving, documents, CLI implementation, manifest/package metadata, plugin config schema, docs, and bundled asset hooks.
  • Added generic plugin seams for nested CLI features, hosted media resolvers, plugin HTTP routes, WebSocket upgrades, hosted plugin surface URLs, and node capability auth.
  • Canvas now registers its node invoke policy, hosted media resolver, HTTP/A2UI routes, and openclaw nodes canvas command from the Canvas plugin.
  • Removed runtime legacy config compatibility: no top-level canvasHost schema/type/help/read path and no Canvas-specific config reload restart key.
  • Kept doctor migration only: openclaw doctor --fix rewrites legacy canvasHost to plugins.entries.canvas.config.host, then removes the old key.
  • Removed protocol compatibility: hello-ok.canvasHostUrl, canvasCapability, canvasCapabilityExpiresAtMs, and node.canvas.capability.refresh are gone.
  • Replaced native client fallback refresh flows with pluginSurfaceUrls["canvas"] on iOS, Android, and macOS.
  • Removed core system-prompt Canvas root injection; webchat embed guidance now stays generic/profile-scoped.
  • Updated docs and generated plugin SDK API baseline for the new public protocol/config surface.

Current shape

Core owns only generic plugin/runtime plumbing: discovery, tool registration, node invoke policy registry, gateway HTTP/auth dispatch, WebSocket upgrades, hosted media resolution, plugin surface URL advertisement, and node capability checks.

Canvas-specific runtime behavior lives under extensions/canvas. Native app Canvas handlers remain under apps/ because they are client/UI implementations, not core plugin runtime ownership.

Verification

  • pnpm test src/gateway/plugin-node-capability.test.ts src/gateway/server.plugin-node-capability-auth.test.ts src/gateway/server/ws-connection.test.ts src/gateway/server/ws-connection.startup.test.ts src/config/schema.help.quality.test.ts extensions/canvas/src/config.test.ts
  • pnpm test extensions/canvas/src/config-migration.test.ts src/plugins/setup-registry.canvas.test.ts
  • pnpm tsgo:core
  • pnpm tsgo:extensions
  • pnpm tsgo:extensions:test
  • pnpm tsgo:core:test
  • ANDROID_HOME="$HOME/Library/Android/sdk" ./gradlew :app:testPlayDebugUnitTest --tests ai.openclaw.app.gateway.GatewaySessionInvokeTest --tests ai.openclaw.app.gateway.GatewaySessionInvokeTimeoutTest --tests ai.openclaw.app.node.InvokeDispatcherTest
  • swift test --filter GatewayNodeSessionTests in apps/shared/OpenClawKit
  • swift test --filter MacGatewayChatTransportMappingTests in apps/macos
  • swift test --filter CanvasWindowSmokeTests in apps/macos
  • pnpm build
  • pnpm plugins:inventory:check
  • pnpm plugin-sdk:api:gen && pnpm plugin-sdk:api:check
  • git diff --check

Known unrelated local full-suite Swift failures observed while verifying:

  • swift test in apps/shared/OpenClawKit compiled the touched code but failed TalkConfigContractTests.selectionFixtures.
  • swift test in apps/macos compiled the package but failed MenuSessionsInjectorTests.injects session rows.

CI intentionally not waited on per maintainer request.

@steipete
steipete requested a review from a team as a code owner May 6, 2026 17:04
@clawsweeper

clawsweeper Bot commented May 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

Summary
The PR moves Canvas runtime ownership into extensions/canvas, removes vendored/generated A2UI surfaces, adds generic plugin HTTP/WebSocket/surface/capability seams, updates clients/docs/protocol baselines, and prunes related generated/vendor files.

Reproducibility: yes. for the review findings: current PR-head source inspection reproduces the removed redaction guidance, broad JSON formatter ignore, changelog drift, cron repair regression, plugin CLI shadowing path, cached Canvas init failure, and selected-route upgrade auth bug. I did not establish a live Canvas/A2UI runtime reproduction for the full refactor.

Real behavior proof
Needs real behavior proof before merge: The PR body lists tests and builds, but I found no after-fix real Canvas/A2UI behavior proof on the current head; add redacted screenshots, recordings, terminal/live output, linked artifacts, or logs and update the PR body for re-review.

Next step before merge
Protected maintainer-labeled XL PR with dirty state, missing real behavior proof, security-sensitive concerns, and several blocking source findings needs contributor fixes plus maintainer review.

Security
Needs attention: The current diff still removes proof privacy guidance and introduces plugin CLI command-shadowing behavior that affects trusted command dispatch.

Review findings

  • [P2] Restore proof redaction guidance in CONTRIBUTING — CONTRIBUTING.md:106
  • [P2] Keep JSON files covered by oxfmt — .oxfmtrc.jsonc:17
  • [P2] Restore unrelated Unreleased changelog entries — CHANGELOG.md:12
Review details

Best possible solution:

Keep the Canvas-to-plugin refactor under explicit maintainer review, but require a clean rebase, restored safety/tooling/changelog/cron behavior, selected-route auth fixes, and redacted live Canvas/A2UI proof before merge.

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

Yes for the review findings: current PR-head source inspection reproduces the removed redaction guidance, broad JSON formatter ignore, changelog drift, cron repair regression, plugin CLI shadowing path, cached Canvas init failure, and selected-route upgrade auth bug. I did not establish a live Canvas/A2UI runtime reproduction for the full refactor.

Is this the best way to solve the issue?

No. Moving Canvas behind generic plugin seams may be a reasonable direction, but this branch is not the safest merge path while it is dirty, lacks live behavior proof, and still carries source-confirmed regressions.

Full review comments:

  • [P2] Restore proof redaction guidance in CONTRIBUTING — CONTRIBUTING.md:106
    This removes the contributor-facing reminder to redact IP addresses, API keys, phone numbers, non-public endpoints, and other private details from proof artifacts. Contributors use this file as a PR requirements source, so the proof gate loses its privacy warning.
    Confidence: 0.9
  • [P2] Keep JSON files covered by oxfmt — .oxfmtrc.jsonc:17
    Ignoring every **/*.json file removes package manifests, plugin manifests, tsconfigs, and generated JSON baselines from pnpm format:check, even though this config still expects package-json ordering to be enforced.
    Confidence: 0.88
  • [P2] Restore unrelated Unreleased changelog entries — CHANGELOG.md:12
    The changelog edit drops unrelated current Unreleased bullets while adding the Canvas note, including contributor-attributed release notes that need to survive rebase.
    Confidence: 0.9
  • [P2] Restore cron model-sentinel cleanup — src/commands/doctor-cron-store-migration.ts:381-388
    normalizeStoredCronJobs no longer strips legacy payload.model sentinels such as "default", "null", blanks, or JSON null before persisting migrated jobs. Those values are treated as explicit model overrides at runtime and can make repaired cron jobs fail instead of inheriting the default model.
    Confidence: 0.9
  • [P2] Preserve built-in node subcommands for plugin CLI loading — src/plugins/register-plugin-cli-command-groups.ts:78-84
    This branch runs before overlap checks and force-registers entries when the parent path matches the primary command, so a plugin registering under openclaw nodes can replace built-in subcommands such as status. Nested plugin commands should still respect the existing overlap guard.
    Confidence: 0.86
  • [P2] Retry Canvas host initialization after transient failure — extensions/canvas/src/http-route.ts:26-40
    hostHandlerPromise ??= caches the async Canvas host initializer. If createCanvasHostHandler throws once, the rejected promise is reused for later requests/upgrades until process restart, turning a transient filesystem or state failure into a persistent Canvas outage.
    Confidence: 0.84
  • [P2] Gate upgrade auth against the selected plugin route — src/gateway/server/plugins-http.ts:194-198
    createGatewayPluginUpgradeHandler computes requiresGatewayAuth across all matching upgrade routes before dispatching. A broad auth: "gateway" route can therefore reject a more-specific matched route that uses plugin auth and would actually handle the socket.
    Confidence: 0.83
  • [P2] Avoid collapsing capability routes by surface name alone — src/gateway/server/plugins-http/route-capability.ts:57-65
    listPluginNodeCapabilities deduplicates by surface, but capability storage includes scopeKey for the plugin owner. If two plugins register the same surface, only one scope is minted at connect and the other route cannot use its scoped capability URL unless it falls back to gateway auth.
    Confidence: 0.8

Overall correctness: patch is incorrect
Overall confidence: 0.91

Security concerns:

  • [medium] Proof redaction guidance is removed — CONTRIBUTING.md:106
    Dropping the CONTRIBUTING reminder to redact IP addresses, API keys, phone numbers, non-public endpoints, and other private details increases the chance that proof screenshots, logs, or terminal output expose sensitive information.
    Confidence: 0.9
  • [medium] Plugins can shadow built-in node CLI commands — src/plugins/register-plugin-cli-command-groups.ts:78
    The new nested plugin CLI registration path can remove and replace built-in node subcommands before overlap checks run, making command dispatch depend on plugin registration in a way users may not expect.
    Confidence: 0.82

What I checked:

  • Live PR state: Public GitHub API reports head 3d2082af746216603aaa2d8b9a6508e8df558482, mergeable=false, mergeable_state=dirty, 1047 changed files, 12273 additions, and 81171 deletions. (3d2082af7462)
  • Protected label: The issue API reports labels including maintainer and size: XL, so this workflow must not auto-close it.
  • Real behavior proof missing: The PR body lists tests/builds but no after-fix live Canvas/A2UI screenshots, recordings, terminal output, logs, or linked artifacts, and current labels do not include proof: sufficient or proof: override. (3d2082af7462)
  • Redaction guidance removed: Current main reminds contributors to redact private information from proof artifacts; PR head removes that sentence from the same requirement. (CONTRIBUTING.md:106, 3d2082af7462)
  • JSON formatter coverage removed: PR head adds **/*.json to .oxfmtrc.jsonc ignore patterns, while current main keeps JSON files covered by the formatter config. (.oxfmtrc.jsonc:17, 3d2082af7462)
  • Changelog drift: PR head drops unrelated current Unreleased entries, including the contributor proof redaction note and many entries present on current main. (CHANGELOG.md:12, 3d2082af7462)

Likely related people:

  • steipete: Recent main history includes Canvas host performance/refactor work, gateway/config refactors, plugin loader changes, and CLI Canvas maintenance across the central surfaces touched here. (role: recent maintainer and adjacent owner; confidence: high; commits: 56573185f2, 7f3f108521, b85b1c68d1; files: src/canvas-host/server.ts, src/gateway/server-http.ts, src/plugins/loader.ts)
  • vincentkoc: Recent main history shows gateway HTTP/plugin dispatch maintenance and the plugin CLI activation-planning change that introduced the current overlap guard being modified by this PR. (role: gateway and plugin CLI maintainer; confidence: high; commits: d38e30e02c, c7d77f8c7b, a9c7c2e1ed; files: src/gateway/server-http.ts, src/plugins/register-plugin-cli-command-groups.ts, src/plugins/loader.ts)
  • kevinslin: Current main's cron payload.model sentinel repair comes from a recent cron fix, which this PR currently removes from doctor migration behavior. (role: cron repair behavior introducer; confidence: high; commits: 6aafdf121a; files: src/commands/doctor-cron-store-migration.ts, src/commands/doctor-cron-store-migration.test.ts)
  • jacobtomlinson: Canvas host history includes a merged feature contribution for default status DOM nodes, making them an adjacent Canvas host routing candidate if host behavior questions remain. (role: Canvas host contributor; confidence: low; commits: df0e136bc7; files: src/canvas-host/server.ts)

Remaining risk / open question:

  • The branch is dirty/unmergeable against the current base, so review findings may shift after rebase.
  • The PR changes gateway protocol, plugin runtime seams, native clients, docs, CI, and vendored dependencies; source review found blockers but did not live-run Canvas/A2UI.
  • The PR body provides test/build commands but no inspected real runtime proof for the moved Canvas surface.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 1ef85c7d4c30.

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

💡 Codex Review


P1 Badge Restore missing Crabbox runtime module before importing it

This import points to ./crabbox-runtime.js, but that module is not present in this commit, so loading this runtime now fails with Cannot find module .../crabbox-runtime.js. Any execution path that imports the desktop/slack/visual mantis smoke runtimes will crash before running logic, which breaks QA smoke workflows rather than just type safety.


import { writeManagedNpmPlugin } from "./test-helpers/managed-npm-plugin.js";

P2 Badge Add the extracted managed NPM plugin helper file

These tests now import ./test-helpers/managed-npm-plugin.js, but that helper file is not added in this commit, so the suite fails at module load (Cannot find module './test-helpers/managed-npm-plugin.js') and no tests execute. This regresses plugin test coverage in CI for all files switched to that shared helper.

ℹ️ 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".

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 6, 2026
@steipete
steipete force-pushed the experimental/generated-surface-pruning branch from f0c880c to 8904061 Compare May 6, 2026 17:44
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation cli CLI command changes docker Docker and sandbox tooling agents Agent runtime and tooling labels May 6, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

💡 Codex Review


P1 Badge Load Canvas plugin at startup so node policies apply

node-command-policy now sources default Canvas command allowlisting from active plugin nodeInvokePolicies, but this manifest disables startup activation. On a fresh gateway boot, the Canvas policy is absent until some unrelated path loads full plugin runtime, so node.invoke calls like canvas.snapshot are rejected as not allowlisted (including openclaw nodes canvas ... and the Canvas agent tool). Marking the plugin startup-active (or otherwise ensuring its node policy is registered during gateway bootstrap) avoids this regression.

ℹ️ 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".

@clawsweeper clawsweeper Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 6, 2026
@steipete
steipete force-pushed the experimental/generated-surface-pruning branch from 8904061 to fd75c9c Compare May 6, 2026 18:06
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

💡 Codex Review

return await imageResultFromFile({
label: "canvas:snapshot",
path: filePath,
details: { format: payload.format },
});

P2 Badge Preserve canvas snapshot image sanitization limits

The canvas tool now returns snapshot images via imageResultFromFile(...) without passing any imageSanitization limits, so configured agents.defaults.imageMaxDimensionPx is no longer enforced for canvas.snapshot. This is a behavior regression from the previous core tool path and can reintroduce oversized image payloads (larger token usage, higher memory, and provider-side image-size failures) for users who rely on that limit.


await handlePluginUpgrade(req, socket, head, pathContext, {
gatewayAuthSatisfied: false,
})

P1 Badge Enforce plugin websocket auth before upgrade dispatch

The upgrade path always passes gatewayAuthSatisfied: false into plugin WS dispatch, which means any plugin route registered with auth: "gateway" can never satisfy createGatewayPluginUpgradeHandler's auth gate and will be skipped. Because skipped routes fall through to the core wss.handleUpgrade path, authenticated plugin websocket endpoints are effectively broken and can be misrouted to the generic gateway websocket handler instead of being explicitly authorized/rejected.

ℹ️ 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".

@steipete
steipete force-pushed the experimental/generated-surface-pruning branch from fd75c9c to d614a05 Compare May 6, 2026 18:31

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

https://github.com/openclaw/openclaw/blob/057db0252e175f80731477fdd27ac6e0d3a0e507/extensions/canvas/src/host/a2ui.ts#L49-L51
P1 Badge Ensure A2UI bundle exists before accepting Canvas A2UI requests

resolveA2uiRoot() now requires both index.html and a2ui.bundle.js to exist in a candidate directory; with this commit the tracked bundle file was removed, so fresh source checkouts return 503 A2UI assets not found for /__openclaw__/a2ui/* unless users manually run the bundle step first. This breaks Canvas/A2UI behavior out of the box in dev/runtime flows that do not run canvas:a2ui:bundle.

ℹ️ 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".

Comment on lines +870 to +872
await handlePluginUpgrade(req, socket, head, pathContext, {
gatewayAuthSatisfied: false,
})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Pass auth context into plugin WebSocket upgrade dispatch

The new plugin WebSocket path is invoked with gatewayAuthSatisfied: false unconditionally, but createGatewayPluginUpgradeHandler blocks any matched route that uses auth: "gateway" unless this flag is true (and scope context is present). As a result, plugin routes that register handleUpgrade with gateway auth can never succeed and will always be skipped/blocked during upgrade handling.

Useful? React with 👍 / 👎.

@steipete
steipete force-pushed the experimental/generated-surface-pruning branch from 057db02 to c2f731b Compare May 6, 2026 19:11

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c2f731bffc

ℹ️ 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".

Comment thread src/gateway/server.impl.ts Outdated
@@ -1343,9 +1325,8 @@ export async function startGatewayServer(
preauthConnectionBudget,
port,
gatewayHost: bindHost ?? undefined,
canvasHostEnabled: Boolean(canvasHost),
canvasHostEnabled,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Derive canvas host availability from loaded plugin state

canvasHostEnabled is now forwarded from config (readCanvasHostEnabled) instead of actual runtime registration success, so the gateway can advertise canvasHostUrl even when the canvas plugin failed to load/register routes. This can happen because gateway startup calls loadOpenClawPlugins(...) without throwOnLoadError, so plugin errors are non-fatal (src/gateway/server-plugins.ts:604). In that state, clients receive a scoped canvas URL/capability that resolves to no handler (404/failed upgrades), whereas previous behavior only advertised canvas when the host actually started.

Useful? React with 👍 / 👎.

@steipete
steipete force-pushed the experimental/generated-surface-pruning branch 4 times, most recently from 96e71a9 to 9e251b0 Compare May 6, 2026 21:02

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b6897d457a

ℹ️ 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".

Comment on lines 148 to 150
"node.pending.ack",
"node.invoke.result",
"node.event",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add plugin surface refresh RPCs to BASE_METHODS

BASE_METHODS no longer includes either node.pluginSurface.refresh (new core handler) or the legacy node.canvas.capability.refresh, but startup uses listGatewayMethods() as coreGatewayMethodNames when loading plugins. That means a plugin can now register one of these method names without conflict and handleGatewayRequest will dispatch the plugin handler first (extraHandlers precedence), effectively letting plugins shadow core refresh auth/capability behavior; these methods are also omitted from hello.features.methods for clients that gate calls on advertised support.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7ce4353e7e

ℹ️ 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".

Comment thread src/gateway/plugin-node-capability.ts Outdated
Comment on lines +222 to +223
const entry = client.pluginNodeCapabilities?.[surface];
if (!entry || entry.expiresAtMs <= nowMs) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Scope capability authorization to route owner, not surface string

Capability authorization is keyed only by surface, so any two plugin routes that reuse the same surface name implicitly share a token. In this commit, nodeCapability.surface is plugin-provided and there is no uniqueness check at registration time, while hasAuthorizedPluginNodeCapability accepts a request if any client has a matching token for that surface. That lets a different plugin route (or a second route family) piggyback on another surface’s credential and bypass intended isolation/TTL policy for that route.

Useful? React with 👍 / 👎.

@steipete
steipete force-pushed the experimental/generated-surface-pruning branch from b813e9d to 5bbf3d6 Compare May 7, 2026 04:07
@steipete
steipete requested a review from a team as a code owner May 7, 2026 04:07
@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord channel: telegram Channel integration: telegram commands Command implementations labels May 7, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5bbf3d64a0

ℹ️ 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".

Comment on lines 381 to 384
if (payloadRecord) {
if (
payloadRecord.kind === "agentTurn" &&
"model" in payloadRecord &&
isInvalidCronPayloadModelSentinel(payloadRecord.model)
) {
delete payloadRecord.model;
mutated = true;
trackIssue("invalidCronPayloadModel");
}
const hadLegacyPayloadProvider = Boolean(normalizeOptionalString(payloadRecord.provider));
if (migrateLegacyCronPayload(payloadRecord)) {
mutated = true;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore cron model-sentinel cleanup in store migration

normalizeStoredCronJobs no longer strips legacy payload.model sentinels before persisting migrated jobs, so existing stores that still contain values like "default", "null", or empty strings keep an explicit model override that should have been treated as inheritance. In that state, cron execution now treats the sentinel as a real override and resolveCronModelSelection rejects it as an invalid model, causing affected scheduled jobs to fail after upgrade instead of self-healing during doctor repair (src/cron/isolated-agent/model-selection.ts).

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0941804810

ℹ️ 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".

Comment on lines +62 to +64
const existing = surfaces.get(surface);
if (!existing || resolveTtlMs(next) < resolveTtlMs(existing)) {
surfaces.set(surface, next);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid collapsing capability routes by surface name alone

listPluginNodeCapabilities deduplicates entries by surface, but capability auth now keys stored tokens by scopeKey (plugin owner + surface). If two plugins register the same nodeCapability.surface, only one owner’s scope survives this map and gets minted during connect, while requests to the other owner’s route will always fail capability auth unless the caller also supplies bearer gateway auth. This creates a silent routing/auth break for one plugin whenever surface names collide; either enforce global surface uniqueness at registration time or keep per-owner capability entries here.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3d2082af74

ℹ️ 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".

Comment on lines +194 to +196
const requiresGatewayAuth = matchedPluginRoutesRequireGatewayAuth(matchedRoutes);
if (requiresGatewayAuth && dispatchContext?.gatewayAuthSatisfied !== true) {
log.warn(`plugin http upgrade blocked without gateway auth (${pathContext.canonicalPath})`);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Gate gateway-auth checks to selected upgrade route

createGatewayPluginUpgradeHandler computes requiresGatewayAuth across all matching upgrade routes before dispatching, so a broader auth: "gateway" route can force a 401 even when a more-specific matched route with auth: "plugin" would actually handle the socket. This creates false auth failures for overlapping upgrade paths (e.g., exact public endpoint under a protected prefix). Auth enforcement should be derived from the effective dispatched route ordering rather than some(...) across all matches.

Useful? React with 👍 / 👎.

@steipete
steipete force-pushed the experimental/generated-surface-pruning branch from b446382 to 590c95e Compare May 7, 2026 08:06
@steipete
steipete merged commit 2c33464 into main May 7, 2026
44 of 54 checks passed
@steipete
steipete deleted the experimental/generated-surface-pruning branch May 7, 2026 08:07
@steipete

steipete commented May 7, 2026

Copy link
Copy Markdown
Contributor Author

Landed via rebase onto main.

  • Local proof: pnpm build:docker; pnpm tsgo:core; pnpm tsgo:core:test; pnpm test src/agents/pi-embedded-runner/tool-result-context-guard.test.ts src/agents/pi-embedded-subscribe.handlers.tools.test.ts extensions/discord/src/target-parsing.test.ts src/plugins/loader-channel-setup.test.ts; pnpm plugin-sdk:api:check; git diff --check
  • Rebased PR head: 590c95e
  • Merge commit: 2c33464

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: ios App: ios app: macos App: macos app: web-ui App: web-ui channel: discord Channel integration: discord channel: telegram Channel integration: telegram cli CLI command changes commands Command implementations docker Docker and sandbox tooling docs Improvements or additions to documentation extensions: codex extensions: deepseek extensions: memory-core Extension: memory-core extensions: qa-lab gateway Gateway runtime maintainer Maintainer-authored PR scripts Repository scripts size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant