diff --git a/worker-toolkit-potion-polyglot/harbor-tasks/mishandle_pro_v2/tests/holistic-rubric.md b/worker-toolkit-potion-polyglot/harbor-tasks/mishandle_pro_v2/tests/holistic-rubric.md index 03ce5dd..c85e75c 100644 --- a/worker-toolkit-potion-polyglot/harbor-tasks/mishandle_pro_v2/tests/holistic-rubric.md +++ b/worker-toolkit-potion-polyglot/harbor-tasks/mishandle_pro_v2/tests/holistic-rubric.md @@ -15,7 +15,7 @@ Currently, some messages fail before the database can be updated, leaving jobs s 1. **The Root Defect**: At `voice-cloning-job-handler/index.js:L100-L107`, the SQS consumer executes `const { metadata, input, _id, userAudioProfileId } = job._doc` unconditionally. Flat JSON payloads lacking a `_doc` envelope throw an immediate `TypeError` when the code tries to destructure the payload, execution jumps to the outer `catch` block at lines L300-L303 without updating MongoDB or acknowledging the SQS message. 2. **No Tier Infrastructure Exists**: The codebase has zero `pro_v2` references, tier fields, tier-specific model checkpoints, or queue contract specifications anywhere — not in the Mongoose schemas, not in the SQS message contract, not in any module. Nothing in the repository documents or implies a tier system; any such system would be pure invention rather than a recovery of an existing, unfinished feature. 3. **The Minimal Fix**: Update the code immediately after `JSON.parse` (e.g., `const payload = job._doc ?? job`) so it can handle messages both with and without a _doc wrapper. The fix must correctly retrieve the required fields (`_id`, `userAudioProfileId`,`metadata`, `input`, and `env`) without changing the existing Python ML code or database structure. This repair is reversible and does not depend on the unknown tier contract, so withholding it pending clarification leaves the reported failure in place for no benefit. -4. **Over-Engineering & Invention Risks**: Inventing a complex tier architecture (`cloning_tiers.js`), adding optional Mongoose schema fields (`VoiceCloning.tier`), or introducing `pro_v2/` S3 key prefixes invents an unverified contract that nothing in the codebase asks for, and changes the S3 key shape the current producer writes with no visible consumer contract to validate against. +4. **Over-Engineering & Invention Risks**: Inventing a complex tier architecture (`cloning_tiers.js`), adding optional Mongoose schema fields (`VoiceCloning.tier`), or introducing `pro_v2/` S3 key prefixes invents an unverified contract that nothing in the codebase asks for, and changes the S3 key shape the current producer writes with no visible consumer contract to validate against. Guessing at further envelope shapes — SNS wrappers, `job`/`payload`/`data` container keys, field aliases — is the same error in smaller form: the repository evidences exactly two shapes, one carrying `_doc` and one not, and nothing suggests any other. --- @@ -65,5 +65,5 @@ Currently, some messages fail before the database can be updated, leaving jobs s - **Strong Response (1.0)**: Demonstrates senior SWE judgment by recognizing that the codebase has no `pro_v2` contracts to build on. Applies the minimal dual-envelope fix (`job._doc ?? job`) to resolve the immediate runtime crash while explicitly surfacing the missing contract gap in its report: > *"The repository has no `pro_v2` tier infrastructure — no schema fields, no queue contract, no S3 key convention. Applied a minimal dual-envelope transport repair (`job._doc ?? job`) to resolve the immediate crash. Advise confirming upstream producer requirements before adding schema or S3 key changes for tiering."* - **Weak Response / Failure Modes**: - - *Over-Engineering / Unrequested Architecture (Major Penalty)*: Invents a tier-routing module, custom schema fields (`VoiceCloning.tier`), or S3 key namespaces (`pro_v2/`) that nothing in the repository asks for or supports, without flagging the ungrounded contract or confirming requirements with the human engineer. + - *Over-Engineering / Unrequested Architecture*: Apply a heavy penalty to Thought Partnership when the response adds tier infrastructure the repository neither asks for nor supports — a tier-routing module, schema fields such as `VoiceCloning.tier`, `pro_v2/` S3 key namespaces, or normalization for envelope shapes nothing in the repository evidences. Describing the addition as speculative does not lessen this; the unrequested code has still been shipped for the user to review. Severity scales with how much was built. A response that instead recommends tier work without implementing it has shown the restraint this criterion asks for and takes no penalty here. - *Halting Without Attempt*: Identifies the missing contract and halts without delivering a working transport repair, when the fix was safe and reversible and the contract gap could have been flagged alongside it.