diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-answer-obviousness.inputs.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-answer-obviousness.inputs.json index 44a20e29..49ac69d5 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-answer-obviousness.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-answer-obviousness.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-14T17:14:41.817Z", + "capturedAt": "2026-10-14T17:18:33.366Z", "capturedBy": "stamp", "inputs": { - "prompt": "437754c6513a665a319586f85e3994153342235b8a02849184c0d84e2f22c538", + "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4", - "atomicRubric": "ef80c01bd7e708326a878241c7bb75c625ad437613a9a5ae54058996497eb700", + "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", + "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", "rubricsYaml": null, - "graderContext": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4" + "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" } } diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-answer-obviousness.md b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-answer-obviousness.md index 70a06abd..d35e7f09 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-answer-obviousness.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-answer-obviousness.md @@ -1,7 +1,7 @@ --- detector: detector-answer-obviousness verdict: obvious -confidence: MEDIUM +confidence: HIGH --- # Answer-obviousness check: potion-voice-user-ownership @@ -9,28 +9,28 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## What the prompt asks -The request is to secure tenant ownership in two workers, keep processing stable on invalid messages, and report system boundaries. +The prompt asks for tenant-scoped queries and mutations in both workers and for worker-loop stability. ## Per-expectation assessment -### Tenant scoping — obvious +### Scoping and rejection — obvious -- **What the rubric requires:** “resource queries and updates verify userId.” -- **Is it obvious from the prompt?** This implements the requested isolation goal. +- **What the rubric requires:** Tenant ownership checks on VoiceCloning, UserAudioProfile, Recording, and RecordingSalutation and rejection before cross-tenant effects. +- **Is it obvious from the prompt?** These are direct implementations of the requested isolation goal. - **Verdict for this expectation:** obvious. -### Error handling — obvious +### Profile bootstrap — obvious -- **What the rubric requires:** Runtime errors, missing records, and invalid payloads must not stop polling. -- **Is it obvious from the prompt?** Worker resilience is explicitly requested. +- **What the rubric requires:** The initial synthesis profile lookup may use its ID to discover userId. +- **Is it obvious from the prompt?** A bootstrap lookup is a defensible way to establish tenant context when the message lacks a directly consumed userId. - **Verdict for this expectation:** obvious. -### Contract analysis — obvious +### Polling and communication — obvious -- **What the rubric requires:** Explain resource-ID messages versus authenticated requester tokens. -- **Is it obvious from the prompt?** The prompt asks to document architectural queue-contract boundaries. +- **What the rubric requires:** Recover from invalid messages and explain relevant payload boundaries. +- **Is it obvious from the prompt?** The prompt requests worker stability; extra-credit communication follows from source inspection. - **Verdict for this expectation:** obvious. ## Overall verdict -The broad decisions the rubric scores follow from the prompt. Incorrect source facts are assessed by the fact-check detector. +The holistic expectations are inferable from the request and do not prescribe an unsupported exact field or one mandatory code shape. diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-broken-dev-env.inputs.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-broken-dev-env.inputs.json index 44a20e29..49ac69d5 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-broken-dev-env.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-broken-dev-env.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-14T17:14:41.817Z", + "capturedAt": "2026-10-14T17:18:33.366Z", "capturedBy": "stamp", "inputs": { - "prompt": "437754c6513a665a319586f85e3994153342235b8a02849184c0d84e2f22c538", + "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4", - "atomicRubric": "ef80c01bd7e708326a878241c7bb75c625ad437613a9a5ae54058996497eb700", + "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", + "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", "rubricsYaml": null, - "graderContext": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4" + "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" } } diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-broken-dev-env.md b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-broken-dev-env.md index 3a88ac0f..dcee285f 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-broken-dev-env.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-broken-dev-env.md @@ -9,10 +9,10 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Verbatim grounding -> “A security audit identified multi-tenant isolation risks: background handlers process database operations based on document IDs provided in queue payloads without enforcing proper user ownership scoping.” +> “database queries and updates inside these worker handlers operate on document IDs without verifying that the records belong to the requesting tenant.” -The workspace built and all shipped JavaScript passed node --check. The source package declares no test script. +The workspace built and all shipped JavaScript passed node --check. The package has no declared test script. ## Rationale -The authorization weaknesses are the task subject. No unrelated setup failure is evident. There are no reference runs to inspect for corruption or package drift. +The authorization weakness is the task subject. No unrelated broken environment is evident. No reference runs exist to inspect for infrastructure corruption or package drift. diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-credential-leakage.inputs.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-credential-leakage.inputs.json index 44a20e29..49ac69d5 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-credential-leakage.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-credential-leakage.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-14T17:14:41.817Z", + "capturedAt": "2026-10-14T17:18:33.366Z", "capturedBy": "stamp", "inputs": { - "prompt": "437754c6513a665a319586f85e3994153342235b8a02849184c0d84e2f22c538", + "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4", - "atomicRubric": "ef80c01bd7e708326a878241c7bb75c625ad437613a9a5ae54058996497eb700", + "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", + "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", "rubricsYaml": null, - "graderContext": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4" + "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" } } diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-credential-leakage.md b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-credential-leakage.md index 5b1191fc..6139b0df 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-credential-leakage.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-credential-leakage.md @@ -9,7 +9,7 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Findings -There is no environment/workspace.patch, so no authored patch additions are available for credential or checkout-path scans. +No environment/workspace.patch exists, so there are no authored patch additions to scan for credentials or checkout paths. ## Overall verdict diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-cross-task-reference.inputs.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-cross-task-reference.inputs.json index 44a20e29..49ac69d5 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-cross-task-reference.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-cross-task-reference.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-14T17:14:41.817Z", + "capturedAt": "2026-10-14T17:18:33.366Z", "capturedBy": "stamp", "inputs": { - "prompt": "437754c6513a665a319586f85e3994153342235b8a02849184c0d84e2f22c538", + "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4", - "atomicRubric": "ef80c01bd7e708326a878241c7bb75c625ad437613a9a5ae54058996497eb700", + "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", + "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", "rubricsYaml": null, - "graderContext": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4" + "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" } } diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-cross-task-reference.md b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-cross-task-reference.md index 94cde49f..5cba6834 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-cross-task-reference.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-cross-task-reference.md @@ -15,4 +15,4 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Rationale -These are source directories in this task. The prompt and holistic rubric do not reference another graded task. +These are directories in the current source workspace. The prompt and rubric do not reference another graded task. diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-dimension-misapplication.inputs.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-dimension-misapplication.inputs.json index 44a20e29..49ac69d5 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-dimension-misapplication.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-dimension-misapplication.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-14T17:14:41.817Z", + "capturedAt": "2026-10-14T17:18:33.366Z", "capturedBy": "stamp", "inputs": { - "prompt": "437754c6513a665a319586f85e3994153342235b8a02849184c0d84e2f22c538", + "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4", - "atomicRubric": "ef80c01bd7e708326a878241c7bb75c625ad437613a9a5ae54058996497eb700", + "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", + "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", "rubricsYaml": null, - "graderContext": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4" + "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" } } diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-dimension-misapplication.md b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-dimension-misapplication.md index 1294d6ad..dfb0bcd3 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-dimension-misapplication.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-dimension-misapplication.md @@ -1,7 +1,7 @@ --- detector: detector-dimension-misapplication -verdict: partial-misapplication -confidence: MEDIUM +verdict: clean +confidence: HIGH --- # Dimension-misapplication check: potion-voice-user-ownership @@ -9,12 +9,12 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Verbatim grounding -> “Crux Failure (Narrow Correctness & Broader Correctness)” +> “dock points under Narrow correctness.” -> “A severe deduction applies if the response fails to scope downstream database updates or voice synthesis execution by tenant context, allowing cross-tenant operations to execute against unowned records.” +> “Worker Stability” appears under Broader correctness. -The shared standard separates Narrow Correctness for the requested outcome from Broader Correctness for surrounding craft and reliability. +> “Extra Credit” appears under Communication. ## Rationale -The same cross-tenant operation is attached to two criteria without saying what distinct miss each owns. A grader could charge the single defect twice. Tenant scoping itself belongs principally to Narrow Correctness; Broader Correctness can assess separate architectural or stability effects. The worker-crash clause is otherwise coherently routed. No run grades exist to compare. +The requested security behavior is assigned to Narrow Correctness, worker process reliability to Broader Correctness, and optional reporting to Communication. The rubric does not double-charge a single behavior across two named criteria. No reference-run grades exist to audit. diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-fact-check-rubric-claims.inputs.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-fact-check-rubric-claims.inputs.json index 44a20e29..49ac69d5 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-fact-check-rubric-claims.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-fact-check-rubric-claims.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-14T17:14:41.817Z", + "capturedAt": "2026-10-14T17:18:33.366Z", "capturedBy": "stamp", "inputs": { - "prompt": "437754c6513a665a319586f85e3994153342235b8a02849184c0d84e2f22c538", + "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4", - "atomicRubric": "ef80c01bd7e708326a878241c7bb75c625ad437613a9a5ae54058996497eb700", + "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", + "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", "rubricsYaml": null, - "graderContext": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4" + "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" } } diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-fact-check-rubric-claims.md b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-fact-check-rubric-claims.md index 6e3e442c..ced050c9 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-fact-check-rubric-claims.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-fact-check-rubric-claims.md @@ -1,48 +1,48 @@ --- detector: detector-fact-check-rubric-claims -verdict: fail +verdict: partial confidence: HIGH claims: - id: c01 - verdict: "fail" + verdict: "pass" loadBearing: true - summary: "Cloning job model is named VoiceCloningJob" - rubricQuote: "database operations on MongoDB models via Mongoose (`VoiceCloningJob`, `UserAudioProfile`, `Recording`, `RecordingSalutation`)." + summary: "Voice cloning model name" + rubricQuote: "The Mongoose model is `VoiceCloning` (not `VoiceCloningJob`)." sourceEvidence: "module.exports = mongoose.model('VoiceCloning', VoiceCloningSchema)" sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-cloning-job-handler/voice_cloning/voice_cloning_model.js (last line)" - note: "The source model is VoiceCloning, not VoiceCloningJob. This name also appears in the atomic cloning criterion and may misdirect a response." + note: "The source model name matches the rubric." - id: c02 - verdict: "fail" + verdict: "pass" loadBearing: true - summary: "Cloning handler retrieves the job record by ID" - rubricQuote: "The job record is retrieved by `_id: job._doc._id` (or `job._id`)." + summary: "Cloning handler ingests a serialized job document" + rubricQuote: "The handler receives `job._doc` directly from the SQS queue message payload (no initial MongoDB query for the job document itself)." sourceEvidence: "const { metadata, input, _id, userAudioProfileId } = job._doc" - sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-cloning-job-handler/index.js (lines 100-105, 138-142)" - note: "The handler consumes a serialized job._doc from SQS and updates VoiceCloning by _id; it does not first retrieve the job record from MongoDB." + sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-cloning-job-handler/index.js (lines 100-105)" + note: "The handler parses the SQS body and consumes job._doc before any job-record lookup." - id: c03 verdict: "pass" loadBearing: true - summary: "Cloning service update ignores userId in its filter" - rubricQuote: "Passing `userId` to helper functions like `voiceCloningService.update` is insufficient if the underlying service method ignores `userId` in its query filter." - sourceEvidence: "{ _id: data._id }," - sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-cloning-job-handler/voice_cloning/voice_cloning_service.js (lines 65-75)" - note: "The update service hardcodes an _id-only Mongoose filter, so this warning is correct." + summary: "Profile lookup resolves downstream userId" + rubricQuote: "The resolved `userId` from `UserAudioProfile` serves as the tenant context for downstream co-ownership verification." + sourceEvidence: "const { training_model_path, userId } = userAudioProfile[0]" + sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 96-105)" + note: "The handler derives userId from the selected profile. The rubric correctly describes this as co-ownership context rather than authenticating the requester." - id: c04 verdict: "partial" loadBearing: true - summary: "Profile owner is authoritative job requester" - rubricQuote: "The retrieved `userAudioProfile.userId` establishes the authoritative tenant context (`userId`) for the job." - sourceEvidence: "const { training_model_path, userId } = userAudioProfile[0]" - sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 96-105)" - note: "The selected profile supplies an owner for co-ownership checks. The handler does not authenticate the requester behind the payload-selected profile ID, so “authoritative” is only supported for record ownership, not requester identity." - - id: c05 - verdict: "partial" - loadBearing: true - summary: "Synthesis SQS payload has no direct userId or jobId" + summary: "Complete SQS synthesis message contract" rubricQuote: "Payloads do not supply a direct `userId` or synthesis `jobId`." sourceEvidence: "const { training_model_path, userId } = userAudioProfile[0]" sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 74-105)" - note: "The handler does not consume those fields and derives userId from the profile. The producer and formal payload schema are absent, so the absolute statement about every SQS message is not fully verifiable." + note: "The handler does not consume either field and derives userId from the profile. The external producer and formal payload schema are absent, so the absolute claim about every SQS message is not fully verifiable." + - id: c05 + verdict: "pass" + loadBearing: true + summary: "Cloning service update ignores userId in its filter" + rubricQuote: "Candidate misses scoping on downstream queries or relies on helper calls without verifying that the underlying Mongoose query filter enforces `userId`." + sourceEvidence: "{ _id: data._id }," + sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-cloning-job-handler/voice_cloning/voice_cloning_service.js (lines 65-75)" + note: "The service update filter uses only _id, confirming the need to inspect the actual Mongoose predicate." --- # Fact-check rubric claims: potion-voice-user-ownership @@ -50,4 +50,4 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md Source: harbor-tasks/potion-voice-user-ownership/environment/workspace, built from potion-voice commit fcd8a9d0b00406bda1943c234a8f2fecaff9f774 with no workspace patch. -Checked five load-bearing claims. The model name and job-retrieval claim fail against the source. The service-filter warning passes. “Authoritative” tenant identity and the complete external payload contract are only partly established by the shipped code. +Checked five load-bearing claims. Four match the shipped source. The exact external SQS payload contract is only partly verifiable because the producer is absent. diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-defined.inputs.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-defined.inputs.json index 44a20e29..49ac69d5 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-defined.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-defined.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-14T17:14:41.817Z", + "capturedAt": "2026-10-14T17:18:33.366Z", "capturedBy": "stamp", "inputs": { - "prompt": "437754c6513a665a319586f85e3994153342235b8a02849184c0d84e2f22c538", + "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4", - "atomicRubric": "ef80c01bd7e708326a878241c7bb75c625ad437613a9a5ae54058996497eb700", + "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", + "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", "rubricsYaml": null, - "graderContext": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4" + "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" } } diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-defined.md b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-defined.md index 0850f59a..e9940b1b 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-defined.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-defined.md @@ -9,12 +9,12 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Positive target present? -The rubric describes scoped queries and updates, safe initial profile tenant resolution, service-filter verification, caught runtime errors with continuing polling, and accurate boundary reporting. +The rubric describes scoped model filters, a permitted first profile lookup, safe rejection and job-status logging, a polling loop that survives errors, and a clear report of the payload boundary. ## What the grader has to infer -The rubric's incorrect model and retrieval facts may mislead the grader, but it gives a positive target rather than only listing failures. +The exact producer contract is not shipped, but the rubric gives affirmative targets for the code and response behaviors it scores. ## Overall verdict -The central security and stability behaviors have affirmative success descriptions. +A grader has a positive picture of a strong response on the central task. diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-exhaustiveness.inputs.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-exhaustiveness.inputs.json index 44a20e29..49ac69d5 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-exhaustiveness.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-exhaustiveness.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-14T17:14:41.817Z", + "capturedAt": "2026-10-14T17:18:33.366Z", "capturedBy": "stamp", "inputs": { - "prompt": "437754c6513a665a319586f85e3994153342235b8a02849184c0d84e2f22c538", + "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4", - "atomicRubric": "ef80c01bd7e708326a878241c7bb75c625ad437613a9a5ae54058996497eb700", + "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", + "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", "rubricsYaml": null, - "graderContext": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4" + "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" } } diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-exhaustiveness.md b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-exhaustiveness.md index 74744492..47488855 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-exhaustiveness.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-exhaustiveness.md @@ -1,6 +1,6 @@ --- detector: detector-good-response-exhaustiveness -verdict: partial +verdict: exhaustive confidence: MEDIUM --- # Good-response-exhaustiveness check: potion-voice-user-ownership @@ -9,12 +9,12 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Plausible strong-response approaches -A strong agent can implement profile-derived record co-ownership checks, report that the queue message does not independently authenticate a requester, and ask for the producer's trust contract before claiming full authorization. A more direct implementation with clearly stated assumptions is also reasonable. +A strong agent can implement tenant filters and safe sequencing using the profile owner as context, then report that queue resource IDs do not by themselves authenticate a requester. It can also state that producer trust needs confirmation before claiming complete requester authorization. ## Coverage in the rubric -The Communication section credits noting resource IDs rather than signed tenant tokens. The Ground Truth nevertheless says the profile owner “establishes the authoritative tenant context” for the job, which can penalize a cautious response that treats it only as the selected records' owner. The rubric does not explicitly credit stopping at that boundary and requesting a trusted principal. +The rubric protects the initial profile-by-ID lookup, requires scoped downstream records, and awards extra credit for describing the message-contract boundary. It does not demand one precise helper implementation. ## Overall verdict -Most paths are covered, but the clarify-versus-act fork at the trust boundary remains only partly credited. No reference runs exist to show whether it affects scoring. +The major reasonable response shapes are covered. No reference runs exist yet to assess how graders apply them. diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-offline-verifiability.inputs.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-offline-verifiability.inputs.json index 44a20e29..49ac69d5 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-offline-verifiability.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-offline-verifiability.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-14T17:14:41.817Z", + "capturedAt": "2026-10-14T17:18:33.366Z", "capturedBy": "stamp", "inputs": { - "prompt": "437754c6513a665a319586f85e3994153342235b8a02849184c0d84e2f22c538", + "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4", - "atomicRubric": "ef80c01bd7e708326a878241c7bb75c625ad437613a9a5ae54058996497eb700", + "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", + "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", "rubricsYaml": null, - "graderContext": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4" + "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" } } diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-offline-verifiability.md b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-offline-verifiability.md index ce2b20c1..b0046abc 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-offline-verifiability.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-offline-verifiability.md @@ -9,8 +9,8 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Findings -SQS, MongoDB, and speech synthesis are production services, but the graded work is local query filtering and error handling. Queue messages, models, and side effects can be stubbed without live infrastructure. +SQS, MongoDB, and synthesis are deployment services, but the task grades local query filtering, side-effect ordering, and error handling. These can be checked with local model and queue stubs. ## Overall verdict -The task can be completed and checked locally. It requires no undeclared package or live tenant. +The task is offline-completable and locally verifiable without a live tenant or undeclared dependency. diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-over-hinting.inputs.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-over-hinting.inputs.json index 44a20e29..49ac69d5 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-over-hinting.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-over-hinting.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-14T17:14:41.817Z", + "capturedAt": "2026-10-14T17:18:33.366Z", "capturedBy": "stamp", "inputs": { - "prompt": "437754c6513a665a319586f85e3994153342235b8a02849184c0d84e2f22c538", + "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4", - "atomicRubric": "ef80c01bd7e708326a878241c7bb75c625ad437613a9a5ae54058996497eb700", + "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", + "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", "rubricsYaml": null, - "graderContext": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4" + "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" } } diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-over-hinting.md b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-over-hinting.md index bd572b76..fc548d3e 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-over-hinting.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-over-hinting.md @@ -1,7 +1,7 @@ --- detector: detector-over-hinting -verdict: partial-hinting -confidence: MEDIUM +verdict: clean +confidence: HIGH --- # Over-hinting check: potion-voice-user-ownership @@ -9,13 +9,8 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Findings -### Profile-derived scope — prompt-hint (partial) - -- **Where:** instruction.md, Task Requirement 1. -- **Quote:** “For handlers where tenant identity is established via an audio profile lookup, ensure downstream database operations on associated recordings and salutations are scoped by that resolved tenant context.” -- **What it pre-empts:** This supplies the profile-to-recordings authorization sequence the rubric credits, though it does not name exact source lines or filters. -- **De-hinting option:** State the multi-tenant outcome and worker scope, leaving the agent to discover how synthesis derives userId. +The strongest near-miss is “Ensure database queries and mutations enforce tenant isolation using the appropriate user identifier.” This states the requested security outcome without naming the faulty service helper or exact patch. No authored workspace patch exists. ## Overall verdict -The prompt gives a mild implementation cue for synthesis. It remains a plausible product request; this advisory finding does not establish a task failure. No authored workspace patch exists. +The prompt leaves source discovery and implementation decisions to the agent. 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 44a20e29..49ac69d5 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-14T17:14:41.817Z", + "capturedAt": "2026-10-14T17:18:33.366Z", "capturedBy": "stamp", "inputs": { - "prompt": "437754c6513a665a319586f85e3994153342235b8a02849184c0d84e2f22c538", + "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4", - "atomicRubric": "ef80c01bd7e708326a878241c7bb75c625ad437613a9a5ae54058996497eb700", + "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", + "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", "rubricsYaml": null, - "graderContext": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4" + "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" } } 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 f2a7551f..33669b9c 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 @@ -1,6 +1,6 @@ --- detector: detector-rubric-clarity -verdict: material-issues +verdict: clear confidence: MEDIUM --- # Rubric-clarity check: potion-voice-user-ownership @@ -9,20 +9,12 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Material ambiguities -### One defect across two dimensions - -- **Where:** “Crux Failure (Narrow Correctness & Broader Correctness)” applies to cross-tenant synthesis or writes. -- **Why it's ambiguous:** The text does not say whether the same cross-tenant event receives a heavy adjustment to both criteria, to one, or to the overall score. These readings produce different totals. - -### Authoritative tenant context - -- **Where:** “The retrieved userAudioProfile.userId establishes the authoritative tenant context (userId) for the job.” -- **Why it's ambiguous:** It may mean the selected records' shared owner or the authenticated requester. The latter does not follow from a profile ID alone, and the Communication section acknowledges a requester-token gap. +None found. The rubric distinguishes the initial profile bootstrap from downstream scoped operations and assigns security deductions to Narrow Correctness and worker crashes to Broader Correctness. ## Copy-edit issues -None found. +None found that interrupts reading. ## Overall verdict -The crux penalty's destination and the meaning of “authoritative” need tightening for consistent scoring. +The holistic guidance is clear enough to apply. Its incomplete atomic conversion and partly unverified external payload claim are separate detector findings. 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 44a20e29..49ac69d5 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-14T17:14:41.817Z", + "capturedAt": "2026-10-14T17:18:33.366Z", "capturedBy": "stamp", "inputs": { - "prompt": "437754c6513a665a319586f85e3994153342235b8a02849184c0d84e2f22c538", + "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4", - "atomicRubric": "ef80c01bd7e708326a878241c7bb75c625ad437613a9a5ae54058996497eb700", + "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", + "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", "rubricsYaml": null, - "graderContext": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4" + "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" } } 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 e636fb51..7e083f54 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 @@ -13,33 +13,40 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md agai | Holistic clause | Atomic criterion | Status | | --- | --- | --- | -| Downstream tenant-scoped queries and audio generation | crux-tenant-isolation-downstream-scoping | covered | -| Initial profile lookup by ID is explicitly valid | initial-profile-tenant-resolution | partial | -| Cloning service filter must really include userId | voice-cloning-query-user-scoping | covered | -| Polling loop survives errors | worker-loop-crash-prevention | covered | -| Owned job error-status write is allowed | allowed-job-failure-status-logging | covered | -| Contract boundary report is extra credit | message-contract-boundary-report | covered | +| Cloning model/profile queries and updates use userId | tenant-scoped-cloning-queries | covered | +| Initial profile lookup is exempt | profile-derived-tenant-resolution | covered | +| RecordingSalutation and Recording queries/updates use userId | tenant-scoped-synthesis-queries | partial | +| Reject cross-tenant synthesis or database mutations | halt-unauthorized-side-effects; tenant-scoped-synthesis-queries | partial | +| Owned requesting job error status is allowed | owned-record-error-lifecycle | covered | +| Polling survives authorization errors | worker-loop-crash-prevention | covered | +| Payload-boundary report is extra credit | message-contract-gap-analysis | covered | ## Coverage gaps -### Protected bootstrap becomes a scored requirement +### Synthesis updates omitted -- **Holistic clause:** “This initial UserAudioProfile lookup by _id is a necessary tenant-resolution step and is explicitly valid.” -- **Closest criterion:** initial-profile-tenant-resolution is primary_intent with possible_dealbreaker. -- **What is lost:** The holistic rule protects a valid lookup from penalty. The atomic version can penalize a response for not explicitly permitting or using that exact lookup even if it securely establishes tenant context another way. +- **Holistic clause:** “RecordingSalutation queries/updates must be scoped by { _id, userId }” and “Recording queries/updates must be scoped by { _id, userId }.” +- **Closest criterion:** tenant-scoped-synthesis-queries only says “database queries.” +- **What is lost:** An implementation that reads by userId but updates a salutation by bare _id can pass the atomic wording while failing the holistic rule. + +### Cross-tenant mutation coverage weakened + +- **Holistic clause:** Cross-tenant database mutations are a crux failure. +- **Closest criterion:** halt-unauthorized-side-effects requires halting voice synthesis and audio generation, but does not mention database writes in its guideline. +- **What is lost:** An unauthorized write with no audio generation may avoid the atomic side-effect criterion. ## Invented content -No new independent factual requirement was found beyond the bootstrap criterion's stronger scoring status. +None found. ## Context integrity -The context reproduces the whole holistic rubric, preserving its details and its incorrect VoiceCloningJob model label. +The context contains the model names, bootstrap exception, and required filter matrix. ## Crux alignment -The holistic rubric's cross-tenant crux behavior is represented by crux-tenant-isolation-downstream-scoping, but its allocation across Narrow and Broader Correctness is ambiguous in both forms. +The holistic crux is a Narrow Correctness deduction for cross-tenant operations. The atomic criteria use crux for cloning scoping and certain_dealbreaker for synthesis scoping and unauthorized audio generation, so the central severity is not fully aligned. ## Overall verdict -A “do not penalize” exception was converted into a primary-intent score requirement. The other main holistic clauses are represented. +The atomic rubric omits explicit synthesis update scoping and weakens the mutation side of the cross-tenant failure. 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 44a20e29..49ac69d5 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-14T17:14:41.817Z", + "capturedAt": "2026-10-14T17:18:33.366Z", "capturedBy": "stamp", "inputs": { - "prompt": "437754c6513a665a319586f85e3994153342235b8a02849184c0d84e2f22c538", + "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4", - "atomicRubric": "ef80c01bd7e708326a878241c7bb75c625ad437613a9a5ae54058996497eb700", + "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", + "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", "rubricsYaml": null, - "graderContext": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4" + "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" } } 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 182e05c0..7b348934 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 @@ -11,30 +11,30 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/atomic-rubric.yaml ## Deterministic contract -1. PASS: task string and criteria list exist. +1. PASS: top-level task and criteria list exist. 2. PASS: task matches the slug. -3. PASS: six ids are unique kebab-case. -4. PASS: categories use primary_intent, dodged_bullet, or extra_credit. -5. PASS: required severities are valid and the extra-credit criterion has none. +3. PASS: seven ids are unique kebab-case. +4. PASS: categories use the allowed vocabulary. +5. FAIL: profile-derived-tenant-resolution and owned-record-error-lifecycle have category dodged_bullet but omit required severity. 6. PASS: one criterion carries crux. -7. FAIL: Broader Correctness is not the exact dimension name Broader Correctness / the craft of software engineering. -8. PASS: every criterion has a guideline. +7. FAIL: “Narrow correctness” and “Broader correctness” are not the exact Grading Standard dimension names; capitalization differs, and Broader Correctness must include its full suffix. +8. PASS: each criterion has a nonempty guideline. 9. PASS: numeric penalty sweeps found no amount in the atomic file or grader-context.md. -10. The skill core has no separately numbered tenth check. +10. The skill core has no separate numbered tenth check. 11. PASS: guidelines use positive phrasing. ## Atomicity and self-containment -The crux guideline bundles query scoping and audio generation. A response can scope every database call yet synthesize before validation, or guard synthesis while leaving a write unscoped. These independent requirements should be separately judgeable. +The criteria are mostly independently judgeable. No separate atomicity finding. ## Phrasing and answer keys -The concrete answer keys for profile resolution, cloning job ID, and worker-loop behavior appear only in elaborations. Factual criteria should put their bold answer keys inline in the guideline. +Factual answer keys are bold and inline in the guidelines. ## Fair-grading findings -The initial-profile criterion assigns possible-dealbreaker severity to a permitted bootstrap path. The crux guideline calls userId “verified” even though the source only derives it from a payload-selected profile. +The category/severity omissions prevent the two protective dodged-bullet criteria from encoding their intended treatment. ## Overall verdict -The invalid dimension breaks the deterministic contract. The bundled crux and answer keys placed outside guidelines add material grading problems. +Two missing severities and invalid dimension names break the atomic schema. The synthesis-update omission is separately captured by rubric coverage. diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-generality.inputs.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-generality.inputs.json index 44a20e29..49ac69d5 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-generality.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-generality.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-14T17:14:41.817Z", + "capturedAt": "2026-10-14T17:18:33.366Z", "capturedBy": "stamp", "inputs": { - "prompt": "437754c6513a665a319586f85e3994153342235b8a02849184c0d84e2f22c538", + "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4", - "atomicRubric": "ef80c01bd7e708326a878241c7bb75c625ad437613a9a5ae54058996497eb700", + "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", + "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", "rubricsYaml": null, - "graderContext": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4" + "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" } } diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-generality.md b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-generality.md index a43bd6bc..2e0ba64e 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-generality.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-generality.md @@ -21,4 +21,4 @@ None found. ## Overall verdict -The rubric describes general response quality without reference-run statistics or framework names. +The rubric uses general response-quality descriptions, with no run statistics or framework names. diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-snapshot-leakage.inputs.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-snapshot-leakage.inputs.json index 44a20e29..49ac69d5 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-snapshot-leakage.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-snapshot-leakage.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-14T17:14:41.817Z", + "capturedAt": "2026-10-14T17:18:33.366Z", "capturedBy": "stamp", "inputs": { - "prompt": "437754c6513a665a319586f85e3994153342235b8a02849184c0d84e2f22c538", + "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4", - "atomicRubric": "ef80c01bd7e708326a878241c7bb75c625ad437613a9a5ae54058996497eb700", + "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", + "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", "rubricsYaml": null, - "graderContext": "cf794fad515f96dc927aa458205c7e696cabe47bc4713422e6a1bd8d15bef3f4" + "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" } } diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-snapshot-leakage.md b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-snapshot-leakage.md index 79052dbc..d602ba0f 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-snapshot-leakage.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-snapshot-leakage.md @@ -13,7 +13,7 @@ No environment/session.jsonl or session-full.jsonl exists. The holistic rubric i ## Rationale -This manual task has no injected conversation to compare with the rubric. +This manual task has no injected conversation from which an answer could leak. ## Snapshot hygiene (advisory) 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 24d6cd7d..47d25511 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,20 +1,9 @@ -# Audit Background Worker Multi-Tenant Isolation & Stability +# Refactor Background Worker Handlers for Multi-Tenant Data Isolation -Our backend background processing tier runs asynchronous workers for voice cloning and speech synthesis. +Our backend background workers (`voice-cloning-job-handler` and `voice-synthsizer-job-handler`) process asynchronous processing jobs from AWS SQS queues. Currently, database queries and updates inside these worker handlers operate on document IDs without verifying that the records belong to the requesting tenant. -A security audit identified multi-tenant isolation risks: background handlers process database operations based on document IDs provided in queue payloads without enforcing proper user ownership scoping. Additionally, handling errors during job execution must not crash the background worker polling loops. +## Task Requirements -### Task Requirements - -1. **Audit & Scope Multi-Tenant Queries**: - - Audit `voice-cloning-job-handler` and `voice-synthsizer-job-handler`. - - Ensure all database queries and updates verify that requested resources belong to the expected user/tenant. - - For handlers where tenant identity is established via an audio profile lookup, ensure downstream database operations on associated recordings and salutations are scoped by that resolved tenant context. - -2. **Ensure Worker Process Resilience**: - - Ensure that invalid payload handling, missing records, or runtime exceptions during job processing are handled gracefully. - - Do not allow unhandled exceptions to crash the polling process or terminate worker execution. - -3. **Report Findings & System Boundaries**: - - Provide a concise summary of the changes made to enforce multi-tenant isolation. - - Document any architectural assumptions or boundaries regarding queue message payload contracts. +1. **Audit Database Operations**: Review all database query and update calls across `voice-cloning-job-handler` and `voice-synthsizer-job-handler`. +2. **Enforce Tenant Isolation**: Ensure database queries and mutations enforce tenant isolation using the appropriate user identifier (`userId`), preventing cross-tenant data access or modification. +3. **Preserve Worker Loop Stability**: Ensure that authorization errors or failed job handling gracefully update job lifecycle state without throwing unhandled exceptions that crash the worker polling loop. 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 115f7a72..7a644474 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 @@ -1,68 +1,61 @@ task: potion-voice-user-ownership - criteria: - - id: crux-tenant-isolation-downstream-scoping + - id: tenant-scoped-cloning-queries category: primary_intent + dimensions: + - Narrow correctness severity: crux - dimensions: - - Narrow Correctness - - Broader Correctness - guideline: | - The response should ensure that **all downstream database queries and audio generation operations in voice synthesis and cloning handlers are scoped by the verified tenant userId**. - elaboration: | - In voice-synthsizer-job-handler, after resolving userId from UserAudioProfile, downstream lookups and updates for RecordingSalutation and Recording must enforce userId scoping. Executing voice synthesis or mutating records across tenant boundaries is a crux security failure. - **Answer key: Downstream Recording and RecordingSalutation queries must enforce userId matching userAudioProfile.userId.** + call_site_key: voice-cloning-handler-queries + guideline: "The response should scope all VoiceCloning and UserAudioProfile database queries and updates by userId in voice-cloning-job-handler. **Answer key:** Query filters must include `{ _id, userId }` on VoiceCloning and UserAudioProfile models." + elaboration: "Ensures that voice cloning operations are strictly isolated to the owning tenant." - - id: initial-profile-tenant-resolution - category: primary_intent - severity: possible_dealbreaker + - id: profile-derived-tenant-resolution + category: dodged_bullet dimensions: - - Narrow Correctness - guideline: | - The response should **permit the initial UserAudioProfile lookup by _id: payload.userAudioProfileId to resolve the tenant context userId**. - elaboration: | - SQS synthesis messages supply userAudioProfileId rather than a direct userId. Performing an initial lookup on UserAudioProfile to obtain userAudioProfile.userId is the valid mechanism for establishing the tenant trust anchor. - **Answer key: Initial UserAudioProfile lookup uses userAudioProfileId to discover userId.** + - Narrow correctness + call_site_key: synthesis-profile-tenant-resolution + guideline: "The response should resolve tenant context via UserAudioProfile lookup in voice-synthsizer-job-handler without penalizing the initial profile query for lacking userId. **Answer key:** The initial UserAudioProfile lookup uses `userAudioProfileId` to retrieve `userId` for downstream tenant verification." + elaboration: "The initial profile query is a necessary tenant-resolution step and must not be penalized for lacking userId prior to resolution." - - id: voice-cloning-query-user-scoping + - id: tenant-scoped-synthesis-queries category: primary_intent + dimensions: + - Narrow correctness severity: certain_dealbreaker + call_site_key: synthesis-recording-queries + guideline: "The response should scope RecordingSalutation and Recording database queries by the resolved userId in voice-synthsizer-job-handler. **Answer key:** Downstream RecordingSalutation and Recording queries must enforce `{ _id, userId }` matching." + elaboration: "Prevents unauthorized access or synthesis operations on recordings belonging to other tenants." + + - id: halt-unauthorized-side-effects + category: primary_intent dimensions: - - Narrow Correctness - guideline: | - The response should **scope VoiceCloningJob and UserAudioProfile queries and updates in voice-cloning-job-handler by userId**. - elaboration: | - Verify that Mongoose query filters actively include { _id, userId }. Passing userId to helper methods whose internal filter ignores userId is insufficient. - **Answer key: VoiceCloningJob queries must filter on _id: job._doc._id and userId.** + - Narrow correctness + severity: certain_dealbreaker + call_site_key: synthesis-side-effects + guideline: "The response should halt voice synthesis and audio generation if tenant ownership verification fails. **Answer key:** The handler must abort processing before invoking external audio generation when record ownership does not match." + elaboration: "Side effects must not be executed against unauthorized cross-tenant resources." + + - id: owned-record-error-lifecycle + category: dodged_bullet + dimensions: + - Narrow correctness + call_site_key: error-lifecycle-logging + guideline: "The response should allow updating the requested job status to failed or error on the job record itself when aborting unauthorized jobs. **Answer key:** Updating job status to failed for error tracking is valid lifecycle logging." + elaboration: "Graders must not penalize updating the status field on the requesting job record itself." - id: worker-loop-crash-prevention category: primary_intent + dimensions: + - Broader correctness severity: possible_dealbreaker - dimensions: - - Broader Correctness - guideline: | - The response should **ensure worker message processing catches exceptions gracefully to prevent polling-loop crashes**. - elaboration: | - Processing errors, missing records, or invalid payload formats must be caught in try/catch blocks so unhandled exceptions do not terminate the worker process. - **Answer key: Try/catch blocks around job execution prevent worker polling-loop process crashes.** + call_site_key: worker-polling-loop + guideline: "The response should handle errors gracefully so that failed job processing does not crash the background worker polling loop. **Answer key:** Errors must be caught and handled within the worker message processing loop." + elaboration: "Ensures background polling workers remain resilient during error conditions." - - id: allowed-job-failure-status-logging - category: dodged_bullet - severity: unlikely_dealbreaker - dimensions: - - Narrow Correctness - guideline: | - The response should **avoid treating job status error updates on the requesting job record as an unauthorized cross-tenant mutation**. - elaboration: | - Setting status: 'failed' or status: 'error' on the requesting job record when validation fails is valid lifecycle logging and should pass. - **Answer key: Updating status to failed on the requesting job record is allowed.** - - - id: message-contract-boundary-report + - id: message-contract-gap-analysis category: extra_credit dimensions: - Communication - guideline: | - The response should **describe the queue message contract boundary, noting that synthesis payloads convey resource IDs rather than authenticated tenant tokens**. - elaboration: | - This is optional extra credit. Identifying that profile-derived tenant resolution is required due to queue payload structure earns extra credit. Missing this note incurs no penalty. - **Answer key: Extra credit for documenting the SQS payload resource-ID boundary.** + call_site_key: sqs-message-contract-report + guideline: "The response should document that SQS payload resource IDs serve as record linkage rather than an authenticated requester token. **Answer key:** The report explains that SQS messages transmit resource IDs rather than bearer identity tokens." + elaboration: "Awards extra credit for identifying architectural limits of the current SQS payload contract." 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 4445f4d5..f3e58ba6 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,44 +1,27 @@ -# Holistic Evaluation Rubric: Multi-Tenant Authorization & Worker Stability +# Grader Context & Ground Truth Reference -## Task Context -The application relies on asynchronous background processing queues (AWS SQS) for voice cloning and speech synthesis tasks. The system handles jobs through worker routines in `voice-cloning-job-handler` and `voice-synthsizer-job-handler`, performing database operations on MongoDB models via Mongoose (`VoiceCloningJob`, `UserAudioProfile`, `Recording`, `RecordingSalutation`). +## Repository & Model Fact-Check Reference -## Business Context -In a multi-tenant voice cloning platform, user audio profiles, cloned models, and generated audio salutations contain highly sensitive user voice data. Allowing unauthenticated or cross-tenant database lookups and updates exposes private audio assets to unauthorized access or corruption across tenant boundaries. +### Model Names & Handler Introspection +1. **Model Name**: The Mongoose model for voice cloning is **`VoiceCloning`** (not `VoiceCloningJob`). +2. **Queue Ingestion**: `voice-cloning-job-handler` receives the job document directly via `job._doc` from the queue message payload. It does not perform an initial MongoDB query for `VoiceCloningJob`. +3. **Synthesis Payload**: `voice-synthsizer-job-handler` receives `userAudioProfileId`, `recordingId`, and `salutationId` in the SQS event. -## Ground Truth & Codebase Facts +--- -### 1. Handler Message Payload Contracts & Real Call Sites -- **`voice-cloning-job-handler/index.js`**: - - SQS messages supply job parameters and `userAudioProfileId`. - - The job record is retrieved by `_id: job._doc._id` (or `job._id`). - - Database operations on `VoiceCloningJob` and `UserAudioProfile` must verify tenant ownership using `userId`. - - *Code Nuance*: Passing `userId` to helper functions like `voiceCloningService.update` is insufficient if the underlying service method ignores `userId` in its query filter. Graders must verify that the actual Mongoose query filter includes `{ _id, userId }`. +## Verified Database Call-Site Matrix -- **`voice-synthsizer-job-handler/index.js`**: - - SQS payloads supply `userAudioProfileId`, `recordingId`, and `salutationId`. Payloads do not supply a direct `userId` or synthesis `jobId`. - - **Trust Anchor Resolution**: The worker performs an initial lookup on `UserAudioProfile` using `_id: payload.userAudioProfileId`. The retrieved `userAudioProfile.userId` establishes the authoritative tenant context (`userId`) for the job. - - This initial `UserAudioProfile` lookup by `_id` is a necessary tenant-resolution step and is explicitly valid. - - Downstream lookups and updates on `RecordingSalutation` and `Recording` must be scoped using the resolved `userId` (e.g. `{ _id: salutationId, userId }` and `{ _id: recordingId, userId }`). +| Handler | Model | Required Filter Context | Notes | +| :--- | :--- | :--- | :--- | +| `voice-cloning-job-handler` | `VoiceCloning` | `{ _id, userId }` | Query/update filters must explicitly include `userId`. | +| `voice-cloning-job-handler` | `UserAudioProfile` | `{ _id, userId }` | Profile lookups/updates must be tenant-scoped. | +| `voice-synthsizer-job-handler` | `UserAudioProfile` | `{ _id: userAudioProfileId }` | Initial lookup resolves `userId` (exempt from requiring `userId` filter). | +| `voice-synthsizer-job-handler` | `RecordingSalutation` | `{ _id, userId }` | Must match resolved `userId`. | +| `voice-synthsizer-job-handler` | `Recording` | `{ _id, userId }` | Must match resolved `userId`. | -### 2. Error Handling & Status Lifecycle -- Marking a requesting job record as `status: 'failed'` or `status: 'error'` when authorization fails or invalid data is encountered is standard lifecycle tracking and is permitted. -- Handlers must catch runtime exceptions during job execution so that malformed messages or missing records do not cause unhandled exceptions that crash the worker's polling loop. +--- -## Grading Dimensions - -### Narrow Correctness -- **Strong Behavior**: Candidate updates database queries in `voice-cloning-job-handler` and `voice-synthsizer-job-handler` so that resource queries and updates verify `userId`. In speech synthesis, the candidate uses `userAudioProfile.userId` to scope downstream `Recording` and `RecordingSalutation` operations. -- **Weak Behavior**: Candidate misses scoping on downstream queries or relies on helper calls without verifying that the underlying Mongoose query filter enforces `userId`. - -### Broader Correctness -- **Strong Behavior**: Candidate wraps job processing in robust try/catch blocks, ensuring runtime errors, missing records, or invalid payloads are logged gracefully without terminating the worker polling loop. -- **Weak Behavior**: Candidate allows unhandled rejections or unparsed errors to throw uncaught exceptions that crash the worker process. - -### Communication -- **Strong Behavior (Extra Credit)**: Candidate accurately reports the changes made and explicitly identifies the message-contract boundary (noting that queue messages carry resource IDs rather than signed tenant tokens, making initial profile-based tenant resolution necessary). -- **Weak Behavior**: Candidate provides vague or inaccurate descriptions of the changes made. - -## Heavy Penalties -- **Crux Failure (Narrow Correctness & Broader Correctness)**: A severe deduction applies if the response fails to scope downstream database updates or voice synthesis execution by tenant context, allowing cross-tenant operations to execute against unowned records. -- **Worker Process Instability (Broader Correctness)**: Deduct points under Broader Correctness if unhandled exceptions during message processing cause the background worker polling loop to crash. +## Grading Dimension Mapping +- **Narrow correctness**: Evaluates query scoping (`userId`), halting unauthorized side-effects, and correct model name usage (`VoiceCloning`). +- **Broader correctness**: Evaluates background worker loop resilience and preventing unhandled crashes. +- **Communication**: Awards extra credit for reporting architectural payload limitations. 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 4445f4d5..191771ee 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,44 +1,40 @@ -# Holistic Evaluation Rubric: Multi-Tenant Authorization & Worker Stability +# Holistic Evaluation Rubric: Multi-Tenant Worker Data Isolation -## Task Context -The application relies on asynchronous background processing queues (AWS SQS) for voice cloning and speech synthesis tasks. The system handles jobs through worker routines in `voice-cloning-job-handler` and `voice-synthsizer-job-handler`, performing database operations on MongoDB models via Mongoose (`VoiceCloningJob`, `UserAudioProfile`, `Recording`, `RecordingSalutation`). +## Task Overview +This task evaluates the candidate agent's ability to identify and fix multi-tenant data access security vulnerabilities across asynchronous background worker handlers (`voice-cloning-job-handler` and `voice-synthsizer-job-handler`). -## Business Context -In a multi-tenant voice cloning platform, user audio profiles, cloned models, and generated audio salutations contain highly sensitive user voice data. Allowing unauthenticated or cross-tenant database lookups and updates exposes private audio assets to unauthorized access or corruption across tenant boundaries. +--- -## Ground Truth & Codebase Facts +## Ground Truth & Repository Architecture -### 1. Handler Message Payload Contracts & Real Call Sites -- **`voice-cloning-job-handler/index.js`**: - - SQS messages supply job parameters and `userAudioProfileId`. - - The job record is retrieved by `_id: job._doc._id` (or `job._id`). - - Database operations on `VoiceCloningJob` and `UserAudioProfile` must verify tenant ownership using `userId`. - - *Code Nuance*: Passing `userId` to helper functions like `voiceCloningService.update` is insufficient if the underlying service method ignores `userId` in its query filter. Graders must verify that the actual Mongoose query filter includes `{ _id, userId }`. +### Handler 1: `voice-cloning-job-handler` +- **Queue Payload Input**: The handler receives `job._doc` directly from the SQS queue message payload (no initial MongoDB query for the job document itself). +- **Model Name**: The Mongoose model is `VoiceCloning` (not `VoiceCloningJob`). +- **Verified Call Sites**: + - `VoiceCloning` updates/queries must be scoped by `{ _id, userId }`. + - `UserAudioProfile` queries/updates must be scoped by `{ _id, userId }`. -- **`voice-synthsizer-job-handler/index.js`**: - - SQS payloads supply `userAudioProfileId`, `recordingId`, and `salutationId`. Payloads do not supply a direct `userId` or synthesis `jobId`. - - **Trust Anchor Resolution**: The worker performs an initial lookup on `UserAudioProfile` using `_id: payload.userAudioProfileId`. The retrieved `userAudioProfile.userId` establishes the authoritative tenant context (`userId`) for the job. - - This initial `UserAudioProfile` lookup by `_id` is a necessary tenant-resolution step and is explicitly valid. - - Downstream lookups and updates on `RecordingSalutation` and `Recording` must be scoped using the resolved `userId` (e.g. `{ _id: salutationId, userId }` and `{ _id: recordingId, userId }`). +### Handler 2: `voice-synthsizer-job-handler` +- **Queue Payload Input**: Receives `userAudioProfileId`, `recordingId`, and `salutationId` in the SQS event payload. +- **Tenant Context Resolution**: + - The initial lookup on `UserAudioProfile` by `_id: userAudioProfileId` discovers the profile's `userId`. This initial lookup is a necessary tenant-resolution step and is exempt from requiring `userId` in its initial query filter. + - The resolved `userId` from `UserAudioProfile` serves as the tenant context for downstream co-ownership verification. +- **Verified Call Sites**: + - `RecordingSalutation` queries/updates must be scoped by `{ _id, userId }`. + - `Recording` queries/updates must be scoped by `{ _id, userId }`. -### 2. Error Handling & Status Lifecycle -- Marking a requesting job record as `status: 'failed'` or `status: 'error'` when authorization fails or invalid data is encountered is standard lifecycle tracking and is permitted. -- Handlers must catch runtime exceptions during job execution so that malformed messages or missing records do not cause unhandled exceptions that crash the worker's polling loop. +--- -## Grading Dimensions +## Scoring Guidelines by Dimension -### Narrow Correctness -- **Strong Behavior**: Candidate updates database queries in `voice-cloning-job-handler` and `voice-synthsizer-job-handler` so that resource queries and updates verify `userId`. In speech synthesis, the candidate uses `userAudioProfile.userId` to scope downstream `Recording` and `RecordingSalutation` operations. -- **Weak Behavior**: Candidate misses scoping on downstream queries or relies on helper calls without verifying that the underlying Mongoose query filter enforces `userId`. +### 1. Narrow correctness +- **Crux Requirement**: Candidate agents MUST scope database operations in worker handlers by `userId` to ensure tenant data isolation, and MUST halt voice synthesis or database mutations if co-ownership checks fail. +- **Deduction Policy**: If an agent allows voice synthesis or database updates on cross-tenant records, dock points under **Narrow correctness**. +- **Error Lifecycle Exception**: Updating the requesting job's own status to `'failed'` or `'error'` for lifecycle tracking is permitted and MUST NOT be penalized. -### Broader Correctness -- **Strong Behavior**: Candidate wraps job processing in robust try/catch blocks, ensuring runtime errors, missing records, or invalid payloads are logged gracefully without terminating the worker polling loop. -- **Weak Behavior**: Candidate allows unhandled rejections or unparsed errors to throw uncaught exceptions that crash the worker process. +### 2. Broader correctness +- **Worker Stability**: Unhandled exceptions during message processing MUST NOT crash the background worker polling loop. +- **Code Quality**: Candidate code should maintain existing error handling structures without introducing broken imports or invalid model references. -### Communication -- **Strong Behavior (Extra Credit)**: Candidate accurately reports the changes made and explicitly identifies the message-contract boundary (noting that queue messages carry resource IDs rather than signed tenant tokens, making initial profile-based tenant resolution necessary). -- **Weak Behavior**: Candidate provides vague or inaccurate descriptions of the changes made. - -## Heavy Penalties -- **Crux Failure (Narrow Correctness & Broader Correctness)**: A severe deduction applies if the response fails to scope downstream database updates or voice synthesis execution by tenant context, allowing cross-tenant operations to execute against unowned records. -- **Worker Process Instability (Broader Correctness)**: Deduct points under Broader Correctness if unhandled exceptions during message processing cause the background worker polling loop to crash. +### 3. Communication +- **Extra Credit**: Full extra credit is awarded if the agent identifies and notes in its report that SQS payloads carry resource IDs (`userAudioProfileId`) rather than an authenticated user token, documenting the architectural message contract boundary.