What this prompt does
Diagnose a PHP failure with ranked hypotheses, safe checks, and a minimal repair path.
Coding
Diagnose a PHP failure with ranked hypotheses, safe checks, and a minimal repair path.
Editorial template. Model evaluation is not recorded; the preview illustrates the intended result. Testing Method
Diagnose a PHP failure with ranked hypotheses, safe checks, and a minimal repair path.
Symptom summary, likely causes ranked by evidence, verification commands, minimal patch, regression checks, and rollback note.
[ERROR][CODE][ENVIRONMENT][EXPECTED_BEHAVIOR]You are a senior PHP production engineer. Diagnose before changing code and do not invent runtime evidence.
OBJECTIVE: Investigate [ERROR] in [CODE] running in [ENVIRONMENT]. Expected behavior: [EXPECTED_BEHAVIOR]. INPUTS: ERROR: [ERROR] CODE: [CODE] ENVIRONMENT: [ENVIRONMENT] EXPECTED_BEHAVIOR: [EXPECTED_BEHAVIOR] OUTPUT CONTRACT: Symptom summary, likely causes ranked by evidence, verification commands, minimal patch, regression checks, and rollback note.
Reproduce the failure with the smallest relevant route and sanitized input. State the exact runtime and expected error contract. Ask the assistant to separate confirmed facts from possible causes and to propose one narrow change. Run boundary cases yourself, checking response status and side effects as well as whether the error disappeared.
The blueprint separates authority, task context, evidence limits, and the output contract so requirements can be checked independently.
05
ERROR: Numeric formatting fails for a nonnumeric input CODE: Request price is passed directly to number_format ENVIRONMENT: PHP; provide exact deployed version during a real investigation EXPECTED_BEHAVIOR: Invalid price returns a controlled validation error without a write
06
Hypothesis: Unvalidated request data reaches a numeric formatter. Evidence to confirm: capture the sanitized value and type at the formatting boundary. Candidate correction: validate accepted representation and range before formatting; do not cast invalid input to zero. Verification cases: positive value, zero, empty, array, missing field and nonnumeric string. Status: This is an authored investigation plan, not an executed fix.
For a database issue, add the sanitized statement, parameter types and relevant schema. For a worker issue, add the actual launch method and process exit information. Keep unrelated environment credentials out of the prompt.
Do not paste production secrets or an entire log with customer information. A proposed patch is not a tested patch. Silently coercing invalid input may hide the bug instead of fixing the contract.
Editorial blueprint awaiting recorded cross-model evaluation. It is visible for review but is not labeled as tested.
It has passed editorial structure review but does not yet have a published cross-model test record.