GoodPrompts
기본 탐색
프롬프트 라이브러리

Review a diff for regressions

Identify observable behavior changes and suggest a focused test.

분류
프로그래밍
작성자
GoodPrompts
원문 언어
English

입력하고 복사

변수

완성된 프롬프트

Review {{diff}} against {{expected behavior}}. Report only findings supported by the change. For each finding include the changed expression, the input that triggers a regression, the expected and actual behavior, and a focused test. Leave style suggestions out unless they affect behavior.

완성된 프롬프트를 복사하려면 모든 변수를 입력하세요.

원본 템플릿 보기

원본 프롬프트

Review {{diff}} against {{expected behavior}}. Report only findings supported by the change. For each finding include the changed expression, the input that triggers a regression, the expected and actual behavior, and a focused test. Leave style suggestions out unless they affect behavior.

실행 예시

Codex · · 한 번 실행했습니다. 정확한 모델 버전은 기록하지 않았습니다.

입력

Expected: a free plan has 0 remaining credits and should display 0.
Diff: - const remaining = plan.remaining ?? fallback;
+ const remaining = plan.remaining || fallback;
Fallback = 10.

출력

Regression: `plan.remaining || fallback` treats 0 as missing. With remaining = 0 and fallback = 10, the expected display is 0 and the actual display is 10. Add a regression test with these values and assert the result is 0.

Identifies the changed operator and a concrete zero input, with expected and actual behavior.