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 00fa8039..08a6102b 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-16T16:18:46.621Z", + "capturedAt": "2026-10-16T16:24:57.547Z", "capturedBy": "stamp", "inputs": { - "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", + "prompt": "965c8d7d9e6120dc351739c1b2453e6ec7249a585a63614dc9bc21f4b3568854", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", - "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", + "holisticRubric": "3b9ca74913311c5f4099505cff26067c1f4643f41bc77c59fcc24867f93b7320", + "atomicRubric": "0e90e8531669c7d85963a3b42ad588646a55f0d59d37874cde3feb99cb6675cc", "rubricsYaml": null, - "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" + "graderContext": "5a0bb9a1d526e9334cd5fdbf3e1e6b05246a2e6c4039f8166804b297fcc9e5bd" } } 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 76301812..b4bc6a62 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 @@ -27,4 +27,4 @@ Try-catch resilience is explicit in the prompt. Accurately describing implemente ## Overall verdict -The positively scored expectations are reasonable from the prompt. The full-score wording and scoped no-match grading have separate clarity and coverage findings; this detector finds no mind-reading requirement or unrequested implementation approach. +The positively scored expectations are reasonable from the prompt. The atomic package's stronger update-result answer key has a separate coverage finding; this detector finds no mind-reading requirement in the holistic rubric. 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 00fa8039..08a6102b 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-16T16:18:46.621Z", + "capturedAt": "2026-10-16T16:24:57.547Z", "capturedBy": "stamp", "inputs": { - "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", + "prompt": "965c8d7d9e6120dc351739c1b2453e6ec7249a585a63614dc9bc21f4b3568854", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", - "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", + "holisticRubric": "3b9ca74913311c5f4099505cff26067c1f4643f41bc77c59fcc24867f93b7320", + "atomicRubric": "0e90e8531669c7d85963a3b42ad588646a55f0d59d37874cde3feb99cb6675cc", "rubricsYaml": null, - "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" + "graderContext": "5a0bb9a1d526e9334cd5fdbf3e1e6b05246a2e6c4039f8166804b297fcc9e5bd" } } 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 d35df945..971ea36f 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,7 +9,7 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Verbatim grounding -> “An audit revealed that background worker handlers retrieve and mutate MongoDB records using document ObjectIds (`_id`, `userAudioProfileId`, `salutationId`) without verifying that the records belong to the requesting tenant (`userId`).” +> “A recent security audit revealed a critical multi-tenant data isolation vulnerability: background job handlers retrieve, update, and process MongoDB records using only document identifiers (e.g., `_id`, `userAudioProfileId`, `salutationId`) provided in queue message payloads, without validating tenant ownership (`userId`).” The cloning worker uses `voiceCloningService.update({ _id, status: 'processing' })` and an ID-only profile update. The synthesis worker reads recording records by ID. Both worker entry files pass `node --check`. 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 00fa8039..08a6102b 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-16T16:18:46.621Z", + "capturedAt": "2026-10-16T16:24:57.547Z", "capturedBy": "stamp", "inputs": { - "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", + "prompt": "965c8d7d9e6120dc351739c1b2453e6ec7249a585a63614dc9bc21f4b3568854", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", - "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", + "holisticRubric": "3b9ca74913311c5f4099505cff26067c1f4643f41bc77c59fcc24867f93b7320", + "atomicRubric": "0e90e8531669c7d85963a3b42ad588646a55f0d59d37874cde3feb99cb6675cc", "rubricsYaml": null, - "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" + "graderContext": "5a0bb9a1d526e9334cd5fdbf3e1e6b05246a2e6c4039f8166804b297fcc9e5bd" } } 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 00fa8039..08a6102b 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-16T16:18:46.621Z", + "capturedAt": "2026-10-16T16:24:57.547Z", "capturedBy": "stamp", "inputs": { - "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", + "prompt": "965c8d7d9e6120dc351739c1b2453e6ec7249a585a63614dc9bc21f4b3568854", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", - "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", + "holisticRubric": "3b9ca74913311c5f4099505cff26067c1f4643f41bc77c59fcc24867f93b7320", + "atomicRubric": "0e90e8531669c7d85963a3b42ad588646a55f0d59d37874cde3feb99cb6675cc", "rubricsYaml": null, - "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" + "graderContext": "5a0bb9a1d526e9334cd5fdbf3e1e6b05246a2e6c4039f8166804b297fcc9e5bd" } } 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 2b3b4e52..6f795110 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,7 +9,7 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md and ## Verbatim grounding -> “Refactor Background Worker Handlers for Multi-Tenant Data Isolation” +> “Refactor Background Handlers for Multi-Tenant Data Isolation” ## Rationale 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 00fa8039..08a6102b 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-16T16:18:46.621Z", + "capturedAt": "2026-10-16T16:24:57.547Z", "capturedBy": "stamp", "inputs": { - "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", + "prompt": "965c8d7d9e6120dc351739c1b2453e6ec7249a585a63614dc9bc21f4b3568854", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", - "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", + "holisticRubric": "3b9ca74913311c5f4099505cff26067c1f4643f41bc77c59fcc24867f93b7320", + "atomicRubric": "0e90e8531669c7d85963a3b42ad588646a55f0d59d37874cde3feb99cb6675cc", "rubricsYaml": null, - "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" + "graderContext": "5a0bb9a1d526e9334cd5fdbf3e1e6b05246a2e6c4039f8166804b297fcc9e5bd" } } 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 fe69ed5e..80c723e8 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 -> “Failing a Crux preflight side-effect requirement applies a heavy penalty to **Narrow Correctness** and a heavy penalty to the **Overall Score**.” +> “Failing preflight tenant validation and executing unauthorized side effects (audio rendering or database writes) incurs a heavy penalty on **Narrow Correctness** and a heavy penalty on the **Overall Score**.” -> “Failing to check if a scoped update returned `null` is evaluated as a minor defect under **Broader Correctness / the craft of software engineering** or **Common Sense**” +> “Failing to check if an update returned `null` on an already `userId`-scoped query is a minor defensive programming defect evaluated under **Broader Correctness / the craft of software engineering**, not a Crux security breach.” ## Rationale -The revised Crux penalty now targets the standard Narrow Correctness dimension and the overall score. Both-place penalties are supported by the shared grading arithmetic. Query filter omissions also belong to Narrow Correctness, while follow-through after a safe no-match result can be assessed as craft or practical judgment. Polling resilience is routed to Broader Correctness. An inaccurate account of unverified code behavior can reasonably be charged to Verification & Thoroughness. +A code path that renders or mutates before checking tenant ownership fails the requested deliverable and belongs to Narrow Correctness. The combined Narrow and overall penalty is the shared standard's supported pattern. A scoped write whose result is not checked is routed to craft rather than Integrity or the security Crux. -No noncanonical dimension or unsupported Integrity penalty remains. The omission of an atomic criterion for scoped-null follow-through belongs to rubric coverage, not dimension routing. +Polling-loop resilience is also a Broader Correctness concern. The rubric places inaccurate or unverified implementation claims under Verification & Thoroughness. All named dimensions are canonical, and the charge-once rule prevents reusing one omission as two deductions. 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 00fa8039..08a6102b 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-16T16:18:46.621Z", + "capturedAt": "2026-10-16T16:24:57.547Z", "capturedBy": "stamp", "inputs": { - "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", + "prompt": "965c8d7d9e6120dc351739c1b2453e6ec7249a585a63614dc9bc21f4b3568854", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", - "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", + "holisticRubric": "3b9ca74913311c5f4099505cff26067c1f4643f41bc77c59fcc24867f93b7320", + "atomicRubric": "0e90e8531669c7d85963a3b42ad588646a55f0d59d37874cde3feb99cb6675cc", "rubricsYaml": null, - "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" + "graderContext": "5a0bb9a1d526e9334cd5fdbf3e1e6b05246a2e6c4039f8166804b297fcc9e5bd" } } 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 891af9d5..0533c5a4 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,43 @@ claims: - id: c01 verdict: pass loadBearing: true - summary: "Cloning baseline updates lack userId filters" - rubricQuote: "All database queries and updates on `VoiceCloning` and `UserAudioProfile` in `voice-cloning-job-handler` must filter by `userId` in addition to document `_id`." + summary: "Cloning worker uses ID-only model updates" + rubricQuote: "All reads and updates to `VoiceCloning` and `UserAudioProfile` must incorporate `userId` alongside record `_id`." sourceEvidence: "await voiceCloningService.update({ _id, status: 'processing' })" - sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-cloning-job-handler/index.js (line 139; profile update at lines 140-143)" - note: "The ID-only update shows the baseline weakness. The agent can inspect the handler and service locally." + sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-cloning-job-handler/index.js (line 139; ID-only profile update at lines 140-143)" + note: "The baseline weakness the rubric asks to fix is visible in the active handler. The agent can inspect the worker and service locally." - id: c02 verdict: pass loadBearing: true - summary: "Synthesis downstream reads lack tenant filters" - rubricQuote: "Downstream reads and updates on `RecordingSalutation` and `Recording` in `voice-synthsizer-job-handler` must filter by the profile-derived `userId`." + summary: "Synthesis downstream operations lack userId filters" + rubricQuote: "All subsequent reads and updates to `RecordingSalutation` and `Recording` must be scoped by the profile-derived `userId`." sourceEvidence: "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 157-160; salutation read lines 152-155; update lines 169-177)" - note: "The baseline downstream operations are ID-only. The agent can trace the required change from this workspace." + note: "The baseline downstream reads and salutation update are ID-only. The agent can trace them in the workspace." - id: c03 verdict: pass loadBearing: true - summary: "Initial profile lookup resolves userId" - rubricQuote: "The initial query on `UserAudioProfile` by `_id: userAudioProfileId` in `voice-synthsizer-job-handler` is a valid tenant-resolution step" + summary: "Initial profile lookup resolves synthesis userId" + rubricQuote: "The initial `UserAudioProfile` lookup by `_id: userAudioProfileId` is required to resolve `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 worker derives userId from the profile selected by ID. The prompt also discloses this valid first step." + note: "The handler obtains userId from the profile. The prompt also makes this first lookup reachable to the agent." - id: c04 verdict: pass loadBearing: true - summary: "A filtered no-match update mutates no document" - rubricQuote: "If a database query or update includes the `userId` tenant filter but matches no record in the database (0 documents modified), no cross-tenant data leak or unauthorized mutation occurs." + summary: "A scoped no-match update changes no document" + rubricQuote: "A database query or update that already filters by `userId` but returns no matching record (0 documents modified) is a safe no-match that cannot corrupt or leak cross-tenant data." sourceEvidence: "const updatedModel = await VoiceCloningModel.findOneAndUpdate(\n { ...filter }," sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-cloning-job-handler/voice_cloning/voice_cloning_service.js (lines 89-90)" - note: "Mongoose applies the full filter to the update. A null no-match result changes no matched document. This narrow claim does not establish whether later side effects are safe." + note: "Mongoose applies the complete filter to the operation, so a no-match result changes no matched record. This verifies the direct database operation only; it does not establish that any subsequent effects are safe." - id: c05 verdict: pass loadBearing: true - summary: "Both workers poll" - rubricQuote: "Error handling must catch job processing exceptions inside a `try-catch` block to keep worker polling loops active." + summary: "Both handlers contain polling loops" + rubricQuote: "Unhandled exceptions during message processing must be caught in a `try-catch` block so the background worker polling loop remains active." sourceEvidence: "while (true) {\n await processQueue()" sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 259-260; cloning equivalent lines 324-325)" - note: "Both loop structures exist. Error resilience is the requested result, not an assertion that the baseline already handles all failures." + note: "Both worker loops are present. Exception handling is the target, not a claim that the baseline already handles every error." --- # Fact-check rubric claims: potion-voice-user-ownership @@ -50,4 +50,4 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md Source: `harbor-tasks/potion-voice-user-ownership/environment/workspace/`, built from locally resolving `repos/potion-voice` commit `fcd8a9d0b00406bda1943c234a8f2fecaff9f774` without a workspace patch. -Checked five load-bearing facts. All are supported by locally reachable source or the ordinary semantics of a filtered Mongoose update. The no-match finding is limited to that query; the missing atomic criterion for unchecked results is assessed by rubric coverage. +Checked five load-bearing claims; all are supported by locally reachable code or filtered-update semantics. The unsupported `voiceCloningId` assertion is in the atomic grader context, not the resolved holistic rubric, and is recorded in the rubric-coverage report. 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 00fa8039..08a6102b 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-16T16:18:46.621Z", + "capturedAt": "2026-10-16T16:24:57.547Z", "capturedBy": "stamp", "inputs": { - "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", + "prompt": "965c8d7d9e6120dc351739c1b2453e6ec7249a585a63614dc9bc21f4b3568854", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", - "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", + "holisticRubric": "3b9ca74913311c5f4099505cff26067c1f4643f41bc77c59fcc24867f93b7320", + "atomicRubric": "0e90e8531669c7d85963a3b42ad588646a55f0d59d37874cde3feb99cb6675cc", "rubricsYaml": null, - "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" + "graderContext": "5a0bb9a1d526e9334cd5fdbf3e1e6b05246a2e6c4039f8166804b297fcc9e5bd" } } 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 41861b14..de2690ab 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 @@ -13,7 +13,7 @@ Yes. The rubric describes tenant-scoped reads and updates in both handlers, an a ## What the grader has to infer -Exact helper edits and control-flow structure remain open. The target behaviors themselves are affirmative and concrete. The separate full-score instruction has a scoring-clarity issue, but the rubric does define positive success states. +Exact helper edits and control-flow structure remain open. The target behaviors themselves are affirmative and concrete. The high-quality-response section reinforces the positive target without assigning a fixed score. ## Overall verdict 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 00fa8039..08a6102b 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-16T16:18:46.621Z", + "capturedAt": "2026-10-16T16:24:57.547Z", "capturedBy": "stamp", "inputs": { - "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", + "prompt": "965c8d7d9e6120dc351739c1b2453e6ec7249a585a63614dc9bc21f4b3568854", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", - "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", + "holisticRubric": "3b9ca74913311c5f4099505cff26067c1f4643f41bc77c59fcc24867f93b7320", + "atomicRubric": "0e90e8531669c7d85963a3b42ad588646a55f0d59d37874cde3feb99cb6675cc", "rubricsYaml": null, - "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" + "graderContext": "5a0bb9a1d526e9334cd5fdbf3e1e6b05246a2e6c4039f8166804b297fcc9e5bd" } } 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 1a6d0800..f6d073e1 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 @@ -17,4 +17,4 @@ The rubric grades tenant filters and observable preflight behavior without presc ## Overall verdict -No major reasonable implementation path is excluded. The missing atomic criterion for late-null follow-through is a rubric-coverage gap, not an uncredited strong approach in the holistic rubric. +No major reasonable implementation path is excluded. The atomic package now includes a scoped-update-null-handling criterion; coverage checks whether its answer key stays within the holistic rule. 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 00fa8039..08a6102b 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-16T16:18:46.621Z", + "capturedAt": "2026-10-16T16:24:57.547Z", "capturedBy": "stamp", "inputs": { - "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", + "prompt": "965c8d7d9e6120dc351739c1b2453e6ec7249a585a63614dc9bc21f4b3568854", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", - "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", + "holisticRubric": "3b9ca74913311c5f4099505cff26067c1f4643f41bc77c59fcc24867f93b7320", + "atomicRubric": "0e90e8531669c7d85963a3b42ad588646a55f0d59d37874cde3feb99cb6675cc", "rubricsYaml": null, - "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" + "graderContext": "5a0bb9a1d526e9334cd5fdbf3e1e6b05246a2e6c4039f8166804b297fcc9e5bd" } } 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 00fa8039..08a6102b 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-16T16:18:46.621Z", + "capturedAt": "2026-10-16T16:24:57.547Z", "capturedBy": "stamp", "inputs": { - "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", + "prompt": "965c8d7d9e6120dc351739c1b2453e6ec7249a585a63614dc9bc21f4b3568854", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", - "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", + "holisticRubric": "3b9ca74913311c5f4099505cff26067c1f4643f41bc77c59fcc24867f93b7320", + "atomicRubric": "0e90e8531669c7d85963a3b42ad588646a55f0d59d37874cde3feb99cb6675cc", "rubricsYaml": null, - "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" + "graderContext": "5a0bb9a1d526e9334cd5fdbf3e1e6b05246a2e6c4039f8166804b297fcc9e5bd" } } 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 00fa8039..08a6102b 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-16T16:18:46.621Z", + "capturedAt": "2026-10-16T16:24:57.547Z", "capturedBy": "stamp", "inputs": { - "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", + "prompt": "965c8d7d9e6120dc351739c1b2453e6ec7249a585a63614dc9bc21f4b3568854", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", - "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", + "holisticRubric": "3b9ca74913311c5f4099505cff26067c1f4643f41bc77c59fcc24867f93b7320", + "atomicRubric": "0e90e8531669c7d85963a3b42ad588646a55f0d59d37874cde3feb99cb6675cc", "rubricsYaml": null, - "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" + "graderContext": "5a0bb9a1d526e9334cd5fdbf3e1e6b05246a2e6c4039f8166804b297fcc9e5bd" } } 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 ae87ee0e..fbd7a907 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-clarity.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-clarity.md @@ -1,6 +1,6 @@ --- detector: detector-rubric-clarity -verdict: material-issues +verdict: clear confidence: HIGH --- # Rubric-clarity check: potion-voice-user-ownership @@ -9,16 +9,14 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Material ambiguities -### Full-score instruction behaves like a pin +None found. The high-quality and flawed-response descriptions are qualitative summaries, not fixed score pins. The Crux trigger specifies execution of rendering or writes before tenant validation, and its heavy penalties target Narrow Correctness and the overall score. The safe scoped no-match rule explicitly routes an unchecked null result to Broader Correctness instead of Crux. The charge-once rule separates filter omissions from side-effect execution. -- **Where:** “**Pass (1.00)**: Fully enforces `userId` scoping across all handler reads and updates, halts unauthorized preflight side effects, handles errors inside `try-catch` blocks, and accurately documents the changes.” -- **Why it's ambiguous:** Under “Summary Score Guidance,” this can mean either “these task requirements deserve full credit on their relevant criteria” or “assign an overall 1.00 whenever these listed behaviors appear.” The latter pins the score despite the shared standard's eight-dimension mean and could erase real shortcomings in other dimensions. The rubric does not disambiguate the two readings. -- **Grade evidence:** No current reference runs exist. +No current reference runs exist to test how borderline implementations would be graded. ## Copy-edit issues -None material. The scoped no-match exception and both-place Crux penalty now state their intended routes plainly. +None that interrupt use. The repeated “standard” in the SQS sentence is readable but can be trimmed. ## Overall verdict -The revised penalty target is clear, but the overall `Pass (1.00)` line admits incompatible scoring interpretations. Because it is a score-determining instruction, the verdict is `material-issues`. +The current holistic rubric gives a usable scoring boundary without numeric score pins or undefined criterion targets. `clear`. 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 00fa8039..08a6102b 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-16T16:18:46.621Z", + "capturedAt": "2026-10-16T16:24:57.547Z", "capturedBy": "stamp", "inputs": { - "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", + "prompt": "965c8d7d9e6120dc351739c1b2453e6ec7249a585a63614dc9bc21f4b3568854", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", - "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", + "holisticRubric": "3b9ca74913311c5f4099505cff26067c1f4643f41bc77c59fcc24867f93b7320", + "atomicRubric": "0e90e8531669c7d85963a3b42ad588646a55f0d59d37874cde3feb99cb6675cc", "rubricsYaml": null, - "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" + "graderContext": "5a0bb9a1d526e9334cd5fdbf3e1e6b05246a2e6c4039f8166804b297fcc9e5bd" } } 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 e228d79d..d7f869fc 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-coverage.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-coverage.md @@ -11,32 +11,31 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md agai | Holistic rule | Atomic entry | Status | | --- | --- | --- | -| Cloning reads and updates use ID plus userId | `cloning-tenant-isolation` | covered | -| Synthesis downstream reads and updates use profile-derived userId | `synthesis-tenant-isolation-queries-updates` | covered | -| Initial profile lookup by ID is valid | `initial-profile-tenant-resolution` | covered | -| Preflight side effects trigger heavy Narrow and overall penalties | Two handler-specific Crux criteria | covered | -| Scoped no-match is **not** Crux | Both Crux elaborations and context | covered | -| Unchecked scoped-update null is a **minor Broader Correctness or Common Sense defect** | No independently judgeable criterion | **gap** | -| Worker try-catch and SQS acknowledgment allowance | `worker-loop-crash-prevention` | covered | -| Accurate written summary | `refactor-summary-accuracy` | covered | -| Query/side-effect charge-once routing | Both Crux elaborations | covered | +| Both handlers scope tenant-owned reads and updates by userId | Two tenant-isolation criteria | covered | +| Initial synthesis profile lookup by ID is valid | `initial-profile-tenant-resolution` | covered | +| Unauthorized preflight effects trigger heavy Narrow and overall penalties | Two handler-specific Crux criteria | covered | +| A scoped update returning null is a minor craft finding, not Crux | `scoped-update-null-handling` and context | covered with extra condition | +| Worker try-catch and SQS acknowledgment protection | `worker-loop-crash-prevention` | covered | +| Accurate response or code documentation | `refactor-summary-accuracy` | covered | +| Charge each defect once | Both Crux elaborations and context | covered | ## Coverage gaps -The holistic rubric says: “Failing to check if a scoped update returned `null` is evaluated as a minor defect under **Broader Correctness / the craft of software engineering** or **Common Sense**.” The atomic package preserves the **non-Crux exemption**, but none of its seven guidelines scores checking or handling that result. `worker-loop-crash-prevention` addresses caught exceptions, not null returns. A response could pass every atomic criterion while leaving this explicitly graded defect. +None. The new `scoped-update-null-handling` criterion fills the earlier omission. ## Invented content -None found. The atomic criteria do not add a new functional requirement unsupported by the holistic rubric. +- **Stronger update-result test:** The holistic rubric grades “Failing to check if an update returned `null`” as a minor defect. The atomic answer key says the response should “verify that a record was matched and modified before assuming success.” A matched, idempotent write can modify zero fields while returning a record. Requiring proof of modification adds a condition not in the holistic rubric and could mark that valid case down. +- **Unsupported queue-field context:** `tests/grader-context.md` says the cloning handler ingests payloads containing “`userId` and `voiceCloningId`.” Neither the holistic rubric nor instruction specifies a `voiceCloningId` payload field. The current handler destructures `_id` and `userAudioProfileId` from `job._doc` at lines 100–104, and has no `voiceCloningId` reference. This extra ground-truth statement can mislead the grader about the correct tenant source or record ID. ## Context integrity -Architecture, tenant-source, preflight, scoped no-match, and SQS context are present in `tests/grader-context.md`. The missing item is a scored criterion, not background context. +The architecture, profile-derived synthesis tenant source, preflight requirement, scoped no-match rule, and SQS allowance survive in the atomic context. The issue is added context, not missing context. ## Crux alignment -The two handler Crux criteria encode the holistic rubric's heavy Narrow and overall penalties and stay within the two-Crux cap. +The two Crux criteria correspond to the holistic heavy penalties on Narrow Correctness and the overall score and stay within the two-Crux cap. ## Overall verdict -The missing minor deduction changes grading content, so the verdict is `material-issues`. The current atomic file is well-formed, but it does not fully represent the holistic rubric. +The atomic package now captures all holistic requirements, but its extra update-result condition and unsupported cloning payload field change how a response could be graded. The verdict remains `material-issues` for invented content. 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 00fa8039..08a6102b 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-16T16:18:46.621Z", + "capturedAt": "2026-10-16T16:24:57.547Z", "capturedBy": "stamp", "inputs": { - "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", + "prompt": "965c8d7d9e6120dc351739c1b2453e6ec7249a585a63614dc9bc21f4b3568854", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", - "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", + "holisticRubric": "3b9ca74913311c5f4099505cff26067c1f4643f41bc77c59fcc24867f93b7320", + "atomicRubric": "0e90e8531669c7d85963a3b42ad588646a55f0d59d37874cde3feb99cb6675cc", "rubricsYaml": null, - "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" + "graderContext": "5a0bb9a1d526e9334cd5fdbf3e1e6b05246a2e6c4039f8166804b297fcc9e5bd" } } 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 a9dbf7d5..ef03d4bf 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 @@ -9,29 +9,29 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/atomic-rubric.yaml and ## Deterministic contract -1. **Pass:** YAML parses as a mapping with `task` and seven `criteria`. -2. **Pass:** `task` matches `potion-voice-user-ownership`. -3. **Pass:** All seven IDs are unique kebab-case. +1. **Pass:** YAML parses with top-level `task` and eight `criteria`. +2. **Pass:** The task value matches the slug. +3. **Pass:** All IDs are unique kebab-case. 4. **Pass:** Categories use the allowed vocabulary. 5. **Pass:** Severities use the allowed vocabulary and placement. -6. **Pass:** Exactly two criteria carry `crux`. -7. **Pass:** Every `dimensions` entry uses an exact Grading Standard name, including `Broader Correctness / the craft of software engineering`. -8. **Pass:** Every guideline is nonempty. -9. **Pass:** Numeric-penalty sweeps found no penalty amount in the atomic rubric or grader context. “0 records modified” describes a database result, not a score adjustment. -11. **Pass:** Guidelines phrase requirements positively. +6. **Pass:** Exactly two Crux criteria meet the cap. +7. **Pass:** Every dimensions entry names an exact Grading Standard dimension. +8. **Pass:** Guidelines are nonempty. +9. **Pass:** Numeric-penalty sweeps found no penalty amount. “0 records modified” describes database behavior, not score arithmetic. +11. **Pass:** Guidelines are positively phrased. ## Atomicity and self-containment -No material issue found. Handler-specific ownership gates are separately judgeable. Routing notes may name sibling criteria without making the guidelines dependent on them. +The eight criteria are independently judgeable. The new scoped-update-null-handling criterion stands alone as a defensive follow-through check. ## Phrasing and answer keys -Bold inline answer keys are present. The Crux elaborations clarify that the scored side-effect failure concerns preflight work and that an already scoped no-match result is a non-trigger. +Bold inline answer keys are present. Elaborations explain penalty routing and the scoped no-match exemption without adding a separate response requirement. ## Fair-grading findings -No unreachable action or compulsory design fork found. Whether the holistic rubric's minor null-check deduction has an atomic criterion is assessed by rubric coverage. +No out-of-reach action, forced implementation approach, or built-in duplicate charge found. Whether “matched and modified” adds to the holistic rule is assessed by rubric coverage, not form. ## Overall verdict -The deterministic contract and judgment checks pass. The artifact's form verdict is `clear`. +The deterministic and judgment-layer form checks pass. `clear`. 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 00fa8039..08a6102b 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-16T16:18:46.621Z", + "capturedAt": "2026-10-16T16:24:57.547Z", "capturedBy": "stamp", "inputs": { - "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", + "prompt": "965c8d7d9e6120dc351739c1b2453e6ec7249a585a63614dc9bc21f4b3568854", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", - "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", + "holisticRubric": "3b9ca74913311c5f4099505cff26067c1f4643f41bc77c59fcc24867f93b7320", + "atomicRubric": "0e90e8531669c7d85963a3b42ad588646a55f0d59d37874cde3feb99cb6675cc", "rubricsYaml": null, - "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" + "graderContext": "5a0bb9a1d526e9334cd5fdbf3e1e6b05246a2e6c4039f8166804b297fcc9e5bd" } } 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 00fa8039..08a6102b 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-16T16:18:46.621Z", + "capturedAt": "2026-10-16T16:24:57.547Z", "capturedBy": "stamp", "inputs": { - "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", + "prompt": "965c8d7d9e6120dc351739c1b2453e6ec7249a585a63614dc9bc21f4b3568854", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", - "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", + "holisticRubric": "3b9ca74913311c5f4099505cff26067c1f4643f41bc77c59fcc24867f93b7320", + "atomicRubric": "0e90e8531669c7d85963a3b42ad588646a55f0d59d37874cde3feb99cb6675cc", "rubricsYaml": null, - "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" + "graderContext": "5a0bb9a1d526e9334cd5fdbf3e1e6b05246a2e6c4039f8166804b297fcc9e5bd" } } 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 73940e8f..56bbe4dd 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,23 +1,18 @@ -# Refactor Background Worker Handlers for Multi-Tenant Data Isolation +# Refactor Background Handlers for Multi-Tenant Data Isolation -## Overview -Our backend processes voice cloning and speech synthesis jobs via background AWS SQS queues. An audit revealed that background worker handlers retrieve and mutate MongoDB records using document ObjectIds (`_id`, `userAudioProfileId`, `salutationId`) without verifying that the records belong to the requesting tenant (`userId`). +## Context +Our backend background worker services process voice cloning and speech synthesis jobs asynchronously via SQS message queues. A recent security audit revealed a critical multi-tenant data isolation vulnerability: background job handlers retrieve, update, and process MongoDB records using only document identifiers (e.g., `_id`, `userAudioProfileId`, `salutationId`) provided in queue message payloads, without validating tenant ownership (`userId`). -You must refactor all database queries and updates in the background worker handlers to enforce strict multi-tenant isolation. +## Requirements +1. **Audit & Refactor Background Handlers**: + - Inspect `voice-cloning-job-handler` and `voice-synthsizer-job-handler`. + - Ensure all database reads and updates on tenant-owned models (`VoiceCloning`, `UserAudioProfile`, `RecordingSalutation`, and `Recording`) are strictly scoped by tenant identity (`userId`). + - For `voice-synthsizer-job-handler`, derive the tenant identity (`userId`) from the initial `UserAudioProfile` lookup before executing downstream queries or updates on `RecordingSalutation` and `Recording`. -## Key Requirements -1. **Voice Cloning Handler (`voice-cloning-job-handler`)**: - - Scope all database queries and updates on `VoiceCloning` and `UserAudioProfile` records using `userId` in addition to record `_id`. +2. **Prevent Unauthorized Side Effects**: + - If tenant ownership validation fails or a record does not belong to the expected tenant, immediately halt background job processing. + - Do not perform audio generation rendering or mutate database records when tenant validation fails. -2. **Speech Synthesis Handler (`voice-synthsizer-job-handler`)**: - - Perform the initial lookup on `UserAudioProfile` by `_id: userAudioProfileId` to establish tenant context (`userId`). - - Scope all downstream database reads and updates on `RecordingSalutation` and `Recording` records using the profile-derived `userId`. - -3. **Preflight Side-Effect Protection**: - - Halt audio generation rendering and database mutations if tenant validation checks fail or records do not match the tenant context. - -4. **Worker Loop Resilience**: - - Ensure all job processing errors are caught within a `try-catch` block so unhandled exceptions do not crash background worker polling loops. - -5. **Refactoring Documentation**: - - Provide an accurate written summary and code documentation detailing the multi-tenant isolation logic. +3. **Maintain Worker Resilience & Log Accuracy**: + - Ensure exceptions during message handling are caught gracefully so the worker polling loop does not crash. + - Provide a clear, accurate summary of the refactoring changes made across both handlers in your final response or documentation. 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 5e744f38..035a088a 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 @@ -46,10 +46,7 @@ criteria: and a heavy penalty to the overall score. Routing note: Charge query syntax omissions under cloning-tenant-isolation; charge preflight side-effect execution under this criterion. Do not double-charge a single defect across query criteria and side-effect - criteria. Note: A query or update that includes the userId filter but returns - no document match is a safe no-match (0 records modified) and is evaluated under - Broader Correctness / the craft of software engineering, not as a Crux side-effect - failure.' + criteria.' - id: synthesis-prevent-unauthorized-side-effects name: Synthesis Prevent Unauthorized Side Effects category: primary_intent @@ -67,10 +64,7 @@ criteria: and a heavy penalty to the overall score. Routing note: Charge query syntax omissions under synthesis-tenant-isolation-queries-updates; charge preflight side-effect execution under this criterion. Do not double-charge a single defect across query - criteria and side-effect criteria. Note: A query or update that includes the userId - filter but returns no document match is a safe no-match (0 records modified) and - is evaluated under Broader Correctness / the craft of software engineering, not - as a Crux side-effect failure.' + criteria and side-effect criteria.' - id: initial-profile-tenant-resolution name: Initial Profile Tenant Resolution category: dodged_bullet @@ -85,6 +79,23 @@ criteria: _id: userAudioProfileId 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: scoped-update-null-handling + name: Scoped Update Null Handling + category: dodged_bullet + dimensions: + - Broader Correctness / the craft of software engineering + call_site_keys: + - voice-cloning-job-handler + - voice-synthsizer-job-handler + severity: unlikely_dealbreaker + guideline: 'The response should check and handle null or zero-match return values + on tenant-scoped database updates before proceeding. **Answer key: Database update + operations that filter by tenant userId should verify that a record was matched + and modified before assuming success.**' + elaboration: 'Evaluates defensive error handling on scoped database updates. Note: + A query or update that already filters by tenant userId but matches 0 records + cannot leak cross-tenant data; failing to check its return value is a minor defensive + programming defect under Broader Correctness, not a Crux security breach.' - id: worker-loop-crash-prevention name: Worker Loop Crash Prevention category: dodged_bullet 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 0631875f..b8889cc3 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,23 +1,31 @@ -# Grader Context & Reference Ground Truth +# Grader Context: Potion Voice Multi-Tenant User Ownership -## System Architecture -The application runs asynchronous background workers consuming AWS SQS job payloads for voice cloning (`voice-cloning-job-handler`) and speech synthesis (`voice-synthsizer-job-handler`). +## Architectural Reference Ground Truth -## Ground Truth Requirements +### 1. Handler Breakdown & Data Models +* **`voice-cloning-job-handler`**: + * Ingests voice cloning job payloads containing `userId` and `voiceCloningId`. + * Models involved: `VoiceCloning` and `UserAudioProfile`. + * Both read queries and update operations on `VoiceCloning` and `UserAudioProfile` must explicitly include `userId` in the query filter alongside record `_id`. -### 1. Voice Cloning Handler (`voice-cloning-job-handler`) -- **Query Scoping**: Every lookup and mutation on `VoiceCloning` and `UserAudioProfile` must incorporate `userId: tenantId` along with document `_id`. -- **Preflight Gating**: If the record does not belong to `userId`, execution must halt immediately before performing rendering work or updating job status. +* **`voice-synthsizer-job-handler`**: + * Ingests synthesis job payloads containing `userAudioProfileId` and `salutationId`. + * Step 1: Reads `UserAudioProfile` by `_id: userAudioProfileId` to resolve the owning `userId`. + * Step 2: Uses the resolved `userId` to scope all downstream queries and updates on `RecordingSalutation` and `Recording`. -### 2. Speech Synthesis Handler (`voice-synthsizer-job-handler`) -- **Initial Profile Lookup**: The initial lookup on `UserAudioProfile` uses `_id: userAudioProfileId` to obtain `userId`. This initial query does not require `userId`. -- **Downstream Scoping**: All subsequent queries and updates on `RecordingSalutation` and `Recording` must filter by the profile-derived `userId`. -- **Preflight Gating**: Audio synthesis and database updates must be halted if tenant validation fails. +### 2. Security & Side-Effect Rules +* **Crux Requirement (Preflight Halting)**: + * Audio rendering operations and database mutations must be halted if tenant ownership checks fail. + * Executing preflight side effects on unvalidated payloads triggers heavy penalties on Narrow Correctness and the Overall Score. +* **Single-Deduction Rule**: + * Charge query syntax omissions under the query isolation criteria (`cloning-tenant-isolation` or `synthesis-tenant-isolation-queries-updates`). + * Charge execution of unauthorized preflight side effects under the handler-specific Crux criteria (`cloning-prevent-unauthorized-side-effects` or `synthesis-prevent-unauthorized-side-effects`). + * Do not double-charge a single defect across query criteria and side-effect criteria. -### 3. Scoped No-Match vs. Preflight Side Effects -- **Scoped No-Match**: A query or update that includes `userId` but matches no document (0 records modified) is safe from cross-tenant data leaks. An unchecked null return on an already-scoped query is evaluated under **Broader Correctness / the craft of software engineering**, not as a Crux side-effect breach. -- **Preflight Side Effects**: Executing audio rendering or mutating records before establishing or validating tenant ownership triggers a heavy penalty on Narrow Correctness and the Overall Score. - -### 4. Worker Resilience & Framework Notes -- Job processing must be wrapped in `try-catch` blocks to prevent worker loop crashes. -- SQS message deletion and acknowledgment on completed or rejected jobs is standard framework behavior and must not be penalized. +### 3. Defensive Programming & Null Handling +* **Scoped Update Null Handling**: + * Queries and updates that filter by `userId` are inherently tenant-isolated (0 records modified if tenant ID does not match). + * Missing a `null` check on an already `userId`-scoped update is a minor defensive programming defect evaluated under `scoped-update-null-handling` in **Broader Correctness / the craft of software engineering**, NOT a Crux security breach. +* **Polling Loop Crash Prevention**: + * Exceptions during message processing must be wrapped in a `try-catch` block to keep worker polling loops running. + * Standard framework SQS message deletion and acknowledgment on completed and rejected jobs must not be penalized. diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md index 5801305c..53ffb7ef 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,34 +1,35 @@ -# Holistic Evaluation Guidelines +# Holistic Evaluation Guidelines: Potion Voice Multi-Tenant User Ownership -## Evaluation Overview -Evaluate candidate solutions across the standard software engineering dimensions based on multi-tenant data isolation, security side-effect prevention, and error resilience across `voice-cloning-job-handler` and `voice-synthsizer-job-handler`. +## Scenario Overview +The candidate is tasked with auditing and refactoring two asynchronous background job handlers (`voice-cloning-job-handler` and `voice-synthsizer-job-handler`) to enforce strict multi-tenant data isolation across MongoDB collections (`VoiceCloning`, `UserAudioProfile`, `RecordingSalutation`, and `Recording`). --- -## Dimension Breakdown +## Performance Expectations Across Standard Dimensions -### Narrow Correctness -- **Voice Cloning Tenant Isolation**: All database queries and updates on `VoiceCloning` and `UserAudioProfile` in `voice-cloning-job-handler` must filter by `userId` in addition to document `_id`. -- **Speech Synthesis Tenant Isolation**: Downstream reads and updates on `RecordingSalutation` and `Recording` in `voice-synthsizer-job-handler` must filter by the profile-derived `userId`. -- **Initial Profile Lookup Allowance**: The initial query on `UserAudioProfile` by `_id: userAudioProfileId` in `voice-synthsizer-job-handler` is a valid tenant-resolution step and does not require `userId` in that initial lookup. -- **Preflight Side-Effect Halting (Crux Requirement)**: - - Audio generation rendering and database mutations in `voice-cloning-job-handler` and `voice-synthsizer-job-handler` must be halted if tenant ownership checks fail. - - **Penalty Routing & Magnitude**: Failing a Crux preflight side-effect requirement applies a heavy penalty to **Narrow Correctness** and a heavy penalty to the **Overall Score**. - - **Charge-Once Rule**: Charge query filter syntax omissions under tenant isolation criteria; charge preflight execution under side-effect criteria. Do not double-charge a single code defect across both query and side-effect criteria. +### 1. Narrow Correctness +* **Tenant-Scoped Queries & Updates**: + * In `voice-cloning-job-handler`: All reads and updates to `VoiceCloning` and `UserAudioProfile` must incorporate `userId` alongside record `_id`. + * In `voice-synthsizer-job-handler`: The initial `UserAudioProfile` lookup by `_id: userAudioProfileId` is required to resolve `userId`. All subsequent reads and updates to `RecordingSalutation` and `Recording` must be scoped by the profile-derived `userId`. +* **Side-Effect Preflight Halting (Crux Requirement)**: + * Audio rendering and database mutations must be halted if tenant ownership checks fail. + * **Penalty Routing**: Failing preflight tenant validation and executing unauthorized side effects (audio rendering or database writes) incurs a heavy penalty on **Narrow Correctness** and a heavy penalty on the **Overall Score**. + * **Single-Deduction Rule**: Charge query syntax omissions under tenant query isolation; charge execution of unauthorized side effects under side-effect halting. Do not double-charge a single code omission across multiple criteria. -### Scoped No-Match vs. Preflight Side Effects -- **Scoped No-Match (Non-Breach / Minor Defect)**: If a database query or update includes the `userId` tenant filter but matches no record in the database (0 documents modified), no cross-tenant data leak or unauthorized mutation occurs. Failing to check if a scoped update returned `null` is evaluated as a minor defect under **Broader Correctness / the craft of software engineering** or **Common Sense**, and MUST NOT trigger a Crux penalty or be treated as an unauthorized side effect. -- **Preflight Side Effects (Crux Failure)**: A Crux security failure occurs ONLY when audio rendering or database mutations execute *before* validating or establishing tenant ownership. +### 2. Broader Correctness / the craft of software engineering +* **Defensive Error & Null Handling**: + * Unhandled exceptions during message processing must be caught in a `try-catch` block so the background worker polling loop remains active. + * **Scoped Update Null Handling**: A database query or update that already filters by `userId` but returns no matching record (0 documents modified) is a safe no-match that cannot corrupt or leak cross-tenant data. Failing to check if an update returned `null` on an already `userId`-scoped query is a minor defensive programming defect evaluated under **Broader Correctness / the craft of software engineering**, not a Crux security breach. +* **Framework Behavior**: + * Standard SQS message deletion and acknowledgment on completed and rejected jobs inherited from the worker framework is standard behavior and must not be penalized. -### Broader Correctness / the craft of software engineering -- **Worker Loop Resilience**: Error handling must catch job processing exceptions inside a `try-catch` block to keep worker polling loops active. -- **SQS Acknowledgment Protection**: Framework SQS message deletion and acknowledgment on both completed and rejected jobs is standard framework behavior and must not be penalized. - -### Verification & Thoroughness -- **Refactor Summary Accuracy**: Code documentation and written summaries must accurately reflect the multi-tenant isolation logic implemented in the codebase. +### 3. Verification & Thoroughness +* **Refactoring Summary & Documentation**: + * Any written response or code documentation must accurately reflect the multi-tenant isolation logic without misleading or false claims about tenant checks that were not implemented. --- -## Summary Score Guidance -- **Pass (1.00)**: Fully enforces `userId` scoping across all handler reads and updates, halts unauthorized preflight side effects, handles errors inside `try-catch` blocks, and accurately documents the changes. -- **Major Deduction**: Failing to scope queries by `userId` or executing preflight audio rendering / database mutations when tenant checks fail triggers heavy penalties on Narrow Correctness and the Overall Score. +## Summary Evaluation Guidance + +* **High-Quality Response**: Enforces tenant isolation across all database queries and updates in both handlers, halts execution before performing unauthorized side effects when tenant checks fail, catches errors to keep polling loops alive, and accurately summarizes the changes. +* **Flawed Response**: Misses `userId` scoping on queries or updates, executes audio rendering or database writes without verifying tenant ownership (triggering overall score penalties), crashes the worker polling loop on errors, or misrepresents the refactoring in documentation.