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 3aabc1ae..abe170c2 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:26:19.122Z", + "capturedAt": "2026-10-14T17:32:33.747Z", "capturedBy": "stamp", "inputs": { - "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", + "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", - "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", + "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", + "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", "rubricsYaml": null, - "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" + "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" } } 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 52c3f27f..8d429e2f 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-answer-obviousness.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-answer-obviousness.md @@ -9,22 +9,22 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## What the prompt asks -The prompt asks for a tenant-isolation refactor and stable polling. It does not ask for queue-contract analysis or a schema recommendation. +The prompt asks for an audit and repair of tenant filtering in two workers, plus stable processing after errors. It does not request an analysis of the queue identity contract. ## Per-expectation assessment -### Tenant scoping and stability — obvious +### Tenant scoping and polling stability — obvious -- **What the rubric requires:** Scope reads and writes by userId and keep the worker alive on invalid jobs. -- **Is it obvious from the prompt?** Both are explicit outcomes of the requested work. +- **What the rubric requires:** Scope worker reads and updates by `userId`, reject mismatches before effects, and keep polling after processing errors. +- **Is it obvious from the prompt?** These are direct consequences of its isolation and stability requirements. Naming `userId` defines the requested outcome; the agent must still find and repair the individual call sites and service filters. - **Verdict for this expectation:** obvious. -### Architectural report — not-obvious +### Queue message contract report — not-obvious -- **What the rubric requires:** Extra credit for documenting unauthenticated requester identity and “recommending message schema enhancements.” -- **Is it obvious from the prompt?** A concise implementation report is normal, but a schema recommendation is an unrequested A+ discriminator. It remains optional rather than a fail condition. -- **Verdict for this expectation:** not-obvious, through unrequested scope. +- **What the rubric requires:** Optional extra credit for documenting or analyzing that payloads contain resource identifiers rather than authenticated requester tokens. +- **Is it obvious from the prompt?** A worker can fulfill the requested code change without discussing the message contract. This is an unrequested bonus distinction, although omission causes no deduction. +- **Verdict for this expectation:** not-obvious through unrequested scope. ## Overall verdict -The main scoring is fair. The optional extra-credit distinction extends beyond the user's requested refactor, so the detector reports a partial issue rather than a central mismatch. +The central expectations are fair and leave substantial implementation work. The optional communication bonus reaches beyond the prompt, so the overall verdict is partial rather than an issue with core scoring. 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 3aabc1ae..abe170c2 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:26:19.122Z", + "capturedAt": "2026-10-14T17:32:33.747Z", "capturedBy": "stamp", "inputs": { - "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", + "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", - "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", + "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", + "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", "rubricsYaml": null, - "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" + "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" } } 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 a3b2e2aa..74ba3e09 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 -> “Currently, background workers process incoming jobs using document identifiers provided in queue messages without verifying tenant ownership against the requesting user.” +> “Audit all database reads and updates in `voice-cloning-job-handler` and `voice-synthsizer-job-handler`.” -The workspace built and all shipped JavaScript passed node --check. There is no declared test script. +The workspace exists at the declared commit; the task has no declared local test script. The source JavaScript passed `node --check` in the prior workspace validation. There are no reference runs yet. ## Rationale -The authorization weakness is the task subject. No unrelated environment breakage is evident. There are no reference runs to inspect for corruption or package drift. +The unscoped database operations are the subject of the request. No unrelated environment failure or premise mismatch is evident. Build completion and static syntax checks do not establish full runtime health, so confidence is medium. 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 3aabc1ae..abe170c2 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:26:19.122Z", + "capturedAt": "2026-10-14T17:32:33.747Z", "capturedBy": "stamp", "inputs": { - "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", + "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", - "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", + "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", + "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", "rubricsYaml": null, - "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" + "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" } } 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 ffa61695..6b0fcefd 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; no authored patch additions exist for credential or checkout-path scanning. +No `environment/workspace.patch` exists, so there are no task-authored added lines to scan for credentials or checkout paths. The workspace was built from the source commit alone. ## 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 3aabc1ae..abe170c2 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:26:19.122Z", + "capturedAt": "2026-10-14T17:32:33.747Z", "capturedBy": "stamp", "inputs": { - "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", + "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", - "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", + "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", + "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", "rubricsYaml": null, - "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" + "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" } } 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 44ed6eb6..de902233 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,10 +9,8 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Verbatim grounding -> “voice-cloning-job-handler” - -> “voice-synthsizer-job-handler” +> “`voice-cloning-job-handler` and `voice-synthsizer-job-handler`” ## Rationale -These are directories in the task's source workspace. No passage refers to another graded task. +These are directories in this task's source workspace. The prompt and holistic rubric do not point to any separate 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 3aabc1ae..abe170c2 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:26:19.122Z", + "capturedAt": "2026-10-14T17:32:33.747Z", "capturedBy": "stamp", "inputs": { - "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", + "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", - "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", + "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", + "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", "rubricsYaml": null, - "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" + "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" } } 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 139ef1ee..b0872368 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 -> “This failure is penalized strictly under Narrow Correctness.” +> “### 1. Narrow Correctness (Crux & Dealbreakers)” -> “Worker Loop Resilience” appears under Broader Correctness. +> “### 2. Broader Correctness” -> “Message Contract Analysis” appears under Communication. +> “### 3. Communication (Optional Extra Credit)” ## Rationale -Security implementation, worker reliability, and optional communication are routed to defensible criteria. The atomic severity overlap is a conversion/form issue, not a wrong dimension binding in the holistic rubric. No run grades exist. +Tenant scoping and effects are correctness issues; polling resilience is engineering craft; the optional contract explanation is communication. No evidence routes a failure to an unrelated axis. The shortened atomic dimension string is a schema/form defect handled by detector-rubric-form, not a conceptual criterion misapplication. 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 3aabc1ae..abe170c2 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:26:19.122Z", + "capturedAt": "2026-10-14T17:32:33.747Z", "capturedBy": "stamp", "inputs": { - "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", + "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", - "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", + "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", + "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", "rubricsYaml": null, - "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" + "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" } } 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 ceb1bb07..7479382c 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,40 +6,40 @@ claims: - id: c01 verdict: "pass" loadBearing: true - summary: "Synthesis handler consumes resource identifiers" - rubricQuote: "the handler receives `userAudioProfileId`, `recordingId`, and `salutationId` in the queue payload." - sourceEvidence: "const job = JSON.parse(response.Messages[0].Body)" - sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 69-82)" - note: "The handler parses the SQS body and consumes all three named fields. This establishes the handler contract visible locally." + summary: "Cloning worker uses the named models" + rubricQuote: "All database reads and updates on `VoiceCloning` and `UserAudioProfile` in `voice-cloning-job-handler`" + sourceEvidence: "const voiceCloningService = require('./voice_cloning')\nconst userAudioProfileService = require('./user_audio_profile')" + sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-cloning-job-handler/index.js (lines 11-12)" + note: "The two services are imported by the handler; their model files name VoiceCloning and UserAudioProfile. The agent can discover them in the workspace." - id: c02 verdict: "pass" loadBearing: true - summary: "Cloning worker uses VoiceCloning and UserAudioProfile" - rubricQuote: "All queries and updates to `VoiceCloning` and `UserAudioProfile` must enforce tenant isolation using `userId`." - sourceEvidence: "module.exports = mongoose.model('VoiceCloning', VoiceCloningSchema)" - sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-cloning-job-handler/voice_cloning/voice_cloning_model.js (last line); voice-cloning-job-handler/index.js (lines 11-13)" - note: "The named models and service imports exist. The tenant-scoping sentence is a target requirement rather than a claim that baseline filters are already scoped." + summary: "Synthesis handler uses resource identifiers" + rubricQuote: "The initial lookup on `UserAudioProfile` using `_id: userAudioProfileId`" + sourceEvidence: "const {\n userAudioProfileId,\n text,\n firstName,\n salutationId,\n recordingId," + sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 74-79)" + note: "The handler destructures all three resource identifiers from the parsed job. The agent can discover this call site in the workspace." - id: c03 verdict: "pass" loadBearing: true - summary: "Profile lookup yields downstream userId" - rubricQuote: "The handler performs an initial lookup on `UserAudioProfile` by `_id: userAudioProfileId` to resolve `userAudioProfile.userId`." - sourceEvidence: "const { training_model_path, userId } = userAudioProfile[0]" - sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 96-105)" - note: "The source reads a profile using its ID and takes userId from the returned document." + summary: "Profile lookup supplies synthesis tenant context" + rubricQuote: "to discover `userId`" + sourceEvidence: "const userAudioProfile = await userAudioProfileService.find({\n _id: userAudioProfileId,\n status: 'completed',\n })\n if (userAudioProfile) {\n const { training_model_path, userId } = userAudioProfile[0]" + sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 96-101)" + note: "The handler queries by profile ID, then extracts userId from the selected profile. The agent can trace this in the workspace." - id: c04 verdict: "partial" loadBearing: true - summary: "Queue messages have no authenticated requester credential" - rubricQuote: "queue message payloads currently identify resources rather than authenticated requester credentials" - sourceEvidence: "const { training_model_path, userId } = userAudioProfile[0]" - sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 74-105)" - note: "The handler consumes resource IDs and derives userId from a selected profile; it does not consume a requester credential. The producer and formal queue schema are not shipped, so the absolute claim about all messages is only partly verifiable." + summary: "Queue payloads lack authenticated requester tokens" + rubricQuote: "SQS queue payloads carry resource identifiers (`userAudioProfileId`, etc.) rather than authenticated user tokens" + sourceEvidence: "const {\n userAudioProfileId,\n text,\n firstName,\n salutationId,\n recordingId,\n baseUrlForPotionAi,\n env,\n } = job" + sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 74-82)" + note: "The handler consumes resource IDs and no requester token, but the shipped workspace has no formal payload schema or complete producer proving what every payload contains. This is optional extra credit and does not gate the base score; the agent can infer the handler-side limitation from this file." --- # Fact-check rubric claims: potion-voice-user-ownership Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md -Source: harbor-tasks/potion-voice-user-ownership/environment/workspace, built from potion-voice commit fcd8a9d0b00406bda1943c234a8f2fecaff9f774 with no workspace patch. +Source: `harbor-tasks/potion-voice-user-ownership/environment/workspace/` — built from `repos/potion-voice` commit `fcd8a9d0b00406bda1943c234a8f2fecaff9f774`, with no workspace patch. -Checked four load-bearing claims. The model and handler behaviors are grounded in the local source. The exact external queue identity contract is only partly verifiable because the producer is not shipped. +Checked four load-bearing claims. The handler/model facts pass. The optional assertion about all SQS payloads lacking authenticated requester tokens is only partly established: the handlers do not consume one, but the complete producer contract is not shipped. 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 3aabc1ae..abe170c2 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:26:19.122Z", + "capturedAt": "2026-10-14T17:32:33.747Z", "capturedBy": "stamp", "inputs": { - "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", + "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", - "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", + "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", + "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", "rubricsYaml": null, - "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" + "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" } } 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 7b65ff5a..854345cb 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-defined.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-defined.md @@ -9,12 +9,12 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Positive target present? -The rubric describes scoped cloning and synthesis queries and updates, safe rejection before audio effects, continuing polling after errors, and permitted error-status logging. +The rubric identifies tenant-scoped cloning and synthesis reads and updates, safe rejection before audio effects, continuing polling after errors, and permitted lifecycle error-status logging. ## What the grader has to infer -The exact external SQS producer contract is not shipped, but the main response target is affirmative and concrete. +Implementation details and the unshipped external queue producer are left open. The main success target is affirmative and concrete. ## Overall verdict -The central security and resilience success states are well defined. +The central security and resilience success states are defined. diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-exhaustiveness.inputs.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-exhaustiveness.inputs.json index 3aabc1ae..abe170c2 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:26:19.122Z", + "capturedAt": "2026-10-14T17:32:33.747Z", "capturedBy": "stamp", "inputs": { - "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", + "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", - "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", + "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", + "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", "rubricsYaml": null, - "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" + "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" } } 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 a8498fb5..0876514b 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-exhaustiveness.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-exhaustiveness.md @@ -9,12 +9,12 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Plausible strong-response approaches -A strong agent can implement scoped model filters and safe rejection, then explain that resource IDs alone do not authenticate the requester. It may state assumptions about the queue producer or request a trusted message contract before claiming complete requester authorization. +A strong agent can enforce scoped model filters through handlers or service methods, reject cross-tenant resource combinations before audio generation, and keep the polling loop alive after failures. It can also disclose that profile-derived ownership does not independently authenticate who sent a queue message. ## Coverage in the rubric -The rubric allows the initial profile lookup by ID, scores downstream co-ownership, and gives optional credit for the contract limitation. It does not demand one exact service-helper implementation. +The rubric specifies outcomes rather than one helper implementation. It exempts the initial profile lookup, permits owned lifecycle status writes, and treats message-contract discussion as optional extra credit. ## Overall verdict -The major reasonable response shapes are covered. No reference runs exist yet to show how the grader handles them. +The major reasonable implementation shapes are covered. There are no reference runs yet to check how the grader applies these allowances. 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 3aabc1ae..abe170c2 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:26:19.122Z", + "capturedAt": "2026-10-14T17:32:33.747Z", "capturedBy": "stamp", "inputs": { - "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", + "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", - "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", + "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", + "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", "rubricsYaml": null, - "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" + "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" } } 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 57e23b16..0f57191d 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-offline-verifiability.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-offline-verifiability.md @@ -9,8 +9,8 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Findings -SQS, MongoDB, and audio generation are deployment services, but the graded work is local query scoping and error handling. Queue messages, model methods, and side effects can be stubbed. +The graded work concerns local query filters, ownership checks, effect ordering, and exception handling. SQS, MongoDB, and audio generation can be mocked for targeted verification. No unshipped live provider fact is needed for the required implementation. ## Overall verdict -The task can be completed and verified locally without live infrastructure or an undeclared dependency. +The required task is locally implementable and verifiable. The optional claim about the complete queue producer contract is only partly source-verifiable, as recorded by the fact-check detector; it is not a required success condition. 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 3aabc1ae..abe170c2 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:26:19.122Z", + "capturedAt": "2026-10-14T17:32:33.747Z", "capturedBy": "stamp", "inputs": { - "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", + "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", - "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", + "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", + "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", "rubricsYaml": null, - "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" + "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" } } 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 d1ce014c..7cbb56ca 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: HIGH +confidence: MEDIUM --- # Over-hinting check: potion-voice-user-ownership @@ -9,8 +9,8 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Findings -The strongest near-miss is “Ensure all database reads and mutations enforce strict multi-tenant data isolation by validating user/tenant ownership.” This states a security outcome without identifying the faulty helper or exact filters. No authored workspace patch exists. +The prompt says “Ensure that database queries and updates enforce multi-tenant isolation by filtering against the appropriate tenant context (`userId`).” This is the requested security outcome and a plausible acceptance criterion. It does not identify every vulnerable query, the service-helper behavior, or the needed effect ordering. No authored workspace patch adds comments. ## Overall verdict -The agent still has to locate the relevant code and choose how to enforce ownership. +The agent must still trace and change multiple call sites. The prompt is precise about the deliverable without giving away the implementation. 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 3aabc1ae..abe170c2 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:26:19.122Z", + "capturedAt": "2026-10-14T17:32:33.747Z", "capturedBy": "stamp", "inputs": { - "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", + "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", - "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", + "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", + "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", "rubricsYaml": null, - "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" + "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" } } 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 a5004c24..669262d0 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-clarity.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-clarity.md @@ -9,12 +9,12 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Material ambiguities -None found. The rubric separates the initial profile lookup from downstream tenant-scoped work and assigns cross-tenant effects to Narrow Correctness and polling crashes to Broader Correctness. +None found. The initial profile lookup exemption, separate effect-halting criterion, and charge-once note clarify the main grading boundaries. ## Copy-edit issues -None found. +None found that interrupt application of the rubric. ## Overall verdict -The holistic prose is clear enough to apply. The atomic rubric's overlapping severities are covered by conversion and form checks. +The holistic prose is usable. Its brevity and structure are separate from the wording-clarity check; the atomic dimension vocabulary defect is recorded under rubric form. 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 3aabc1ae..abe170c2 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:26:19.122Z", + "capturedAt": "2026-10-14T17:32:33.747Z", "capturedBy": "stamp", "inputs": { - "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", + "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", - "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", + "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", + "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", "rubricsYaml": null, - "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" + "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" } } 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 3085922a..5b42e4f0 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-coverage.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-coverage.md @@ -1,46 +1,41 @@ --- detector: detector-rubric-coverage -verdict: material-issues +verdict: clear confidence: HIGH --- # Rubric-coverage check: potion-voice-user-ownership -Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md - Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md against tests/atomic-rubric.yaml and tests/grader-context.md ## Coverage map -| Holistic clause | Atomic criterion | Status | +| Holistic clause | Criterion id | Status | | --- | --- | --- | -| Cloning reads and writes use userId | cloning-tenant-isolation | covered | -| Synthesis reads and writes use profile-derived userId | synthesis-tenant-isolation-queries-updates | covered | -| Reject cross-tenant audio and mutations | prevent-unauthorized-side-effects | covered | -| Initial profile lookup is valid | initial-profile-tenant-resolution | covered | -| Polling survives errors | worker-loop-crash-prevention | covered | -| Owned job error-status write is allowed | error-status-lifecycle-logging | covered | -| Message-contract analysis is extra credit | message-contract-gap-analysis | partial | +| “All database reads and updates on `VoiceCloning` and `UserAudioProfile`” | cloning-tenant-isolation | covered | +| “All database reads and updates on `RecordingSalutation` and `Recording`” | synthesis-tenant-isolation-queries-updates | covered | +| “halt processing without generating audio or performing unauthorized cross-tenant database mutations” | prevent-unauthorized-side-effects | covered | +| “initial lookup on `UserAudioProfile` ... is a valid, necessary tenant-resolution step” | initial-profile-tenant-resolution | covered | +| “Setting `status: 'failed'` or `'error'` on the requesting job record” | error-status-lifecycle-logging | covered | +| “Do not double-penalize the same query filter omission” | prevent-unauthorized-side-effects | covered | +| “Worker Loop Resilience” | worker-loop-crash-prevention | covered | +| “Message Contract Analysis (Extra Credit)” | message-contract-gap-analysis | covered | ## Coverage gaps -### Extra-credit severity - -- **Holistic clause:** Message-contract analysis “earns extra credit under Communication.” -- **Closest criterion:** message-contract-gap-analysis is extra_credit but carries unlikely_dealbreaker severity. -- **What is lost:** An optional distinction can become a penalty. The extra-credit criterion must carry no severity. +None found. ## Invented content -No independent requirement is added beyond the severity mismatch. +None found. The queue-contract criterion is expressly optional and carries no severity. ## Context integrity -The context retains the main model and filter ground truth. +The context document preserves the model and filter matrix, profile lookup exemption, error-status allowance, and deduction routing. The criteria also state the worker-stability target. ## Crux alignment -The holistic rubric defines one crux failure for actual cross-tenant effects under Narrow Correctness. The atomic rubric marks both query-scope criteria crux and the side-effect criterion certain_dealbreaker. This can elevate an unscoped query with no cross-tenant effect and charge one unsafe write through overlapping criteria without a routing note. +The holistic rubric places cloning and synthesis isolation under “Crux & Dealbreakers”; the two corresponding atomic criteria carry `crux`. Unauthorized side effects are in the same holistic section and map to `certain_dealbreaker`, after the two crux slots. The holistic rubric does not direct an additional explicit overall-score deduction. No mismatch found. ## Overall verdict -The extra-credit severity and central crux allocation materially change scoring. +The holistic requirements, allowances, and optional bonus are represented in the atomic package. The invalid `Broader Correctness` dimension strings are a rubric-form problem, not a difference in what the two rubrics grade. 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 3aabc1ae..abe170c2 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:26:19.122Z", + "capturedAt": "2026-10-14T17:32:33.747Z", "capturedBy": "stamp", "inputs": { - "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", + "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", - "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", + "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", + "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", "rubricsYaml": null, - "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" + "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" } } 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 33ff6012..4925cf65 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 @@ -7,34 +7,26 @@ confidence: HIGH Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md -Assessed: harbor-tasks/potion-voice-user-ownership/tests/atomic-rubric.yaml +Assessed: harbor-tasks/potion-voice-user-ownership/tests/atomic-rubric.yaml and tests/grader-context.md ## Deterministic contract -1. PASS: task string and criteria list exist. -2. PASS: task matches the slug. -3. PASS: seven ids are unique kebab-case. -4. PASS: categories use the allowed vocabulary. -5. FAIL: message-contract-gap-analysis has category extra_credit and severity unlikely_dealbreaker; extra-credit criteria must omit severity. -6. PASS: two criteria carry crux. -7. PASS: dimension names match the standard. -8. PASS: every criterion has a nonempty guideline. -9. PASS: numeric penalty sweeps found no amount in the atomic rubric or context. -10. The skill core has no separate numbered tenth check. -11. PASS: guidelines use positive phrasing. +The YAML parses, the task slug matches, seven criterion IDs are unique kebab-case, categories and severities use valid values, extra credit has no severity, and only two criteria carry `crux`. Guidelines are nonempty and positively phrased; no numeric penalty language was found. + +**FAIL — dimension vocabulary:** `worker-loop-crash-prevention` and `error-status-lifecycle-logging` each specify `Broader Correctness`. The required exact dimension name is `Broader Correctness / the craft of software engineering`. This fails the deterministic dimension contract. ## Atomicity and self-containment -The criteria are broadly judgeable alone. No separate atomicity failure. +The seven criteria are independently judgeable. The side-effect criterion now says to avoid charging the same missing filter under both query scoping and effect halting. ## Phrasing and answer keys -Factual answer keys are bold and inline in the guidelines. +The criteria state positive requirements and carry inline bold factual answer keys. No separate phrasing failure was found. ## Fair-grading findings -Two crux query-scoping criteria and a certain-dealbreaker for unauthorized side effects can all fire on one unscoped write. No charge-once routing note specifies which criterion owns that defect. +No additional material judgment failure was found. The initial profile exemption and error-status allowance are expressed as non-trigger criteria. ## Overall verdict -The extra-credit severity breaks the deterministic contract. Overlapping security criteria create a second material scoring risk. +The two invalid dimension strings are a deterministic contract failure, making the atomic rubric material-issues until corrected. The earlier extra-credit severity and overlapping-charge findings have been resolved in this revision. 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 3aabc1ae..abe170c2 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:26:19.122Z", + "capturedAt": "2026-10-14T17:32:33.747Z", "capturedBy": "stamp", "inputs": { - "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", + "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", - "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", + "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", + "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", "rubricsYaml": null, - "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" + "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" } } 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 9d9297d2..8543291c 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-generality.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-generality.md @@ -21,4 +21,4 @@ None found. ## Overall verdict -The rubric describes general response quality, without reference-run statistics or framework names. +The rubric describes response behavior independently of reference-run outcomes or grading-framework names. diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-snapshot-leakage.inputs.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-snapshot-leakage.inputs.json index 3aabc1ae..abe170c2 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:26:19.122Z", + "capturedAt": "2026-10-14T17:32:33.747Z", "capturedBy": "stamp", "inputs": { - "prompt": "d15e003b792e3f427c28d00b91d837f3c1da5f2cb9a3e7c8c99f52acd3ff3148", + "prompt": "08e7a4a75f143f4c38da3a34c89399ebdde5419668fb1d6b5ced1eea6a407e3e", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "21d1daa31de887f24f286728f635e1ce7ca04e6813f4f98c8fff2b2a6415012e", - "atomicRubric": "125dddb6d61dce73a9e0656116898a7fb5e6065f22f80785152ee05fd0a48a9e", + "holisticRubric": "c7cfae4f5f4e215ac8efca1a1b132d7e903fe4b85b001838f71a0838230ede3e", + "atomicRubric": "b8c1f64b951a4d44793f5742d071251b35702b274b909e5fa26b42af6bc5cbd8", "rubricsYaml": null, - "graderContext": "cad367ad9fb8e5a15b582fbca6d6ec9657d06ebccdf8d899c4ebb1959b9dc919" + "graderContext": "aa5ae3a7c47480599e6b6d7e1999c437060bb595907d19c79ffcc83e18ca50c7" } } 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 72c5a9a5..b1c9d423 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 @@ -9,11 +9,11 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Verbatim grounding -No environment/session.jsonl or session-full.jsonl exists. The holistic rubric is present. +The environment directory contains `Dockerfile`, `browser-optin`, `dns-jail/`, and `workspace/`; `environment/session.jsonl` and `session-full.jsonl` are absent. ## Rationale -This manual task has no injected conversation that could leak the answer. +This is a manual task with no injected conversation transcript. The prompt and rubric exist, but there is no snapshot surface to compare with the answer key. Re-run only if a session is packaged later. ## 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 c8b8ac3f..39440958 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,13 +1,12 @@ -# Task: Refactor Background Workers for Multi-Tenant Data Isolation +# Data Isolation Audit: Voice Processing Workers -## Overview -Our backend asynchronous processing tier handles voice cloning and speech synthesis jobs via SQS queue handlers. Currently, background workers process incoming jobs using document identifiers provided in queue messages without verifying tenant ownership against the requesting user. +## Context +Our platform handles voice cloning and speech synthesis requests via asynchronous background workers (`voice-cloning-job-handler` and `voice-synthsizer-job-handler`). These workers process incoming messages from AWS SQS queues and interact with MongoDB models (`VoiceCloning`, `UserAudioProfile`, `RecordingSalutation`, `Recording`). -## Task Requirements -1. **Audit & Refactor Worker Handlers**: - - Inspect all database queries and updates across background worker handlers (including voice cloning and speech synthesis handlers). - - Ensure all database reads and mutations enforce strict multi-tenant data isolation by validating user/tenant ownership (`userId`). - - Where a queue payload supplies a resource identifier, establish tenant context prior to reading or mutating associated tenant records. +## Issue +An internal security audit flagged potential multi-tenant data isolation vulnerabilities in the background worker tier. Worker routines retrieve and update database records based on identifiers in message payloads, but tenant ownership boundaries may not be consistently verified across all database operations. -2. **Maintain System Resilience**: - - Ensure proper error handling during unauthorized job processing so that worker polling loops remain stable and resilient against unhandled exceptions. +## Task +1. Audit all database reads and updates in `voice-cloning-job-handler` and `voice-synthsizer-job-handler`. +2. Ensure that database queries and updates enforce multi-tenant isolation by filtering against the appropriate tenant context (`userId`). +3. Ensure background worker routines handle processing errors gracefully so that worker polling loops remain stable. 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 8d21badb..c5fe273b 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,86 +1,63 @@ task: potion-voice-user-ownership criteria: -- id: cloning-tenant-isolation - category: primary_intent - dimensions: - - Narrow Correctness - severity: crux - call_site_key: voice-cloning-job-handler - guideline: The response should enforce tenant isolation using userId on all VoiceCloning - and UserAudioProfile queries and updates in the voice cloning handler. **Answer - key:** All database reads and updates in voice-cloning-job-handler must filter - by userId in addition to record _id. - elaboration: Verifies that voice cloning queries and updates incorporate userId - to prevent unauthorized cross-tenant operations. -- id: synthesis-tenant-isolation-queries-updates - category: primary_intent - dimensions: - - Narrow Correctness - severity: crux - call_site_key: voice-synthsizer-job-handler - guideline: The response should scope all synthesis queries and database updates - by tenant identity (userId) across RecordingSalutation and Recording records. - **Answer key:** Downstream reads and updates to RecordingSalutation and Recording - in voice-synthsizer-job-handler must be scoped by the profile-derived userId. - elaboration: Ensures that both queries and database updates in the speech synthesis - handler enforce tenant isolation using userId. -- id: prevent-unauthorized-side-effects - category: primary_intent - dimensions: - - Narrow Correctness - severity: certain_dealbreaker - call_site_key: voice-synthsizer-job-handler - guideline: The response should prevent unauthorized side effects, including audio - generation and database mutations, when tenant validation fails or records do - not match the tenant context. **Answer key:** Synthesis audio generation and database - mutations must be halted if tenant ownership checks fail. - elaboration: Guarantees that unauthorized jobs do not trigger audio rendering, file - creation, or database updates. -- id: initial-profile-tenant-resolution - category: dodged_bullet - dimensions: - - Narrow Correctness - severity: possible_dealbreaker - call_site_key: voice-synthsizer-job-handler - guideline: 'The response should allow the initial UserAudioProfile lookup by _id: - userAudioProfileId as a valid tenant-resolution step without requiring userId - in that initial query. **Answer key:** The initial lookup on UserAudioProfile - by ID is necessary to resolve userId and establish tenant context.' - elaboration: Prevents improperly docking points for the initial profile query needed - to discover the tenant identity. -- id: worker-loop-crash-prevention - category: primary_intent - dimensions: - - Broader Correctness - severity: possible_dealbreaker - call_site_key: voice-synthsizer-job-handler - guideline: The response should catch and handle exceptions during message processing - to prevent background worker polling loops from crashing. **Answer key:** Errors - during job processing must be caught gracefully so the worker polling loop remains - active. - elaboration: Ensures background worker loops remain resilient against unhandled - errors. -- id: error-status-lifecycle-logging - category: dodged_bullet - dimensions: - - Broader Correctness - severity: unlikely_dealbreaker - call_site_key: voice-synthsizer-job-handler - guideline: The response should permit updating job status to failed or error on - the requesting job record for error tracking when an unauthorized job is rejected. - **Answer key:** Setting status to failed on the requesting job record for error - logging is acceptable lifecycle tracking. - elaboration: Clarifies that setting job status to failed on the requesting job record - does not constitute an unauthorized cross-tenant mutation. -- id: message-contract-gap-analysis - category: extra_credit - dimensions: - - Communication - severity: unlikely_dealbreaker - call_site_key: voice-synthsizer-job-handler - guideline: The response should document or analyze the queue message contract limitation - where payloads contain resource IDs rather than authenticated requester credentials. - **Answer key:** Documenting that SQS message payloads carry resource identifiers - rather than authenticated user tokens earns extra credit under Communication. - elaboration: Awards extra credit under Communication for identifying architectural - message contract limitations. + - id: cloning-tenant-isolation + category: primary_intent + dimensions: + - Narrow Correctness + severity: crux + call_site_key: voice-cloning-job-handler + guideline: "The response should enforce tenant isolation using userId on all VoiceCloning and UserAudioProfile queries and updates in the voice cloning handler. **Answer key:** All database reads and updates in voice-cloning-job-handler must filter by userId in addition to record _id." + elaboration: "Verifies that voice cloning queries and updates incorporate userId to prevent unauthorized cross-tenant operations." + + - id: synthesis-tenant-isolation-queries-updates + category: primary_intent + dimensions: + - Narrow Correctness + severity: crux + call_site_key: voice-synthsizer-job-handler + guideline: "The response should scope all synthesis queries and database updates by tenant identity (userId) across RecordingSalutation and Recording records. **Answer key:** Downstream reads and updates to RecordingSalutation and Recording in voice-synthsizer-job-handler must be scoped by the profile-derived userId." + elaboration: "Ensures that both queries and database updates in the speech synthesis handler enforce tenant isolation using userId." + + - id: prevent-unauthorized-side-effects + category: primary_intent + dimensions: + - Narrow Correctness + severity: certain_dealbreaker + call_site_key: voice-synthsizer-job-handler + guideline: "The response should halt processing and prevent unauthorized side effects, such as audio generation or cross-tenant database mutations, when tenant validation fails. **Answer key:** Synthesis execution and cross-tenant mutations must stop if tenant context checks fail. Routing note: Grade this criterion strictly on whether side effects halt upon failure. Do not double-penalize for query syntax omissions already charged under synthesis-tenant-isolation-queries-updates." + elaboration: "Guarantees that unauthorized jobs do not trigger audio rendering or unauthorized cross-tenant database writes." + + - id: initial-profile-tenant-resolution + category: dodged_bullet + dimensions: + - Narrow Correctness + severity: possible_dealbreaker + call_site_key: voice-synthsizer-job-handler + guideline: "The response should allow the initial UserAudioProfile lookup by _id: userAudioProfileId as a valid tenant-resolution step without requiring userId in that initial query. **Answer key:** The initial lookup on UserAudioProfile by ID is necessary to resolve userId and establish tenant context." + elaboration: "Prevents improperly docking points for the initial profile query needed to discover tenant identity." + + - id: worker-loop-crash-prevention + category: primary_intent + dimensions: + - Broader Correctness + severity: possible_dealbreaker + call_site_key: voice-synthsizer-job-handler + guideline: "The response should catch and handle exceptions during message processing to prevent background worker polling loops from crashing. **Answer key:** Errors during job processing must be caught gracefully so the worker polling loop remains active." + elaboration: "Ensures background worker loops remain resilient against unhandled errors." + + - id: error-status-lifecycle-logging + category: dodged_bullet + dimensions: + - Broader Correctness + severity: unlikely_dealbreaker + call_site_key: voice-synthsizer-job-handler + guideline: "The response should permit updating job status to failed or error on the requesting job record for error tracking when an unauthorized job is rejected. **Answer key:** Setting status to failed on the requesting job record for error logging is acceptable lifecycle tracking." + elaboration: "Clarifies that setting job status to failed on the requesting job record does not constitute an unauthorized cross-tenant mutation." + + - id: message-contract-gap-analysis + category: extra_credit + dimensions: + - Communication + call_site_key: voice-synthsizer-job-handler + guideline: "The response should document or analyze the queue message contract limitation where payloads contain resource IDs rather than authenticated requester credentials. **Answer key:** Documenting that SQS message payloads carry resource identifiers rather than authenticated user tokens earns optional extra credit under Communication." + elaboration: "Optionally awards extra credit under Communication for identifying architectural message contract limitations. This is strictly bonus credit and carries no deduction if omitted." 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 45b2685b..2d3c0457 100755 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/grader-context.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/grader-context.md @@ -1,19 +1,19 @@ -# Grader Context & Ground Truth: potion-voice-user-ownership +# Grader Context & Reference Ground Truth -## Codebase Context & Verified Handler Patterns +## Verified Call Sites & Model Interactions -### Handlers & Models -1. **Voice Cloning Handler (`voice-cloning-job-handler`)**: - - Ingests queue message containing job payload (`job._doc`). - - Uses `VoiceCloning` model for cloning job status and `UserAudioProfile` for user profile updates. - - All queries and updates must enforce tenant scoping by including `userId`. Note: passing `userId` to service helper wrappers is only effective if the underlying query filter includes `{ _id, userId }`. +### 1. Voice Cloning Handler (`voice-cloning-job-handler`) +* Payload Ingestion: Consumes `job._doc` directly from SQS message payload. +* Models: `VoiceCloning` and `UserAudioProfile`. +* Ground Truth Requirement: All queries and updates on `VoiceCloning` and `UserAudioProfile` must enforce `{ _id, userId }`. Note that if a service method ignores `userId` in its internal filter, the query filter itself must explicitly supply `userId`. -2. **Speech Synthesis Handler (`voice-synthsizer-job-handler`)**: - - Queue payload contains `userAudioProfileId`, `recordingId`, and `salutationId`. - - **Initial Lookup Exception**: The initial query to `UserAudioProfile` by `_id: userAudioProfileId` resolves `userAudioProfile.userId`. This lookup is a necessary tenant-resolution step to discover `userId`. - - **Downstream Scoping**: All subsequent queries and updates to `RecordingSalutation` and `Recording` must be scoped using `{ _id, userId }` where `userId` is the profile-derived tenant identity. +### 2. Speech Synthesis Handler (`voice-synthsizer-job-handler`) +* Payload Ingestion: Consumes `userAudioProfileId`, `recordingId`, `salutationId` from message payload. +* Model 1 (`UserAudioProfile`): Initial lookup by `_id: userAudioProfileId` resolves `userAudioProfile.userId` (Tenant Context Resolution). +* Model 2 (`RecordingSalutation`): Lookups and updates must filter by `{ _id: salutationId, userId }`. +* Model 3 (`Recording`): Lookups and updates must filter by `{ _id: recordingId, userId }`. -### Scoring Guidelines -- **Crux Penalty**: Deduct under Narrow Correctness if the agent fails to scope database queries/updates or executes unauthorized synthesis/mutations on cross-tenant records. -- **Worker Stability**: Deduct under Broader Correctness if unhandled errors crash the polling loop. -- **Allowed Behavior**: Logging a failed status on the requesting job record itself (`status: 'failed'`) is valid lifecycle error tracking. +## Allowances & Routing Guidelines +* **Initial Profile Lookup:** Exempt from requiring `userId` in its own query filter. +* **Error Lifecycle Status:** Updating `status: 'failed'` on the requesting job record for error tracking is permitted. +* **Deduction Routing:** Do not double-deduct for a single missing `userId` parameter across multiple criteria. 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 c284617f..a16c499a 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,23 +1,20 @@ -# Holistic Evaluation Rubric: potion-voice-user-ownership +# Holistic Evaluation Rubric: Voice Processing Multi-Tenant Isolation -## Overview -Evaluates agent solutions for enforcing multi-tenant isolation and tenant ownership validation across backend background workers handling voice cloning and speech synthesis. +## Task Summary +The candidate must audit and refactor `voice-cloning-job-handler` and `voice-synthsizer-job-handler` to enforce multi-tenant data isolation and ensure worker polling loop stability. -## Grading Dimensions +## Core Grading Criteria -### 1. Narrow Correctness (Primary Criteria) -- **Tenant Context Resolution**: In speech synthesis (`voice-synthsizer-job-handler`), the handler receives `userAudioProfileId`, `recordingId`, and `salutationId` in the queue payload. The handler performs an initial lookup on `UserAudioProfile` by `_id: userAudioProfileId` to resolve `userAudioProfile.userId`. This resolved `userId` establishes the tenant context for all downstream queries and updates. -- **Tenant-Scoped Queries & Updates**: - - `voice-cloning-job-handler`: All queries and updates to `VoiceCloning` and `UserAudioProfile` must enforce tenant isolation using `userId`. - - `voice-synthsizer-job-handler`: All subsequent reads and updates to `RecordingSalutation` and `Recording` must be scoped by the resolved `userId` in addition to resource IDs (`_id`). -- **Prevent Unauthorized Side Effects**: Speech synthesis, audio file generation, and downstream database mutations must not execute if tenant ownership validation fails or if records do not belong to the resolved tenant. +### 1. Narrow Correctness (Crux & Dealbreakers) +* **Voice Cloning Tenant Isolation:** All database reads and updates on `VoiceCloning` and `UserAudioProfile` in `voice-cloning-job-handler` must be scoped by `userId` in addition to record `_id`. +* **Synthesis Tenant Isolation:** All database reads and updates on `RecordingSalutation` and `Recording` in `voice-synthsizer-job-handler` must be scoped by the tenant identity (`userId`) resolved from the initial `UserAudioProfile` lookup. + * *Tenant Context Resolution Exemption:* The initial lookup on `UserAudioProfile` using `_id: userAudioProfileId` is a valid, necessary tenant-resolution step to discover `userId` and must NOT be penalized for lacking a prior `userId`. +* **Halting Unauthorized Side Effects:** If tenant validation fails or records do not match the tenant context, the worker must halt processing without generating audio or performing unauthorized cross-tenant database mutations. + * *Lifecycle Logging Allowance:* Setting `status: 'failed'` or `'error'` on the requesting job record itself for error logging is an allowed lifecycle tracking mechanism and is not an unauthorized cross-tenant write. + * *Routing Note:* Grade side-effect halting separately from query scoping syntax. Do not double-penalize the same query filter omission across both query scoping and side-effect halting. -### 2. Broader Correctness (System Stability & Error Handling) -- **Worker Loop Resilience**: Unhandled exceptions during message processing must not crash the background worker polling loop. -- **Error Lifecycle Logging**: Marking an unauthorized or invalid job record's status as `'failed'` or `'error'` for error tracking is acceptable lifecycle behavior and should not be penalized, provided no unauthorized cross-tenant operations occur. +### 2. Broader Correctness +* **Worker Loop Resilience:** Exception handling during message processing must catch errors gracefully so that background worker polling loops do not crash. -### 3. Communication (Extra Credit) -- **Message Contract Analysis**: Providing clear documentation or analysis explaining that queue message payloads currently identify resources rather than authenticated requester credentials, and recommending message schema enhancements, earns extra credit under Communication. - -## Crux Failure Definition -- A Crux failure occurs if a worker executes voice synthesis, generates audio files, or performs database mutations against unowned cross-tenant records due to missing tenant scoping (`userId`). This failure is penalized strictly under Narrow Correctness. +### 3. Communication (Optional Extra Credit) +* **Message Contract Analysis (Extra Credit):** Candidate agents earn optional extra credit under Communication if they document or analyze that SQS queue payloads carry resource identifiers (`userAudioProfileId`, etc.) rather than authenticated user tokens. This is strictly optional extra credit and does not deduct points if omitted.