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 abe170c2..814680be 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:32:33.747Z", + "capturedAt": "2026-10-14T17:38:51.161Z", "capturedBy": "stamp", "inputs": { - "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", + "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", - "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", + "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", + "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "rubricsYaml": null, - "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" + "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" } } 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 8d429e2f..ae569510 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 @@ -9,22 +9,22 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## What the prompt asks -The prompt asks for an audit and repair of tenant filtering in two workers, plus stable processing after errors. It does not request an analysis of the queue identity contract. +The prompt asks for tenant-scoped reads, updates, and side effects in background workers, while preserving polling stability and error logging. It does not ask for explanatory comments or documentation. ## Per-expectation assessment -### Tenant scoping and polling stability — obvious +### Isolation and worker stability — obvious -- **What the rubric requires:** Scope worker reads and updates by `userId`, reject mismatches before effects, and keep polling after processing errors. -- **Is it obvious from the prompt?** These are direct consequences of its isolation and stability requirements. Naming `userId` defines the requested outcome; the agent must still find and repair the individual call sites and service filters. +- **What the rubric requires:** Scope records by `userId`, avoid cross-tenant effects, and keep the polling loop stable on errors. +- **Is it obvious from the prompt?** These are the explicit deliverables. The agent still has to trace call sites and design the checks. - **Verdict for this expectation:** obvious. -### Queue message contract report — not-obvious +### Security-boundary documentation — not-obvious -- **What the rubric requires:** Optional extra credit for documenting or analyzing that payloads contain resource identifiers rather than authenticated requester tokens. -- **Is it obvious from the prompt?** A worker can fulfill the requested code change without discussing the message contract. This is an unrequested bonus distinction, although omission causes no deduction. +- **What the rubric requires:** Optional Communication extra credit for inline comments or documentation explaining the isolation design across handlers. +- **Is it obvious from the prompt?** Some explanation in a final summary is routine, but adding comments or documentation is an unrequested bonus distinction. Omission does not deduct points. - **Verdict for this expectation:** not-obvious through unrequested scope. ## Overall verdict -The central expectations are fair and leave substantial implementation work. The optional communication bonus reaches beyond the prompt, so the overall verdict is partial rather than an issue with core scoring. +Core scoring follows the request. The extra-credit item is a secondary unrequested expectation, so the verdict is partial. 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 abe170c2..814680be 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:32:33.747Z", + "capturedAt": "2026-10-14T17:38:51.161Z", "capturedBy": "stamp", "inputs": { - "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", + "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", - "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", + "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", + "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "rubricsYaml": null, - "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" + "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" } } 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 74ba3e09..05998ed5 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 -> “Audit all database reads and updates in `voice-cloning-job-handler` and `voice-synthsizer-job-handler`.” +> “A security audit revealed that database queries within these worker handlers retrieve and update records using document identifiers without consistently validating tenant ownership (`userId`).” -The workspace exists at the declared commit; the task has no declared local test script. The source JavaScript passed `node --check` in the prior workspace validation. There are no reference runs yet. +The declared commit resolves locally, the task workspace is present, and the source JavaScript passes `node --check`. The package declares no local test script. There are no reference runs to assess for corruption or drift. ## Rationale -The unscoped database operations are the subject of the request. No unrelated environment failure or premise mismatch is evident. Build completion and static syntax checks do not establish full runtime health, so confidence is medium. +The missing ownership checks are the requested subject of the task. No unrelated build failure or premise mismatch was found; full runtime integration has not yet been established. 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 abe170c2..814680be 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:32:33.747Z", + "capturedAt": "2026-10-14T17:38:51.161Z", "capturedBy": "stamp", "inputs": { - "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", + "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", - "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", + "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", + "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "rubricsYaml": null, - "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" + "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" } } 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 6b0fcefd..d34c9892 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 task-authored added lines to scan for credentials or checkout paths. The workspace was built from the source commit alone. +There is no `environment/workspace.patch`, so there are no task-authored patch additions to scan for secrets or authoring-machine 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 abe170c2..814680be 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:32:33.747Z", + "capturedAt": "2026-10-14T17:38:51.161Z", "capturedBy": "stamp", "inputs": { - "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", + "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", - "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", + "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", + "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "rubricsYaml": null, - "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" + "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" } } 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 de902233..37c74e14 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 @@ -9,8 +9,8 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Verbatim grounding -> “`voice-cloning-job-handler` and `voice-synthsizer-job-handler`” +> “background worker handlers (`voice-cloning-job-handler` and `voice-synthsizer-job-handler`)” ## Rationale -These are directories in this task's source workspace. The prompt and holistic rubric do not point to any separate graded task. +The named handlers are directories in this source workspace. The prompt and resolved 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 abe170c2..814680be 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:32:33.747Z", + "capturedAt": "2026-10-14T17:38:51.161Z", "capturedBy": "stamp", "inputs": { - "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", + "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", - "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", + "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", + "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "rubricsYaml": null, - "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" + "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" } } 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 b0872368..3b750c38 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,6 +1,6 @@ --- detector: detector-dimension-misapplication -verdict: clean +verdict: partial-misapplication confidence: HIGH --- # Dimension-misapplication check: potion-voice-user-ownership @@ -9,12 +9,10 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Verbatim grounding -> “### 1. Narrow Correctness (Crux & Dealbreakers)” +> “### 2. Broader Correctness / Systemic Impact” -> “### 2. Broader Correctness” - -> “### 3. Communication (Optional Extra Credit)” +> “* **Worker Loop Resilience**: Unhandled exceptions during job processing must not crash the worker polling loop.” ## Rationale -Tenant scoping and effects are correctness issues; polling resilience is engineering craft; the optional contract explanation is communication. No evidence routes a failure to an unrelated axis. The shortened atomic dimension string is a schema/form defect handled by detector-rubric-form, not a conceptual criterion misapplication. +The worker resilience and lifecycle allowance belong to the standard's Broader Correctness / the craft of software engineering criterion, so the substantive routing is defensible. The section heading instead invents the label “Broader Correctness / Systemic Impact,” which is not one of the fixed eight criterion names. This is a secondary non-canonical naming issue (shape X2), not a substantive security failure routed to the wrong criterion. The atomic schema defect is separately reported by rubric-form. 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 abe170c2..814680be 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:32:33.747Z", + "capturedAt": "2026-10-14T17:38:51.161Z", "capturedBy": "stamp", "inputs": { - "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", + "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", - "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", + "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", + "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "rubricsYaml": null, - "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" + "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" } } 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 7479382c..17a96a2d 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,40 +1,40 @@ --- detector: detector-fact-check-rubric-claims -verdict: partial +verdict: pass confidence: HIGH claims: - id: c01 verdict: "pass" loadBearing: true - summary: "Cloning worker uses the named models" - rubricQuote: "All database reads and updates on `VoiceCloning` and `UserAudioProfile` in `voice-cloning-job-handler`" - sourceEvidence: "const voiceCloningService = require('./voice_cloning')\nconst userAudioProfileService = require('./user_audio_profile')" - sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-cloning-job-handler/index.js (lines 11-12)" - note: "The two services are imported by the handler; their model files name VoiceCloning and UserAudioProfile. The agent can discover them in the workspace." + summary: "Cloning handler processes job document identifiers" + rubricQuote: "In `voice-cloning-job-handler`, all reads and updates on `VoiceCloning` and `UserAudioProfile` models" + sourceEvidence: "const { metadata, input, _id, userAudioProfileId } = job._doc" + sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-cloning-job-handler/index.js (line 104)" + note: "The handler consumes the job document and its two record identifiers. The two model services are imported at lines 11–12 and reachable to the test agent in the workspace." - id: c02 verdict: "pass" loadBearing: true - summary: "Synthesis handler uses resource identifiers" - rubricQuote: "The initial lookup on `UserAudioProfile` using `_id: userAudioProfileId`" - sourceEvidence: "const {\n userAudioProfileId,\n text,\n firstName,\n salutationId,\n recordingId," - sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 74-79)" - note: "The handler destructures all three resource identifiers from the parsed job. The agent can discover this call site in the workspace." + summary: "Cloning update filter currently omits userId" + rubricQuote: "due to missing tenant scoping (`userId`)" + sourceEvidence: "const updatedModel = await VoiceCloningModel.findOneAndUpdate(\n { _id: data._id }," + sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-cloning-job-handler/voice_cloning/voice_cloning_service.js (lines 68-69)" + note: "The update helper filters by record ID alone, supporting the rubric’s isolation concern. The agent can inspect the helper in the workspace." - id: c03 verdict: "pass" loadBearing: true - summary: "Profile lookup supplies synthesis tenant context" - rubricQuote: "to discover `userId`" + summary: "Initial profile lookup derives userId in synthesis" + rubricQuote: "the initial `UserAudioProfile` query by `_id: userAudioProfileId` is a valid and necessary tenant-resolution step to discover `userAudioProfile.userId`" sourceEvidence: "const userAudioProfile = await userAudioProfileService.find({\n _id: userAudioProfileId,\n status: 'completed',\n })\n if (userAudioProfile) {\n const { training_model_path, userId } = userAudioProfile[0]" sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 96-101)" - note: "The handler queries by profile ID, then extracts userId from the selected profile. The agent can trace this in the workspace." + note: "The shipped handler performs the ID lookup and extracts userId. It is reachable from the workspace; the exemption is a scoring judgment about this flow." - id: c04 - verdict: "partial" + verdict: "pass" loadBearing: true - summary: "Queue payloads lack authenticated requester tokens" - rubricQuote: "SQS queue payloads carry resource identifiers (`userAudioProfileId`, etc.) rather than authenticated user tokens" - sourceEvidence: "const {\n userAudioProfileId,\n text,\n firstName,\n salutationId,\n recordingId,\n baseUrlForPotionAi,\n env,\n } = job" - sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 74-82)" - note: "The handler consumes resource IDs and no requester token, but the shipped workspace has no formal payload schema or complete producer proving what every payload contains. This is optional extra credit and does not gate the base score; the agent can infer the handler-side limitation from this file." + summary: "Synthesis downstream reads are initially unscoped" + rubricQuote: "All downstream queries and updates on `RecordingSalutation` and `Recording` must be scoped by this profile-derived `userId`" + sourceEvidence: "const salutationToUpdate = await recordingSalutationModel.findOne({\n _id: salutationId,\n deleted: false,\n })\n\n const recordingToUpdate = await recordingModel.findOne({\n _id: recordingId,\n deleted: false,\n })" + sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 152-160)" + note: "The current reads omit userId, making the stated target relevant. The test agent can find both call sites in the workspace." --- # Fact-check rubric claims: potion-voice-user-ownership @@ -42,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 `repos/potion-voice` commit `fcd8a9d0b00406bda1943c234a8f2fecaff9f774`, with no workspace patch. -Checked four load-bearing claims. The handler/model facts pass. The optional assertion about all SQS payloads lacking authenticated requester tokens is only partly established: the handlers do not consume one, but the complete producer contract is not shipped. +Checked four load-bearing claims. All four are supported by the shipped worker source and reachable to the test agent. The separate context document asserts that `job._doc` contains `userId`; that stronger payload assertion is outside this detector's resolved holistic-rubric input and is not established by these call sites. 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 abe170c2..814680be 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:32:33.747Z", + "capturedAt": "2026-10-14T17:38:51.161Z", "capturedBy": "stamp", "inputs": { - "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", + "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", - "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", + "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", + "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "rubricsYaml": null, - "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" + "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" } } 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 854345cb..d0fae40c 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 identifies tenant-scoped cloning and synthesis reads and updates, safe rejection before audio effects, continuing polling after errors, and permitted lifecycle error-status logging. +The rubric specifies tenant-scoped cloning and synthesis operations, an initial profile lookup exemption, no unauthorized rendering or mutation, stable polling after errors, and permitted lifecycle error status. Documentation earns optional extra credit. ## What the grader has to infer -Implementation details and the unshipped external queue producer are left open. The main success target is affirmative and concrete. +Specific code changes are left to the agent, but the expected functional behavior is stated affirmatively. ## Overall verdict -The central security and resilience success states are defined. +The rubric gives the grader a concrete target for a strong implementation. 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 abe170c2..814680be 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:32:33.747Z", + "capturedAt": "2026-10-14T17:38:51.161Z", "capturedBy": "stamp", "inputs": { - "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", + "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", - "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", + "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", + "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "rubricsYaml": null, - "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" + "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" } } 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 0876514b..47cf8224 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 enforce scoped model filters through handlers or service methods, reject cross-tenant resource combinations before audio generation, and keep the polling loop alive after failures. It can also disclose that profile-derived ownership does not independently authenticate who sent a queue message. +A strong response can enforce ownership in handler queries, service helpers, or both; reject mismatched records before effects; and retain a live polling loop. It can explain that a profile-derived `userId` validates co-ownership of the selected resources but does not independently authenticate a queue sender. ## Coverage in the rubric -The rubric specifies outcomes rather than one helper implementation. It exempts the initial profile lookup, permits owned lifecycle status writes, and treats message-contract discussion as optional extra credit. +The holistic rubric scores outcomes, not a specific helper implementation. Its profile-lookup exemption and owned-job error-status allowance leave room for ordinary alternatives. The extra-credit documentation item is optional. ## Overall verdict -The major reasonable implementation shapes are covered. There are no reference runs yet to check how the grader applies these allowances. +The major implementation shapes remain creditable. No reference runs yet demonstrate a reasonable alternative being penalized. 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 abe170c2..814680be 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:32:33.747Z", + "capturedAt": "2026-10-14T17:38:51.161Z", "capturedBy": "stamp", "inputs": { - "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", + "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", - "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", + "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", + "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "rubricsYaml": null, - "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" + "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" } } 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 0f57191d..8567b7bb 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 -The graded work concerns local query filters, ownership checks, effect ordering, and exception handling. SQS, MongoDB, and audio generation can be mocked for targeted verification. No unshipped live provider fact is needed for the required implementation. +The required behavior concerns local query filters, ordering before side effects, and exception handling. Model methods, queue messages, and rendering calls can be stubbed. The task does not require a live SQS queue, MongoDB tenant, or audio provider to decide its central success criteria. ## Overall verdict -The required task is locally implementable and verifiable. The optional claim about the complete queue producer contract is only partly source-verifiable, as recorded by the fact-check detector; it is not a required success condition. +A competent agent can implement and verify the required local behavior from the shipped source. Runtime integration with deployed services is outside the required grade. 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 abe170c2..814680be 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:32:33.747Z", + "capturedAt": "2026-10-14T17:38:51.161Z", "capturedBy": "stamp", "inputs": { - "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", + "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", - "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", + "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", + "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "rubricsYaml": null, - "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" + "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" } } 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 7cbb56ca..817ab0f4 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 prompt says “Ensure that database queries and updates enforce multi-tenant isolation by filtering against the appropriate tenant context (`userId`).” This is the requested security outcome and a plausible acceptance criterion. It does not identify every vulnerable query, the service-helper behavior, or the needed effect ordering. No authored workspace patch adds comments. +The prompt names the security objective and `userId` as the tenant context. Those are genuine deliverable constraints. It does not identify the update helper's ID-only filter, enumerate every vulnerable query, or prescribe the guard order. No authored workspace patch adds comments. ## Overall verdict -The agent must still trace and change multiple call sites. The prompt is precise about the deliverable without giving away the implementation. +The agent still has to locate and repair the affected operations. No answer-giving passage or authored code comment was found. 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 abe170c2..814680be 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:32:33.747Z", + "capturedAt": "2026-10-14T17:38:51.161Z", "capturedBy": "stamp", "inputs": { - "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", + "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", - "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", + "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", + "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "rubricsYaml": null, - "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" + "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" } } 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 669262d0..2512285c 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 initial profile lookup exemption, separate effect-halting criterion, and charge-once note clarify the main grading boundaries. +None found in the holistic prose. It separates the initial profile lookup from downstream scoped operations and expressly forbids duplicate deductions for overlapping criteria. ## Copy-edit issues -None found that interrupt application of the rubric. +None found that prevents consistent reading. ## Overall verdict -The holistic prose is usable. Its brevity and structure are separate from the wording-clarity check; the atomic dimension vocabulary defect is recorded under rubric form. +The holistic rubric is readable. Whether its charge-once rule and crux weights survive atomic conversion is assessed by rubric coverage and form. 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 abe170c2..814680be 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:32:33.747Z", + "capturedAt": "2026-10-14T17:38:51.161Z", "capturedBy": "stamp", "inputs": { - "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", + "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", - "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", + "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", + "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "rubricsYaml": null, - "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" + "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" } } 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 5b42e4f0..28c1616b 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 @@ -1,6 +1,6 @@ --- detector: detector-rubric-coverage -verdict: clear +verdict: material-issues confidence: HIGH --- # Rubric-coverage check: potion-voice-user-ownership @@ -9,33 +9,36 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md agai ## Coverage map -| Holistic clause | Criterion id | Status | +| Holistic clause | Atomic criterion | Status | | --- | --- | --- | -| “All database reads and updates on `VoiceCloning` and `UserAudioProfile`” | cloning-tenant-isolation | covered | -| “All database reads and updates on `RecordingSalutation` and `Recording`” | synthesis-tenant-isolation-queries-updates | covered | -| “halt processing without generating audio or performing unauthorized cross-tenant database mutations” | prevent-unauthorized-side-effects | covered | -| “initial lookup on `UserAudioProfile` ... is a valid, necessary tenant-resolution step” | initial-profile-tenant-resolution | covered | -| “Setting `status: 'failed'` or `'error'` on the requesting job record” | error-status-lifecycle-logging | covered | -| “Do not double-penalize the same query filter omission” | prevent-unauthorized-side-effects | covered | -| “Worker Loop Resilience” | worker-loop-crash-prevention | covered | -| “Message Contract Analysis (Extra Credit)” | message-contract-gap-analysis | covered | +| Cloning `VoiceCloning` and `UserAudioProfile` scoping | cloning-tenant-isolation | covered | +| Synthesis profile resolution and downstream record scoping | synthesis-tenant-isolation-queries-updates; initial-profile-tenant-resolution | covered | +| Cross-tenant rendering, file generation, and mutations | prevent-unauthorized-side-effects | covered | +| Worker loop resilience | worker-loop-crash-prevention | covered | +| Owned-job failed/error status is allowed | error-status-lifecycle-logging | covered | +| “Do not double-penalize across overlapping criteria.” | none | missing | +| Documentation extra credit | tenant-refactor-documentation | covered | ## Coverage gaps -None found. +### Charge-once routing + +- **Holistic clause:** “Do not double-penalize across overlapping criteria.” (Narrow Correctness routing note.) +- **Closest criterion:** `prevent-unauthorized-side-effects` has no corresponding routing note; neither does `tests/grader-context.md`. +- **What is lost:** A single unscoped write that reaches another tenant can be charged under both a crux query-scoping criterion and the side-effect criterion, contrary to the holistic rule. ## Invented content -None found. The queue-contract criterion is expressly optional and carries no severity. +The two query-scoping criteria carry `crux`, although the holistic rubric's expressly named “Crux Failure / Dealbreaker” is **executing** rendering, file generation, or mutations against unowned records. An omitted filter that has not produced such an effect is still a Narrow Correctness failure, but the atomic severities can promote that narrower omission to the dealbreaker weight. This is a crux-weighting expansion. ## Context integrity -The context document preserves the model and filter matrix, profile lookup exemption, error-status allowance, and deduction routing. The criteria also state the worker-stability target. +The context document retains the model/filter matrix and initial profile exemption. It omits the holistic charge-once rule and the owned-job error-status allowance; the latter survives in an atomic criterion, while the former survives nowhere. ## Crux alignment -The holistic rubric places cloning and synthesis isolation under “Crux & Dealbreakers”; the two corresponding atomic criteria carry `crux`. Unauthorized side effects are in the same holistic section and map to `certain_dealbreaker`, after the two crux slots. The holistic rubric does not direct an additional explicit overall-score deduction. No mismatch found. +The holistic dealbreaker trigger is actual unauthorized execution. Atomic `prevent-unauthorized-side-effects` encodes that at `certain_dealbreaker`, after two crux slots were assigned to filter requirements. Those two crux criteria have no equally broad overall-score dealbreaker backing in the holistic rubric. The weighting may diverge for a filter omission without an unauthorized effect. ## Overall verdict -The holistic requirements, allowances, and optional bonus are represented in the atomic package. The invalid `Broader Correctness` dimension strings are a rubric-form problem, not a difference in what the two rubrics grade. +The missing non-trigger and the expanded crux weighting materially change scoring between the two rubric forms. 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 abe170c2..814680be 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:32:33.747Z", + "capturedAt": "2026-10-14T17:38:51.161Z", "capturedBy": "stamp", "inputs": { - "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", + "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", - "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", + "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", + "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "rubricsYaml": null, - "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" + "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" } } 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 4925cf65..8943a465 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,22 +11,22 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/atomic-rubric.yaml and ## Deterministic contract -The YAML parses, the task slug matches, seven criterion IDs are unique kebab-case, categories and severities use valid values, extra credit has no severity, and only two criteria carry `crux`. Guidelines are nonempty and positively phrased; no numeric penalty language was found. +The YAML parses; task slug, IDs, categories, severities, crux cap, nonempty guidelines, positive phrasing, and absence of numeric penalty language pass. The extra-credit criterion correctly omits severity. -**FAIL — dimension vocabulary:** `worker-loop-crash-prevention` and `error-status-lifecycle-logging` each specify `Broader Correctness`. The required exact dimension name is `Broader Correctness / the craft of software engineering`. This fails the deterministic dimension contract. +**FAIL — invalid dimension names:** `worker-loop-crash-prevention` and `error-status-lifecycle-logging` use `Broader Correctness / Systemic Impact`. The schema requires the exact name `Broader Correctness / the craft of software engineering`. Both criteria fail the dimension vocabulary rule. ## Atomicity and self-containment -The seven criteria are independently judgeable. The side-effect criterion now says to avoid charging the same missing filter under both query scoping and effect halting. +Each behavioral criterion is mostly judgeable alone. The side-effect criterion and the query-scoping criteria can both fail from one unscoped write. The atomic text no longer preserves the holistic charge-once routing note, creating a double-counting risk. ## Phrasing and answer keys -The criteria state positive requirements and carry inline bold factual answer keys. No separate phrasing failure was found. +The factual keys are inline and bold. No separate wording failure was found. ## Fair-grading findings -No additional material judgment failure was found. The initial profile exemption and error-status allowance are expressed as non-trigger criteria. +The missing charge-once rule matters because the holistic rubric explicitly directs the grader to avoid duplicate deductions for overlapping security criteria. Its loss is primarily a coverage gap; the overlapping atomic criteria also pose a form-level scoring risk. ## Overall verdict -The two invalid dimension strings are a deterministic contract failure, making the atomic rubric material-issues until corrected. The earlier extra-credit severity and overlapping-charge findings have been resolved in this revision. +The two invalid dimension strings are deterministic form failures. The overlapping criteria add a material grading risk until their routing is specified. 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 abe170c2..814680be 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:32:33.747Z", + "capturedAt": "2026-10-14T17:38:51.161Z", "capturedBy": "stamp", "inputs": { - "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", + "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", - "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", + "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", + "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "rubricsYaml": null, - "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" + "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" } } 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 8543291c..98390b2d 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 response behavior independently of reference-run outcomes or grading-framework names. +The rubric describes task behavior independently of reference-run outcomes or grading-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 abe170c2..814680be 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:32:33.747Z", + "capturedAt": "2026-10-14T17:38:51.161Z", "capturedBy": "stamp", "inputs": { - "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", + "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", - "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", + "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", + "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "rubricsYaml": null, - "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" + "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" } } 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 b1c9d423..e9d482f3 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 @@ The environment directory contains `Dockerfile`, `browser-optin`, `dns-jail/`, a ## Rationale -This is a manual task with no injected conversation transcript. The prompt and rubric exist, but there is no snapshot surface to compare with the answer key. Re-run only if a session is packaged later. +This manual task has no injected conversation to compare against the rubric answer key. The prompt and rubric are present; adding a snapshot session would make this check runnable. ## 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 39440958..3a6755c7 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,12 +1,10 @@ -# Data Isolation Audit: Voice Processing Workers +# Background Worker Multi-Tenant Isolation Audit & Refactor -## Context -Our platform handles voice cloning and speech synthesis requests via asynchronous background workers (`voice-cloning-job-handler` and `voice-synthsizer-job-handler`). These workers process incoming messages from AWS SQS queues and interact with MongoDB models (`VoiceCloning`, `UserAudioProfile`, `RecordingSalutation`, `Recording`). +## Background & Objective +Our backend background workers currently process asynchronous voice cloning and speech synthesis jobs. A security audit revealed that database queries within these worker handlers retrieve and update records using document identifiers without consistently validating tenant ownership (`userId`). -## Issue -An internal security audit flagged potential multi-tenant data isolation vulnerabilities in the background worker tier. Worker routines retrieve and update database records based on identifiers in message payloads, but tenant ownership boundaries may not be consistently verified across all database operations. +You must audit and refactor the worker handler routines to ensure strict multi-tenant isolation across all database operations while preserving worker stability and error logging. -## Task -1. Audit all database reads and updates in `voice-cloning-job-handler` and `voice-synthsizer-job-handler`. -2. Ensure that database queries and updates enforce multi-tenant isolation by filtering against the appropriate tenant context (`userId`). -3. Ensure background worker routines handle processing errors gracefully so that worker polling loops remain stable. +## Key Requirements +1. **Multi-Tenant Isolation**: Ensure that all database queries, updates, and side effects within background worker handlers are strictly scoped by tenant context (`userId`) to prevent unauthorized cross-tenant data access or modification. +2. **Worker Stability & Resilient Error Handling**: Ensure that authorization failures or processing errors are handled gracefully without crashing 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 c5fe273b..9347e152 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,63 +1,63 @@ task: potion-voice-user-ownership criteria: - - 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: 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: 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 halt processing and prevent unauthorized side effects, such as audio generation or cross-tenant database mutations, when tenant validation fails. **Answer key:** Synthesis execution and cross-tenant mutations must stop if tenant context checks fail. Routing note: Grade this criterion strictly on whether side effects halt upon failure. Do not double-penalize for query syntax omissions already charged under synthesis-tenant-isolation-queries-updates." - elaboration: "Guarantees that unauthorized jobs do not trigger audio rendering or unauthorized cross-tenant database writes." +- 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 tenant identity." +- 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: worker-loop-crash-prevention + category: primary_intent + dimensions: + - Broader Correctness / Systemic Impact + 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: error-status-lifecycle-logging + category: dodged_bullet + dimensions: + - Broader Correctness / Systemic Impact + 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 - 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 optional extra credit under Communication." - elaboration: "Optionally awards extra credit under Communication for identifying architectural message contract limitations. This is strictly bonus credit and carries no deduction if omitted." +- id: tenant-refactor-documentation + category: extra_credit + dimensions: + - Communication + call_site_key: voice-synthsizer-job-handler + guideline: "The response should provide clear inline comments or documentation explaining the multi-tenant isolation logic and security boundary refactor across the background handlers. **Answer key:** Adding clear comments or documentation that explains the tenant isolation checks earns extra credit under Communication." + elaboration: "Awards extra credit under Communication for providing clear architectural documentation of the tenant isolation refactor." diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/grader-context.md b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/grader-context.md index 2d3c0457..971d2b6e 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,19 +1,19 @@ -# Grader Context & Reference Ground Truth +# Grader Context & Reference Answer Key -## Verified Call Sites & Model Interactions +## Handler Architecture & Ground Truth Call Sites ### 1. Voice Cloning Handler (`voice-cloning-job-handler`) -* Payload Ingestion: Consumes `job._doc` directly from SQS message payload. -* Models: `VoiceCloning` and `UserAudioProfile`. -* Ground Truth Requirement: All queries and updates on `VoiceCloning` and `UserAudioProfile` must enforce `{ _id, userId }`. Note that if a service method ignores `userId` in its internal filter, the query filter itself must explicitly supply `userId`. +* **Payload Structure**: Receives job document directly via `job._doc` containing `_id`, `userAudioProfileId`, and `userId`. +* **Verified Call Sites**: + * `VoiceCloning.findOne({ _id: jobId, userId })` or `VoiceCloning.findOneAndUpdate({ _id: jobId, userId }, ...)` + * `UserAudioProfile.findOne({ _id: profileId, userId })` ### 2. Speech Synthesis Handler (`voice-synthsizer-job-handler`) -* Payload Ingestion: Consumes `userAudioProfileId`, `recordingId`, `salutationId` from message payload. -* Model 1 (`UserAudioProfile`): Initial lookup by `_id: userAudioProfileId` resolves `userAudioProfile.userId` (Tenant Context Resolution). -* Model 2 (`RecordingSalutation`): Lookups and updates must filter by `{ _id: salutationId, userId }`. -* Model 3 (`Recording`): Lookups and updates must filter by `{ _id: recordingId, userId }`. - -## Allowances & Routing Guidelines -* **Initial Profile Lookup:** Exempt from requiring `userId` in its own query filter. -* **Error Lifecycle Status:** Updating `status: 'failed'` on the requesting job record for error tracking is permitted. -* **Deduction Routing:** Do not double-deduct for a single missing `userId` parameter across multiple criteria. +* **Payload Structure**: Receives SQS payload with `userAudioProfileId`, `recordingId`, and `salutationId`. +* **Tenant Resolution Anchor**: + * Initial lookup: `UserAudioProfile.findById(userAudioProfileId)` or `findOne({ _id: userAudioProfileId })` resolves `userAudioProfile.userId`. + * **Exemption**: The initial `UserAudioProfile` lookup by ID is a required tenant-resolution step to discover `userId` and must NOT be penalized for lacking `userId` in its own query filter. +* **Downstream Verified Call Sites**: + * `RecordingSalutation.findOne({ _id: salutationId, userId })` + * `Recording.findOne({ _id: recordingId, userId })` +* **Halt Before Side Effects**: If profile lookup fails or downstream record `userId` does not match `userAudioProfile.userId`, the handler must halt processing before calling synthesis rendering services or mutating records. 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 a16c499a..f5f5e68c 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,20 +1,22 @@ -# Holistic Evaluation Rubric: Voice Processing Multi-Tenant Isolation +# Holistic Evaluation Rubric: Potion Voice User Ownership -## Task Summary -The candidate must audit and refactor `voice-cloning-job-handler` and `voice-synthsizer-job-handler` to enforce multi-tenant data isolation and ensure worker polling loop stability. +## Task Overview +The candidate is tasked with auditing and refactoring background worker handlers (`voice-cloning-job-handler` and `voice-synthsizer-job-handler`) to enforce multi-tenant isolation using `userId` scoping across database operations. -## Core Grading Criteria +--- -### 1. Narrow Correctness (Crux & Dealbreakers) -* **Voice Cloning Tenant Isolation:** All database reads and updates on `VoiceCloning` and `UserAudioProfile` in `voice-cloning-job-handler` must be scoped by `userId` in addition to record `_id`. -* **Synthesis Tenant Isolation:** All database reads and updates on `RecordingSalutation` and `Recording` in `voice-synthsizer-job-handler` must be scoped by the tenant identity (`userId`) resolved from the initial `UserAudioProfile` lookup. - * *Tenant Context Resolution Exemption:* The initial lookup on `UserAudioProfile` using `_id: userAudioProfileId` is a valid, necessary tenant-resolution step to discover `userId` and must NOT be penalized for lacking a prior `userId`. -* **Halting Unauthorized Side Effects:** If tenant validation fails or records do not match the tenant context, the worker must halt processing without generating audio or performing unauthorized cross-tenant database mutations. - * *Lifecycle Logging Allowance:* Setting `status: 'failed'` or `'error'` on the requesting job record itself for error logging is an allowed lifecycle tracking mechanism and is not an unauthorized cross-tenant write. - * *Routing Note:* Grade side-effect halting separately from query scoping syntax. Do not double-penalize the same query filter omission across both query scoping and side-effect halting. +## Grading Standards & Dimensions -### 2. Broader Correctness -* **Worker Loop Resilience:** Exception handling during message processing must catch errors gracefully so that background worker polling loops do not crash. +### 1. Narrow Correctness +* **Crux Failure / Dealbreaker**: Executing voice synthesis rendering, file generation, or database mutations against unowned cross-tenant records due to missing tenant scoping (`userId`). +* **Tenant Isolation Requirements**: + * In `voice-cloning-job-handler`, all reads and updates on `VoiceCloning` and `UserAudioProfile` models must filter by `userId` in addition to record `_id`. + * In `voice-synthsizer-job-handler`, the initial `UserAudioProfile` query by `_id: userAudioProfileId` is a valid and necessary tenant-resolution step to discover `userAudioProfile.userId`. All downstream queries and updates on `RecordingSalutation` and `Recording` must be scoped by this profile-derived `userId`. +* **Routing Note**: Deduct points under Narrow Correctness strictly for missing query filters or executing unauthorized side effects. Do not double-penalize across overlapping criteria. -### 3. Communication (Optional Extra Credit) -* **Message Contract Analysis (Extra Credit):** Candidate agents earn optional extra credit under Communication if they document or analyze that SQS queue payloads carry resource identifiers (`userAudioProfileId`, etc.) rather than authenticated user tokens. This is strictly optional extra credit and does not deduct points if omitted. +### 2. Broader Correctness / Systemic Impact +* **Worker Loop Resilience**: Unhandled exceptions during job processing must not crash the worker polling loop. +* **Lifecycle Error Tracking Allowance**: Setting `status: 'failed'` or `'error'` on the requesting job record itself for error logging when a job is rejected is an expected lifecycle tracking mechanism and must not be penalized. + +### 3. Communication +* **Extra Credit**: Award extra credit for providing clear documentation or inline comments explaining the multi-tenant isolation logic and security boundary design across the refactored handlers.