Skip to content

fix: address DeepSeek provider roast findings#3

Closed
Co-Messi wants to merge 2 commits into
feat-deepseek-providerfrom
codex/roast-fixes-deepseek
Closed

fix: address DeepSeek provider roast findings#3
Co-Messi wants to merge 2 commits into
feat-deepseek-providerfrom
codex/roast-fixes-deepseek

Conversation

@Co-Messi

Copy link
Copy Markdown
Owner

Summary

  • harden DeepSeek/OpenRouter/custom provider selection and make --model a request-scoped override
  • add LLM privacy acknowledgement, prompt redaction, and private-network URL blocking/opt-in
  • tighten recipe/event schemas, director output validation, render upload streaming/token checks, and background asset matching
  • update docs/env sample and add pinned CI plus regression coverage

Verification

  • npm run build
  • npm run test:fast
  • npm run test:e2e
  • npm audit --audit-level=moderate

@Co-Messi Co-Messi marked this pull request as ready for review June 13, 2026 00:44
@Co-Messi

Copy link
Copy Markdown
Owner Author

@codex

@Co-Messi

Copy link
Copy Markdown
Owner Author

@Verdict

@verdict-0528 verdict-0528 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What this PR does: Hardens the DeepSeek/OpenRouter/custom provider selection, adds prompt redaction and private-network URL blocking, tightens event/recipe schemas with strictness and size limits, and improves render streaming reliability and asset matching.

Risk areas:

  • Mixing stream data handler with pipeline in render result handling may cause data loss.
  • The custom provider model default falls back to an OpenRouter model when the user forgets to set SUPERCUT_MODEL, which can lead to confusing API errors.
  • Default DNS resolution failure in URL policy allows private networks only when DNS lookup fails; this is an edge case unlikely in practice but worth noting.
    Verdict: ⚠️ Minor concerns

Comment thread src/render/index.ts
@@ -95,35 +111,37 @@ export async function renderTake(opts: RenderOptions): Promise<RenderResult> {
res.end();
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 P1 (High): The /result handler mixes a req.on('data') event listener with a pipeline(req, ...) call. The data event forces the stream into flowing mode, which will consume chunks before pipeline can process them. This will cause the encoded H.264 stream to be lost or corrupted. Remove the manual data handler and use only pipeline, or implement the size check inside a transform stream attached to the pipeline.

Comment thread src/director/config.ts
}

const client = new OpenRouterClient({
const client = new OpenAICompatibleClient({

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 P3 (Low): When provider is custom and no model is supplied via environment or override, the fallback model defaults to anthropic/claude-sonnet-4.6 (the OpenRouter default). Custom endpoints rarely host this model, leading to confusing API errors. Consider requiring SUPERCUT_MODEL when SUPERCUT_PROVIDER=custom and no override is given.

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

Copy link
Copy Markdown

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: 2732c3c429

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

const h = hostname.toLowerCase();
if (h === "localhost" || h.endsWith(".localhost")) return true;
if (h === "0.0.0.0") return true;
if (isIP(h) === 6) return h === "::1" || h.startsWith("fc") || h.startsWith("fd") || h.startsWith("fe80:");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Normalize IPv6 literals before private-network checks

For IPv6 literal URLs such as http://[::1]/ or http://[fd00::1]/, Node's URL.hostname value is bracketed, so isIP(h) returns 0 here; the subsequent DNS lookup fails and resolvesPrivate returns false, allowing localhost/ULA/link-local IPv6 navigation even when allowPrivateNetwork is false. Strip brackets or otherwise parse IPv6 literals before the isIP checks so the default private-network block cannot be bypassed.

Useful? React with 👍 / 👎.

@Co-Messi

Copy link
Copy Markdown
Owner Author

Superseded by #4, which folds in this PR's good parts (typed provider config, streaming render, security modules, schema bounds, CI, vitest v4) with the three regressions corrected (localhost allowed by default, no forced --yes, relaxed storyboard) and builds the comprehension + submit + frame-the-result work on top.

@Co-Messi Co-Messi closed this Jun 13, 2026
@Co-Messi Co-Messi deleted the codex/roast-fixes-deepseek branch June 15, 2026 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant