From 14fe92eba52140d557b808a2787187aa35c17317 Mon Sep 17 00:00:00 2001 From: Eric Bell Date: Fri, 16 Oct 2026 12:20:17 -0400 Subject: [PATCH] pre-trial detector run 03 --- .../detector-answer-obviousness.inputs.json | 10 ++-- .../detectors/detector-answer-obviousness.md | 6 +-- .../detector-broken-dev-env.inputs.json | 10 ++-- .../detectors/detector-broken-dev-env.md | 2 +- .../detector-credential-leakage.inputs.json | 10 ++-- .../detector-cross-task-reference.inputs.json | 10 ++-- .../detector-cross-task-reference.md | 2 +- ...ector-dimension-misapplication.inputs.json | 10 ++-- .../detector-dimension-misapplication.md | 10 ++-- ...ector-fact-check-rubric-claims.inputs.json | 10 ++-- .../detector-fact-check-rubric-claims.md | 12 ++--- ...detector-good-response-defined.inputs.json | 10 ++-- .../detector-good-response-defined.md | 2 +- ...r-good-response-exhaustiveness.inputs.json | 10 ++-- .../detector-good-response-exhaustiveness.md | 2 +- ...detector-offline-verifiability.inputs.json | 10 ++-- .../detector-over-hinting.inputs.json | 10 ++-- .../detectors/detector-over-hinting.md | 2 +- .../detector-rubric-clarity.inputs.json | 10 ++-- .../detectors/detector-rubric-clarity.md | 16 ++----- .../detector-rubric-coverage.inputs.json | 10 ++-- .../detectors/detector-rubric-coverage.md | 28 +++++------ .../detector-rubric-form.inputs.json | 10 ++-- .../detectors/detector-rubric-form.md | 30 ++++++------ .../detector-rubric-generality.inputs.json | 10 ++-- .../detector-snapshot-leakage.inputs.json | 10 ++-- .../instruction.md | 25 +++++----- .../tests/atomic-rubric.yaml | 32 ++++++------- .../tests/grader-context.md | 36 +++++++------- .../tests/holistic-rubric.md | 47 +++++++++++-------- .../tests/rubric-criteria.json | 2 +- .../tests/rubric-criteria.md | 4 +- 32 files changed, 207 insertions(+), 201 deletions(-) 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 b7192ebe..00fa8039 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-answer-obviousness.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-answer-obviousness.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-16T16:13:20.095Z", + "capturedAt": "2026-10-16T16:18:46.621Z", "capturedBy": "stamp", "inputs": { - "prompt": "e1f2b9eb2af41073de1fe56b3cbe4753c6959022f287ca9de49da144117bfff4", + "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "a93db93bfc731a598c6f1eb13c42bcae6dec72f725f0a8581cdf540db30b6aec", - "atomicRubric": "0a970248ea40b85a0b84c2084cb646b197f9517a3890c86bd558a5ec62a08109", + "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", + "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", "rubricsYaml": null, - "graderContext": "25fa9f96fa5166859fd6a332951a4c6b25675c350ef512289962b124b7153be9" + "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" } } 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 5a79ba67..76301812 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,7 +9,7 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## What the prompt asks -The prompt requests tenant-scoped cloning and synthesis reads and updates, profile-derived tenant identity for synthesis, preflight halting before unauthorized effects, and resilient worker polling. It does not dictate helper design or the exact code edits. +The prompt requests tenant-scoped cloning and synthesis reads and updates, profile-derived tenant identity for synthesis, halting after failed tenant checks, resilient worker polling, and an accurate description of the refactor. It does not dictate helper design or the exact code edits. ## Per-expectation assessment @@ -19,7 +19,7 @@ The two handler filter rules and the initial profile lookup exemption follow the ### Preflight side-effect gate — obvious -The prompt explicitly asks the agent to halt before rendering or database mutations if tenant context cannot be established or validation fails. The rubric's primary stop requirement is therefore inferable. +The prompt explicitly asks the agent to halt rendering and database mutations if tenant validation fails or records do not match the tenant context. The rubric's primary stop requirement is therefore inferable. ### Polling and accurate summary — obvious @@ -27,4 +27,4 @@ Try-catch resilience is explicit in the prompt. Accurately describing implemente ## Overall verdict -The positively scored expectations are reasonable from the prompt. Scoring arithmetic and the scoped no-match exception have separate clarity and form findings, but this detector finds no mind-reading requirement or unrequested implementation approach. +The positively scored expectations are reasonable from the prompt. The full-score wording and scoped no-match grading have separate clarity and coverage findings; this detector finds no mind-reading requirement or unrequested implementation approach. 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 b7192ebe..00fa8039 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-broken-dev-env.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-broken-dev-env.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-16T16:13:20.095Z", + "capturedAt": "2026-10-16T16:18:46.621Z", "capturedBy": "stamp", "inputs": { - "prompt": "e1f2b9eb2af41073de1fe56b3cbe4753c6959022f287ca9de49da144117bfff4", + "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "a93db93bfc731a598c6f1eb13c42bcae6dec72f725f0a8581cdf540db30b6aec", - "atomicRubric": "0a970248ea40b85a0b84c2084cb646b197f9517a3890c86bd558a5ec62a08109", + "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", + "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", "rubricsYaml": null, - "graderContext": "25fa9f96fa5166859fd6a332951a4c6b25675c350ef512289962b124b7153be9" + "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" } } 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 8a958a75..d35df945 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-broken-dev-env.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-broken-dev-env.md @@ -9,7 +9,7 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Verbatim grounding -> “Currently, database operations on Mongoose models (`VoiceCloning`, `UserAudioProfile`, `RecordingSalutation`, and `Recording`) rely solely on document ObjectIds” +> “An audit revealed that background worker handlers retrieve and mutate MongoDB records using document ObjectIds (`_id`, `userAudioProfileId`, `salutationId`) without verifying that the records belong to the requesting tenant (`userId`).” The cloning worker uses `voiceCloningService.update({ _id, status: 'processing' })` and an ID-only profile update. The synthesis worker reads recording records by ID. Both worker entry files pass `node --check`. diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-credential-leakage.inputs.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-credential-leakage.inputs.json index b7192ebe..00fa8039 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-credential-leakage.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-credential-leakage.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-16T16:13:20.095Z", + "capturedAt": "2026-10-16T16:18:46.621Z", "capturedBy": "stamp", "inputs": { - "prompt": "e1f2b9eb2af41073de1fe56b3cbe4753c6959022f287ca9de49da144117bfff4", + "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "a93db93bfc731a598c6f1eb13c42bcae6dec72f725f0a8581cdf540db30b6aec", - "atomicRubric": "0a970248ea40b85a0b84c2084cb646b197f9517a3890c86bd558a5ec62a08109", + "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", + "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", "rubricsYaml": null, - "graderContext": "25fa9f96fa5166859fd6a332951a4c6b25675c350ef512289962b124b7153be9" + "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" } } 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 b7192ebe..00fa8039 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-cross-task-reference.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-cross-task-reference.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-16T16:13:20.095Z", + "capturedAt": "2026-10-16T16:18:46.621Z", "capturedBy": "stamp", "inputs": { - "prompt": "e1f2b9eb2af41073de1fe56b3cbe4753c6959022f287ca9de49da144117bfff4", + "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "a93db93bfc731a598c6f1eb13c42bcae6dec72f725f0a8581cdf540db30b6aec", - "atomicRubric": "0a970248ea40b85a0b84c2084cb646b197f9517a3890c86bd558a5ec62a08109", + "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", + "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", "rubricsYaml": null, - "graderContext": "25fa9f96fa5166859fd6a332951a4c6b25675c350ef512289962b124b7153be9" + "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" } } 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 5bc43480..2b3b4e52 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-cross-task-reference.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-cross-task-reference.md @@ -9,7 +9,7 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md and ## Verbatim grounding -> “Audit and refactor all database reads and updates across both background handlers” +> “Refactor Background Worker Handlers for Multi-Tenant Data Isolation” ## Rationale diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-dimension-misapplication.inputs.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-dimension-misapplication.inputs.json index b7192ebe..00fa8039 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-dimension-misapplication.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-dimension-misapplication.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-16T16:13:20.095Z", + "capturedAt": "2026-10-16T16:18:46.621Z", "capturedBy": "stamp", "inputs": { - "prompt": "e1f2b9eb2af41073de1fe56b3cbe4753c6959022f287ca9de49da144117bfff4", + "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "a93db93bfc731a598c6f1eb13c42bcae6dec72f725f0a8581cdf540db30b6aec", - "atomicRubric": "0a970248ea40b85a0b84c2084cb646b197f9517a3890c86bd558a5ec62a08109", + "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", + "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", "rubricsYaml": null, - "graderContext": "25fa9f96fa5166859fd6a332951a4c6b25675c350ef512289962b124b7153be9" + "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" } } 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 9747257e..fe69ed5e 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-dimension-misapplication.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-dimension-misapplication.md @@ -1,6 +1,6 @@ --- detector: detector-dimension-misapplication -verdict: clear-misapplication +verdict: clean confidence: HIGH --- # Dimension-misapplication check: potion-voice-user-ownership @@ -9,12 +9,12 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Verbatim grounding -> “A Crux failure ... results in 0 credit for the corresponding Crux criterion and incurs a heavy penalty on the overall score” +> “Failing a Crux preflight side-effect requirement applies a heavy penalty to **Narrow Correctness** and a heavy penalty to the **Overall Score**.” -> “Charge query syntax omissions under query isolation criteria; charge unauthorized preflight side-effect execution under the Crux criteria.” +> “Failing to check if a scoped update returned `null` is evaluated as a minor defect under **Broader Correctness / the craft of software engineering** or **Common Sense**” ## Rationale -The holistic grader scores the eight Grading Standard dimensions. A handler-specific “Crux criterion” is an atomic-rubric item, not one of those dimensions. The rubric directs a load-bearing failure to that noncanonical target without saying how the standard's Narrow Correctness score should be affected. That is Shape X2, a clear criterion misapplication; the overall-score penalty is a separately supported target. +The revised Crux penalty now targets the standard Narrow Correctness dimension and the overall score. Both-place penalties are supported by the shared grading arithmetic. Query filter omissions also belong to Narrow Correctness, while follow-through after a safe no-match result can be assessed as craft or practical judgment. Polling resilience is routed to Broader Correctness. An inaccurate account of unverified code behavior can reasonably be charged to Verification & Thoroughness. -Tenant filter defects otherwise belong to Narrow Correctness, and polling reliability belongs to Broader Correctness. Unverified or misleading claims about what was implemented can reasonably land in Verification & Thoroughness. The finding concerns the named Crux target, not those ordinary routes. +No noncanonical dimension or unsupported Integrity penalty remains. The omission of an atomic criterion for scoped-null follow-through belongs to rubric coverage, not dimension routing. 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 b7192ebe..00fa8039 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-fact-check-rubric-claims.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-fact-check-rubric-claims.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-16T16:13:20.095Z", + "capturedAt": "2026-10-16T16:18:46.621Z", "capturedBy": "stamp", "inputs": { - "prompt": "e1f2b9eb2af41073de1fe56b3cbe4753c6959022f287ca9de49da144117bfff4", + "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "a93db93bfc731a598c6f1eb13c42bcae6dec72f725f0a8581cdf540db30b6aec", - "atomicRubric": "0a970248ea40b85a0b84c2084cb646b197f9517a3890c86bd558a5ec62a08109", + "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", + "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", "rubricsYaml": null, - "graderContext": "25fa9f96fa5166859fd6a332951a4c6b25675c350ef512289962b124b7153be9" + "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" } } 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 0828acb2..891af9d5 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 @@ -7,7 +7,7 @@ claims: verdict: pass loadBearing: true summary: "Cloning baseline updates lack userId filters" - rubricQuote: "All reads and updates on `VoiceCloning` and `UserAudioProfile` within `voice-cloning-job-handler` must explicitly filter by `userId` in addition to document `_id`." + rubricQuote: "All database queries and updates on `VoiceCloning` and `UserAudioProfile` in `voice-cloning-job-handler` must filter by `userId` in addition to document `_id`." sourceEvidence: "await voiceCloningService.update({ _id, status: 'processing' })" sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-cloning-job-handler/index.js (line 139; profile update at lines 140-143)" note: "The ID-only update shows the baseline weakness. The agent can inspect the handler and service locally." @@ -15,7 +15,7 @@ claims: verdict: pass loadBearing: true summary: "Synthesis downstream reads lack tenant filters" - rubricQuote: "downstream queries and updates on `RecordingSalutation` and `Recording` must be scoped by the profile-derived `userId`." + rubricQuote: "Downstream reads and updates on `RecordingSalutation` and `Recording` in `voice-synthsizer-job-handler` must filter by the profile-derived `userId`." sourceEvidence: "const recordingToUpdate = await recordingModel.findOne({\n _id: recordingId,\n deleted: false,\n })" sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 157-160; salutation read lines 152-155; update lines 169-177)" note: "The baseline downstream operations are ID-only. The agent can trace the required change from this workspace." @@ -23,7 +23,7 @@ claims: verdict: pass loadBearing: true summary: "Initial profile lookup resolves userId" - rubricQuote: "The initial query looking up `UserAudioProfile` by `_id: userAudioProfileId` is a valid tenant-resolution step" + rubricQuote: "The initial query on `UserAudioProfile` by `_id: userAudioProfileId` in `voice-synthsizer-job-handler` is a valid tenant-resolution step" sourceEvidence: "const userAudioProfile = await userAudioProfileService.find({\n _id: userAudioProfileId,\n status: 'completed',\n })\n if (userAudioProfile) {\n const { training_model_path, userId } = userAudioProfile[0]" sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 96-101)" note: "The worker derives userId from the profile selected by ID. The prompt also discloses this valid first step." @@ -31,7 +31,7 @@ claims: verdict: pass loadBearing: true summary: "A filtered no-match update mutates no document" - rubricQuote: "If a query includes the `userId` filter but matches no record (0 documents updated), no cross-tenant data is accessed or mutated." + rubricQuote: "If a database query or update includes the `userId` tenant filter but matches no record in the database (0 documents modified), no cross-tenant data leak or unauthorized mutation occurs." sourceEvidence: "const updatedModel = await VoiceCloningModel.findOneAndUpdate(\n { ...filter }," sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-cloning-job-handler/voice_cloning/voice_cloning_service.js (lines 89-90)" note: "Mongoose applies the full filter to the update. A null no-match result changes no matched document. This narrow claim does not establish whether later side effects are safe." @@ -39,7 +39,7 @@ claims: verdict: pass loadBearing: true summary: "Both workers poll" - rubricQuote: "Job processing logic must be wrapped in a `try-catch` block so unhandled exceptions do not crash background worker polling loops." + rubricQuote: "Error handling must catch job processing exceptions inside a `try-catch` block to keep worker polling loops active." sourceEvidence: "while (true) {\n await processQueue()" sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 259-260; cloning equivalent lines 324-325)" note: "Both loop structures exist. Error resilience is the requested result, not an assertion that the baseline already handles all failures." @@ -50,4 +50,4 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md Source: `harbor-tasks/potion-voice-user-ownership/environment/workspace/`, built from locally resolving `repos/potion-voice` commit `fcd8a9d0b00406bda1943c234a8f2fecaff9f774` without a workspace patch. -Checked five load-bearing facts. All are supported by locally reachable source or the ordinary semantics of a filtered Mongoose update. The no-match finding is limited to that query; the rubric's treatment of subsequent work is assessed by rubric clarity. +Checked five load-bearing facts. All are supported by locally reachable source or the ordinary semantics of a filtered Mongoose update. The no-match finding is limited to that query; the missing atomic criterion for unchecked results is assessed by rubric coverage. 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 b7192ebe..00fa8039 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-defined.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-defined.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-16T16:13:20.095Z", + "capturedAt": "2026-10-16T16:18:46.621Z", "capturedBy": "stamp", "inputs": { - "prompt": "e1f2b9eb2af41073de1fe56b3cbe4753c6959022f287ca9de49da144117bfff4", + "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "a93db93bfc731a598c6f1eb13c42bcae6dec72f725f0a8581cdf540db30b6aec", - "atomicRubric": "0a970248ea40b85a0b84c2084cb646b197f9517a3890c86bd558a5ec62a08109", + "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", + "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", "rubricsYaml": null, - "graderContext": "25fa9f96fa5166859fd6a332951a4c6b25675c350ef512289962b124b7153be9" + "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" } } 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 175b35d7..41861b14 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-defined.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-defined.md @@ -13,7 +13,7 @@ Yes. The rubric describes tenant-scoped reads and updates in both handlers, an a ## What the grader has to infer -Exact helper edits and control-flow structure remain open. The target behaviors themselves are affirmative and concrete. The way the holistic rubric assigns zero credit to a handler-specific Crux item is unclear, but that is a scoring-clarity issue, not an absence of positive success states. +Exact helper edits and control-flow structure remain open. The target behaviors themselves are affirmative and concrete. The separate full-score instruction has a scoring-clarity issue, but the rubric does define positive success states. ## Overall verdict diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-exhaustiveness.inputs.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-exhaustiveness.inputs.json index b7192ebe..00fa8039 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-exhaustiveness.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-exhaustiveness.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-16T16:13:20.095Z", + "capturedAt": "2026-10-16T16:18:46.621Z", "capturedBy": "stamp", "inputs": { - "prompt": "e1f2b9eb2af41073de1fe56b3cbe4753c6959022f287ca9de49da144117bfff4", + "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "a93db93bfc731a598c6f1eb13c42bcae6dec72f725f0a8581cdf540db30b6aec", - "atomicRubric": "0a970248ea40b85a0b84c2084cb646b197f9517a3890c86bd558a5ec62a08109", + "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", + "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", "rubricsYaml": null, - "graderContext": "25fa9f96fa5166859fd6a332951a4c6b25675c350ef512289962b124b7153be9" + "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" } } 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 93acf453..1a6d0800 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-exhaustiveness.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-good-response-exhaustiveness.md @@ -17,4 +17,4 @@ The rubric grades tenant filters and observable preflight behavior without presc ## Overall verdict -No major reasonable implementation path is excluded. The late-null severity dispute concerns scoring proportion and clarity, not an uncredited strong approach. +No major reasonable implementation path is excluded. The missing atomic criterion for late-null follow-through is a rubric-coverage gap, not an uncredited strong approach in the holistic rubric. 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 b7192ebe..00fa8039 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-offline-verifiability.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-offline-verifiability.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-16T16:13:20.095Z", + "capturedAt": "2026-10-16T16:18:46.621Z", "capturedBy": "stamp", "inputs": { - "prompt": "e1f2b9eb2af41073de1fe56b3cbe4753c6959022f287ca9de49da144117bfff4", + "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "a93db93bfc731a598c6f1eb13c42bcae6dec72f725f0a8581cdf540db30b6aec", - "atomicRubric": "0a970248ea40b85a0b84c2084cb646b197f9517a3890c86bd558a5ec62a08109", + "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", + "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", "rubricsYaml": null, - "graderContext": "25fa9f96fa5166859fd6a332951a4c6b25675c350ef512289962b124b7153be9" + "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" } } 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 b7192ebe..00fa8039 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-over-hinting.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-over-hinting.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-16T16:13:20.095Z", + "capturedAt": "2026-10-16T16:18:46.621Z", "capturedBy": "stamp", "inputs": { - "prompt": "e1f2b9eb2af41073de1fe56b3cbe4753c6959022f287ca9de49da144117bfff4", + "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "a93db93bfc731a598c6f1eb13c42bcae6dec72f725f0a8581cdf540db30b6aec", - "atomicRubric": "0a970248ea40b85a0b84c2084cb646b197f9517a3890c86bd558a5ec62a08109", + "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", + "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", "rubricsYaml": null, - "graderContext": "25fa9f96fa5166859fd6a332951a4c6b25675c350ef512289962b124b7153be9" + "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" } } 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 d53f0a0d..1deee1ef 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-over-hinting.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-over-hinting.md @@ -9,7 +9,7 @@ Assessed: harbor-tasks/potion-voice-user-ownership/instruction.md and environmen ## Findings -The prompt specifies tenant isolation, the initial profile tenant source, preflight side-effect stopping, and try-catch resilience. These are requested behavior and context for a code refactor. It does not point to the exact defective calls or provide a patch. No authored workspace patch adds explanatory comments. +The prompt specifies tenant isolation, the initial profile tenant source, side-effect stopping after failed checks, try-catch resilience, and a written explanation. These are requested behavior and context for a code refactor. It does not point to the exact defective calls or provide a patch. No authored workspace patch adds explanatory comments. ## Overall verdict 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 b7192ebe..00fa8039 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-clarity.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-clarity.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-16T16:13:20.095Z", + "capturedAt": "2026-10-16T16:18:46.621Z", "capturedBy": "stamp", "inputs": { - "prompt": "e1f2b9eb2af41073de1fe56b3cbe4753c6959022f287ca9de49da144117bfff4", + "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "a93db93bfc731a598c6f1eb13c42bcae6dec72f725f0a8581cdf540db30b6aec", - "atomicRubric": "0a970248ea40b85a0b84c2084cb646b197f9517a3890c86bd558a5ec62a08109", + "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", + "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", "rubricsYaml": null, - "graderContext": "25fa9f96fa5166859fd6a332951a4c6b25675c350ef512289962b124b7153be9" + "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" } } 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 7eb69c96..ae87ee0e 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,22 +9,16 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md ## Material ambiguities -### Crux scoring uses an undefined criterion +### Full-score instruction behaves like a pin -- **Where:** “A Crux failure ... results in 0 credit for the corresponding Crux criterion and incurs a heavy penalty on the overall score (reducing the overall score by 0.25 to 0.30 below an otherwise-equivalent run).” -- **Why it's ambiguous:** The holistic grader's shared standard scores eight named dimensions; it has no separately scored cloning or synthesis Crux criterion. One grader could set Narrow Correctness to zero, another could apply only an overall subtraction, and a third could do both. The 0.25–0.30 range also leaves the subtraction amount to the grader. -- **Grade evidence:** The reference-runs directory is empty, so the revised wording has no current grading evidence. - -### Scoped no-match exception can mask later effects - -- **Where:** “Not checking a null return on an already `userId`-scoped write is NOT a Crux failure; it is scored as a minor defect under Broader Correctness.” -- **Why it's ambiguous:** A null scoped write itself changes no record, but the rubric does not state whether rendering or another mutation *after* that result still counts as a preflight side-effect failure. The surrounding Crux clause requires halting before effects when tenant validation fails. Those readings produce substantially different scores. +- **Where:** “**Pass (1.00)**: Fully enforces `userId` scoping across all handler reads and updates, halts unauthorized preflight side effects, handles errors inside `try-catch` blocks, and accurately documents the changes.” +- **Why it's ambiguous:** Under “Summary Score Guidance,” this can mean either “these task requirements deserve full credit on their relevant criteria” or “assign an overall 1.00 whenever these listed behaviors appear.” The latter pins the score despite the shared standard's eight-dimension mean and could erase real shortcomings in other dimensions. The rubric does not disambiguate the two readings. - **Grade evidence:** No current reference runs exist. ## Copy-edit issues -The prose is readable. The findings concern scoring boundaries rather than grammar. +None material. The scoped no-match exception and both-place Crux penalty now state their intended routes plainly. ## Overall verdict -The holistic rubric still needs a penalty stated in terms of the eight standard dimensions and/or the overall score, and a precise rule for downstream work after a scoped no-match result. The ambiguity is load-bearing, so the verdict is `material-issues`. +The revised penalty target is clear, but the overall `Pass (1.00)` line admits incompatible scoring interpretations. Because it is a score-determining instruction, the verdict is `material-issues`. 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 b7192ebe..00fa8039 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-coverage.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-coverage.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-16T16:13:20.095Z", + "capturedAt": "2026-10-16T16:18:46.621Z", "capturedBy": "stamp", "inputs": { - "prompt": "e1f2b9eb2af41073de1fe56b3cbe4753c6959022f287ca9de49da144117bfff4", + "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "a93db93bfc731a598c6f1eb13c42bcae6dec72f725f0a8581cdf540db30b6aec", - "atomicRubric": "0a970248ea40b85a0b84c2084cb646b197f9517a3890c86bd558a5ec62a08109", + "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", + "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", "rubricsYaml": null, - "graderContext": "25fa9f96fa5166859fd6a332951a4c6b25675c350ef512289962b124b7153be9" + "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" } } 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 1ccf5b3d..e228d79d 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-coverage.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-coverage.md @@ -1,6 +1,6 @@ --- detector: detector-rubric-coverage -verdict: clear +verdict: material-issues confidence: HIGH --- # Rubric-coverage check: potion-voice-user-ownership @@ -11,32 +11,32 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md agai | Holistic rule | Atomic entry | Status | | --- | --- | --- | -| Cloning model reads and updates include ID and userId | `cloning-tenant-isolation` | covered | -| Synthesis recording reads and updates use profile-derived userId | `synthesis-tenant-isolation-queries-updates` | covered | -| Initial profile lookup is exempt | `initial-profile-tenant-resolution` | covered | -| Preflight halt in each handler | Two handler-specific side-effect Crux entries | covered | -| Overall Crux consequence and partial-halt allowance | Both Crux elaborations | covered | -| Scoped null no-match is Broader Correctness, not Crux | Both Crux elaborations; grader context | covered | -| Polling try-catch and SQS acknowledgment allowance | `worker-loop-crash-prevention` | covered | +| Cloning reads and updates use ID plus userId | `cloning-tenant-isolation` | covered | +| Synthesis downstream reads and updates use profile-derived userId | `synthesis-tenant-isolation-queries-updates` | covered | +| Initial profile lookup by ID is valid | `initial-profile-tenant-resolution` | covered | +| Preflight side effects trigger heavy Narrow and overall penalties | Two handler-specific Crux criteria | covered | +| Scoped no-match is **not** Crux | Both Crux elaborations and context | covered | +| Unchecked scoped-update null is a **minor Broader Correctness or Common Sense defect** | No independently judgeable criterion | **gap** | +| Worker try-catch and SQS acknowledgment allowance | `worker-loop-crash-prevention` | covered | | Accurate written summary | `refactor-summary-accuracy` | covered | -| Single-deduction routing | Both Crux elaborations | covered | +| Query/side-effect charge-once routing | Both Crux elaborations | covered | ## Coverage gaps -None found. The atomic package repeats the holistic rubric's exception for an already tenant-scoped no-match result. +The holistic rubric says: “Failing to check if a scoped update returned `null` is evaluated as a minor defect under **Broader Correctness / the craft of software engineering** or **Common Sense**.” The atomic package preserves the **non-Crux exemption**, but none of its seven guidelines scores checking or handling that result. `worker-loop-crash-prevention` addresses caught exceptions, not null returns. A response could pass every atomic criterion while leaving this explicitly graded defect. ## Invented content -None found. The numerical Crux penalty is present in both artifacts; whether it is valid syntax or clear grading guidance belongs to rubric form and rubric clarity. +None found. The atomic criteria do not add a new functional requirement unsupported by the holistic rubric. ## Context integrity -The holistic rubric has no separate task-context or ground-truth sections. The companion context restates the architecture, tenant source, Crux trigger, scoped no-match exception, and SQS protection needed by the criteria. +Architecture, tenant-source, preflight, scoped no-match, and SQS context are present in `tests/grader-context.md`. The missing item is a scored criterion, not background context. ## Crux alignment -The two Crux criteria correspond to the cloning and synthesis side-effect clauses, within the two-Crux cap. Both specify an overall-score consequence, matching the holistic rubric. +The two handler Crux criteria encode the holistic rubric's heavy Narrow and overall penalties and stay within the two-Crux cap. ## Overall verdict -The atomic criteria and companion context preserve the holistic rubric's scoring content. This `clear` verdict is about equivalence; the numeric-penalty and dimension-name defects are assessed by rubric form. +The missing minor deduction changes grading content, so the verdict is `material-issues`. The current atomic file is well-formed, but it does not fully represent the holistic rubric. 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 b7192ebe..00fa8039 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-form.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-form.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-16T16:13:20.095Z", + "capturedAt": "2026-10-16T16:18:46.621Z", "capturedBy": "stamp", "inputs": { - "prompt": "e1f2b9eb2af41073de1fe56b3cbe4753c6959022f287ca9de49da144117bfff4", + "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "a93db93bfc731a598c6f1eb13c42bcae6dec72f725f0a8581cdf540db30b6aec", - "atomicRubric": "0a970248ea40b85a0b84c2084cb646b197f9517a3890c86bd558a5ec62a08109", + "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", + "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", "rubricsYaml": null, - "graderContext": "25fa9f96fa5166859fd6a332951a4c6b25675c350ef512289962b124b7153be9" + "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" } } 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 5d2eb99d..a9dbf7d5 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 @@ -1,6 +1,6 @@ --- detector: detector-rubric-form -verdict: material-issues +verdict: clear confidence: HIGH --- # Rubric-form check: potion-voice-user-ownership @@ -9,29 +9,29 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/atomic-rubric.yaml and ## Deterministic contract -1. **Pass.** YAML parses as a map with top-level `task` and seven `criteria`. -2. **Pass.** `task: potion-voice-user-ownership` matches the slug. -3. **Pass.** All seven `id` values are unique kebab-case. -4. **Pass.** All `category` values are in the allowed vocabulary. -5. **Pass.** All severities are allowed and correctly present. -6. **Pass.** Exactly two criteria have `severity: crux`. -7. **FAIL.** `worker-loop-crash-prevention` has `dimensions:\n - Broader Correctness`. The exact standard name is `Broader Correctness / the craft of software engineering`. -8. **Pass.** Every guideline is nonempty. -9. **FAIL.** Both Crux elaborations state “0 credit on this criterion and reducing the overall score by 0.25 to 0.30”; the context states “reducing overall score by 0.25–0.30.” The detector contract forbids numeric penalty amounts in either file. The numeric sweeps find the score-by amount in the elaborations. -11. **Pass.** No guideline phrases its requirement with prohibited negation. +1. **Pass:** YAML parses as a mapping with `task` and seven `criteria`. +2. **Pass:** `task` matches `potion-voice-user-ownership`. +3. **Pass:** All seven IDs are unique kebab-case. +4. **Pass:** Categories use the allowed vocabulary. +5. **Pass:** Severities use the allowed vocabulary and placement. +6. **Pass:** Exactly two criteria carry `crux`. +7. **Pass:** Every `dimensions` entry uses an exact Grading Standard name, including `Broader Correctness / the craft of software engineering`. +8. **Pass:** Every guideline is nonempty. +9. **Pass:** Numeric-penalty sweeps found no penalty amount in the atomic rubric or grader context. “0 records modified” describes a database result, not a score adjustment. +11. **Pass:** Guidelines phrase requirements positively. ## Atomicity and self-containment -The seven guidelines are mostly independently judgeable. Two handler-specific Crux criteria can be evaluated separately. +No material issue found. Handler-specific ownership gates are separately judgeable. Routing notes may name sibling criteria without making the guidelines dependent on them. ## Phrasing and answer keys -The factual answer keys are inline and bold. The Crux guidelines describe halting on failed tenant checks, while their elaborations exempt unchecked null results from scoped queries. If subsequent side effects are meant to be exempt too, that boundary should be stated in the guidelines; currently the answer key is broader than the exception. +Bold inline answer keys are present. The Crux elaborations clarify that the scored side-effect failure concerns preflight work and that an already scoped no-match result is a non-trigger. ## Fair-grading findings -No unreachable requirement found. The two Crux criteria are within the cap, but their elaborations try to dictate a numeric overall subtraction outside the atomic scoring contract. +No unreachable action or compulsory design fork found. Whether the holistic rubric's minor null-check deduction has an atomic criterion is assessed by rubric coverage. ## Overall verdict -`material-issues` follows from the exact-dimension vocabulary violation and prohibited numeric penalty language. Successful staging confirms only the staging script's structural gate; it does not clear this detector's full contract. +The deterministic contract and judgment checks pass. The artifact's form verdict is `clear`. diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-generality.inputs.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-generality.inputs.json index b7192ebe..00fa8039 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-generality.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-rubric-generality.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-16T16:13:20.095Z", + "capturedAt": "2026-10-16T16:18:46.621Z", "capturedBy": "stamp", "inputs": { - "prompt": "e1f2b9eb2af41073de1fe56b3cbe4753c6959022f287ca9de49da144117bfff4", + "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "a93db93bfc731a598c6f1eb13c42bcae6dec72f725f0a8581cdf540db30b6aec", - "atomicRubric": "0a970248ea40b85a0b84c2084cb646b197f9517a3890c86bd558a5ec62a08109", + "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", + "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", "rubricsYaml": null, - "graderContext": "25fa9f96fa5166859fd6a332951a4c6b25675c350ef512289962b124b7153be9" + "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" } } 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 b7192ebe..00fa8039 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-snapshot-leakage.inputs.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/detectors/detector-snapshot-leakage.inputs.json @@ -1,17 +1,17 @@ { "version": 1, - "capturedAt": "2026-10-16T16:13:20.095Z", + "capturedAt": "2026-10-16T16:18:46.621Z", "capturedBy": "stamp", "inputs": { - "prompt": "e1f2b9eb2af41073de1fe56b3cbe4753c6959022f287ca9de49da144117bfff4", + "prompt": "deb81bf018b183c64bc8cb0ced93918dba97a3beb587664b9b11e5ee8dc67b09", "graderGuidance": null, "sessionJsonl": null, "workspacePatch": null, "gitref": "fcd8a9d0", "graderGuidanceConsolidated": null, - "holisticRubric": "a93db93bfc731a598c6f1eb13c42bcae6dec72f725f0a8581cdf540db30b6aec", - "atomicRubric": "0a970248ea40b85a0b84c2084cb646b197f9517a3890c86bd558a5ec62a08109", + "holisticRubric": "feb48a080659047315efe25d77c2c28bca0de1c01042f169092d378f9d1cc5fa", + "atomicRubric": "611fca7ba8ca0402feba07e9d2d307f18cb31a73aeb494735efa5ef3187069b2", "rubricsYaml": null, - "graderContext": "25fa9f96fa5166859fd6a332951a4c6b25675c350ef512289962b124b7153be9" + "graderContext": "1aaf956fdfa60c68fe7ba164e1ee35e818d44bfabd0406f833f563b13ed5e029" } } 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 dc8d1b9b..73940e8f 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,20 +1,23 @@ # Refactor Background Worker Handlers for Multi-Tenant Data Isolation -Our backend background workers (`voice-cloning-job-handler` and `voice-synthsizer-job-handler`) process asynchronous jobs from AWS SQS queues. Currently, database operations on Mongoose models (`VoiceCloning`, `UserAudioProfile`, `RecordingSalutation`, and `Recording`) rely solely on document ObjectIds (e.g., `_id`, `userAudioProfileId`, `recordingId`, `salutationId`) provided in queue payloads. +## Overview +Our backend processes voice cloning and speech synthesis jobs via background AWS SQS queues. An audit revealed that background worker handlers retrieve and mutate MongoDB records using document ObjectIds (`_id`, `userAudioProfileId`, `salutationId`) without verifying that the records belong to the requesting tenant (`userId`). -## Objective -Audit and refactor all database reads and updates across both background handlers to enforce strict multi-tenant data isolation using `userId`. +You must refactor all database queries and updates in the background worker handlers to enforce strict multi-tenant isolation. -## Requirements +## Key Requirements 1. **Voice Cloning Handler (`voice-cloning-job-handler`)**: - - Scope all database reads and updates on `VoiceCloning` and `UserAudioProfile` models by `userId` in addition to record `_id`. + - Scope all database queries and updates on `VoiceCloning` and `UserAudioProfile` records using `userId` in addition to record `_id`. 2. **Speech Synthesis Handler (`voice-synthsizer-job-handler`)**: - - Perform initial tenant resolution by looking up `UserAudioProfile` by `_id: userAudioProfileId` to establish the validated `userId`. - - Scope all downstream reads and updates on `RecordingSalutation` and `Recording` models by the resolved `userId`. + - Perform the initial lookup on `UserAudioProfile` by `_id: userAudioProfileId` to establish tenant context (`userId`). + - Scope all downstream database reads and updates on `RecordingSalutation` and `Recording` records using the profile-derived `userId`. -3. **Preflight Execution Halting**: - - Ensure background processing halts before performing audio rendering or executing database mutations if tenant context cannot be established or tenant validation fails. +3. **Preflight Side-Effect Protection**: + - Halt audio generation rendering and database mutations if tenant validation checks fail or records do not match the tenant context. -4. **Polling Loop Resilience**: - - Handle job processing errors gracefully inside a `try-catch` block so unhandled exceptions do not crash background worker polling loops. +4. **Worker Loop Resilience**: + - Ensure all job processing errors are caught within a `try-catch` block so unhandled exceptions do not crash background worker polling loops. + +5. **Refactoring Documentation**: + - Provide an accurate written summary and code documentation detailing the multi-tenant isolation logic. 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 8ba3cbe0..5e744f38 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 @@ -42,14 +42,14 @@ criteria: tenant validation fails or records do not match tenant context. **Answer key: Audio generation rendering and database mutations in voice-cloning-job-handler must be halted if tenant ownership checks fail.**' - elaboration: 'Failing this crux criterion applies a heavy penalty to the overall - score (0 credit on this criterion and reducing the overall score by 0.25 to 0.30). - Routing note: Charge query syntax omissions under cloning-tenant-isolation; charge - preflight side-effect execution under this criterion. Do not double-charge a single - defect across query criteria and side-effect criteria. Note: A query or update - that includes the userId filter but returns no document match is a safe no-match - (0 records modified) and is evaluated under Broader Correctness, not as a Crux - side-effect failure.' + elaboration: 'Failing this crux criterion applies a heavy penalty to Narrow Correctness + and a heavy penalty to the overall score. Routing note: Charge query syntax omissions + under cloning-tenant-isolation; charge preflight side-effect execution under this + criterion. Do not double-charge a single defect across query criteria and side-effect + criteria. Note: A query or update that includes the userId filter but returns + no document match is a safe no-match (0 records modified) and is evaluated under + Broader Correctness / the craft of software engineering, not as a Crux side-effect + failure.' - id: synthesis-prevent-unauthorized-side-effects name: Synthesis Prevent Unauthorized Side Effects category: primary_intent @@ -63,13 +63,13 @@ criteria: tenant validation fails or records do not match tenant context. **Answer key: Audio generation rendering and database mutations in voice-synthsizer-job-handler must be halted if tenant ownership checks fail.**' - elaboration: 'Failing this crux criterion applies a heavy penalty to the overall - score (0 credit on this criterion and reducing the overall score by 0.25 to 0.30). - Routing note: Charge query syntax omissions under synthesis-tenant-isolation-queries-updates; - charge preflight side-effect execution under this criterion. Do not double-charge - a single defect across query criteria and side-effect criteria. Note: A query - or update that includes the userId filter but returns no document match is a safe - no-match (0 records modified) and is evaluated under Broader Correctness, not + elaboration: 'Failing this crux criterion applies a heavy penalty to Narrow Correctness + and a heavy penalty to the overall score. Routing note: Charge query syntax omissions + under synthesis-tenant-isolation-queries-updates; charge preflight side-effect + execution under this criterion. Do not double-charge a single defect across query + criteria and side-effect criteria. Note: A query or update that includes the userId + filter but returns no document match is a safe no-match (0 records modified) and + is evaluated under Broader Correctness / the craft of software engineering, not as a Crux side-effect failure.' - id: initial-profile-tenant-resolution name: Initial Profile Tenant Resolution @@ -89,7 +89,7 @@ criteria: name: Worker Loop Crash Prevention category: dodged_bullet dimensions: - - Broader Correctness + - Broader Correctness / the craft of software engineering call_site_keys: - voice-cloning-job-handler - voice-synthsizer-job-handler 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 cf837be9..0631875f 100755 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/grader-context.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/grader-context.md @@ -1,23 +1,23 @@ -# Grader Context & Ground Truth Reference: Potion Voice User Ownership +# Grader Context & Reference Ground Truth -This document provides ground-truth implementation context for grading `potion-voice-user-ownership`. +## System Architecture +The application runs asynchronous background workers consuming AWS SQS job payloads for voice cloning (`voice-cloning-job-handler`) and speech synthesis (`voice-synthsizer-job-handler`). -## Background Architecture & Handlers -1. **`voice-cloning-job-handler`**: - - Ingests queue payload containing `job._doc`. - - Models accessed: `VoiceCloning`, `UserAudioProfile`. - - Refactor rule: Queries and updates must include `userId` in addition to `_id`. +## Ground Truth Requirements -2. **`voice-synthsizer-job-handler`**: - - Ingests queue payload containing `job._doc`. - - Step 1: Look up `UserAudioProfile` by `_id: job._doc.userAudioProfileId` to obtain the validated `userId`. - - Step 2: Use the resolved `userId` to scope all downstream queries and updates on `RecordingSalutation` and `Recording`. +### 1. Voice Cloning Handler (`voice-cloning-job-handler`) +- **Query Scoping**: Every lookup and mutation on `VoiceCloning` and `UserAudioProfile` must incorporate `userId: tenantId` along with document `_id`. +- **Preflight Gating**: If the record does not belong to `userId`, execution must halt immediately before performing rendering work or updating job status. -## Preflight Execution Halting & Crux Rules -- **Crux Rule**: Execution must halt *before* audio rendering or database mutations if tenant validation fails. -- **Crux Scoring Effect**: A Crux failure results in 0 credit for the Crux criterion and incurs a heavy penalty on the overall score (reducing overall score by 0.25–0.30). -- **Scoped No-Match Exemption**: An already `userId`-scoped query that returns 0 records (null) cannot alter cross-tenant data. Missing a null return check on a scoped write is evaluated under Broader Correctness, NOT as a Crux security breach. +### 2. Speech Synthesis Handler (`voice-synthsizer-job-handler`) +- **Initial Profile Lookup**: The initial lookup on `UserAudioProfile` uses `_id: userAudioProfileId` to obtain `userId`. This initial query does not require `userId`. +- **Downstream Scoping**: All subsequent queries and updates on `RecordingSalutation` and `Recording` must filter by the profile-derived `userId`. +- **Preflight Gating**: Audio synthesis and database updates must be halted if tenant validation fails. -## Polling Loop & SQS Protections -- Errors during job execution must be handled within a `try-catch` block to keep polling loops active. -- Framework SQS message deletion and acknowledgment on completed and rejected jobs is standard behavior and must NOT be penalized. +### 3. Scoped No-Match vs. Preflight Side Effects +- **Scoped No-Match**: A query or update that includes `userId` but matches no document (0 records modified) is safe from cross-tenant data leaks. An unchecked null return on an already-scoped query is evaluated under **Broader Correctness / the craft of software engineering**, not as a Crux side-effect breach. +- **Preflight Side Effects**: Executing audio rendering or mutating records before establishing or validating tenant ownership triggers a heavy penalty on Narrow Correctness and the Overall Score. + +### 4. Worker Resilience & Framework Notes +- Job processing must be wrapped in `try-catch` blocks to prevent worker loop crashes. +- SQS message deletion and acknowledgment on completed or rejected jobs is standard framework behavior and must not be penalized. 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 54af1b18..5801305c 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,25 +1,34 @@ -# Holistic Evaluation Rubric: Multi-Tenant Data Isolation in Worker Handlers +# Holistic Evaluation Guidelines -This rubric evaluates how effectively the candidate refactored `voice-cloning-job-handler` and `voice-synthsizer-job-handler` to enforce multi-tenant data isolation using `userId`. +## Evaluation Overview +Evaluate candidate solutions across the standard software engineering dimensions based on multi-tenant data isolation, security side-effect prevention, and error resilience across `voice-cloning-job-handler` and `voice-synthsizer-job-handler`. -## Scoring Dimensions +--- -### 1. Narrow Correctness -- **Voice Cloning Query Isolation**: All reads and updates on `VoiceCloning` and `UserAudioProfile` within `voice-cloning-job-handler` must explicitly filter by `userId` in addition to document `_id`. -- **Speech Synthesis Query Isolation**: In `voice-synthsizer-job-handler`, downstream queries and updates on `RecordingSalutation` and `Recording` must be scoped by the profile-derived `userId`. -- **Initial Profile Tenant Resolution**: The initial query looking up `UserAudioProfile` by `_id: userAudioProfileId` is a valid tenant-resolution step and does not require `userId` in that initial lookup. -- **Preflight Side-Effect Halting (Crux Requirements)**: - - Execution must halt *before* initiating audio generation rendering or executing database mutations if tenant validation fails or tenant context is missing. - - **Crux Scoring Effect**: A Crux failure (failing to halt preflight side effects when tenant validation fails) results in 0 credit for the corresponding Crux criterion and incurs a heavy penalty on the overall score (reducing the overall score by 0.25 to 0.30 below an otherwise-equivalent run). - - **Scoped No-Match vs. Preflight Side Effects**: If a query includes the `userId` filter but matches no record (0 documents updated), no cross-tenant data is accessed or mutated. Not checking a null return on an already `userId`-scoped write is NOT a Crux failure; it is scored as a minor defect under Broader Correctness. +## Dimension Breakdown -### 2. Broader Correctness / Craft of Software Engineering -- **Polling Loop Crash Prevention**: Job processing logic must be wrapped in a `try-catch` block so unhandled exceptions do not crash background worker polling loops. -- **Framework SQS Acknowledgment Protection**: Framework-level SQS message deletion and acknowledgment on completed or rejected jobs is standard behavior and must NOT be penalized. +### Narrow Correctness +- **Voice Cloning Tenant Isolation**: All database queries and updates on `VoiceCloning` and `UserAudioProfile` in `voice-cloning-job-handler` must filter by `userId` in addition to document `_id`. +- **Speech Synthesis Tenant Isolation**: Downstream reads and updates on `RecordingSalutation` and `Recording` in `voice-synthsizer-job-handler` must filter by the profile-derived `userId`. +- **Initial Profile Lookup Allowance**: The initial query on `UserAudioProfile` by `_id: userAudioProfileId` in `voice-synthsizer-job-handler` is a valid tenant-resolution step and does not require `userId` in that initial lookup. +- **Preflight Side-Effect Halting (Crux Requirement)**: + - Audio generation rendering and database mutations in `voice-cloning-job-handler` and `voice-synthsizer-job-handler` must be halted if tenant ownership checks fail. + - **Penalty Routing & Magnitude**: Failing a Crux preflight side-effect requirement applies a heavy penalty to **Narrow Correctness** and a heavy penalty to the **Overall Score**. + - **Charge-Once Rule**: Charge query filter syntax omissions under tenant isolation criteria; charge preflight execution under side-effect criteria. Do not double-charge a single code defect across both query and side-effect criteria. -### 3. Verification & Thoroughness -- **Refactor Summary Accuracy**: Written summaries, commit messages, or code documentation must accurately describe the multi-tenant isolation logic across both worker handlers without misleading claims. +### Scoped No-Match vs. Preflight Side Effects +- **Scoped No-Match (Non-Breach / Minor Defect)**: If a database query or update includes the `userId` tenant filter but matches no record in the database (0 documents modified), no cross-tenant data leak or unauthorized mutation occurs. Failing to check if a scoped update returned `null` is evaluated as a minor defect under **Broader Correctness / the craft of software engineering** or **Common Sense**, and MUST NOT trigger a Crux penalty or be treated as an unauthorized side effect. +- **Preflight Side Effects (Crux Failure)**: A Crux security failure occurs ONLY when audio rendering or database mutations execute *before* validating or establishing tenant ownership. -## Single-Deduction & Routing Rules -- **No Double Charging**: Charge query syntax omissions under query isolation criteria; charge unauthorized preflight side-effect execution under the Crux criteria. Do not double-charge a single defect across query and side-effect criteria. -- **Partial Halts**: If code halts database updates but fails to halt audio rendering (or vice versa), award partial credit on the relevant side-effect criterion rather than applying a full score wipeout. +### Broader Correctness / the craft of software engineering +- **Worker Loop Resilience**: Error handling must catch job processing exceptions inside a `try-catch` block to keep worker polling loops active. +- **SQS Acknowledgment Protection**: Framework SQS message deletion and acknowledgment on both completed and rejected jobs is standard framework behavior and must not be penalized. + +### Verification & Thoroughness +- **Refactor Summary Accuracy**: Code documentation and written summaries must accurately reflect the multi-tenant isolation logic implemented in the codebase. + +--- + +## Summary Score Guidance +- **Pass (1.00)**: Fully enforces `userId` scoping across all handler reads and updates, halts unauthorized preflight side effects, handles errors inside `try-catch` blocks, and accurately documents the changes. +- **Major Deduction**: Failing to scope queries by `userId` or executing preflight audio rendering / database mutations when tenant checks fail triggers heavy penalties on Narrow Correctness and the Overall Score. diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/rubric-criteria.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/rubric-criteria.json index e2d75128..520a4748 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/rubric-criteria.json +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/rubric-criteria.json @@ -46,7 +46,7 @@ "category": "dodged_bullet", "severity": "possible_dealbreaker", "dimensions": [ - "Broader Correctness" + "Broader Correctness / the craft of software engineering" ] }, { diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/rubric-criteria.md b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/rubric-criteria.md index 67e15a4d..d0952095 100644 --- a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/rubric-criteria.md +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/rubric-criteria.md @@ -14,13 +14,13 @@ Ensures that both queries and database updates in the speech synthesis handler e The response should prevent unauthorized side effects, including audio generation rendering and database mutations in the voice cloning handler, when tenant validation fails or records do not match tenant context. **Answer key: Audio generation rendering and database mutations in voice-cloning-job-handler must be halted if tenant ownership checks fail.** -Failing this crux criterion applies a heavy penalty to the overall score (0 credit on this criterion and reducing the overall score by 0.25 to 0.30). Routing note: Charge query syntax omissions under cloning-tenant-isolation; charge preflight side-effect execution under this criterion. Do not double-charge a single defect across query criteria and side-effect criteria. Note: A query or update that includes the userId filter but returns no document match is a safe no-match (0 records modified) and is evaluated under Broader Correctness, not as a Crux side-effect failure. +Failing this crux criterion applies a heavy penalty to Narrow Correctness and a heavy penalty to the overall score. Routing note: Charge query syntax omissions under cloning-tenant-isolation; charge preflight side-effect execution under this criterion. Do not double-charge a single defect across query criteria and side-effect criteria. Note: A query or update that includes the userId filter but returns no document match is a safe no-match (0 records modified) and is evaluated under Broader Correctness / the craft of software engineering, not as a Crux side-effect failure. ### Criterion: synthesis-prevent-unauthorized-side-effects The response should prevent unauthorized side effects, including audio generation rendering and database mutations in the speech synthesis handler, when tenant validation fails or records do not match tenant context. **Answer key: Audio generation rendering and database mutations in voice-synthsizer-job-handler must be halted if tenant ownership checks fail.** -Failing this crux criterion applies a heavy penalty to the overall score (0 credit on this criterion and reducing the overall score by 0.25 to 0.30). Routing note: Charge query syntax omissions under synthesis-tenant-isolation-queries-updates; charge preflight side-effect execution under this criterion. Do not double-charge a single defect across query criteria and side-effect criteria. Note: A query or update that includes the userId filter but returns no document match is a safe no-match (0 records modified) and is evaluated under Broader Correctness, not as a Crux side-effect failure. +Failing this crux criterion applies a heavy penalty to Narrow Correctness and a heavy penalty to the overall score. Routing note: Charge query syntax omissions under synthesis-tenant-isolation-queries-updates; charge preflight side-effect execution under this criterion. Do not double-charge a single defect across query criteria and side-effect criteria. Note: A query or update that includes the userId filter but returns no document match is a safe no-match (0 records modified) and is evaluated under Broader Correctness / the craft of software engineering, not as a Crux side-effect failure. ### Criterion: initial-profile-tenant-resolution