diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-meaningful-failure.inputs.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-meaningful-failure.inputs.json index 4ccefc70..dbf4721d 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-meaningful-failure.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-meaningful-failure.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-14T19:42:51.859Z", + "capturedAt": "2026-10-14T19:46:11.531Z", "capturedBy": "stamp", "inputs": { - "prompt": "c1a9867d40b183f9475d6e0750bc7663c5648e17cae2cbbc72b3c6d3e5065429", + "prompt": "e5a73f8bf200424137a9d965478d3f327249a0c634401bcf29a9eae57c44f9c5", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "1f89b01999d13694dbe98c0ef8e61ac0ab69b3d0687262e10bc6c5cccba80540", - "atomicRubric": "71d23eafe5164f53d0a918dbbcda902b285ce79daca556ac334d6d968b8acd8c", + "holisticRubric": "cd72b3a3734588a3a9b2caf7164c77b06265c18e709f08d508c7257b2b87f1da", + "atomicRubric": "9f40ecfe36754f1d0c940eb203dab7494035f6b8aa2d12f26d8a437c190181b8", "rubricsYaml": null, - "graderContext": "449ae99f24d0b403d88bac9137e7a0fa049089a134a6f3d705d0e474348bc610" + "graderContext": "d892e9cdb09122698e1473f377d4c2802c785cfc485de981d17a5e85185c0a21" } } diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-meaningful-failure.md b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-meaningful-failure.md index 467c542c..427ee210 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-meaningful-failure.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-meaningful-failure.md @@ -9,8 +9,8 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md and ## Load-bearing targets -- **Tenant-source and filter isolation:** The Narrow Correctness section requires `userId` scoping on cloning operations and synthesis operations, with the synthesizer's initial profile lookup resolving tenant context. -- **Stop unauthorized downstream work:** The Narrow Correctness section calls halting audio generation or database updates after failed ownership validation its Crux requirement and says failure earns zero credit for an unspecified criterion under Narrow Correctness. +- **Tenant-source and filter isolation:** The Narrow Correctness section requires tenant scoping on cloning and synthesis operations, with the synthesizer's initial profile lookup resolving tenant context. The relevant identifier slots are blank in this revision. +- **Stop unauthorized downstream work:** The Narrow Correctness section calls halting audio generation or database updates after failed ownership validation its Crux requirement and applies a heavy penalty to the overall score. - **Worker resilience:** The Broader Correctness section requires polling loops to survive message-processing exceptions. Inherited SQS acknowledgment order is now an explicit non-penalty rule. The written summary is peripheral to the central security failure. @@ -53,7 +53,7 @@ The original rewards span 0.62–0.73. They were graded against an earlier holis - **Fired in:** 3/4 original grades; the 0.73 original grade does not mention it. - **What the agent actually wrote:** The 0.66 final response says, “Referenced records are authorized before processing.” A preflight read does not establish that a later scoped update still matched. - **Real-world consequence if the agent is wrong:** File and audio work can continue after a later ownership failure. The 0.66 grade reports the mocked download, and the 0.62 grade reports directory creation and another update before a failed processing update. -- **Verdict for this deduction:** `meaningful`. It directly violates the task's stop condition; the source's zero-credit target is a separate rubric-clarity issue. +- **Verdict for this deduction:** `meaningful`. It directly violates the task's stop condition. The current Crux penalty has an overall-score target, although the missing identifiers remain a separate clarity issue. ### Missing baseline-payload verification — meaningful @@ -69,9 +69,9 @@ The old grades also discuss acknowledgment before database success and, in one r ### Unauthorized effects after ownership failure — holds -- **Guidance says:** “If tenant validation fails or requested records do not match the tenant context, the handler must immediately halt execution before performing audio generation or database updates.” The source then says failure gives “0 credit for this criterion under Narrow Correctness.” +- **Guidance says:** “The implementation must prevent unauthorized side effects, halting speech synthesis audio rendering and database updates whenever tenant validation fails or records do not match tenant context.” The source then says failure “applies a heavy penalty to the overall score.” - **Reachability / evidence / proportionality:** Both workers perform model writes and audio work after record lookups. The 0.62 and 0.66 grades describe concrete later side effects after scoped-update failures. Preventing cross-tenant effects is a proportionate core security requirement. -- **Call:** The consequence is real, and a severe Narrow Correctness deduction is proportionate to actual cross-tenant rendering or writes. Whether the source zeros the whole dimension or only the side-effect item remains unclear; rubric clarity and coverage assess that scoring issue separately. +- **Call:** The consequence is real, and a heavy penalty for actual cross-tenant rendering or writes is proportionate. The current blank identifiers create a separate clarity and coverage defect. The tenant-source compatibility target and polling-loop resilience target have plausible stakes. The former manifested in every run; the latter was met. @@ -79,4 +79,4 @@ The tenant-source compatibility target and polling-loop resilience target have p The current rubric targets a real compatibility regression and a real ownership-stop gap. The first appears in all four reference runs, and the second in three original grades. The shipped baseline and reproduced run checks support their consequences. The new protection for inherited SQS acknowledgment removes the mixed-deduction reason for the earlier `partial` verdict. -The verdict is `meaningful` with medium confidence because the four reference grades were produced under an earlier holistic revision. They support elicitation and impact, but they do not show how graders would apply the current zero-credit wording to those same responses. +The verdict is `meaningful` with medium confidence because the four reference grades were produced under an earlier holistic revision. They support elicitation and impact, but they do not show how graders would apply the current wording with missing identifiers to those same responses. diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-clarity.inputs.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-clarity.inputs.json index 4ccefc70..dbf4721d 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-clarity.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-clarity.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-14T19:42:51.859Z", + "capturedAt": "2026-10-14T19:46:11.531Z", "capturedBy": "stamp", "inputs": { - "prompt": "c1a9867d40b183f9475d6e0750bc7663c5648e17cae2cbbc72b3c6d3e5065429", + "prompt": "e5a73f8bf200424137a9d965478d3f327249a0c634401bcf29a9eae57c44f9c5", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "1f89b01999d13694dbe98c0ef8e61ac0ab69b3d0687262e10bc6c5cccba80540", - "atomicRubric": "71d23eafe5164f53d0a918dbbcda902b285ce79daca556ac334d6d968b8acd8c", + "holisticRubric": "cd72b3a3734588a3a9b2caf7164c77b06265c18e709f08d508c7257b2b87f1da", + "atomicRubric": "9f40ecfe36754f1d0c940eb203dab7494035f6b8aa2d12f26d8a437c190181b8", "rubricsYaml": null, - "graderContext": "449ae99f24d0b403d88bac9137e7a0fa049089a134a6f3d705d0e474348bc610" + "graderContext": "d892e9cdb09122698e1473f377d4c2802c785cfc485de981d17a5e85185c0a21" } } diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-clarity.md b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-clarity.md index 1781db1f..5e5fa3a7 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-clarity.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-clarity.md @@ -9,16 +9,22 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Material ambiguities -### Zero-credit target is undefined +### Missing identifiers in the tenant-scoping rules -- **Where:** The Narrow Correctness Scoring note says, “This is a Crux requirement under Narrow Correctness. Failing to halt unauthorized side effects results in 0 credit for this criterion under Narrow Correctness.” -- **Why it's ambiguous:** The Grading Standard's scored criterion is Narrow Correctness; the side-effect bullet is a task-specific requirement inside it. “This criterion” could mean all of Narrow Correctness receives zero, or only the side-effect requirement receives no credit while other Narrow Correctness work still counts. Those readings give materially different scores. The explicit numeric zeroing also substitutes an unsupported cap-like rule for the standard's qualitative heavy-penalty mechanism. -- **Grade evidence:** The four original reference grades assign nonzero Narrow Correctness ratings and were produced under an earlier rubric revision. They do not resolve this new scoring sentence. +- **Where:** Narrow Correctness says, “All database reads and updates in must filter by in addition to record .” It also says, “All downstream database reads and updates to and in must be scoped by the profile-derived .” +- **Why it's ambiguous:** The handler, model, tenant-field, and record-field names have vanished. One grader could credit any tenant predicate in either worker; another could require the specific handlers and fields evident elsewhere in the task package. The source rubric no longer defines that boundary. +- **Grade evidence:** All four original grades discuss userId and specific handlers, but they were produced under an earlier holistic revision. They cannot settle how the current blank clauses would be applied. + +### Missing identifiers in the profile-lookup exemption + +- **Where:** The allowed-behaviors section says, “Performing an initial lookup on by to resolve and establish tenant context is necessary and must not be penalized for omitting .” +- **Why it's ambiguous:** The model, lookup key, resolved field, and exempted predicate are blank. A grader cannot tell which initial lookup is protected or where the exemption ends. That can change whether the initial query earns a deduction. +- **Grade evidence:** The original grades discuss profile-derived ownership, but predate this revision and do not interpret the blank exemption. ## Copy-edit issues -None found that interrupts reading. The issue is the scoring target and mechanism. +- Empty inline slots interrupt multiple load-bearing sentences, including the isolation rules and initial-lookup exemption quoted above. These appear to be lost identifiers rather than intentional prose. ## Overall verdict -The previous overall-score double-target wording is gone, but the replacement still leaves the amount of Narrow Correctness credit ambiguous. State the failure's effect qualitatively on Narrow Correctness, or specify an overall-score heavy penalty with a clear trigger and non-trigger if that is the intended cliff. +The Crux penalty now has a clear overall-score target, resolving the previous scoring-target finding. The missing identifiers make several core pass/fail rules materially ambiguous and leave the document visibly incomplete. diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-coverage.inputs.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-coverage.inputs.json index 4ccefc70..dbf4721d 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-coverage.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-coverage.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-14T19:42:51.859Z", + "capturedAt": "2026-10-14T19:46:11.531Z", "capturedBy": "stamp", "inputs": { - "prompt": "c1a9867d40b183f9475d6e0750bc7663c5648e17cae2cbbc72b3c6d3e5065429", + "prompt": "e5a73f8bf200424137a9d965478d3f327249a0c634401bcf29a9eae57c44f9c5", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "1f89b01999d13694dbe98c0ef8e61ac0ab69b3d0687262e10bc6c5cccba80540", - "atomicRubric": "71d23eafe5164f53d0a918dbbcda902b285ce79daca556ac334d6d968b8acd8c", + "holisticRubric": "cd72b3a3734588a3a9b2caf7164c77b06265c18e709f08d508c7257b2b87f1da", + "atomicRubric": "9f40ecfe36754f1d0c940eb203dab7494035f6b8aa2d12f26d8a437c190181b8", "rubricsYaml": null, - "graderContext": "449ae99f24d0b403d88bac9137e7a0fa049089a134a6f3d705d0e474348bc610" + "graderContext": "d892e9cdb09122698e1473f377d4c2802c785cfc485de981d17a5e85185c0a21" } } diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-coverage.md b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-coverage.md index fc3f4aba..90ea6d8a 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-coverage.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-coverage.md @@ -11,41 +11,37 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md agai | Holistic clause (short, verbatim key phrase) | Criterion id(s) | Status | | --- | --- | --- | -| “All database queries and updates ... `VoiceCloning` and `UserAudioProfile` ... `userId` ... `_id`” | cloning-tenant-isolation | covered | -| “All downstream queries and updates ... `RecordingSalutation` and `Recording` ... `userId` resolved from `UserAudioProfile`” | synthesis-tenant-isolation-queries-updates | covered | -| “immediately halt execution before performing audio generation or database updates” | prevent-unauthorized-side-effects | covered | -| “0 credit for this criterion under Narrow Correctness” | prevent-unauthorized-side-effects | partial | -| “initial lookup ... `_id: userAudioProfileId` ... must not be penalized” | initial-profile-tenant-resolution | covered | -| “Unhandled exceptions ... caught gracefully in a `try-catch` block” | worker-loop-crash-prevention | covered | -| “SQS message deletion and acknowledgment inherited ... must not be penalized” | inherited-sqs-acknowledgment-protection | covered | -| “If a written summary or code documentation is provided ... accurately explain ... without false or misleading security claims” | refactor-summary-accuracy | covered | +| “All database reads and updates in must filter by in addition to record .” | cloning-tenant-isolation | partial | +| “All downstream database reads and updates to and in must be scoped by the profile-derived .” | synthesis-tenant-isolation-queries-updates | partial | +| “halting speech synthesis audio rendering and database updates whenever tenant validation fails” | prevent-unauthorized-side-effects | covered | +| “applies a heavy penalty to the overall score” | prevent-unauthorized-side-effects | covered | +| “initial lookup on by to resolve ... must not be penalized for omitting .” | initial-profile-tenant-resolution | partial | +| “Standard SQS message deletion and acknowledgment behavior ... must not be penalized” | worker-loop-crash-prevention elaboration | covered | +| “caught gracefully in a try-catch block” | worker-loop-crash-prevention | covered | +| “accurately describe the multi-tenant isolation logic” | refactor-summary-accuracy | covered | ## Coverage gaps -### Narrow Correctness zero-credit instruction +### Tenant-scoping and initial-lookup clauses are underspecified in the source -- **Holistic clause:** The Scoring note says failure gives “0 credit for this criterion under Narrow Correctness.” -- **Closest criterion:** `prevent-unauthorized-side-effects` has `severity: crux` but no zero-credit effect on Narrow Correctness. -- **What is lost:** An atomic grader applies Crux severity to the aggregate; a holistic grader may zero the Narrow Correctness dimension or only the side-effect requirement. The source must first resolve that ambiguity before the atomic conversion can be equivalent. +- **Holistic clause:** The three Narrow Correctness clauses quoted as partial above contain blank slots where handler names, models, and fields should be. +- **Closest criterion:** cloning-tenant-isolation, synthesis-tenant-isolation-queries-updates, and initial-profile-tenant-resolution provide specific names. +- **What is lost:** The atomic rubric can penalize a response for missing particular model and field predicates that the holistic rubric and grader context do not name. Restore the source facts, then recheck the conversion. ## Invented content -### Unsupported Crux severity +### Specific answer keys have no counterpart in the current source documents -The holistic rubric has no heavy penalty targeting the overall score. Its Crux label and zero-credit instruction are attached to Narrow Correctness. `prevent-unauthorized-side-effects` carries `severity: crux`, which the atomic conversion contract reserves for an overall-score heavy penalty. This changes aggregate scoring materially. - -### Standalone acknowledgment criterion - -The holistic rubric protects inherited SQS acknowledgment from a deduction. `inherited-sqs-acknowledgment-protection` restates that protection as a scored dodged-bullet criterion. Its wording no longer demands preserving baseline timing, but it can still add an almost automatic pass; the protection belongs as a non-trigger in the relevant criterion's elaboration rather than as an independent scoring item. +The cloning criterion says, “All **database reads** and **updates** in **voice-cloning-job-handler** must filter by **userId** in addition to record **_id**.” The synthesis criterion names **RecordingSalutation**, **Recording**, **voice-synthsizer-job-handler**, and **userId**; the initial-profile criterion names **UserAudioProfile** and **_id**. The holistic rubric and grader context were checked for these identifiers; their corresponding slots are blank. These facts may be correct against the workspace, but the current source documents do not support their scoring specificity. ## Context integrity -The holistic rubric has no separate Task context, Business context, or Ground truth sections to extract verbatim. The context file supplies additional architectural details. Its core tenant-source and model facts broadly match the source's requirements, and the earlier unsupported `findById` API claim is gone. +The holistic rubric has no separate context sections to extract. The grader context's Handler & Model Ground Truth section has blank handler, model, queue-field, and tenant-field entries, including “1. ****: - Mongoose model: .” It does not preserve the factual context behind the atomic answer keys. The atomic guidelines contain many of these facts, so they remain individually judgeable, but the two rubric forms no longer carry equivalent ground truth. ## Crux alignment -There is one atomic Crux, `prevent-unauthorized-side-effects`, and no holistic heavy penalty against the overall score to back it. The source's “0 credit” under Narrow Correctness is a different scoring instruction. The Crux mismatch is material. +The holistic Side-Effect Prevention clause explicitly applies a heavy penalty to the overall score. prevent-unauthorized-side-effects is the one atomic crux criterion and encodes that penalty. There is no Crux mismatch on this revision. ## Overall verdict -Most behavioral clauses are represented, and the documentation and acknowledgment wording improved. The remaining zero-credit instruction and unsupported atomic Crux yield different scores between the two forms. Resolve the source penalty target, then reconvert and keep the acknowledgment allowance as a non-trigger. +The main scoring behavior, protection for inherited SQS acknowledgment, and Crux penalty map to atomic criteria. The lost identifiers in both the holistic rubric and grader context make the atomic answer keys unsupported by those documents and create a material mismatch. diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-form.inputs.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-form.inputs.json index 4ccefc70..dbf4721d 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-form.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-form.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-14T19:42:51.859Z", + "capturedAt": "2026-10-14T19:46:11.531Z", "capturedBy": "stamp", "inputs": { - "prompt": "c1a9867d40b183f9475d6e0750bc7663c5648e17cae2cbbc72b3c6d3e5065429", + "prompt": "e5a73f8bf200424137a9d965478d3f327249a0c634401bcf29a9eae57c44f9c5", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "1f89b01999d13694dbe98c0ef8e61ac0ab69b3d0687262e10bc6c5cccba80540", - "atomicRubric": "71d23eafe5164f53d0a918dbbcda902b285ce79daca556ac334d6d968b8acd8c", + "holisticRubric": "cd72b3a3734588a3a9b2caf7164c77b06265c18e709f08d508c7257b2b87f1da", + "atomicRubric": "9f40ecfe36754f1d0c940eb203dab7494035f6b8aa2d12f26d8a437c190181b8", "rubricsYaml": null, - "graderContext": "449ae99f24d0b403d88bac9137e7a0fa049089a134a6f3d705d0e474348bc610" + "graderContext": "d892e9cdb09122698e1473f377d4c2802c785cfc485de981d17a5e85185c0a21" } } diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-form.md b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-form.md index 744fdd8c..43a1d173 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-form.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-form.md @@ -1,15 +1,15 @@ --- detector: detector-rubric-form -verdict: material-issues +verdict: minor-issues confidence: MEDIUM --- # Rubric-form check: potion-voice-user-ownership -Assessed: harbor-tasks/potion-voice-user-ownership/tests/atomic-rubric.yaml +Assessed: harbor-tasks/potion-voice-user-ownership/tests/atomic-rubric.yaml and tests/grader-context.md ## Deterministic contract -1. YAML parses with the task slug and seven criteria: pass. +1. YAML parses with the task slug and six criteria: pass (parsed with the installed yaml package). 2. Task slug matches: pass. 3. IDs are unique kebab-case: pass. 4. Categories use the allowed vocabulary: pass. @@ -17,31 +17,27 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/atomic-rubric.yaml 6. One Crux is within the two-Crux cap: pass. 7. Dimensions name standard criteria: pass. 8. Guidelines are nonempty: pass. -9. Numeric penalty language is absent from the atomic rubric and grader context: pass. -10. Behavioral guidelines use positive phrasing: pass. “Must not be penalized” in the acknowledgment answer key describes the allowance rather than a negated implementation instruction. +9. Numeric-penalty pattern sweeps over the atomic rubric and grader context: pass; no candidates matched. +10. The detector contract defines no check numbered 10. +11. Positive-phrasing pattern sweep over guidelines: pass; no negated-requirement candidates matched. ## Atomicity and self-containment -None found in the handler-specific scoping and stop-condition criteria. The side-effect elaboration now carries the charge-routing note instead of putting it in the guideline. +None found. The handler-specific query criteria and stop-condition criterion each state a judgeable requirement. The SQS acknowledgment protection is a non-trigger in the worker-loop elaboration, not a separate scored criterion. ## Phrasing and answer keys ### Factual answer keys are only partly bold -- **Criterion:** `synthesis-tenant-isolation-queries-updates`, among others. +- **Criterion:** synthesis-tenant-isolation-queries-updates, among others. - **Where:** “**Answer key:** Downstream **reads** and **updates** to **RecordingSalutation** and **Recording** ... must be scoped by the profile-derived **userId**.” -- **Why:** The key terms are bold, but the full relationship is plain text. The answer remains inline and judgeable, making this a minor formatting issue. -- **Suggested rewrite:** Bold each full factual answer-key sentence. +- **Why:** The key facts are inline and readable, but the full factual relationship is plain text. This is a formatting issue rather than a missing answer key. +- **Suggested rewrite:** Bold the full answer-key sentence in each factual guideline. ## Fair-grading findings -### A permission is a scored criterion - -- **Criterion:** `inherited-sqs-acknowledgment-protection`. -- **Where:** “The response should allow standard framework SQS message deletion and acknowledgment behavior without penalizing message deletion on completed or rejected jobs.” -- **Why:** The agent's code cannot penalize its own queue acknowledgment as a security defect; only a grader can. This criterion asks the grader to refrain from a deduction and then awards a separate scored pass for doing so. It is not an independently judgeable property of the response and can dilute the task's functional criteria. -- **Suggested rewrite:** Remove the separate criterion and put the allowance into the worker-loop or side-effect criterion's elaboration as a non-trigger. +None found. The previous standalone acknowledgment-permission criterion has been removed. The blank identifiers in grader-context.md are a source-context problem covered by the coverage detector; the atomic guidelines themselves supply the facts needed to judge each criterion. ## Overall verdict -The YAML passes deterministic checks, and the prior grading-directions bundle is gone. The standalone acknowledgment permission remains a material judgment-layer defect because it cannot fail on a meaningful response behavior. The answer-key bolding issue is minor. +The six-criterion file passes the deterministic checks and remains independently judgeable. Partial answer-key bolding is a minor judgment-layer issue. This verdict does not clear the missing source facts found by the coverage detector. diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/instruction.md b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/instruction.md index 1f2f9517..553c7d40 100755 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/instruction.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/instruction.md @@ -1,15 +1,17 @@ -# Audit and Refactor Multi-Tenant Data Isolation in Background Workers +# Multi-Tenant Data Isolation Audit: Voice Cloning & Speech Synthesis Workers -## Overview -Our backend processing pipeline handles voice cloning and speech synthesis jobs via background queue consumers. An audit revealed that background worker job handlers retrieve and mutate records using document IDs passed in SQS message payloads without verifying tenant ownership (`userId`). +## Background & Architecture +Our backend asynchronous processing pipeline processes voice cloning and speech synthesis jobs via AWS SQS message queues and MongoDB (). +Currently, background workers retrieve database entries using only a document identifier () provided in the queue message payload without verifying that the record belongs to the requesting tenant (). -You must refactor the job handlers to enforce strict multi-tenant data isolation and ensure background worker polling loops remain resilient against unhandled errors. +## Task Requirements -## Objectives -1. **Multi-Tenant Scoping**: Ensure all database queries, reads, and updates across voice cloning (`VoiceCloning`, `UserAudioProfile`) and speech synthesis (`Recording`, `RecordingSalutation`) filter by the tenant's `userId`. -2. **Side-Effect Prevention**: Immediately halt downstream processing (including audio generation rendering and database mutations) if tenant ownership validation fails or if requested records do not belong to the tenant. -3. **Worker Stability**: Catch and handle errors during message processing so that unhandled exceptions do not cause the background worker polling loop to crash. +1. **Audit & Refactor Database Operations**: + - Update all database queries and updates in and to enforce strict multi-tenant isolation. + - Ensure every query filters by in addition to the record identifier (), resolving from the initial lookup where appropriate. -## Target Handlers -- `voice-cloning-job-handler` -- `voice-synthsizer-job-handler` +2. **Side-Effect Prevention**: + - Halt execution—preventing downstream audio rendering or database updates—whenever tenant ownership checks fail or records do not match the expected tenant context. + +3. **Worker Loop Resilience**: + - Ensure exceptions during job processing are caught gracefully so background worker polling loops remain active and stable. diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/atomic-rubric.yaml b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/atomic-rubric.yaml index 38ec9b92..879e6524 100755 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/atomic-rubric.yaml +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/atomic-rubric.yaml @@ -10,8 +10,8 @@ criteria: and UserAudioProfile queries and updates in the voice cloning handler. **Answer key:** All **database reads** and **updates** in **voice-cloning-job-handler** must filter by **userId** in addition to record **_id**. - elaboration: Verifies that all database operations in the voice cloning handler - incorporate userId filtering. + elaboration: Verifies that voice cloning queries and updates incorporate userId + to prevent unauthorized cross-tenant operations. - id: synthesis-tenant-isolation-queries-updates category: primary_intent dimensions: @@ -23,8 +23,8 @@ criteria: **Answer key:** Downstream **reads** and **updates** to **RecordingSalutation** and **Recording** in **voice-synthsizer-job-handler** must be scoped by the profile-derived **userId**. - elaboration: Ensures downstream queries and updates in the speech synthesis handler - enforce tenant isolation using userId. + elaboration: Ensures that downstream queries and database updates in the speech + synthesis handler enforce tenant isolation using userId. - id: prevent-unauthorized-side-effects category: primary_intent dimensions: @@ -32,14 +32,15 @@ criteria: severity: crux call_site_key: voice-synthsizer-job-handler guideline: The response should prevent unauthorized side effects, including audio - generation rendering and database mutations across both handlers, when tenant - validation fails or records do not match tenant context. **Answer key:** **Audio - generation rendering** and **database mutations** must be halted if **tenant ownership - checks** fail. + generation and database mutations across both voice cloning and speech synthesis + handlers, when tenant validation fails or records do not match tenant context. + **Answer key:** Synthesis **audio generation** and **database mutations** must + be halted if **tenant ownership checks** fail. elaboration: 'Guarantees that unauthorized jobs do not trigger audio rendering or - unauthorized database writes. Routing note: Charge syntax omissions under query - scoping criteria; charge execution of unauthorized side effects under this crux - criterion.' + database updates when tenant ownership checks fail. Routing note: Charge query + syntax omissions under cloning-tenant-isolation or synthesis-tenant-isolation-queries-updates; + charge side-effect execution under this criterion. Failing this crux criterion + applies a heavy penalty to the overall score.' - id: initial-profile-tenant-resolution category: dodged_bullet dimensions: @@ -51,19 +52,7 @@ criteria: in that initial query. **Answer key:** The initial lookup on **UserAudioProfile** by **_id** is necessary to resolve **userId** and establish **tenant context**.' elaboration: Prevents improperly docking points for the initial profile query needed - to discover the tenant identity. -- id: inherited-sqs-acknowledgment-protection - category: dodged_bullet - dimensions: - - Broader Correctness / the craft of software engineering - severity: possible_dealbreaker - call_site_key: voice-synthsizer-job-handler - guideline: The response should allow standard framework SQS message deletion and - acknowledgment behavior without penalizing message deletion on completed or rejected - jobs. **Answer key:** **SQS message deletion** and **acknowledgment** inherited - from the baseline framework is standard queue functionality and must not be penalized. - elaboration: Ensures agents are not penalized for standard framework queue message - deletion or acknowledgment behavior. + to discover tenant identity. - id: worker-loop-crash-prevention category: primary_intent dimensions: @@ -71,20 +60,22 @@ criteria: severity: possible_dealbreaker call_site_key: voice-synthsizer-job-handler guideline: The response should catch and handle exceptions during message processing - to prevent background worker polling loops from crashing. **Answer key:** Unhandled - **exceptions** during job processing must be caught gracefully in a **try-catch - block** so the worker **polling loop** remains active. - elaboration: Ensures background worker loops remain resilient against unhandled - errors. + to prevent background worker polling loops from crashing. **Answer key:** Errors + during job processing must be caught gracefully in a **try-catch block** so the + worker **polling loop** remains active. + elaboration: 'Ensures background worker loops remain resilient against unhandled + errors during message processing. Note: Standard SQS message acknowledgment inherited + from the consumer framework is standard queue behavior and must not be penalized.' - id: refactor-summary-accuracy category: primary_intent dimensions: - Communication severity: unlikely_dealbreaker call_site_key: voice-synthsizer-job-handler - guideline: The response should accurately describe the multi-tenant isolation refactor - in its written summary or code documentation if provided. **Answer key:** Any - written **summary** or **documentation** must **accurately describe** the **multi-tenant - isolation** implementation without misleading claims. - elaboration: Evaluates that written explanations or documentation accurately reflect - the technical refactoring. + guideline: The response should accurately describe the refactored multi-tenant isolation + changes across handlers in any written response summary or code documentation. + **Answer key:** Any written **summary**, **explanation**, or **code documentation** + must **accurately reflect** the actual code refactoring and **multi-tenant security + logic**. + elaboration: Evaluates whether written explanations or code comments accurately + describe the multi-tenant isolation refactor. diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/grader-context.md b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/grader-context.md index 968f39c4..46d7463b 100755 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/grader-context.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/grader-context.md @@ -1,20 +1,19 @@ -# Grader Context & Ground Truth Reference +# Grader Context & Reference Material -## Architecture & Codebase Facts -- **Voice Cloning Handler (`voice-cloning-job-handler`)**: - - Consumes SQS queue messages containing `job._doc` (or `job._id`). - - Mongoose model: `VoiceCloning`. - - Queries and updates on `VoiceCloning` and `UserAudioProfile` must filter by `userId`. +## Task Overview +This task audits and refactors background worker handlers handling voice cloning and speech synthesis jobs to enforce multi-tenant isolation. -- **Speech Synthesis Handler (`voice-synthsizer-job-handler`)**: - - Ingests queue messages containing `userAudioProfileId`, `recordingId`, and `salutationId`. - - Performs an initial query on `UserAudioProfile` using `_id: userAudioProfileId` to discover the tenant's `userId`. (This initial lookup establishes tenant context and is not a security flaw). - - Subsequent queries and updates on `RecordingSalutation` and `Recording` must be scoped by the resolved `userId`. +## Handler & Model Ground Truth +1. ****: + - Mongoose model: . + - Operations must filter queries and updates by . -- **Side-Effect Prevention**: - - If the initial profile lookup fails to return a record, or if downstream records (`Recording`, `RecordingSalutation`) do not match the resolved `userId`, job processing must abort immediately. - - Unowned jobs must not trigger speech synthesis audio rendering or perform unauthorized database updates. +2. ****: + - Ingests queue messages containing , , and . + - Performs an initial query on using to resolve . + - Downstream queries and updates on and must be scoped by . + - Execution (audio rendering and database writes) must be halted if tenant validation fails. -- **Worker Resilience & Baseline Behavior**: - - Unhandled errors during job execution must be caught so the polling loop remains alive. - - Framework SQS message deletion/acknowledgment behavior upon job completion or rejection is standard queue infrastructure and must not be penalized as a defect. +3. **Infrastructure Notes**: + - Worker polling loops must handle exceptions in a try-catch block to remain active. + - Standard SQS message deletion and acknowledgment behavior inherited from the consumer framework is standard queue processing functionality and must not be penalized. diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md index 485a1598..952045f7 100755 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md @@ -1,15 +1,24 @@ -# Holistic Evaluation Rubric +# Evaluation Rubric: Multi-Tenant Data Isolation ## Narrow Correctness -- **Tenant Isolation in Voice Cloning Handler**: All database queries and updates in `voice-cloning-job-handler` on `VoiceCloning` and `UserAudioProfile` must incorporate `userId` filtering in addition to record `_id`. -- **Tenant Isolation in Speech Synthesis Handler**: All downstream queries and updates in `voice-synthsizer-job-handler` on `RecordingSalutation` and `Recording` must be scoped using the `userId` resolved from `UserAudioProfile`. -- **CRUX: Side-Effect Halting on Validation Failure**: If tenant validation fails or requested records do not match the tenant context, the handler must immediately halt execution before performing audio generation or database updates. - - *Scoring note*: This is a Crux requirement under Narrow Correctness. Failing to halt unauthorized side effects results in 0 credit for this criterion under Narrow Correctness. -- **Initial Profile Lookup Exemption**: Performing an initial lookup on `UserAudioProfile` by `_id: userAudioProfileId` to resolve the tenant's `userId` is a valid, necessary step and must not be penalized. + +### Primary Intent & Crux Requirement +- **Side-Effect Prevention (CRUX)**: The implementation must prevent unauthorized side effects, halting speech synthesis audio rendering and database updates whenever tenant validation fails or records do not match tenant context. Failing to halt unauthorized side effects is a Crux failure that applies a heavy penalty to the overall score. +- **Voice Cloning Tenant Isolation**: All database reads and updates in must filter by in addition to record . +- **Speech Synthesis Tenant Isolation**: All downstream database reads and updates to and in must be scoped by the profile-derived . + +### Allowed Behaviors & Non-Penalization +- **Initial Profile Lookup Exemption**: Performing an initial lookup on by to resolve and establish tenant context is necessary and must not be penalized for omitting . +- **Inherited SQS Acknowledgment**: Standard SQS message deletion and acknowledgment behavior inherited from the baseline consumer framework is expected infrastructure functionality and must not be penalized. + +--- ## Broader Correctness / the craft of software engineering -- **Worker Polling Loop Resilience**: Unhandled exceptions during message processing must be caught gracefully in a `try-catch` block so the background worker polling loop remains active and continues processing queue messages. -- **Framework Queue Message Acknowledgment**: Standard SQS message deletion and acknowledgment inherited from the consumer framework on completed or rejected jobs is acceptable infrastructure functionality and must not be penalized. + +- **Worker Loop Resilience**: Errors and exceptions encountered during job processing must be caught gracefully in a try-catch block to keep background worker polling loops active. + +--- ## Communication -- **Refactor Summary and Documentation Accuracy**: If a written summary or code documentation is provided, it must accurately explain the multi-tenant isolation logic without false or misleading security claims. + +- **Refactor Summary Accuracy**: Any written response summary or inline code documentation accompanying the refactor must accurately describe the multi-tenant isolation logic without misleading claims.