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 814680be..34a5714b 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:38:51.161Z", + "capturedAt": "2026-10-14T17:46:13.035Z", "capturedBy": "stamp", "inputs": { - "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", + "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", - "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", + "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff", + "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d", "rubricsYaml": null, - "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" + "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e" } } 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 ae569510..3ea3bc27 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-answer-obviousness.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-answer-obviousness.md @@ -1,6 +1,6 @@ --- detector: detector-answer-obviousness -verdict: partial +verdict: obvious confidence: MEDIUM --- # Answer-obviousness check: potion-voice-user-ownership @@ -9,22 +9,22 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## What the prompt asks -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. +The prompt asks for multi-tenant isolation in two worker handlers and resilient error handling. It leaves implementation details to the agent. ## Per-expectation assessment -### Isolation and worker stability — obvious +### Tenant-scoped operations and safe side effects — obvious -- **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. +- **What the rubric requires:** Tenant filters on worker records, rejection before cross-tenant effects, and an initial profile lookup to derive the downstream tenant context. +- **Is it obvious from the prompt?** These implement its isolation objective. The profile lookup is discoverable in source; the rubric exempts that first lookup rather than requiring an unseen credential field. - **Verdict for this expectation:** obvious. -### Security-boundary documentation — not-obvious +### Worker resilience and accurate explanation — obvious -- **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. +- **What the rubric requires:** Keep polling after processing errors and describe implemented isolation accurately when explaining it. +- **Is it obvious from the prompt?** Stable error handling is explicit, and accurate description follows ordinary communication standards. The rubric does not require a separate documentation artifact. +- **Verdict for this expectation:** obvious. ## Overall verdict -Core scoring follows the request. The extra-credit item is a secondary unrequested expectation, so the verdict is partial. +No scored expectation requires a contested resolution or unrequested deliverable. The prompt states goals without revealing individual service-filter defects. 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 814680be..34a5714b 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:38:51.161Z", + "capturedAt": "2026-10-14T17:46:13.035Z", "capturedBy": "stamp", "inputs": { - "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", + "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", - "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", + "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff", + "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d", "rubricsYaml": null, - "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" + "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e" } } 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 05998ed5..b398910a 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-broken-dev-env.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-broken-dev-env.md @@ -9,10 +9,10 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Verbatim grounding -> “A security audit revealed that database queries within these worker handlers retrieve and update records using document identifiers without consistently validating tenant ownership (`userId`).” +> “Our backend background workers currently process voice cloning and speech synthesis jobs using document identifiers provided in SQS queue messages.” -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. +The declared commit resolves locally and the built workspace contains both named workers. The source JavaScript passes `node --check`; no local test script is declared. There are no reference runs to check for infrastructure termination or package drift. ## Rationale -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. +The unscoped operations are the subject of the request. No unrelated environment failure or prompt/workspace premise mismatch was found. Confidence is medium because syntax checks do not prove deployed integration health. 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 814680be..34a5714b 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:38:51.161Z", + "capturedAt": "2026-10-14T17:46:13.035Z", "capturedBy": "stamp", "inputs": { - "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", + "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", - "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", + "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff", + "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d", "rubricsYaml": null, - "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" + "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e" } } 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 d34c9892..0c0eebe6 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-credential-leakage.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-credential-leakage.md @@ -9,7 +9,7 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Findings -There is no `environment/workspace.patch`, so there are no task-authored patch additions to scan for secrets or authoring-machine paths. +There is no `environment/workspace.patch`; no task-authored patch additions are available for credential or checkout-path scanning. ## Overall verdict diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-cross-task-reference.inputs.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-cross-task-reference.inputs.json index 814680be..34a5714b 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:38:51.161Z", + "capturedAt": "2026-10-14T17:46:13.035Z", "capturedBy": "stamp", "inputs": { - "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", + "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", - "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", + "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff", + "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d", "rubricsYaml": null, - "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" + "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e" } } 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 37c74e14..9b1d7d81 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 -> “background worker handlers (`voice-cloning-job-handler` and `voice-synthsizer-job-handler`)” +> “`voice-cloning-job-handler` (`VoiceCloning`, `UserAudioProfile`) and `voice-synthsizer-job-handler` (`RecordingSalutation`, `Recording`)” ## Rationale -The named handlers are directories in this source workspace. The prompt and resolved rubric do not reference another graded task. +These names refer to code and models in this task's workspace. Neither the prompt nor the rubric references 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 814680be..34a5714b 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:38:51.161Z", + "capturedAt": "2026-10-14T17:46:13.035Z", "capturedBy": "stamp", "inputs": { - "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", + "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", - "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", + "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff", + "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d", "rubricsYaml": null, - "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" + "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e" } } 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 3b750c38..4da59496 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-dimension-misapplication.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-dimension-misapplication.md @@ -1,7 +1,7 @@ --- detector: detector-dimension-misapplication -verdict: partial-misapplication -confidence: HIGH +verdict: clean +confidence: MEDIUM --- # Dimension-misapplication check: potion-voice-user-ownership @@ -9,10 +9,12 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Verbatim grounding -> “### 2. Broader Correctness / Systemic Impact” +> “### Narrow Correctness” -> “* **Worker Loop Resilience**: Unhandled exceptions during job processing must not crash the worker polling loop.” +> “### Broader Correctness” + +> “### Communication” ## Rationale -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. +Tenant access and effects are routed to Narrow Correctness, polling resilience and lifecycle handling to the engineering-craft criterion, and explanation quality to Communication. “Broader Correctness” is an understandable short heading for the standard's longer name, without inventing a new axis. The strict full-name failure in atomic `dimensions` is handled by rubric-form. No reference-run grades exist to inspect for drift. 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 814680be..34a5714b 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:38:51.161Z", + "capturedAt": "2026-10-14T17:46:13.035Z", "capturedBy": "stamp", "inputs": { - "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", + "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", - "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", + "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff", + "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d", "rubricsYaml": null, - "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" + "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e" } } 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 17a96a2d..5b1fd38b 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,35 +6,35 @@ claims: - id: c01 verdict: "pass" loadBearing: true - 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." + summary: "Cloning handler uses VoiceCloning and UserAudioProfile services" + rubricQuote: "`voice-cloning-job-handler` (`VoiceCloning`, `UserAudioProfile`)" + 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 imported services wrap the named Mongoose models. The agent can trace these imports and model definitions in the workspace." - id: c02 verdict: "pass" loadBearing: true - 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." + summary: "Synthesis handler uses RecordingSalutation and Recording" + rubricQuote: "`voice-synthsizer-job-handler` (`RecordingSalutation`, `Recording`)" + sourceEvidence: "const recordingModel = require('./recording')\nconst recordingSalutationModel = require('./recording_salutation')" + sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 10-11)" + note: "The handler imports the two relevant model modules. The agent can inspect their definitions and call sites in the workspace." - id: c03 verdict: "pass" loadBearing: true - 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`" + summary: "Initial profile lookup yields userId" + rubricQuote: "looking up `UserAudioProfile` by `_id: userAudioProfileId` 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 shipped handler performs the ID lookup and extracts userId. It is reachable from the workspace; the exemption is a scoring judgment about this flow." + note: "The shipped handler looks up the profile by ID and extracts its userId. This flow is reachable in the workspace; the allowance is a grading judgment." - id: c04 verdict: "pass" loadBearing: true - 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." + summary: "Worker has a polling loop" + rubricQuote: "background worker polling loops remain 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)" + note: "The loop exists as stated. The requirement to keep it alive after exceptions is a normative success target, not an assertion that the baseline already does so." --- # 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. 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. +Checked four load-bearing source facts. All are supported by the shipped workspace and reachable to the test agent. Normative tenant-scoping and error-handling requirements were not treated as claims about current behavior. 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 814680be..34a5714b 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:38:51.161Z", + "capturedAt": "2026-10-14T17:46:13.035Z", "capturedBy": "stamp", "inputs": { - "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", + "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", - "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", + "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff", + "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d", "rubricsYaml": null, - "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" + "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e" } } 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 d0fae40c..acdba045 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 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. +The rubric names safe rejection before unauthorized effects, tenant filtering for both worker model sets, continuing polling after errors, a valid initial profile lookup, and permissible lifecycle status writes. ## What the grader has to infer -Specific code changes are left to the agent, but the expected functional behavior is stated affirmatively. +The exact helper implementation is open, but the expected behavior is concrete. The Communication clause asks that any explanation match the implementation. ## Overall verdict -The rubric gives the grader a concrete target for a strong implementation. +A grader can identify what a strong implementation should do. 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 814680be..34a5714b 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:38:51.161Z", + "capturedAt": "2026-10-14T17:46:13.035Z", "capturedBy": "stamp", "inputs": { - "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", + "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", - "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", + "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff", + "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d", "rubricsYaml": null, - "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" + "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e" } } 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 47cf8224..42877c7f 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 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. +An agent can enforce tenant ownership through handler queries, service helpers, or both, and can use the profile lookup to derive downstream ownership context. A careful response may also disclose that profile-derived `userId` does not independently authenticate the sender of an SQS message. ## Coverage in the rubric -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. +The rubric states outcomes rather than prescribing helper structure. It exempts the initial profile query, permits job error-status tracking, and does not penalize a caveat about the queue trust boundary. ## Overall verdict -The major implementation shapes remain creditable. No reference runs yet demonstrate a reasonable alternative being penalized. +The main reasonable implementation shapes can receive credit. No reference runs yet show a strong 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 814680be..34a5714b 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:38:51.161Z", + "capturedAt": "2026-10-14T17:46:13.035Z", "capturedBy": "stamp", "inputs": { - "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", + "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", - "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", + "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff", + "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d", "rubricsYaml": null, - "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" + "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e" } } 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 8567b7bb..3e90f9c3 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 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. +The graded slice is local: model predicates, ownership checks before effects, and exception handling. Queue messages, model methods, and audio rendering can be stubbed for verification. No live external provider is required for the rubric's core success conditions. ## Overall verdict -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. +The requested code changes and meaningful local checks can be completed in the shipped workspace. 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 814680be..34a5714b 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:38:51.161Z", + "capturedAt": "2026-10-14T17:46:13.035Z", "capturedBy": "stamp", "inputs": { - "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", + "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", - "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", + "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff", + "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d", "rubricsYaml": null, - "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" + "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e" } } 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 817ab0f4..5c17ac3b 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-over-hinting.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-over-hinting.md @@ -1,7 +1,7 @@ --- detector: detector-over-hinting verdict: clean -confidence: MEDIUM +confidence: HIGH --- # Over-hinting check: potion-voice-user-ownership @@ -9,8 +9,8 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Findings -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. +The prompt identifies the two handlers and the isolation objective but does not point to individual faulty filters or prescribe an implementation. No authored workspace patch adds solution comments. ## Overall verdict -The agent still has to locate and repair the affected operations. No answer-giving passage or authored code comment was found. +The agent must still locate the affected operations and decide how to enforce ownership and safe effect ordering. 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 814680be..34a5714b 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:38:51.161Z", + "capturedAt": "2026-10-14T17:46:13.035Z", "capturedBy": "stamp", "inputs": { - "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", + "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", - "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", + "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff", + "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d", "rubricsYaml": null, - "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" + "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e" } } 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 2512285c..b57eb3a0 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 in the holistic prose. It separates the initial profile lookup from downstream scoped operations and expressly forbids duplicate deductions for overlapping criteria. +None found. The rubric identifies the side-effect dealbreaker and explicitly says how to avoid charging the same operation again for query syntax. ## Copy-edit issues -None found that prevents consistent reading. +None found that interrupt a reader applying the rubric. ## Overall verdict -The holistic rubric is readable. Whether its charge-once rule and crux weights survive atomic conversion is assessed by rubric coverage and form. +The holistic prose is readable and its charge-once rule is operational. Atomic conversion is reviewed separately. 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 814680be..34a5714b 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:38:51.161Z", + "capturedAt": "2026-10-14T17:46:13.035Z", "capturedBy": "stamp", "inputs": { - "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", + "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", - "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", + "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff", + "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d", "rubricsYaml": null, - "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" + "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e" } } 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 28c1616b..2c59a586 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,34 +11,34 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md agai | Holistic clause | Atomic criterion | Status | | --- | --- | --- | -| 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 | +| “Halting Before Unauthorized Side Effects” | prevent-unauthorized-side-effects | covered | +| “Tenant-Scoped Database Queries & Updates” | cloning-tenant-isolation; synthesis-tenant-isolation-queries-updates | covered | +| “Initial Profile Tenant Resolution Allowance” | initial-profile-tenant-resolution | covered | +| “Routing Note (Charge-Once Rule)” | side-effect and query-scoping elaborations | covered | +| “Worker Polling-Loop Resilience” | worker-loop-crash-prevention | covered | +| “Error Lifecycle Logging Allowance” | error-status-lifecycle-logging | covered | +| “Explanations and inline documentation should accurately describe” | none | missing | ## Coverage gaps -### Charge-once routing +### Communication guidance -- **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. +- **Holistic clause:** “Explanations and inline documentation should accurately describe the multi-tenant isolation approach implemented across the handlers.” (Communication.) +- **Closest criterion:** None. `tests/atomic-rubric.yaml` has no Communication criterion. +- **What is lost:** A response with inaccurate explanations or misleading inline documentation is judged under the holistic rubric's task-specific Communication guidance, but the atomic rubric provides no matching criterion. ## Invented content -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. +No new implementation requirement was found. The query-scoping criteria use `certain_dealbreaker` although the holistic rubric reserves its explicit crux label for unauthorized effects; the charge-once elaborations prevent the same operation from being billed twice. This weighting is strong but not a separate unsupported crux criterion. ## Context integrity -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. +The context document retains the main model/filter facts, the profile-lookup exemption, and the error-status allowance. The charge-once rule is preserved in the atomic elaborations. The missing Communication guidance appears nowhere in the atomic package. ## Crux alignment -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. +The holistic “Crux Criterion — Halting Before Unauthorized Side Effects” maps to `prevent-unauthorized-side-effects` with `severity: crux`. No other atomic criterion has `crux`; no crux mismatch remains. ## Overall verdict -The missing non-trigger and the expanded crux weighting materially change scoring between the two rubric forms. +The Communication guidance is a load-bearing holistic clause missing from the atomic package. The main security requirements and charge-once protection now map correctly. 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 814680be..34a5714b 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:38:51.161Z", + "capturedAt": "2026-10-14T17:46:13.035Z", "capturedBy": "stamp", "inputs": { - "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", + "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", - "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", + "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff", + "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d", "rubricsYaml": null, - "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" + "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e" } } 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 8943a465..704db7fd 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; 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. +The YAML parses; the task slug, six unique kebab-case IDs, category/severity placement, one-crux cap, nonempty guidelines, positive phrasing, and numeric-penalty check pass. -**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. +**FAIL — dimension vocabulary:** `worker-loop-crash-prevention` and `error-status-lifecycle-logging` each use `Broader Correctness`. The atomic schema requires the exact criterion name `Broader Correctness / the craft of software engineering`. ## Atomicity and self-containment -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. +Each criterion is independently judgeable. The charge-once routing notes in the elaborations legitimately refer to the side-effect criterion and avoid duplicate billing. ## Phrasing and answer keys -The factual keys are inline and bold. No separate wording failure was found. +Factual answer keys are inline and bold. No separate phrasing failure was found. ## Fair-grading findings -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. +No additional material form defect was found beyond the two invalid dimension strings. ## Overall verdict -The two invalid dimension strings are deterministic form failures. The overlapping criteria add a material grading risk until their routing is specified. +The two dimension strings break the deterministic contract. The earlier overlap defect has been resolved by charge-once elaborations. 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 814680be..34a5714b 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:38:51.161Z", + "capturedAt": "2026-10-14T17:46:13.035Z", "capturedBy": "stamp", "inputs": { - "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", + "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", - "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", + "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff", + "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d", "rubricsYaml": null, - "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" + "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e" } } 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 98390b2d..4cf4f47e 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 task behavior independently of reference-run outcomes or grading-framework names. +The rubric describes response behavior without reference-run statistics or grading-framework references. 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 814680be..34a5714b 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:38:51.161Z", + "capturedAt": "2026-10-14T17:46:13.035Z", "capturedBy": "stamp", "inputs": { - "prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", + "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", - "atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", + "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff", + "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d", "rubricsYaml": null, - "graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" + "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e" } } 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 e9d482f3..45ea0a5c 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 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. +This manual task has no injected conversation transcript that could reveal the rubric's expected answer. The prompt and rubric are present; a future bundled 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 3a6755c7..e02bad85 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,10 +1,3 @@ -# Background Worker Multi-Tenant Isolation Audit & Refactor +Our backend background workers currently process voice cloning and speech synthesis jobs using document identifiers provided in SQS queue messages. -## 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`). - -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. - -## 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. +Audit and refactor the worker handlers (`voice-cloning-job-handler` and `voice-synthsizer-job-handler`) to enforce multi-tenant data isolation and prevent cross-tenant data access or modification. Ensure that all background operations handle errors gracefully and maintain worker loop resilience. 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 9347e152..8a1e5de4 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,73 @@ 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: synthesis-tenant-isolation-queries-updates +- id: prevent-unauthorized-side-effects 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 + guideline: The response should halt processing before executing voice synthesis, + audio rendering, or database mutations when tenant validation fails or records + do not match the tenant context. **Answer key:** Handlers must halt before side + effects (audio generation and database writes) if tenant verification fails. + elaboration: Crux criterion for multi-tenant isolation. Do not double-charge query + syntax omissions if points are charged here under this side-effects halting rule. +- id: cloning-tenant-isolation + category: primary_intent + dimensions: + - Narrow Correctness + severity: certain_dealbreaker + call_site_key: voice-cloning-job-handler + guideline: The response should scope database queries and updates in the voice cloning + handler using userId alongside record _id. **Answer key:** Reads and updates on + VoiceCloning and UserAudioProfile must filter by userId. + elaboration: Ensures voice cloning operations enforce tenant isolation. Do not charge + if already penalized under prevent-unauthorized-side-effects for the same operation. +- id: synthesis-tenant-isolation-queries-updates 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." - + guideline: The response should scope downstream speech synthesis queries and updates + on RecordingSalutation and Recording using the profile-derived userId. **Answer + key:** Downstream RecordingSalutation and Recording queries and updates must be + filtered by tenant userId. + elaboration: Ensures speech synthesis operations enforce tenant isolation. Do not + charge if already penalized under prevent-unauthorized-side-effects for the same + operation. - 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." - + 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: worker-loop-crash-prevention category: primary_intent dimensions: - - Broader Correctness / Systemic Impact + - 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." - + guideline: The response should catch 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 / Systemic Impact + - 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: 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." + 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. 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 971d2b6e..efd20fd3 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,18 @@ -# Grader Context & Reference Answer Key +# Grader Context & Ground Truth Reference -## Handler Architecture & Ground Truth Call Sites +## Architecture & Handler Behaviors ### 1. Voice Cloning Handler (`voice-cloning-job-handler`) -* **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 })` +- **Queue Payload**: Receives `job._doc` containing `_id`, `userAudioProfileId`, and `userId`. +- **Verified Model Operations**: Reads and updates `VoiceCloning` and `UserAudioProfile` models. +- **Tenant Context**: `userId` is supplied directly in the job message. All queries and updates must include `userId` alongside record `_id`. Note: `voiceCloningService.update` requires explicit query filter object `{ _id, userId }` because passing `userId` as a top-level parameter to certain service wrappers may be ignored by underlying filters. ### 2. Speech Synthesis Handler (`voice-synthsizer-job-handler`) -* **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. +- **Queue Payload**: Receives `userAudioProfileId`, `recordingId`, and `salutationId`. +- **Tenant Context Resolution**: The handler looks up `UserAudioProfile` by `_id: userAudioProfileId` to resolve `userAudioProfile.userId`. This initial profile query is the valid trust anchor that establishes tenant identity (`userId`). +- **Downstream Operations**: Subsequent reads and updates on `RecordingSalutation` and `Recording` must be scoped by `userId` resolved from the profile. +- **Halt Before Side Effects**: If profile lookup fails or downstream records do not match `userId`, the handler must halt before generating audio files or committing database mutations. + +### 3. Error Logging & Worker Resilience +- Setting `status: 'failed'` or `status: 'error'` on the requesting job record for error tracking is standard lifecycle logging and is permitted. +- Exceptions during job processing must be handled gracefully to prevent worker polling loops from crashing. 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 f5f5e68c..5320a06c 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,22 +1,19 @@ -# Holistic Evaluation Rubric: Potion Voice User Ownership +# Holistic Evaluation Rubric -## 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. +## Grading Dimensions ---- +### Narrow Correctness -## Grading Standards & Dimensions +- **Crux Criterion — Halting Before Unauthorized Side Effects**: The primary dealbreaker is executing voice synthesis, audio rendering, or database mutations against unowned cross-tenant records. Handlers must halt execution before producing side effects if tenant validation fails or records do not belong to the tenant. +- **Tenant-Scoped Database Queries & Updates**: Database reads and updates in `voice-cloning-job-handler` (`VoiceCloning`, `UserAudioProfile`) and `voice-synthsizer-job-handler` (`RecordingSalutation`, `Recording`) should incorporate tenant filtering using `userId`. +- **Initial Profile Tenant Resolution Allowance**: In `voice-synthsizer-job-handler`, looking up `UserAudioProfile` by `_id: userAudioProfileId` to resolve `userId` is a valid tenant-resolution step to establish the tenant context for downstream queries. +- **Routing Note (Charge-Once Rule)**: Do not double-penalize. If an agent fails to halt before unauthorized side effects, charge the failure strictly under the Crux criterion. Do not deduct additional points for query syntax omissions on the same operation. -### 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. +### Broader Correctness -### 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. +- **Worker Polling-Loop Resilience**: Unhandled exceptions during message processing must be caught gracefully so that background worker polling loops remain active. +- **Error Lifecycle Logging Allowance**: Updating job status to `'failed'` or `'error'` on the requesting job record itself for lifecycle tracking is acceptable and must not be penalized as an unauthorized cross-tenant mutation. -### 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. +### Communication + +- Explanations and inline documentation should accurately describe the multi-tenant isolation approach implemented across the handlers.