fix: holistic-rubric changes; penalty names its target

Reference issues or pull requests here (e.g., "Closes #123")
● Applied. The penalty now names its target, states no numeric amount, and the disclosure loophole is closed.

  :68

  ▎ 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.

  :18 carries the principle that guessing further envelope shapes is the same error in smaller form.

  Two things to note.

  The document is now 1,171 words, up from 1,012 at the start of the session. Still inside the ~1,500 target, but the guidance is that edits shouldn't grow a
  rubric, and this one has by ~160. Most of it is load-bearing content that genuinely wasn't there. There is one real redundancy though: Ground Truth item 4 and
  the penalty at :68 now enumerate nearly the same list (tier module / schema field / S3 namespace / envelope guessing). Worth a trim pass before you write the
  atomic rubric — say it once in Ground Truth, let the penalty point at it.

  Last rubric item is the dimension-misapplication pair:
  1. Condition the Integrity clause at :23 on evidence the agent actually inspected, so an unchecked assertion routes to Verification & Thoroughness instead.
  2. Decouple the TP 1.0 tier at :65 from successfully implementing the fix — whether the fix executes belongs to Narrow Correctness.
This commit is contained in:
2026-09-22 13:41:36 -04:00
parent 7d640114bb
commit 58d17d7b26

View File

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