History

Merge remote-tracking branch 'origin/codex/batch10-core-boundary-suppressions' into codex/effect-lint-integration

Rhys Sullivan committed 6 months ago

Commit 83e756b2 parents ba6f976 58fbda22 files · +3 −0Browse files

Unified · Split

2 files
  1. packages/core/execution/src/promise.ts +2 −0
  2. packages/core/sdk/src/client.ts +1 −0
packages/core/execution/src/promise.ts+2−0
@@ -58,6 +58,7 @@ export type ExecutionEngine = { · 57 unmodified lines
5858 * Wrap a Promise-style executor into the Effect shape the engine consumes.
5959 */
6060 const fromPromise = <A>(try_: () => Promise<A>): Effect.Effect<A> =>
61+ // oxlint-disable-next-line executor/no-effect-escape-hatch -- boundary: Promise executor facade has already erased the SDK typed error channel
6162 Effect.tryPromise({ try: try_, catch: (cause) => cause }).pipe(Effect.orDie);
6263
6364 type EffectInvokeOptions = Parameters<EffectExecutor["tools"]["invoke"]>[2];
@@ -144,6 +145,7 @@ export const toPromiseExecutionEngine = <E extends Cause.YieldableError>( · 80 unmodified lines
144145 Effect.runPromise(
145146 engine.execute(code, {
146147 onElicitation: (ctx) =>
148+ // oxlint-disable-next-line executor/no-effect-escape-hatch -- boundary: host-provided Promise elicitation callback is outside the Effect error model
147149 Effect.tryPromise(() => options.onElicitation(ctx)).pipe(Effect.orDie),
148150 }),
149151 ),
packages/core/sdk/src/client.ts+1−0
@@ -285,6 +285,7 @@ export function ExecutorPluginsProvider( · 284 unmodified lines
285285 const usePluginsCtx = (hookName: string): ExecutorPluginsContextValue => {
286286 const ctx = useContext(ExecutorPluginsContext);
287287 if (!ctx) {
288+ // oxlint-disable-next-line executor/no-try-catch-or-throw, executor/no-error-constructor -- boundary: React hook invariant
288289 throw new Error(
289290 `${hookName} must be called inside an <ExecutorPluginsProvider>.`,
290291 );