GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Expose project provider skills in chat by jakeleventhal · Pull Request #3982 · pingdotgg/t3code Conversation
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
ApprovabilityVerdict: Needs human review 5 blocking correctness issues found. New feature introducing project-aware provider skill discovery with new RPC endpoints, subprocess spawning, and UI integration across mobile and web. Multiple unresolved review comments identify potential bugs (stale caching, missing config, authorization scope concerns) that warrant human review before merge. You can customize Macroscope's approvability policy. Learn more. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 917ea83630
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| const commandResult = yield* spawnAndCollect( | ||
| binaryPath, | ||
| ChildProcess.make(spawnCommand.command, spawnCommand.args, { | ||
| cwd: input.cwd, | ||
| ...(input.environment ? { env: input.environment } : {}), | ||
| shell: spawnCommand.shell, | ||
| }), | ||
| ).pipe( |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
When grok inspect hangs or is interrupted, this spawn is only attached to whatever ambient Scope happens to be running the RPC/adapter call; GrokDriver.listSkills exposes it as a normal service method and does not create a per-call scope. In that case the 10s timeout can return an error while the child process remains tied to a longer-lived provider/server scope, so repeated $ menu opens or sends with $skill tokens can accumulate stuck grok inspect processes until shutdown. Wrap the spawned spawnAndCollect probe in its own Effect.scoped before applying the timeout.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if (input.cachedSkills?.targetKey === input.targetKey) { | ||
| return input.cachedSkills.skills; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Avoid serving cached skills after discovery failures
When the current cwd-aware skill query fails (for example, grok inspect exits non-zero), discoveredSkills is null and discoveryUnsupported is false, so this branch still returns the previous successful cache for the same target. That makes the menu offer stale skills while the provider is currently unable to rediscover them; selecting one then sends a $skill token that Grok re-checks at send time and fails, blocking the turn instead of surfacing the discovery failure in the composer.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| environmentId, | ||
| instanceId: selectedProviderStatus?.instanceId ?? null, | ||
| cwd: gitCwd, | ||
| enabled: composerTriggerKind === "skill", |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Do not probe skills for env-var tokens
When the user types a shell/env-var token such as $PATH or $NODE_ENV, detectComposerTrigger still marks the token as a skill, so this enables server.listProviderSkills and spawns provider CLI probes even though the Grok send path explicitly filters uppercase env-var-style tokens. In prompts or docs involving env vars, merely placing the cursor after $PATH opens the skill menu and can run grok inspect; gate this query with the same env-var-style check or wait until the token can plausibly be a skill.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
917ea83 to
ecda648
Compare
| return yield* probeCodexAppServerProvider({ | ||
| binaryPath: effectiveConfig.binaryPath, | ||
| homePath: effectiveConfig.homePath, | ||
| cwd, | ||
| customModels: [], | ||
| environment: processEnv, | ||
| includeModels: false, | ||
| }).pipe( |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Medium Drivers/CodexDriver.ts:173
listSkills calls probeCodexAppServerProvider without passing effectiveConfig.launchArgs, so instances that require custom Codex launch arguments (e.g. --config flags) are probed with a different app-server configuration than their normal snapshot and sessions. Skill discovery can return the wrong skill set or fail even though the provider itself works. Pass launchArgs: resolveCodexLaunchArgs(effectiveConfig.launchArgs, processEnv) as the status probe already does.
| return yield* probeCodexAppServerProvider({ | |
| binaryPath: effectiveConfig.binaryPath, | |
| homePath: effectiveConfig.homePath, | |
| cwd, | |
| customModels: [], | |
| environment: processEnv, | |
| includeModels: false, | |
| }).pipe( | |
| return yield* probeCodexAppServerProvider({ | |
| binaryPath: effectiveConfig.binaryPath, | |
| homePath: effectiveConfig.homePath, | |
| launchArgs: resolveCodexLaunchArgs(effectiveConfig.launchArgs, processEnv), | |
| cwd, | |
| customModels: [], | |
| environment: processEnv, | |
| includeModels: false, | |
| }).pipe( |
In file @apps/server/src/provider/Drivers/CodexDriver.ts around lines 173-180:
`listSkills` calls `probeCodexAppServerProvider` without passing `effectiveConfig.launchArgs`, so instances that require custom Codex launch arguments (e.g. `--config` flags) are probed with a different app-server configuration than their normal snapshot and sessions. Skill discovery can return the wrong skill set or fail even though the provider itself works. Pass `launchArgs: resolveCodexLaunchArgs(effectiveConfig.launchArgs, processEnv)` as the status probe already does.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: ecda6483c4
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| return yield* probeCodexAppServerProvider({ | ||
| binaryPath: effectiveConfig.binaryPath, | ||
| homePath: effectiveConfig.homePath, | ||
| cwd, | ||
| customModels: [], | ||
| environment: processEnv, | ||
| includeModels: false, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Pass Codex launch args to skill probes
When a Codex instance is configured with launchArgs or T3CODE_CODEX_LAUNCH_ARGS (for example --strict-config, --config, or feature flags), status checks and real sessions resolve and pass those args, but this new server.listProviderSkills path starts a plain app-server without them. In that configuration the $ menu can discover a different skill set or fail even though the provider itself works with the configured app-server; pass the resolved launch args into probeCodexAppServerProvider here as the other Codex app-server callers do.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @@ -295,6 +297,7 @@ const RPC_REQUIRED_SCOPE = new Map<string, AuthEnvironmentScope>([ | |||
| [WS_METHODS.serverProbe, AuthOrchestrationReadScope], | |||
| [WS_METHODS.serverGetConfig, AuthOrchestrationReadScope], | |||
| [WS_METHODS.serverRefreshProviders, AuthOrchestrationOperateScope], | |||
| [WS_METHODS.serverListProviderSkills, AuthOrchestrationReadScope], | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Gate skill discovery behind operate scope
For sessions that only have orchestration:read, this new RPC still reaches the handler that calls providerRegistry.listSkills, and the new driver implementations start provider subprocesses (codex app-server or grok inspect) in the requested cwd. Comparable provider probing via serverRefreshProviders is already orchestration:operate, so leaving this as read-only lets restricted clients launch local provider processes through the skill menu; require the operate scope here as well.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
ecda648 to
0ab5044
Compare
| target.enabled && | ||
| target.environmentId !== null && | ||
| target.instanceId !== null && | ||
| target.cwd !== null |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Medium state/queries.ts:129
useProviderSkills treats an empty cwd string as a valid target — it only checks target.cwd !== null — so when the new-task flow passes workspaceRoot: "" for a pending task and the user types a $ trigger, the hook sends a provider-skills RPC with cwd: "" instead of disabling the query. The contract requires a non-empty cwd, so discovery fails as a normal error rather than being skipped or falling back as unsupported, leaving skills unavailable for that pending-task case. Use the same empty-string-to-null coercion that useBranches applies.
- target.enabled && - target.environmentId !== null && - target.instanceId !== null && - target.cwd !== null + target.enabled && + target.environmentId !== null && + target.instanceId !== null && + target.cwd !== null && + target.cwd !== ""
apps/mobile/src/features/threads/new-task-flow-provider.tsx:407
providerSkillsCwdpreserves the empty string from an editing placeholder project'sworkspaceRoot. When a queued task has no snapshottedprojectCwd, its shell is unavailable, and the user types a skill trigger,useProviderSkillstherefore sends discovery withcwd: ""instead of disabling the query. This contradicts the placeholder's explicit no-cwd sentinel and can discover against an unintended process-relative directory or fail, leaving the skill menu incorrect; use the same empty-string-to-nullhandling asbranchTarget.
In file @apps/mobile/src/state/queries.ts around lines 129-132:
`useProviderSkills` treats an empty `cwd` string as a valid target — it only checks `target.cwd !== null` — so when the new-task flow passes `workspaceRoot: ""` for a pending task and the user types a `$` trigger, the hook sends a provider-skills RPC with `cwd: ""` instead of disabling the query. The contract requires a non-empty `cwd`, so discovery fails as a normal error rather than being skipped or falling back as unsupported, leaving skills unavailable for that pending-task case. Use the same empty-string-to-`null` coercion that `useBranches` applies.
Also found in 1 other location(s):
- apps/mobile/src/features/threads/new-task-flow-provider.tsx:407 -- `providerSkillsCwd` preserves the empty string from an editing placeholder project's `workspaceRoot`. When a queued task has no snapshotted `projectCwd`, its shell is unavailable, and the user types a skill trigger, `useProviderSkills` therefore sends discovery with `cwd: ""` instead of disabling the query. This contradicts the placeholder's explicit no-cwd sentinel and can discover against an unintended process-relative directory or fail, leaving the skill menu incorrect; use the same empty-string-to-`null` handling as `branchTarget`.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ); | ||
| } | ||
|
|
||
| function potentialGrokSkillTokens(input: string) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Medium Layers/GrokAdapter.ts:109
potentialGrokSkillTokens filters out only all-uppercase tokens, so a lowercase shell variable like $foo in a prompt such as echo $foo is treated as a skill token and triggers listSkills. When grok inspect fails, sendTurn rejects the entire prompt with ProviderAdapterRequestError instead of sending the literal text. This breaks otherwise-valid prompts that happen to contain ordinary shell syntax. Consider tightening the token classification so common shell variables are not mistaken for skill names, or make discovery failures non-fatal so the prompt is still sent as literal text.
In file @apps/server/src/provider/Layers/GrokAdapter.ts around line 109:
`potentialGrokSkillTokens` filters out only all-uppercase tokens, so a lowercase shell variable like `$foo` in a prompt such as `echo $foo` is treated as a skill token and triggers `listSkills`. When `grok inspect` fails, `sendTurn` rejects the entire prompt with `ProviderAdapterRequestError` instead of sending the literal text. This breaks otherwise-valid prompts that happen to contain ordinary shell syntax. Consider tightening the token classification so common shell variables are not mistaken for skill names, or make discovery failures non-fatal so the prompt is still sent as literal text.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @@ -508,6 +508,19 @@ export const ProviderRegistryLive = Layer.effect( | |||
| ); | |||
| }); | |||
|
|
|||
| const listSkills = Effect.fn("ProviderRegistry.listSkills")(function* (input: { | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Medium Layers/ProviderRegistry.ts:511
listSkills reads instances from liveSubsRef, which is only updated asynchronously by syncLiveSources. During a settings reconcile, ProviderInstanceRegistryLive closes the old instance and publishes the replacement before syncLiveSources mirrors it into liveSubsRef, so a skills RPC arriving in that window invokes listSkills on an already-closed instance (or finds no instance at all), causing a transient probe failure or stale result. The instance registry is the authoritative source; resolve the instance directly through it as other instance-routed operations do.
In file @apps/server/src/provider/Layers/ProviderRegistry.ts around line 511:
`listSkills` reads instances from `liveSubsRef`, which is only updated asynchronously by `syncLiveSources`. During a settings reconcile, `ProviderInstanceRegistryLive` closes the old instance and publishes the replacement before `syncLiveSources` mirrors it into `liveSubsRef`, so a skills RPC arriving in that window invokes `listSkills` on an already-closed instance (or finds no instance at all), causing a transient probe failure or stale result. The instance registry is the authoritative source; resolve the instance directly through it as other instance-routed operations do.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 0ab50441ed
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ]); | ||
| const composerProviderSkills = resolveComposerProviderSkills({ | ||
| targetKey: providerSkillsTargetKey, | ||
| discoveredSkills: providerSkills.data?.skills ?? null, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Share discovered skills with message timelines
When a skill exists only in the cwd-aware result—especially for Grok, whose provider snapshots contain no skills—this list remains local to ChatComposer and is only passed to the editor. After sending, ChatView still passes activeProviderStatus?.skills to MessagesTimeline, so SkillInlineText cannot recognize the selected $skill and the chip immediately becomes plain text; mobile has the same snapshot-only feed wiring in ThreadDetailScreen. Preserve the target's discovered skills for timeline rendering as well.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| const providerSkills = useProviderSkills({ | ||
| environmentId: props.environmentId, | ||
| instanceId: selectedProviderStatus?.instanceId ?? null, | ||
| cwd: props.projectCwd, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Discover skills from the active mobile worktree
For a thread running in a worktree, ThreadDetailScreen already receives the resolved threadCwd but passes the base projectWorkspaceRoot as this component's projectCwd. Consequently this query and its cache inspect the base checkout while the provider session executes in the worktree, so branch-specific additions or removals produce an incorrect skill menu and selected entries may not invoke anything. Use the active thread cwd for provider-skill discovery, falling back to the project root only when needed.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
0ab5044 to
853fd77
Compare
853fd77 to
09b0e54
Compare
| )?.skills ?? [], | ||
| [selectedEnvironmentServerConfig, selectedModel?.instanceId], | ||
| ); | ||
| const providerSkillsCwd = selectedWorktreePath ?? selectedProject?.workspaceRoot ?? null; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Medium threads/new-task-flow-provider.tsx:407
Skill discovery uses selectedWorktreePath as the query cwd even in local mode, so after selecting a worktree and switching back to local, skills are fetched from the stale worktree path while the task runs from the project's workspace root. The composer can offer project-specific skills from the wrong checkout. setWorkspaceMode intentionally preserves the previous worktreePath when switching modes, so the cached value leaks into the query. Consider deriving the query cwd from workspaceMode — use selectedWorktreePath only in worktree mode and selectedProject?.workspaceRoot in local mode.
In file @apps/mobile/src/features/threads/new-task-flow-provider.tsx around line 407:
Skill discovery uses `selectedWorktreePath` as the query cwd even in `local` mode, so after selecting a worktree and switching back to local, skills are fetched from the stale worktree path while the task runs from the project's workspace root. The composer can offer project-specific skills from the wrong checkout. `setWorkspaceMode` intentionally preserves the previous `worktreePath` when switching modes, so the cached value leaks into the query. Consider deriving the query cwd from `workspaceMode` — use `selectedWorktreePath` only in worktree mode and `selectedProject?.workspaceRoot` in local mode.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 09b0e54. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| instanceId: selectedModel?.instanceId ?? null, | ||
| cwd: providerSkillsCwd, | ||
| enabled: detectComposerTrigger(prompt, prompt.length)?.kind === "skill", | ||
| }); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Medium Severity
The new-task flow's skill discovery only activates when a $ token is at the end of the prompt. This happens because detectComposerTrigger uses prompt.length instead of the actual cursor position. Consequently, mid-sentence $ skill tokens don't trigger useProviderSkills, leaving skill chip metadata stale or empty, unlike the ThreadComposer.
Reviewed by Cursor Bugbot for commit 09b0e54. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Reviewed the new Effect service/error code (GrokSkillDiscovery.ts, driver listSkills closures, ProviderRegistry.listSkills, the new contract errors, and the client query hooks) against the Effect service conventions.
Findings are limited to the error-wrapping boundaries added by this PR: two ProviderDriverError wrappers derive their detail (and therefore their message) from cause.message, and the new RPC handler re-inspects its own error channel with an inline _tag comparison instead of wrapping only the lower-level registry failure.
Other areas look consistent with the conventions: GrokSkillDiscoveryError uses Schema.TaggedErrorClass with a multi-value operation discriminator and a message derived from its own attributes, listGrokSkills acquires ChildProcessSpawner from the environment, no ManagedRuntime/runPromise or fake Layer.succeed dependencies were introduced, and the new client-runtime helpers are pure functions with focused tests.
Posted via Macroscope — Effect Service Conventions
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| new ProviderDriverError({ | ||
| driver: DRIVER_KIND, | ||
| instanceId, | ||
| detail: cause.message, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
detail only copies cause.message, and ProviderDriverError.message interpolates detail, so the wrapper message is derived from the cause rather than from its own stable attributes. Consider a fixed detail that keeps the context known here (cwd) and leave the underlying failure available solely as cause.
| detail: cause.message, | |
| detail: `Failed to list Grok skills for cwd '${cwd}'`, |
Posted via Macroscope — Effect Service Conventions
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| new ProviderDriverError({ | ||
| driver: DRIVER_KIND, | ||
| instanceId, | ||
| detail: `Failed to list Codex skills: ${cause.message}`, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Same issue as the Grok wrapper: detail interpolates cause.message, which then flows into ProviderDriverError.message. Interpolating an arbitrary defect message can also pull spawn command/output text into the caller-visible detail. Prefer structural context and keep the original error only as cause.
| detail: `Failed to list Codex skills: ${cause.message}`, | |
| detail: `Failed to list Codex skills for cwd '${cwd}'`, |
Posted via Macroscope — Effect Service Conventions
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| } | ||
| return { skills }; | ||
| }).pipe( | ||
| Effect.mapError((cause) => |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This mapError has to re-inspect an error the same block just raised (_tag === "ServerProviderSkillsUnsupportedError"). Wrapping only the lower-level registry failure removes the hand-rolled tag check and keeps the already-structured domain error passing through by construction.
Effect.gen(function* () {
- const skills = yield* providerRegistry.listSkills(input);
+ const skills = yield* providerRegistry.listSkills(input).pipe(
+ Effect.mapError(
+ (cause) =>
+ new ServerProviderSkillsError({
+ instanceId: input.instanceId,
+ cwd: input.cwd,
+ cause,
+ }),
+ ),
+ );
if (!skills) {
return yield* new ServerProviderSkillsUnsupportedError({
instanceId: input.instanceId,
cwd: input.cwd,
});
}
return { skills };
- }).pipe(
- Effect.mapError((cause) =>
- cause._tag === "ServerProviderSkillsUnsupportedError"
- ? cause
- : new ServerProviderSkillsError({
- instanceId: input.instanceId,
- cwd: input.cwd,
- cause,
- }),
- ),
- ),
+ }),Posted via Macroscope — Effect Service Conventions
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Reviewed the new Effect service/error code (GrokSkillDiscovery.ts, driver listSkills closures, ProviderRegistry.listSkills, the new contract errors, and the client query hooks) against the Effect service conventions.
Findings are limited to the error-wrapping boundaries added by this PR: two ProviderDriverError wrappers derive their detail (and therefore their message) from cause.message, and the new RPC handler re-inspects its own error channel with an inline _tag comparison instead of wrapping only the lower-level registry failure.
Other areas look consistent with the conventions: GrokSkillDiscoveryError uses Schema.TaggedErrorClass with a multi-value operation discriminator and a message derived from its own attributes, listGrokSkills acquires ChildProcessSpawner from the environment, no ManagedRuntime/runPromise or fake Layer.succeed dependencies were introduced, and the new client-runtime helpers are pure functions with focused tests.
Posted via Macroscope — Effect Service Conventions
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| new ProviderDriverError({ | ||
| driver: DRIVER_KIND, | ||
| instanceId, | ||
| detail: cause.message, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
detail only copies cause.message, and ProviderDriverError.message interpolates detail, so the wrapper message is derived from the cause rather than from its own stable attributes. Consider a fixed detail that keeps the context known here (cwd) and leave the underlying failure available solely as cause.
| detail: cause.message, | |
| detail: `Failed to list Grok skills for cwd '${cwd}'`, |
Posted via Macroscope — Effect Service Conventions
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| new ProviderDriverError({ | ||
| driver: DRIVER_KIND, | ||
| instanceId, | ||
| detail: `Failed to list Codex skills: ${cause.message}`, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Same issue as the Grok wrapper: detail interpolates cause.message, which then flows into ProviderDriverError.message. Interpolating an arbitrary defect message can also pull spawn command/output text into the caller-visible detail. Prefer structural context and keep the original error only as cause.
| detail: `Failed to list Codex skills: ${cause.message}`, | |
| detail: `Failed to list Codex skills for cwd '${cwd}'`, |
Posted via Macroscope — Effect Service Conventions
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| } | ||
| return { skills }; | ||
| }).pipe( | ||
| Effect.mapError((cause) => |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This mapError has to re-inspect an error the same block just raised (_tag === "ServerProviderSkillsUnsupportedError"). Wrapping only the lower-level registry failure removes the hand-rolled tag check and keeps the already-structured domain error passing through by construction.
Effect.gen(function* () {
- const skills = yield* providerRegistry.listSkills(input);
+ const skills = yield* providerRegistry.listSkills(input).pipe(
+ Effect.mapError(
+ (cause) =>
+ new ServerProviderSkillsError({
+ instanceId: input.instanceId,
+ cwd: input.cwd,
+ cause,
+ }),
+ ),
+ );
if (!skills) {
return yield* new ServerProviderSkillsUnsupportedError({
instanceId: input.instanceId,
cwd: input.cwd,
});
}
return { skills };
- }).pipe(
- Effect.mapError((cause) =>
- cause._tag === "ServerProviderSkillsUnsupportedError"
- ? cause
- : new ServerProviderSkillsError({
- instanceId: input.instanceId,
- cwd: input.cwd,
- cause,
- }),
- ),
- ),
+ }),Posted via Macroscope — Effect Service Conventions
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 09b0e54442
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| rawText && options?.listSkills && potentialGrokSkillTokens(rawText).length > 0 | ||
| ? yield* options.listSkills(ctx.session.cwd ?? "").pipe( |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Avoid probing lowercase shell variables as Grok skills
When a Grok prompt contains an ordinary lowercase shell variable such as $branch or $file, this condition treats it as a potential skill and makes grok inspect part of turn submission. If inspection is unsupported, fails, or reaches its 10-second timeout, the adapter rejects the turn even though the token was not intended as a skill and the ACP session could otherwise process the prompt; the uppercase-only exception does not cover common lowercase shell variables, so discovery failures should not block ambiguous raw-text tokens.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if (composerTrigger.kind === "skill") { | ||
| return searchProviderSkills(selectedProviderStatus?.skills ?? [], composerTrigger.query).map( | ||
| (skill) => ({ | ||
| id: `skill:${selectedProvider}:${skill.name}`, | ||
| type: "skill" as const, | ||
| provider: selectedProvider, | ||
| skill, | ||
| label: formatProviderSkillDisplayName(skill), | ||
| description: | ||
| skill.shortDescription ?? | ||
| skill.description ?? | ||
| (skill.scope ? `${skill.scope} skill` : "Run provider skill"), | ||
| }), | ||
| ); | ||
| return searchProviderSkills(composerProviderSkills, composerTrigger.query).map((skill) => ({ |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Document the new project-scoped skill flow
This adds a user-visible, provider-dependent $ skill discovery flow across web and mobile, including cwd-specific behavior and new failure/fallback semantics, but the commit contains no corresponding docs/user/ update. Add user documentation explaining supported providers and how project/worktree discovery behaves, as required for noticeable behavior changes.
AGENTS.md reference: AGENTS.md:L75-L75
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Closing in favor of #2829 (orchestration V2). #2829 deletes the V1 orchestration layer this PR builds on — This is not a judgement on the change itself. Several of these are real gaps we still want fixed; the base just moved out from under them. Once #2829 merges, please rebase onto |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.