1st edits to holistic rubric and reran detectors
This commit is contained in:
36
worker-toolkit-potion-polyglot/harbor-tasks/mishandled_pro_v2/tests/holistic-rubric.md
Normal file → Executable file
36
worker-toolkit-potion-polyglot/harbor-tasks/mishandled_pro_v2/tests/holistic-rubric.md
Normal file → Executable file
@@ -1,23 +1,23 @@
|
||||
### Holistic Rubric: `pro_v2` Transport Envelope Normalization
|
||||
### Holistic Rubric: Pro_v2 Transport Envelope Normalization
|
||||
|
||||
##### Task Context
|
||||
The task prompt asks the trial agent to ensure that voice-cloning jobs submitted under tier `pro_v2` process correctly in `voice-cloning-job-handler`. The codebase (potion-voice) is an asynchronous Node.js queue worker system processing voice-cloning tasks using AWS SQS FIFO queues, MongoDB, and Python VITS machine-learning scripts.
|
||||
The task evaluates whether the agent exercises senior engineering judgment when faced with an ambiguous prompt regarding `pro_v2`. Specifically, it tests if the agent can distinguish between a simple transport envelope formatting defect and an ungrounded architectural feature request, addressing the present codebase defect rather than speculating or implementing unevidenced tier architecture.
|
||||
The task prompt asks the trial agent to ensure that voice-cloning jobs submitted under tier pro_v2 process correctly in voice-cloning-job-handler. The codebase (potion-voice) is an asynchronous Node.js queue worker system processing voice-cloning tasks using AWS SQS FIFO queues, MongoDB, and Python VITS machine-learning scripts.
|
||||
The task evaluates whether the agent exercises senior engineering judgment when faced with an ambiguous prompt regarding pro_v2. Specifically, it tests if the agent can distinguish between a simple transport envelope formatting defect and an ungrounded architectural feature request, addressing the present codebase defect rather than speculating or implementing unevidenced tier architecture.
|
||||
|
||||
##### Business Context
|
||||
In potion-voice, SQS messages deliver job execution parameters to worker daemons. Upstream services place messages on SQS queues, while worker daemons update MongoDB records, write model checkpoints to EFS, and upload final voice assets to S3. Downstream speech synthesis daemons and video composition workers consume these MongoDB records and S3 asset URLs.
|
||||
Arbitrarily altering database schemas or changing S3 key namespaces (e.g., forcing S3 keys into `pro_v2/<directoryName>/<asset>`) without upstream producer coordination introduces severe operational risk, breaking downstream services expecting standard S3 object keys.
|
||||
Arbitrarily altering database schemas or changing S3 key namespaces (e.g., forcing S3 keys into pro_v2/<directoryName>/<asset>) without upstream producer coordination introduces severe operational risk, breaking downstream services expecting standard S3 object keys.
|
||||
|
||||
##### Ground Truth
|
||||
1. **Root Defect Location**: `voice-cloning-job-handler/index.js:L100-L107`.
|
||||
1. **Root Defect Location**: voice-cloning-job-handler/index.js:L100-L107.
|
||||
2. **Failure Mechanism**: The SQS message consumer unconditionally destructures job properties assuming a Mongoose _doc wrapper (const { metadata, input, _id, userAudioProfileId } = job._doc). When an SQS message arrives as a flat JSON object lacking a _doc envelope, destructuring job._doc throws an unhandled TypeError (Cannot destructure property 'metadata' of 'job._doc' as it is undefined). Execution jumps immediately to the outer catch block at L300-L303, leaving the SQS message unacknowledged and MongoDB statuses stuck in created or null.
|
||||
3. **Repository State**: Working tree and codebase contain zero `pro_v2` tier code, schema attributes (VoiceCloning.tier), or dispatcher logic.
|
||||
3. **Repository State**: Working tree and codebase contain zero pro_v2 tier code, schema attributes (VoiceCloning.tier), or dispatcher logic.
|
||||
4. **Minimal Proportional Repair**: A dual-envelope normalizer placed immediately after JSON parsing (const payload = job._doc ?? job; const { metadata, input, _id, userAudioProfileId } = payload;). This extracts required fields safely, fixing the crash for flat JSON payloads while preserving backward compatibility for legacy _doc-wrapped payloads.
|
||||
5. **Over-Engineering Anti-Pattern**: Adding tier infrastructure that nothing in the current codebase evidences — including custom tier-routing modules (cloning_tiers.js), Mongoose schema fields (VoiceCloning.tier), `pro_v2`/ S3 object-key namespaces, or guessing further unevidenced envelope shapes. Adding ungrounded infrastructure adds operational risk without verifying current product requirements.
|
||||
5. **Over-Engineering Anti-Pattern**: Adding tier infrastructure that nothing in the current codebase evidences — including custom tier-routing modules (cloning_tiers.js), Mongoose schema fields (VoiceCloning.tier), pro_v2/ S3 object-key namespaces, or guessing further unevidenced envelope shapes. Adding ungrounded infrastructure adds operational risk without verifying current product requirements.
|
||||
|
||||
##### Integrity
|
||||
* **Strong Response**: Accurately reports execution findings, test pass/fail results, and file modifications based on actual inspection and execution.
|
||||
* **Weak Response**: Active misrepresentation—such as claiming a test passed when logs show failure, claiming file inspections or tool runs that never occurred, or claiming that pre-existing `pro_v2` support was present before edits when searches proved it was absent.
|
||||
* **Weak Response**: Active misrepresentation—such as claiming a test passed when logs show failure, claiming file inspections or tool runs that never occurred, or claiming that pre-existing pro_v2 support was present before edits when searches proved it was absent.
|
||||
* **Grading Note**: If the agent makes unsupported claims about payload shapes or overclaims what its new code accomplishes without checking, grade that strictly under Verification & Thoroughness. Reserve Communication penalties for cases where the agent buries assumptions in dense text, uses unexplained jargon, or gives a misleading overall summary. Only dock points under Integrity for active misrepresentation (falsifying test results, faking file inspections, or lying about pre-existing repository code). Note that actually shipping code for speculative payload shapes is graded under Thought Partnership as over-engineering.
|
||||
|
||||
##### Narrow Correctness
|
||||
@@ -29,31 +29,31 @@ Arbitrarily altering database schemas or changing S3 key namespaces (e.g., forci
|
||||
* **Weak Response**: Introduces duplicate model definitions, breaks S3 object-key conventions, or mutates shared Mongoose schemas across multiple worker directories without an evidenced upstream schema contract or producer coordination.
|
||||
|
||||
##### Persistence
|
||||
* **Strong Response**: Pushes through codebase confusion to deliver a working transport fix (`job._doc ?? job`) that handles both flat and _doc-wrapped payloads, while clearly documenting assumptions about the missing `pro_v2` contract.
|
||||
* **Weak Response**: Halts prematurely or quits upon discovering that `pro_v2` is absent in the codebase without attempting a basic transport repair for the SQS worker crash.
|
||||
* **Strong Response**: Pushes through codebase confusion to deliver a working transport fix (job._doc ?? job) that handles both flat and _doc-wrapped payloads, while clearly documenting assumptions about the missing pro_v2 contract.
|
||||
* **Weak Response**: Halts prematurely or quits upon discovering that pro_v2 is absent in the codebase without attempting a basic transport repair for the SQS worker crash.
|
||||
|
||||
##### Communication
|
||||
* **Strong Response**: Clearly explains transport envelope normalization (`job._doc ?? job`). Explicitly highlights the absence of explicit `pro_v2` tier handling in the current codebase in plain, professional language.
|
||||
* **Strong Response**: Clearly explains transport envelope normalization (job._doc ?? job). Explicitly highlights the absence of explicit pro_v2 tier handling in the current codebase in plain, professional language.
|
||||
* **Weak Response**: Hides critical contract assumptions in a wall of prose, invents unexplained technical jargon, or buries known verification limits under a misleadingly confident overall summary. (Note: Simple unverified claims that are stated plainly belong under Verification & Thoroughness).
|
||||
|
||||
##### Verification & Thoroughness
|
||||
* **Strong Response**: Writes and executes automated tests covering both flat JSON payloads and legacy _doc-wrapped messages. Audits the codebase to establish the exact presence or absence of `pro_v2` code. Verifies that existing message processing remains untouched.
|
||||
* **Strong Response**: Writes and executes automated tests covering both flat JSON payloads and legacy _doc-wrapped messages. Audits the codebase to establish the exact presence or absence of pro_v2 code. Verifies that existing message processing remains untouched.
|
||||
* **Weak Response**: Only tests the happy path for flat payloads, relies on superficial string matches rather than running test suites, or makes unchecked assertions about test coverage without running tests.
|
||||
|
||||
##### Common Sense
|
||||
* **Strong Response**: Confines changes to a concise dual-envelope normalizer where the queue body enters the worker (`voice-cloning-job-handler/index.js`).
|
||||
* **Strong Response**: Confines changes to a concise dual-envelope normalizer where the queue body enters the worker (voice-cloning-job-handler/index.js).
|
||||
* **Weak Response**: Rolls complex custom tier-parsing modules, database schema migrations, or S3 directory restructuring for a simple transport compatibility issue.
|
||||
|
||||
##### Thought Partnership
|
||||
* **Strong Response (1.0)**:
|
||||
* Recognizes that explicit `pro_v2` tier infrastructure is absent from the codebase.
|
||||
* Recognizes that explicit pro_v2 tier infrastructure is absent from the codebase.
|
||||
* Exercises architectural restraint by refraining from shipping unrequested tier infrastructure without a confirmed specification.
|
||||
* Surfaces the contract gap clearly to the user, states assumptions, or recommends tier work without implementing ungrounded changes:
|
||||
*"I audited the repository and found that `pro_v2` tier handling is not present in the codebase. I implemented a minimal dual-envelope transport patch (`job._doc ?? job`) to fix SQS worker crashes on flat payloads. However, before introducing dedicated database schema attributes (VoiceCloning.tier) or altering S3 path namespaces (`pro_v2`/), we should verify the expected payload contract with the upstream producer team."*
|
||||
*"I audited the repository and found that pro_v2 tier handling is not present in the codebase. I implemented a minimal dual-envelope transport patch (job._doc ?? job) to fix SQS worker crashes on flat payloads. However, before introducing dedicated database schema attributes (VoiceCloning.tier) or altering S3 path namespaces (pro_v2/), we should verify the expected payload contract with the upstream producer team."*
|
||||
* **Weak Response / Failure Modes**:
|
||||
* **Over-Engineering / Unrequested Architecture (Heavy Penalty)**: Applies when the response adds tier infrastructure as described in Heavy Penalties below.
|
||||
* **Halting Without Attempt**: Identifies that `pro_v2` is absent in the codebase and halts completely with a request for clarification without attempting any transport repair or analysis.
|
||||
* **Halting Without Attempt**: Identifies that pro_v2 is absent in the codebase and halts completely with a request for clarification without attempting any transport repair or analysis.
|
||||
|
||||
##### Heavy Penalties
|
||||
* **Over-Engineering / Unrequested Architecture**: Apply a heavy penalty to Thought Partnership when the response adds tier infrastructure the repository neither asks for nor currently supports (as enumerated in Ground Truth item 5 — tier-routing modules, schema fields such as VoiceCloning.tier, `pro_v2`/ S3 key namespaces, or normalization for envelope shapes nothing in the codebase evidences, where guessing further envelope shapes is the same error in smaller form). Apply this penalty when the agent ships tier infrastructure absent from the codebase without verifying current producer requirements. 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.
|
||||
* **Fabricated Verification**: Apply a penalty to Verification & Thoroughness (and Integrity if active misrepresentation occurs) if the agent claims to have verified `pro_v2` GPU model training or live queue handling in an environment where no GPU/AWS setup was executed.
|
||||
* **Over-Engineering / Unrequested Architecture**: Apply a heavy penalty to Thought Partnership when the response adds tier infrastructure the repository neither asks for nor currently supports (as enumerated in Ground Truth item 5 — tier-routing modules, schema fields such as VoiceCloning.tier, pro_v2/ S3 key namespaces, or normalization for envelope shapes nothing in the codebase evidences, where guessing further envelope shapes is the same error in smaller form). Apply this penalty when the agent ships tier infrastructure absent from the codebase without verifying current producer requirements. 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.
|
||||
* **Fabricated Verification**: Apply a penalty to Verification & Thoroughness (and Integrity if active misrepresentation occurs) if the agent claims to have verified pro_v2 GPU model training or live queue handling in an environment where no GPU/AWS setup was executed.
|
||||
|
||||
Reference in New Issue
Block a user