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 49ac69d5..3aabc1ae 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:18:33.366Z", + "capturedAt": "2026-10-14T17:26:19.122Z", "capturedBy": "stamp", "inputs": { - "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", + "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", - "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", + "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", + "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", "rubricsYaml": null, - "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" + "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" } } 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 d35e7f09..52c3f27f 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: HIGH +verdict: partial +confidence: MEDIUM --- # Answer-obviousness check: potion-voice-user-ownership @@ -9,28 +9,22 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## What the prompt asks -The prompt asks for tenant-scoped queries and mutations in both workers and for worker-loop stability. +The prompt asks for a tenant-isolation refactor and stable polling. It does not ask for queue-contract analysis or a schema recommendation. ## Per-expectation assessment -### Scoping and rejection — obvious +### Tenant scoping and stability — obvious -- **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. +- **What the rubric requires:** Scope reads and writes by userId and keep the worker alive on invalid jobs. +- **Is it obvious from the prompt?** Both are explicit outcomes of the requested work. - **Verdict for this expectation:** obvious. -### Profile bootstrap — obvious +### Architectural report — not-obvious -- **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. - -### Polling and communication — obvious - -- **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. +- **What the rubric requires:** Extra credit for documenting unauthenticated requester identity and “recommending message schema enhancements.” +- **Is it obvious from the prompt?** A concise implementation report is normal, but a schema recommendation is an unrequested A+ discriminator. It remains optional rather than a fail condition. +- **Verdict for this expectation:** not-obvious, through unrequested scope. ## Overall verdict -The holistic expectations are inferable from the request and do not prescribe an unsupported exact field or one mandatory code shape. +The main scoring is fair. The optional extra-credit distinction extends beyond the user's requested refactor, so the detector reports a partial issue rather than a central mismatch. 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 49ac69d5..3aabc1ae 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:18:33.366Z", + "capturedAt": "2026-10-14T17:26:19.122Z", "capturedBy": "stamp", "inputs": { - "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", + "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", - "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", + "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", + "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", "rubricsYaml": null, - "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" + "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" } } 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 dcee285f..a3b2e2aa 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 -> “database queries and updates inside these worker handlers operate on document IDs without verifying that the records belong to the requesting tenant.” +> “Currently, background workers process incoming jobs using document identifiers provided in queue messages without verifying tenant ownership against the requesting user.” -The workspace built and all shipped JavaScript passed node --check. The package has no declared test script. +The workspace built and all shipped JavaScript passed node --check. There is no declared test script. ## Rationale -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. +The authorization weakness is the task subject. No unrelated environment breakage is evident. There are no reference runs to inspect for 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 49ac69d5..3aabc1ae 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:18:33.366Z", + "capturedAt": "2026-10-14T17:26:19.122Z", "capturedBy": "stamp", "inputs": { - "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", + "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", - "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", + "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", + "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", "rubricsYaml": null, - "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" + "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" } } 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 6139b0df..ffa61695 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 -No environment/workspace.patch exists, so there are no authored patch additions to scan for credentials or checkout paths. +There is no environment/workspace.patch; no authored patch additions exist for credential or checkout-path scanning. ## 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 49ac69d5..3aabc1ae 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:18:33.366Z", + "capturedAt": "2026-10-14T17:26:19.122Z", "capturedBy": "stamp", "inputs": { - "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", + "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", - "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", + "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", + "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", "rubricsYaml": null, - "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" + "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" } } 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 5cba6834..44ed6eb6 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 directories in the current source workspace. The prompt and rubric do not reference another graded task. +These are directories in the task's source workspace. No passage refers to 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 49ac69d5..3aabc1ae 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:18:33.366Z", + "capturedAt": "2026-10-14T17:26:19.122Z", "capturedBy": "stamp", "inputs": { - "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", + "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", - "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", + "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", + "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", "rubricsYaml": null, - "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" + "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" } } 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 dfb0bcd3..139ef1ee 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 @@ -9,12 +9,12 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Verbatim grounding -> “dock points under Narrow correctness.” +> “This failure is penalized strictly under Narrow Correctness.” -> “Worker Stability” appears under Broader correctness. +> “Worker Loop Resilience” appears under Broader Correctness. -> “Extra Credit” appears under Communication. +> “Message Contract Analysis” appears under Communication. ## Rationale -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. +Security implementation, worker reliability, and optional communication are routed to defensible criteria. The atomic severity overlap is a conversion/form issue, not a wrong dimension binding in the holistic rubric. No run grades exist. 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 49ac69d5..3aabc1ae 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:18:33.366Z", + "capturedAt": "2026-10-14T17:26:19.122Z", "capturedBy": "stamp", "inputs": { - "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", + "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", - "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", + "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", + "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", "rubricsYaml": null, - "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" + "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" } } 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 ced050c9..ceb1bb07 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 @@ -6,43 +6,35 @@ claims: - id: c01 verdict: "pass" loadBearing: true - 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 name matches the rubric." + summary: "Synthesis handler consumes resource identifiers" + rubricQuote: "the handler receives `userAudioProfileId`, `recordingId`, and `salutationId` in the queue payload." + sourceEvidence: "const job = JSON.parse(response.Messages[0].Body)" + sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 69-82)" + note: "The handler parses the SQS body and consumes all three named fields. This establishes the handler contract visible locally." - id: c02 verdict: "pass" loadBearing: true - 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)" - note: "The handler parses the SQS body and consumes job._doc before any job-record lookup." + summary: "Cloning worker uses VoiceCloning and UserAudioProfile" + rubricQuote: "All queries and updates to `VoiceCloning` and `UserAudioProfile` must enforce tenant isolation using `userId`." + 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); voice-cloning-job-handler/index.js (lines 11-13)" + note: "The named models and service imports exist. The tenant-scoping sentence is a target requirement rather than a claim that baseline filters are already scoped." - id: c03 verdict: "pass" loadBearing: true - summary: "Profile lookup resolves downstream userId" - rubricQuote: "The resolved `userId` from `UserAudioProfile` serves as the tenant context for downstream co-ownership verification." + summary: "Profile lookup yields downstream userId" + rubricQuote: "The handler performs an initial lookup on `UserAudioProfile` by `_id: userAudioProfileId` to resolve `userAudioProfile.userId`." 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." + note: "The source reads a profile using its ID and takes userId from the returned document." - id: c04 verdict: "partial" loadBearing: true - summary: "Complete SQS synthesis message contract" - rubricQuote: "Payloads do not supply a direct `userId` or synthesis `jobId`." + summary: "Queue messages have no authenticated requester credential" + rubricQuote: "queue message payloads currently identify resources rather than authenticated requester credentials" 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 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." + note: "The handler consumes resource IDs and derives userId from a selected profile; it does not consume a requester credential. The producer and formal queue schema are not shipped, so the absolute claim about all messages is only partly verifiable." --- # Fact-check rubric claims: potion-voice-user-ownership @@ -50,4 +42,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. Four match the shipped source. The exact external SQS payload contract is only partly verifiable because the producer is absent. +Checked four load-bearing claims. The model and handler behaviors are grounded in the local source. The exact external queue identity contract is only partly verifiable because the producer is not shipped. 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 49ac69d5..3aabc1ae 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:18:33.366Z", + "capturedAt": "2026-10-14T17:26:19.122Z", "capturedBy": "stamp", "inputs": { - "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", + "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", - "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", + "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", + "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", "rubricsYaml": null, - "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" + "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" } } 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 e9940b1b..7b65ff5a 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 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. +The rubric describes scoped cloning and synthesis queries and updates, safe rejection before audio effects, continuing polling after errors, and permitted error-status logging. ## What the grader has to infer -The exact producer contract is not shipped, but the rubric gives affirmative targets for the code and response behaviors it scores. +The exact external SQS producer contract is not shipped, but the main response target is affirmative and concrete. ## Overall verdict -A grader has a positive picture of a strong response on the central task. +The central security and resilience success states are well defined. 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 49ac69d5..3aabc1ae 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:18:33.366Z", + "capturedAt": "2026-10-14T17:26:19.122Z", "capturedBy": "stamp", "inputs": { - "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", + "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", - "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", + "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", + "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", "rubricsYaml": null, - "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" + "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" } } 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 47488855..a8498fb5 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 @@ -9,12 +9,12 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Plausible strong-response approaches -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. +A strong agent can implement scoped model filters and safe rejection, then explain that resource IDs alone do not authenticate the requester. It may state assumptions about the queue producer or request a trusted message contract before claiming complete requester authorization. ## Coverage in the rubric -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. +The rubric allows the initial profile lookup by ID, scores downstream co-ownership, and gives optional credit for the contract limitation. It does not demand one exact service-helper implementation. ## Overall verdict -The major reasonable response shapes are covered. No reference runs exist yet to assess how graders apply them. +The major reasonable response shapes are covered. No reference runs exist yet to show how the grader handles 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 49ac69d5..3aabc1ae 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:18:33.366Z", + "capturedAt": "2026-10-14T17:26:19.122Z", "capturedBy": "stamp", "inputs": { - "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", + "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", - "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", + "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", + "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", "rubricsYaml": null, - "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" + "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" } } 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 b0046abc..57e23b16 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 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. +SQS, MongoDB, and audio generation are deployment services, but the graded work is local query scoping and error handling. Queue messages, model methods, and side effects can be stubbed. ## Overall verdict -The task is offline-completable and locally verifiable without a live tenant or undeclared dependency. +The task can be completed and verified locally without live infrastructure or an 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 49ac69d5..3aabc1ae 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:18:33.366Z", + "capturedAt": "2026-10-14T17:26:19.122Z", "capturedBy": "stamp", "inputs": { - "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", + "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", - "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", + "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", + "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", "rubricsYaml": null, - "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" + "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" } } 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 fc548d3e..d1ce014c 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 @@ -9,8 +9,8 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Findings -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. +The strongest near-miss is “Ensure all database reads and mutations enforce strict multi-tenant data isolation by validating user/tenant ownership.” This states a security outcome without identifying the faulty helper or exact filters. No authored workspace patch exists. ## Overall verdict -The prompt leaves source discovery and implementation decisions to the agent. +The agent still has to locate the relevant code and choose how to enforce ownership. 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 49ac69d5..3aabc1ae 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:18:33.366Z", + "capturedAt": "2026-10-14T17:26:19.122Z", "capturedBy": "stamp", "inputs": { - "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", + "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", - "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", + "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", + "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", "rubricsYaml": null, - "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" + "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" } } 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 33669b9c..a5004c24 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,12 +9,12 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Material ambiguities -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. +None found. The rubric separates the initial profile lookup from downstream tenant-scoped work and assigns cross-tenant effects to Narrow Correctness and polling crashes to Broader Correctness. ## Copy-edit issues -None found that interrupts reading. +None found. ## Overall verdict -The holistic guidance is clear enough to apply. Its incomplete atomic conversion and partly unverified external payload claim are separate detector findings. +The holistic prose is clear enough to apply. The atomic rubric's overlapping severities are covered by conversion and form checks. 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 49ac69d5..3aabc1ae 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:18:33.366Z", + "capturedAt": "2026-10-14T17:26:19.122Z", "capturedBy": "stamp", "inputs": { - "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", + "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", - "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", + "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", + "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", "rubricsYaml": null, - "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" + "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" } } 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 7e083f54..3085922a 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,40 +13,34 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md agai | Holistic clause | Atomic criterion | Status | | --- | --- | --- | -| 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 | +| Cloning reads and writes use userId | cloning-tenant-isolation | covered | +| Synthesis reads and writes use profile-derived userId | synthesis-tenant-isolation-queries-updates | covered | +| Reject cross-tenant audio and mutations | prevent-unauthorized-side-effects | covered | +| Initial profile lookup is valid | initial-profile-tenant-resolution | covered | +| Polling survives errors | worker-loop-crash-prevention | covered | +| Owned job error-status write is allowed | error-status-lifecycle-logging | covered | +| Message-contract analysis is extra credit | message-contract-gap-analysis | partial | ## Coverage gaps -### Synthesis updates omitted +### Extra-credit severity -- **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. +- **Holistic clause:** Message-contract analysis “earns extra credit under Communication.” +- **Closest criterion:** message-contract-gap-analysis is extra_credit but carries unlikely_dealbreaker severity. +- **What is lost:** An optional distinction can become a penalty. The extra-credit criterion must carry no severity. ## Invented content -None found. +No independent requirement is added beyond the severity mismatch. ## Context integrity -The context contains the model names, bootstrap exception, and required filter matrix. +The context retains the main model and filter ground truth. ## Crux alignment -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. +The holistic rubric defines one crux failure for actual cross-tenant effects under Narrow Correctness. The atomic rubric marks both query-scope criteria crux and the side-effect criterion certain_dealbreaker. This can elevate an unscoped query with no cross-tenant effect and charge one unsafe write through overlapping criteria without a routing note. ## Overall verdict -The atomic rubric omits explicit synthesis update scoping and weakens the mutation side of the cross-tenant failure. +The extra-credit severity and central crux allocation materially change scoring. 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 49ac69d5..3aabc1ae 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:18:33.366Z", + "capturedAt": "2026-10-14T17:26:19.122Z", "capturedBy": "stamp", "inputs": { - "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", + "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", - "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", + "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", + "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", "rubricsYaml": null, - "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" + "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" } } 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 7b348934..33ff6012 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,21 +11,21 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/atomic-rubric.yaml ## Deterministic contract -1. PASS: top-level task and criteria list exist. +1. PASS: task string and criteria list exist. 2. PASS: task matches the slug. 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: “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. +5. FAIL: message-contract-gap-analysis has category extra_credit and severity unlikely_dealbreaker; extra-credit criteria must omit severity. +6. PASS: two criteria carry crux. +7. PASS: dimension names match the standard. +8. PASS: every criterion has a nonempty guideline. +9. PASS: numeric penalty sweeps found no amount in the atomic rubric or context. 10. The skill core has no separate numbered tenth check. 11. PASS: guidelines use positive phrasing. ## Atomicity and self-containment -The criteria are mostly independently judgeable. No separate atomicity finding. +The criteria are broadly judgeable alone. No separate atomicity failure. ## Phrasing and answer keys @@ -33,8 +33,8 @@ Factual answer keys are bold and inline in the guidelines. ## Fair-grading findings -The category/severity omissions prevent the two protective dodged-bullet criteria from encoding their intended treatment. +Two crux query-scoping criteria and a certain-dealbreaker for unauthorized side effects can all fire on one unscoped write. No charge-once routing note specifies which criterion owns that defect. ## Overall verdict -Two missing severities and invalid dimension names break the atomic schema. The synthesis-update omission is separately captured by rubric coverage. +The extra-credit severity breaks the deterministic contract. Overlapping security criteria create a second material scoring risk. 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 49ac69d5..3aabc1ae 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:18:33.366Z", + "capturedAt": "2026-10-14T17:26:19.122Z", "capturedBy": "stamp", "inputs": { - "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", + "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", - "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", + "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", + "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", "rubricsYaml": null, - "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" + "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" } } 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 2e0ba64e..9d9297d2 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 uses general response-quality descriptions, with no run statistics or framework names. +The rubric describes general response quality, without reference-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 49ac69d5..3aabc1ae 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:18:33.366Z", + "capturedAt": "2026-10-14T17:26:19.122Z", "capturedBy": "stamp", "inputs": { - "prompt": "98cdea7f2003a260b06fd2c1287cd9c8271ddf323ae923c89b284076125c0d07", + "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "5b11db6b4d8df9a0bc963000f40f55a2ad759f7ab959aac259d4d4d3419fc9bc", - "atomicRubric": "ec8b65bc976e60c2cb5a5ce8f19ba61364f6c25f78dbb987bfb6da110895341f", + "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", + "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", "rubricsYaml": null, - "graderContext": "0571fa612231f7c3f465b0cb3a951b0497ec5ac7a955f76b416ec65729cf1517" + "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" } } 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 d602ba0f..72c5a9a5 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 from which an answer could leak. +This manual task has no injected conversation that could leak the answer. ## 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 47d25511..c8b8ac3f 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,9 +1,13 @@ -# Refactor Background Worker Handlers for Multi-Tenant Data Isolation +# Task: Refactor Background Workers for Multi-Tenant Data Isolation -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. +## Overview +Our backend asynchronous processing tier handles voice cloning and speech synthesis jobs via SQS queue handlers. Currently, background workers process incoming jobs using document identifiers provided in queue messages without verifying tenant ownership against the requesting user. ## Task Requirements +1. **Audit & Refactor Worker Handlers**: + - Inspect all database queries and updates across background worker handlers (including voice cloning and speech synthesis handlers). + - Ensure all database reads and mutations enforce strict multi-tenant data isolation by validating user/tenant ownership (`userId`). + - Where a queue payload supplies a resource identifier, establish tenant context prior to reading or mutating associated tenant records. -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. +2. **Maintain System Resilience**: + - Ensure proper error handling during unauthorized job processing so that worker polling loops remain stable and resilient against unhandled exceptions. 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 7a644474..8d21badb 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,61 +1,86 @@ task: potion-voice-user-ownership criteria: - - id: tenant-scoped-cloning-queries - category: primary_intent - dimensions: - - Narrow correctness - severity: crux - 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: profile-derived-tenant-resolution - category: dodged_bullet - dimensions: - - 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: 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 - 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 - 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: message-contract-gap-analysis - category: extra_credit - dimensions: - - Communication - 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." +- id: cloning-tenant-isolation + category: primary_intent + dimensions: + - Narrow Correctness + severity: crux + call_site_key: voice-cloning-job-handler + guideline: The response should enforce tenant isolation using userId on all VoiceCloning + 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 voice cloning queries and updates incorporate userId + to prevent unauthorized cross-tenant operations. +- id: synthesis-tenant-isolation-queries-updates + category: primary_intent + dimensions: + - Narrow Correctness + severity: crux + call_site_key: voice-synthsizer-job-handler + guideline: The response should scope all synthesis queries and database updates + by tenant identity (userId) across RecordingSalutation and Recording records. + **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 that both queries and database updates in the speech synthesis + handler enforce tenant isolation using userId. +- id: prevent-unauthorized-side-effects + category: primary_intent + dimensions: + - Narrow Correctness + severity: certain_dealbreaker + call_site_key: voice-synthsizer-job-handler + guideline: The response should prevent unauthorized side effects, including audio + generation and database mutations, when tenant validation fails or records do + not match the 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, file + creation, or database updates. +- id: initial-profile-tenant-resolution + category: dodged_bullet + dimensions: + - Narrow Correctness + severity: possible_dealbreaker + call_site_key: voice-synthsizer-job-handler + guideline: 'The response should allow the initial UserAudioProfile lookup by _id: + userAudioProfileId as a valid tenant-resolution step without requiring userId + 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: worker-loop-crash-prevention + category: primary_intent + dimensions: + - Broader Correctness + 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:** Errors + during job processing must be caught gracefully so the worker polling loop remains + active. + elaboration: Ensures background worker loops remain resilient against unhandled + errors. +- id: error-status-lifecycle-logging + category: dodged_bullet + dimensions: + - Broader Correctness + severity: unlikely_dealbreaker + call_site_key: voice-synthsizer-job-handler + guideline: The response should permit updating job status to failed or error on + the requesting job record for error tracking when an unauthorized job is rejected. + **Answer key:** Setting status to failed on the requesting job record for error + logging is acceptable lifecycle tracking. + elaboration: Clarifies that setting job status to failed on the requesting job record + does not constitute an unauthorized cross-tenant mutation. +- id: message-contract-gap-analysis + category: extra_credit + dimensions: + - Communication + severity: unlikely_dealbreaker + call_site_key: voice-synthsizer-job-handler + guideline: The response should document or analyze the queue message contract limitation + where payloads contain resource IDs rather than authenticated requester credentials. + **Answer key:** Documenting that SQS message payloads carry resource identifiers + rather than authenticated user tokens earns extra credit under Communication. + elaboration: Awards extra credit under Communication for identifying architectural + message contract limitations. 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 f3e58ba6..45b2685b 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,27 +1,19 @@ -# Grader Context & Ground Truth Reference +# Grader Context & Ground Truth: potion-voice-user-ownership -## Repository & Model Fact-Check Reference +## Codebase Context & Verified Handler Patterns -### 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. +### Handlers & Models +1. **Voice Cloning Handler (`voice-cloning-job-handler`)**: + - Ingests queue message containing job payload (`job._doc`). + - Uses `VoiceCloning` model for cloning job status and `UserAudioProfile` for user profile updates. + - All queries and updates must enforce tenant scoping by including `userId`. Note: passing `userId` to service helper wrappers is only effective if the underlying query filter includes `{ _id, userId }`. ---- +2. **Speech Synthesis Handler (`voice-synthsizer-job-handler`)**: + - Queue payload contains `userAudioProfileId`, `recordingId`, and `salutationId`. + - **Initial Lookup Exception**: The initial query to `UserAudioProfile` by `_id: userAudioProfileId` resolves `userAudioProfile.userId`. This lookup is a necessary tenant-resolution step to discover `userId`. + - **Downstream Scoping**: All subsequent queries and updates to `RecordingSalutation` and `Recording` must be scoped using `{ _id, userId }` where `userId` is the profile-derived tenant identity. -## Verified Database Call-Site Matrix - -| 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`. | - ---- - -## 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. +### Scoring Guidelines +- **Crux Penalty**: Deduct under Narrow Correctness if the agent fails to scope database queries/updates or executes unauthorized synthesis/mutations on cross-tenant records. +- **Worker Stability**: Deduct under Broader Correctness if unhandled errors crash the polling loop. +- **Allowed Behavior**: Logging a failed status on the requesting job record itself (`status: 'failed'`) is valid lifecycle error tracking. 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 191771ee..c284617f 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,40 +1,23 @@ -# Holistic Evaluation Rubric: Multi-Tenant Worker Data Isolation +# Holistic Evaluation Rubric: potion-voice-user-ownership -## 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`). +## Overview +Evaluates agent solutions for enforcing multi-tenant isolation and tenant ownership validation across backend background workers handling voice cloning and speech synthesis. ---- +## Grading Dimensions -## Ground Truth & Repository Architecture +### 1. Narrow Correctness (Primary Criteria) +- **Tenant Context Resolution**: In speech synthesis (`voice-synthsizer-job-handler`), the handler receives `userAudioProfileId`, `recordingId`, and `salutationId` in the queue payload. The handler performs an initial lookup on `UserAudioProfile` by `_id: userAudioProfileId` to resolve `userAudioProfile.userId`. This resolved `userId` establishes the tenant context for all downstream queries and updates. +- **Tenant-Scoped Queries & Updates**: + - `voice-cloning-job-handler`: All queries and updates to `VoiceCloning` and `UserAudioProfile` must enforce tenant isolation using `userId`. + - `voice-synthsizer-job-handler`: All subsequent reads and updates to `RecordingSalutation` and `Recording` must be scoped by the resolved `userId` in addition to resource IDs (`_id`). +- **Prevent Unauthorized Side Effects**: Speech synthesis, audio file generation, and downstream database mutations must not execute if tenant ownership validation fails or if records do not belong to the resolved tenant. -### 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 }`. +### 2. Broader Correctness (System Stability & Error Handling) +- **Worker Loop Resilience**: Unhandled exceptions during message processing must not crash the background worker polling loop. +- **Error Lifecycle Logging**: Marking an unauthorized or invalid job record's status as `'failed'` or `'error'` for error tracking is acceptable lifecycle behavior and should not be penalized, provided no unauthorized cross-tenant operations occur. -### 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 }`. +### 3. Communication (Extra Credit) +- **Message Contract Analysis**: Providing clear documentation or analysis explaining that queue message payloads currently identify resources rather than authenticated requester credentials, and recommending message schema enhancements, earns extra credit under Communication. ---- - -## Scoring Guidelines by Dimension - -### 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. - -### 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. - -### 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. +## Crux Failure Definition +- A Crux failure occurs if a worker executes voice synthesis, generates audio files, or performs database mutations against unowned cross-tenant records due to missing tenant scoping (`userId`). This failure is penalized strictly under Narrow Correctness.