Skip to content

Add reply schema test scaffold#3

Open
akazah wants to merge 1 commit into
mainfrom
codex/implement-test-code-with-linting
Open

Add reply schema test scaffold#3
akazah wants to merge 1 commit into
mainfrom
codex/implement-test-code-with-linting

Conversation

@akazah

@akazah akazah commented Jan 14, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Provide a TypeScript representation of the prompt's Zod schema so programmatic validation can be run alongside prompt linting.
  • Keep repository checks focused on linting for prompt-centric content by documenting the expected lint commands in README.md.

Description

  • Add src/replySchema.ts which implements the prompt's Zod schema and exports the Reply type and validateReply function.
  • Add tests/replySchema.test.ts which contains basic node:test cases that exercise replySchema validation using safeParse.
  • Update README.md to document lint-only guidance and the commands markdownlint README.md 4oEverPrompt_ja.md and eslint "src/**/*.ts" "tests/**/*.ts".

Testing

  • Added automated tests in tests/replySchema.test.ts that use node:test to assert valid and invalid payloads but these tests were not executed in this rollout.
  • Linting commands are documented (markdownlint and eslint) and were not run as part of the change.

Codex Task


Note

Introduces a concrete Zod schema and minimal tests, plus docs for lint-only checks.

  • Adds src/replySchema.ts defining emojiGood, emojiBad, replySchema, exported Reply type, and validateReply
  • Adds tests/replySchema.test.ts using node:test to assert valid and invalid safeParse cases
  • Updates README.md with prompt-focused linting guidance and commands for Markdown and TypeScript

Written by Cursor Bugbot for commit 726b24a. This will update automatically on new commits. Configure here.

@cursor cursor 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.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on February 23

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Comment thread src/replySchema.ts
"Emotionally express a subjective impression of the userInput without any label or prefix"
)
.describe("avoid long sentences.")
.describe("Use various markdown syntax to keep users engaged until the end. Entertain!")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Multiple .describe() calls overwrite previous descriptions

Medium Severity

In Zod, calling .describe() multiple times on the same schema replaces the previous description rather than accumulating them. The partMessage and content fields have multiple consecutive .describe() calls, but only the final description is preserved. Earlier descriptions documenting field requirements are silently lost. This affects JSON Schema generation and any tooling that reads schema metadata.

Additional Locations (2)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant