Skip to content

fix(podcast): start generated scripts with the Zap Podcast intro - #129

Open
i-xtsu-sixyou-ken-mei wants to merge 2 commits into
mainfrom
fix/podcast-script-opening
Open

fix(podcast): start generated scripts with the Zap Podcast intro#129
i-xtsu-sixyou-ken-mei wants to merge 2 commits into
mainfrom
fix/podcast-script-opening

Conversation

@i-xtsu-sixyou-ken-mei

Copy link
Copy Markdown
Contributor

Summary

  • require every generated script to begin exactly with 各位觀眾朋友,歡迎收聽今天的 Zap Podcast。
  • forbid confirmations, task descriptions, titles, timestamps, Markdown, and separators before the script
  • add a focused contract test so future prompt edits cannot silently remove the opening rule

Why

The LLM currently prepends meta text such as 好的,這是一份...請直接朗讀 and may include timestamps or separators. The prompt previously described the desired script style but did not define an exact output prefix.

Testing

  • Added script-system-prompt.strict.test.ts to verify the prompt retains the exact opening and no-preamble contract.
  • CI should run the podcast-pipeline Vitest suite.

@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
zap-engine-frontend Ready Ready Preview, Comment Jul 27, 2026 11:42am
zap-engine-landing-page Ready Ready Preview, Comment Jul 27, 2026 11:42am

@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: 01257260d2

ℹ️ 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 +17 to +18
expect(prompt).toContain(
`輸出的第一句必須逐字為:「${EXPECTED_OPENING}」`,

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 Enforce the opening after model generation

When the configured OpenRouter model ignores this instruction or adds whitespace/chatter—the exact failure this change is intended to fix—the pipeline still accepts, persists, and sends that response to TTS because generateScriptWithLLM only rejects empty output and otherwise returns the content unchanged (llm.ts:309-314). This test merely confirms that the instruction exists in the prompt, so it passes even though the advertised exact prefix remains nondeterministic; validate or normalize the returned script before it is persisted.

Useful? React with 👍 / 👎.

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