11th file set and run of pre-trial detectors

This commit is contained in:
2026-10-14 13:46:38 -04:00
parent 63d55216a0
commit 6c26dfdb4c
34 changed files with 227 additions and 226 deletions

View File

@@ -1,17 +1,17 @@
{ {
"version": 1, "version": 1,
"capturedAt": "2026-10-14T17:38:51.161Z", "capturedAt": "2026-10-14T17:46:13.035Z",
"capturedBy": "stamp", "capturedBy": "stamp",
"inputs": { "inputs": {
"prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5",
"graderGuidance": null, "graderGuidance": null,
"sessionJsonl": null, "sessionJsonl": null,
"workspacePatch": null, "workspacePatch": null,
"gitref": "fcd8a9d0", "gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null, "graderGuidanceConsolidated": null,
"holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff",
"atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d",
"rubricsYaml": null, "rubricsYaml": null,
"graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e"
} }
} }

View File

@@ -1,6 +1,6 @@
--- ---
detector: detector-answer-obviousness detector: detector-answer-obviousness
verdict: partial verdict: obvious
confidence: MEDIUM confidence: MEDIUM
--- ---
# Answer-obviousness check: potion-voice-user-ownership # Answer-obviousness check: potion-voice-user-ownership
@@ -9,22 +9,22 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
## What the prompt asks ## What the prompt asks
The prompt asks for tenant-scoped reads, updates, and side effects in background workers, while preserving polling stability and error logging. It does not ask for explanatory comments or documentation. The prompt asks for multi-tenant isolation in two worker handlers and resilient error handling. It leaves implementation details to the agent.
## Per-expectation assessment ## Per-expectation assessment
### Isolation and worker stability — obvious ### Tenant-scoped operations and safe side effects — obvious
- **What the rubric requires:** Scope records by `userId`, avoid cross-tenant effects, and keep the polling loop stable on errors. - **What the rubric requires:** Tenant filters on worker records, rejection before cross-tenant effects, and an initial profile lookup to derive the downstream tenant context.
- **Is it obvious from the prompt?** These are the explicit deliverables. The agent still has to trace call sites and design the checks. - **Is it obvious from the prompt?** These implement its isolation objective. The profile lookup is discoverable in source; the rubric exempts that first lookup rather than requiring an unseen credential field.
- **Verdict for this expectation:** obvious. - **Verdict for this expectation:** obvious.
### Security-boundary documentation — not-obvious ### Worker resilience and accurate explanation — obvious
- **What the rubric requires:** Optional Communication extra credit for inline comments or documentation explaining the isolation design across handlers. - **What the rubric requires:** Keep polling after processing errors and describe implemented isolation accurately when explaining it.
- **Is it obvious from the prompt?** Some explanation in a final summary is routine, but adding comments or documentation is an unrequested bonus distinction. Omission does not deduct points. - **Is it obvious from the prompt?** Stable error handling is explicit, and accurate description follows ordinary communication standards. The rubric does not require a separate documentation artifact.
- **Verdict for this expectation:** not-obvious through unrequested scope. - **Verdict for this expectation:** obvious.
## Overall verdict ## Overall verdict
Core scoring follows the request. The extra-credit item is a secondary unrequested expectation, so the verdict is partial. No scored expectation requires a contested resolution or unrequested deliverable. The prompt states goals without revealing individual service-filter defects.

View File

@@ -1,17 +1,17 @@
{ {
"version": 1, "version": 1,
"capturedAt": "2026-10-14T17:38:51.161Z", "capturedAt": "2026-10-14T17:46:13.035Z",
"capturedBy": "stamp", "capturedBy": "stamp",
"inputs": { "inputs": {
"prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5",
"graderGuidance": null, "graderGuidance": null,
"sessionJsonl": null, "sessionJsonl": null,
"workspacePatch": null, "workspacePatch": null,
"gitref": "fcd8a9d0", "gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null, "graderGuidanceConsolidated": null,
"holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff",
"atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d",
"rubricsYaml": null, "rubricsYaml": null,
"graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e"
} }
} }

View File

@@ -9,10 +9,10 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
## Verbatim grounding ## Verbatim grounding
> “A security audit revealed that database queries within these worker handlers retrieve and update records using document identifiers without consistently validating tenant ownership (`userId`).” > “Our backend background workers currently process voice cloning and speech synthesis jobs using document identifiers provided in SQS queue messages.”
The declared commit resolves locally, the task workspace is present, and the source JavaScript passes `node --check`. The package declares no local test script. There are no reference runs to assess for corruption or drift. The declared commit resolves locally and the built workspace contains both named workers. The source JavaScript passes `node --check`; no local test script is declared. There are no reference runs to check for infrastructure termination or package drift.
## Rationale ## Rationale
The missing ownership checks are the requested subject of the task. No unrelated build failure or premise mismatch was found; full runtime integration has not yet been established. The unscoped operations are the subject of the request. No unrelated environment failure or prompt/workspace premise mismatch was found. Confidence is medium because syntax checks do not prove deployed integration health.

View File

@@ -1,17 +1,17 @@
{ {
"version": 1, "version": 1,
"capturedAt": "2026-10-14T17:38:51.161Z", "capturedAt": "2026-10-14T17:46:13.035Z",
"capturedBy": "stamp", "capturedBy": "stamp",
"inputs": { "inputs": {
"prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5",
"graderGuidance": null, "graderGuidance": null,
"sessionJsonl": null, "sessionJsonl": null,
"workspacePatch": null, "workspacePatch": null,
"gitref": "fcd8a9d0", "gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null, "graderGuidanceConsolidated": null,
"holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff",
"atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d",
"rubricsYaml": null, "rubricsYaml": null,
"graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e"
} }
} }

View File

@@ -9,7 +9,7 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
## Findings ## Findings
There is no `environment/workspace.patch`, so there are no task-authored patch additions to scan for secrets or authoring-machine paths. There is no `environment/workspace.patch`; no task-authored patch additions are available for credential or checkout-path scanning.
## Overall verdict ## Overall verdict

View File

@@ -1,17 +1,17 @@
{ {
"version": 1, "version": 1,
"capturedAt": "2026-10-14T17:38:51.161Z", "capturedAt": "2026-10-14T17:46:13.035Z",
"capturedBy": "stamp", "capturedBy": "stamp",
"inputs": { "inputs": {
"prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5",
"graderGuidance": null, "graderGuidance": null,
"sessionJsonl": null, "sessionJsonl": null,
"workspacePatch": null, "workspacePatch": null,
"gitref": "fcd8a9d0", "gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null, "graderGuidanceConsolidated": null,
"holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff",
"atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d",
"rubricsYaml": null, "rubricsYaml": null,
"graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e"
} }
} }

View File

@@ -9,8 +9,8 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
## Verbatim grounding ## Verbatim grounding
> “background worker handlers (`voice-cloning-job-handler` and `voice-synthsizer-job-handler`)” > “`voice-cloning-job-handler` (`VoiceCloning`, `UserAudioProfile`) and `voice-synthsizer-job-handler` (`RecordingSalutation`, `Recording`)”
## Rationale ## Rationale
The named handlers are directories in this source workspace. The prompt and resolved rubric do not reference another graded task. These names refer to code and models in this task's workspace. Neither the prompt nor the rubric references another graded task.

View File

@@ -1,17 +1,17 @@
{ {
"version": 1, "version": 1,
"capturedAt": "2026-10-14T17:38:51.161Z", "capturedAt": "2026-10-14T17:46:13.035Z",
"capturedBy": "stamp", "capturedBy": "stamp",
"inputs": { "inputs": {
"prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5",
"graderGuidance": null, "graderGuidance": null,
"sessionJsonl": null, "sessionJsonl": null,
"workspacePatch": null, "workspacePatch": null,
"gitref": "fcd8a9d0", "gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null, "graderGuidanceConsolidated": null,
"holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff",
"atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d",
"rubricsYaml": null, "rubricsYaml": null,
"graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e"
} }
} }

View File

@@ -1,7 +1,7 @@
--- ---
detector: detector-dimension-misapplication detector: detector-dimension-misapplication
verdict: partial-misapplication verdict: clean
confidence: HIGH confidence: MEDIUM
--- ---
# Dimension-misapplication check: potion-voice-user-ownership # Dimension-misapplication check: potion-voice-user-ownership
@@ -9,10 +9,12 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
## Verbatim grounding ## Verbatim grounding
> “### 2. Broader Correctness / Systemic Impact” > “### Narrow Correctness”
> “* **Worker Loop Resilience**: Unhandled exceptions during job processing must not crash the worker polling loop.” > “### Broader Correctness”
> “### Communication”
## Rationale ## Rationale
The worker resilience and lifecycle allowance belong to the standard's Broader Correctness / the craft of software engineering criterion, so the substantive routing is defensible. The section heading instead invents the label “Broader Correctness / Systemic Impact,” which is not one of the fixed eight criterion names. This is a secondary non-canonical naming issue (shape X2), not a substantive security failure routed to the wrong criterion. The atomic schema defect is separately reported by rubric-form. Tenant access and effects are routed to Narrow Correctness, polling resilience and lifecycle handling to the engineering-craft criterion, and explanation quality to Communication. “Broader Correctness” is an understandable short heading for the standard's longer name, without inventing a new axis. The strict full-name failure in atomic `dimensions` is handled by rubric-form. No reference-run grades exist to inspect for drift.

View File

@@ -1,17 +1,17 @@
{ {
"version": 1, "version": 1,
"capturedAt": "2026-10-14T17:38:51.161Z", "capturedAt": "2026-10-14T17:46:13.035Z",
"capturedBy": "stamp", "capturedBy": "stamp",
"inputs": { "inputs": {
"prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5",
"graderGuidance": null, "graderGuidance": null,
"sessionJsonl": null, "sessionJsonl": null,
"workspacePatch": null, "workspacePatch": null,
"gitref": "fcd8a9d0", "gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null, "graderGuidanceConsolidated": null,
"holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff",
"atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d",
"rubricsYaml": null, "rubricsYaml": null,
"graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e"
} }
} }

View File

@@ -6,35 +6,35 @@ claims:
- id: c01 - id: c01
verdict: "pass" verdict: "pass"
loadBearing: true loadBearing: true
summary: "Cloning handler processes job document identifiers" summary: "Cloning handler uses VoiceCloning and UserAudioProfile services"
rubricQuote: "In `voice-cloning-job-handler`, all reads and updates on `VoiceCloning` and `UserAudioProfile` models" rubricQuote: "`voice-cloning-job-handler` (`VoiceCloning`, `UserAudioProfile`)"
sourceEvidence: "const { metadata, input, _id, userAudioProfileId } = job._doc" 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 (line 104)" sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-cloning-job-handler/index.js (lines 11-12)"
note: "The handler consumes the job document and its two record identifiers. The two model services are imported at lines 11–12 and reachable to the test agent in the workspace." note: "The imported services wrap the named Mongoose models. The agent can trace these imports and model definitions in the workspace."
- id: c02 - id: c02
verdict: "pass" verdict: "pass"
loadBearing: true loadBearing: true
summary: "Cloning update filter currently omits userId" summary: "Synthesis handler uses RecordingSalutation and Recording"
rubricQuote: "due to missing tenant scoping (`userId`)" rubricQuote: "`voice-synthsizer-job-handler` (`RecordingSalutation`, `Recording`)"
sourceEvidence: "const updatedModel = await VoiceCloningModel.findOneAndUpdate(\n { _id: data._id }," sourceEvidence: "const recordingModel = require('./recording')\nconst recordingSalutationModel = require('./recording_salutation')"
sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-cloning-job-handler/voice_cloning/voice_cloning_service.js (lines 68-69)" sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 10-11)"
note: "The update helper filters by record ID alone, supporting the rubric’s isolation concern. The agent can inspect the helper in the workspace." note: "The handler imports the two relevant model modules. The agent can inspect their definitions and call sites in the workspace."
- id: c03 - id: c03
verdict: "pass" verdict: "pass"
loadBearing: true loadBearing: true
summary: "Initial profile lookup derives userId in synthesis" summary: "Initial profile lookup yields userId"
rubricQuote: "the initial `UserAudioProfile` query by `_id: userAudioProfileId` is a valid and necessary tenant-resolution step to discover `userAudioProfile.userId`" rubricQuote: "looking up `UserAudioProfile` by `_id: userAudioProfileId` to resolve `userId`"
sourceEvidence: "const userAudioProfile = await userAudioProfileService.find({\n _id: userAudioProfileId,\n status: 'completed',\n })\n if (userAudioProfile) {\n const { training_model_path, userId } = userAudioProfile[0]" 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)" sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 96-101)"
note: "The shipped handler performs the ID lookup and extracts userId. It is reachable from the workspace; the exemption is a scoring judgment about this flow." note: "The shipped handler looks up the profile by ID and extracts its userId. This flow is reachable in the workspace; the allowance is a grading judgment."
- id: c04 - id: c04
verdict: "pass" verdict: "pass"
loadBearing: true loadBearing: true
summary: "Synthesis downstream reads are initially unscoped" summary: "Worker has a polling loop"
rubricQuote: "All downstream queries and updates on `RecordingSalutation` and `Recording` must be scoped by this profile-derived `userId`" rubricQuote: "background worker polling loops remain active"
sourceEvidence: "const salutationToUpdate = await recordingSalutationModel.findOne({\n _id: salutationId,\n deleted: false,\n })\n\n const recordingToUpdate = await recordingModel.findOne({\n _id: recordingId,\n deleted: false,\n })" sourceEvidence: "while (true) {\n await processQueue()"
sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 152-160)" sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 259-260)"
note: "The current reads omit userId, making the stated target relevant. The test agent can find both call sites in the workspace." note: "The loop exists as stated. The requirement to keep it alive after exceptions is a normative success target, not an assertion that the baseline already does so."
--- ---
# Fact-check rubric claims: potion-voice-user-ownership # Fact-check rubric claims: potion-voice-user-ownership
@@ -42,4 +42,4 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
Source: `harbor-tasks/potion-voice-user-ownership/environment/workspace/` — built from `repos/potion-voice` commit `fcd8a9d0b00406bda1943c234a8f2fecaff9f774`, with no workspace patch. Source: `harbor-tasks/potion-voice-user-ownership/environment/workspace/` — built from `repos/potion-voice` commit `fcd8a9d0b00406bda1943c234a8f2fecaff9f774`, with no workspace patch.
Checked four load-bearing claims. All four are supported by the shipped worker source and reachable to the test agent. The separate context document asserts that `job._doc` contains `userId`; that stronger payload assertion is outside this detector's resolved holistic-rubric input and is not established by these call sites. Checked four load-bearing source facts. All are supported by the shipped workspace and reachable to the test agent. Normative tenant-scoping and error-handling requirements were not treated as claims about current behavior.

View File

@@ -1,17 +1,17 @@
{ {
"version": 1, "version": 1,
"capturedAt": "2026-10-14T17:38:51.161Z", "capturedAt": "2026-10-14T17:46:13.035Z",
"capturedBy": "stamp", "capturedBy": "stamp",
"inputs": { "inputs": {
"prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5",
"graderGuidance": null, "graderGuidance": null,
"sessionJsonl": null, "sessionJsonl": null,
"workspacePatch": null, "workspacePatch": null,
"gitref": "fcd8a9d0", "gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null, "graderGuidanceConsolidated": null,
"holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff",
"atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d",
"rubricsYaml": null, "rubricsYaml": null,
"graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e"
} }
} }

View File

@@ -9,12 +9,12 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
## Positive target present? ## Positive target present?
The rubric specifies tenant-scoped cloning and synthesis operations, an initial profile lookup exemption, no unauthorized rendering or mutation, stable polling after errors, and permitted lifecycle error status. Documentation earns optional extra credit. The rubric names safe rejection before unauthorized effects, tenant filtering for both worker model sets, continuing polling after errors, a valid initial profile lookup, and permissible lifecycle status writes.
## What the grader has to infer ## What the grader has to infer
Specific code changes are left to the agent, but the expected functional behavior is stated affirmatively. The exact helper implementation is open, but the expected behavior is concrete. The Communication clause asks that any explanation match the implementation.
## Overall verdict ## Overall verdict
The rubric gives the grader a concrete target for a strong implementation. A grader can identify what a strong implementation should do.

View File

@@ -1,17 +1,17 @@
{ {
"version": 1, "version": 1,
"capturedAt": "2026-10-14T17:38:51.161Z", "capturedAt": "2026-10-14T17:46:13.035Z",
"capturedBy": "stamp", "capturedBy": "stamp",
"inputs": { "inputs": {
"prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5",
"graderGuidance": null, "graderGuidance": null,
"sessionJsonl": null, "sessionJsonl": null,
"workspacePatch": null, "workspacePatch": null,
"gitref": "fcd8a9d0", "gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null, "graderGuidanceConsolidated": null,
"holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff",
"atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d",
"rubricsYaml": null, "rubricsYaml": null,
"graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e"
} }
} }

View File

@@ -9,12 +9,12 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
## Plausible strong-response approaches ## Plausible strong-response approaches
A strong response can enforce ownership in handler queries, service helpers, or both; reject mismatched records before effects; and retain a live polling loop. It can explain that a profile-derived `userId` validates co-ownership of the selected resources but does not independently authenticate a queue sender. An agent can enforce tenant ownership through handler queries, service helpers, or both, and can use the profile lookup to derive downstream ownership context. A careful response may also disclose that profile-derived `userId` does not independently authenticate the sender of an SQS message.
## Coverage in the rubric ## Coverage in the rubric
The holistic rubric scores outcomes, not a specific helper implementation. Its profile-lookup exemption and owned-job error-status allowance leave room for ordinary alternatives. The extra-credit documentation item is optional. The rubric states outcomes rather than prescribing helper structure. It exempts the initial profile query, permits job error-status tracking, and does not penalize a caveat about the queue trust boundary.
## Overall verdict ## Overall verdict
The major implementation shapes remain creditable. No reference runs yet demonstrate a reasonable alternative being penalized. The main reasonable implementation shapes can receive credit. No reference runs yet show a strong alternative being penalized.

View File

@@ -1,17 +1,17 @@
{ {
"version": 1, "version": 1,
"capturedAt": "2026-10-14T17:38:51.161Z", "capturedAt": "2026-10-14T17:46:13.035Z",
"capturedBy": "stamp", "capturedBy": "stamp",
"inputs": { "inputs": {
"prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5",
"graderGuidance": null, "graderGuidance": null,
"sessionJsonl": null, "sessionJsonl": null,
"workspacePatch": null, "workspacePatch": null,
"gitref": "fcd8a9d0", "gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null, "graderGuidanceConsolidated": null,
"holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff",
"atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d",
"rubricsYaml": null, "rubricsYaml": null,
"graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e"
} }
} }

View File

@@ -9,8 +9,8 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
## Findings ## Findings
The required behavior concerns local query filters, ordering before side effects, and exception handling. Model methods, queue messages, and rendering calls can be stubbed. The task does not require a live SQS queue, MongoDB tenant, or audio provider to decide its central success criteria. The graded slice is local: model predicates, ownership checks before effects, and exception handling. Queue messages, model methods, and audio rendering can be stubbed for verification. No live external provider is required for the rubric's core success conditions.
## Overall verdict ## Overall verdict
A competent agent can implement and verify the required local behavior from the shipped source. Runtime integration with deployed services is outside the required grade. The requested code changes and meaningful local checks can be completed in the shipped workspace.

View File

@@ -1,17 +1,17 @@
{ {
"version": 1, "version": 1,
"capturedAt": "2026-10-14T17:38:51.161Z", "capturedAt": "2026-10-14T17:46:13.035Z",
"capturedBy": "stamp", "capturedBy": "stamp",
"inputs": { "inputs": {
"prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5",
"graderGuidance": null, "graderGuidance": null,
"sessionJsonl": null, "sessionJsonl": null,
"workspacePatch": null, "workspacePatch": null,
"gitref": "fcd8a9d0", "gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null, "graderGuidanceConsolidated": null,
"holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff",
"atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d",
"rubricsYaml": null, "rubricsYaml": null,
"graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e"
} }
} }

View File

@@ -1,7 +1,7 @@
--- ---
detector: detector-over-hinting detector: detector-over-hinting
verdict: clean verdict: clean
confidence: MEDIUM confidence: HIGH
--- ---
# Over-hinting check: potion-voice-user-ownership # Over-hinting check: potion-voice-user-ownership
@@ -9,8 +9,8 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
## Findings ## Findings
The prompt names the security objective and `userId` as the tenant context. Those are genuine deliverable constraints. It does not identify the update helper's ID-only filter, enumerate every vulnerable query, or prescribe the guard order. No authored workspace patch adds comments. The prompt identifies the two handlers and the isolation objective but does not point to individual faulty filters or prescribe an implementation. No authored workspace patch adds solution comments.
## Overall verdict ## Overall verdict
The agent still has to locate and repair the affected operations. No answer-giving passage or authored code comment was found. The agent must still locate the affected operations and decide how to enforce ownership and safe effect ordering.

View File

@@ -1,17 +1,17 @@
{ {
"version": 1, "version": 1,
"capturedAt": "2026-10-14T17:38:51.161Z", "capturedAt": "2026-10-14T17:46:13.035Z",
"capturedBy": "stamp", "capturedBy": "stamp",
"inputs": { "inputs": {
"prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5",
"graderGuidance": null, "graderGuidance": null,
"sessionJsonl": null, "sessionJsonl": null,
"workspacePatch": null, "workspacePatch": null,
"gitref": "fcd8a9d0", "gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null, "graderGuidanceConsolidated": null,
"holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff",
"atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d",
"rubricsYaml": null, "rubricsYaml": null,
"graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e"
} }
} }

View File

@@ -9,12 +9,12 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
## Material ambiguities ## Material ambiguities
None found in the holistic prose. It separates the initial profile lookup from downstream scoped operations and expressly forbids duplicate deductions for overlapping criteria. None found. The rubric identifies the side-effect dealbreaker and explicitly says how to avoid charging the same operation again for query syntax.
## Copy-edit issues ## Copy-edit issues
None found that prevents consistent reading. None found that interrupt a reader applying the rubric.
## Overall verdict ## Overall verdict
The holistic rubric is readable. Whether its charge-once rule and crux weights survive atomic conversion is assessed by rubric coverage and form. The holistic prose is readable and its charge-once rule is operational. Atomic conversion is reviewed separately.

View File

@@ -1,17 +1,17 @@
{ {
"version": 1, "version": 1,
"capturedAt": "2026-10-14T17:38:51.161Z", "capturedAt": "2026-10-14T17:46:13.035Z",
"capturedBy": "stamp", "capturedBy": "stamp",
"inputs": { "inputs": {
"prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5",
"graderGuidance": null, "graderGuidance": null,
"sessionJsonl": null, "sessionJsonl": null,
"workspacePatch": null, "workspacePatch": null,
"gitref": "fcd8a9d0", "gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null, "graderGuidanceConsolidated": null,
"holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff",
"atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d",
"rubricsYaml": null, "rubricsYaml": null,
"graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e"
} }
} }

View File

@@ -11,34 +11,34 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md agai
| Holistic clause | Atomic criterion | Status | | Holistic clause | Atomic criterion | Status |
| --- | --- | --- | | --- | --- | --- |
| Cloning `VoiceCloning` and `UserAudioProfile` scoping | cloning-tenant-isolation | covered | | “Halting Before Unauthorized Side Effects” | prevent-unauthorized-side-effects | covered |
| Synthesis profile resolution and downstream record scoping | synthesis-tenant-isolation-queries-updates; initial-profile-tenant-resolution | covered | | “Tenant-Scoped Database Queries & Updates” | cloning-tenant-isolation; synthesis-tenant-isolation-queries-updates | covered |
| Cross-tenant rendering, file generation, and mutations | prevent-unauthorized-side-effects | covered | | “Initial Profile Tenant Resolution Allowance” | initial-profile-tenant-resolution | covered |
| Worker loop resilience | worker-loop-crash-prevention | covered | | “Routing Note (Charge-Once Rule)” | side-effect and query-scoping elaborations | covered |
| Owned-job failed/error status is allowed | error-status-lifecycle-logging | covered | | “Worker Polling-Loop Resilience” | worker-loop-crash-prevention | covered |
| “Do not double-penalize across overlapping criteria.” | none | missing | | “Error Lifecycle Logging Allowance” | error-status-lifecycle-logging | covered |
| Documentation extra credit | tenant-refactor-documentation | covered | | “Explanations and inline documentation should accurately describe” | none | missing |
## Coverage gaps ## Coverage gaps
### Charge-once routing ### Communication guidance
- **Holistic clause:** “Do not double-penalize across overlapping criteria.” (Narrow Correctness routing note.) - **Holistic clause:** “Explanations and inline documentation should accurately describe the multi-tenant isolation approach implemented across the handlers.” (Communication.)
- **Closest criterion:** `prevent-unauthorized-side-effects` has no corresponding routing note; neither does `tests/grader-context.md`. - **Closest criterion:** None. `tests/atomic-rubric.yaml` has no Communication criterion.
- **What is lost:** A single unscoped write that reaches another tenant can be charged under both a crux query-scoping criterion and the side-effect criterion, contrary to the holistic rule. - **What is lost:** A response with inaccurate explanations or misleading inline documentation is judged under the holistic rubric's task-specific Communication guidance, but the atomic rubric provides no matching criterion.
## Invented content ## Invented content
The two query-scoping criteria carry `crux`, although the holistic rubric's expressly named “Crux Failure / Dealbreaker” is **executing** rendering, file generation, or mutations against unowned records. An omitted filter that has not produced such an effect is still a Narrow Correctness failure, but the atomic severities can promote that narrower omission to the dealbreaker weight. This is a crux-weighting expansion. No new implementation requirement was found. The query-scoping criteria use `certain_dealbreaker` although the holistic rubric reserves its explicit crux label for unauthorized effects; the charge-once elaborations prevent the same operation from being billed twice. This weighting is strong but not a separate unsupported crux criterion.
## Context integrity ## Context integrity
The context document retains the model/filter matrix and initial profile exemption. It omits the holistic charge-once rule and the owned-job error-status allowance; the latter survives in an atomic criterion, while the former survives nowhere. The context document retains the main model/filter facts, the profile-lookup exemption, and the error-status allowance. The charge-once rule is preserved in the atomic elaborations. The missing Communication guidance appears nowhere in the atomic package.
## Crux alignment ## Crux alignment
The holistic dealbreaker trigger is actual unauthorized execution. Atomic `prevent-unauthorized-side-effects` encodes that at `certain_dealbreaker`, after two crux slots were assigned to filter requirements. Those two crux criteria have no equally broad overall-score dealbreaker backing in the holistic rubric. The weighting may diverge for a filter omission without an unauthorized effect. The holistic “Crux Criterion — Halting Before Unauthorized Side Effects” maps to `prevent-unauthorized-side-effects` with `severity: crux`. No other atomic criterion has `crux`; no crux mismatch remains.
## Overall verdict ## Overall verdict
The missing non-trigger and the expanded crux weighting materially change scoring between the two rubric forms. The Communication guidance is a load-bearing holistic clause missing from the atomic package. The main security requirements and charge-once protection now map correctly.

View File

@@ -1,17 +1,17 @@
{ {
"version": 1, "version": 1,
"capturedAt": "2026-10-14T17:38:51.161Z", "capturedAt": "2026-10-14T17:46:13.035Z",
"capturedBy": "stamp", "capturedBy": "stamp",
"inputs": { "inputs": {
"prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5",
"graderGuidance": null, "graderGuidance": null,
"sessionJsonl": null, "sessionJsonl": null,
"workspacePatch": null, "workspacePatch": null,
"gitref": "fcd8a9d0", "gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null, "graderGuidanceConsolidated": null,
"holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff",
"atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d",
"rubricsYaml": null, "rubricsYaml": null,
"graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e"
} }
} }

View File

@@ -11,22 +11,22 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/atomic-rubric.yaml and
## Deterministic contract ## Deterministic contract
The YAML parses; task slug, IDs, categories, severities, crux cap, nonempty guidelines, positive phrasing, and absence of numeric penalty language pass. The extra-credit criterion correctly omits severity. The YAML parses; the task slug, six unique kebab-case IDs, category/severity placement, one-crux cap, nonempty guidelines, positive phrasing, and numeric-penalty check pass.
**FAIL — invalid dimension names:** `worker-loop-crash-prevention` and `error-status-lifecycle-logging` use `Broader Correctness / Systemic Impact`. The schema requires the exact name `Broader Correctness / the craft of software engineering`. Both criteria fail the dimension vocabulary rule. **FAIL — dimension vocabulary:** `worker-loop-crash-prevention` and `error-status-lifecycle-logging` each use `Broader Correctness`. The atomic schema requires the exact criterion name `Broader Correctness / the craft of software engineering`.
## Atomicity and self-containment ## Atomicity and self-containment
Each behavioral criterion is mostly judgeable alone. The side-effect criterion and the query-scoping criteria can both fail from one unscoped write. The atomic text no longer preserves the holistic charge-once routing note, creating a double-counting risk. Each criterion is independently judgeable. The charge-once routing notes in the elaborations legitimately refer to the side-effect criterion and avoid duplicate billing.
## Phrasing and answer keys ## Phrasing and answer keys
The factual keys are inline and bold. No separate wording failure was found. Factual answer keys are inline and bold. No separate phrasing failure was found.
## Fair-grading findings ## Fair-grading findings
The missing charge-once rule matters because the holistic rubric explicitly directs the grader to avoid duplicate deductions for overlapping security criteria. Its loss is primarily a coverage gap; the overlapping atomic criteria also pose a form-level scoring risk. No additional material form defect was found beyond the two invalid dimension strings.
## Overall verdict ## Overall verdict
The two invalid dimension strings are deterministic form failures. The overlapping criteria add a material grading risk until their routing is specified. The two dimension strings break the deterministic contract. The earlier overlap defect has been resolved by charge-once elaborations.

View File

@@ -1,17 +1,17 @@
{ {
"version": 1, "version": 1,
"capturedAt": "2026-10-14T17:38:51.161Z", "capturedAt": "2026-10-14T17:46:13.035Z",
"capturedBy": "stamp", "capturedBy": "stamp",
"inputs": { "inputs": {
"prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5",
"graderGuidance": null, "graderGuidance": null,
"sessionJsonl": null, "sessionJsonl": null,
"workspacePatch": null, "workspacePatch": null,
"gitref": "fcd8a9d0", "gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null, "graderGuidanceConsolidated": null,
"holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff",
"atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d",
"rubricsYaml": null, "rubricsYaml": null,
"graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e"
} }
} }

View File

@@ -21,4 +21,4 @@ None found.
## Overall verdict ## Overall verdict
The rubric describes task behavior independently of reference-run outcomes or grading-framework names. The rubric describes response behavior without reference-run statistics or grading-framework references.

View File

@@ -1,17 +1,17 @@
{ {
"version": 1, "version": 1,
"capturedAt": "2026-10-14T17:38:51.161Z", "capturedAt": "2026-10-14T17:46:13.035Z",
"capturedBy": "stamp", "capturedBy": "stamp",
"inputs": { "inputs": {
"prompt": "6d2ead6581c513784c8a0cdadc1cc673bf89ff62e05ed10acd8962c65ad7b88d", "prompt": "2aa7fe265b45718e278970cdcc094d1a336a95790f22c792cf91f9353cd340a5",
"graderGuidance": null, "graderGuidance": null,
"sessionJsonl": null, "sessionJsonl": null,
"workspacePatch": null, "workspacePatch": null,
"gitref": "fcd8a9d0", "gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null, "graderGuidanceConsolidated": null,
"holisticRubric": "9cbf454a13eb4cd0a91765b48b8cc0666f896a51e66b102659d6c9c109c9d35d", "holisticRubric": "74fe2c283dee61af2efe2f9c4258aa633b2cf72791c6166588c0f03d2ef8e7ff",
"atomicRubric": "5342175425f4b6ffa2f90e4a949a263463345f1c61c5f6a2584280c2a71a3595", "atomicRubric": "ccfaa3b82c205e7eeaf00761efab55d6f923df1162d5be78f4f79116e4aaea3d",
"rubricsYaml": null, "rubricsYaml": null,
"graderContext": "9c06817ea344bf2470e65398cb1efac1988411d51e6a980f1828017d00dad12c" "graderContext": "06a47d4b17bd6dba09c952816d649a1cd87ed4cad592f1fe7bfb27a074525c4e"
} }
} }

View File

@@ -13,7 +13,7 @@ The environment directory contains `Dockerfile`, `browser-optin`, `dns-jail/`, a
## Rationale ## Rationale
This manual task has no injected conversation to compare against the rubric answer key. The prompt and rubric are present; adding a snapshot session would make this check runnable. This manual task has no injected conversation transcript that could reveal the rubric's expected answer. The prompt and rubric are present; a future bundled session would make this check runnable.
## Snapshot hygiene (advisory) ## Snapshot hygiene (advisory)

View File

@@ -1,10 +1,3 @@
# Background Worker Multi-Tenant Isolation Audit & Refactor Our backend background workers currently process voice cloning and speech synthesis jobs using document identifiers provided in SQS queue messages.
## Background & Objective Audit and refactor the worker handlers (`voice-cloning-job-handler` and `voice-synthsizer-job-handler`) to enforce multi-tenant data isolation and prevent cross-tenant data access or modification. Ensure that all background operations handle errors gracefully and maintain worker loop resilience.
Our backend background workers currently process asynchronous voice cloning and speech synthesis jobs. A security audit revealed that database queries within these worker handlers retrieve and update records using document identifiers without consistently validating tenant ownership (`userId`).
You must audit and refactor the worker handler routines to ensure strict multi-tenant isolation across all database operations while preserving worker stability and error logging.
## Key Requirements
1. **Multi-Tenant Isolation**: Ensure that all database queries, updates, and side effects within background worker handlers are strictly scoped by tenant context (`userId`) to prevent unauthorized cross-tenant data access or modification.
2. **Worker Stability & Resilient Error Handling**: Ensure that authorization failures or processing errors are handled gracefully without crashing the worker polling loop.

View File

@@ -1,63 +1,73 @@
task: potion-voice-user-ownership task: potion-voice-user-ownership
criteria: criteria:
- id: cloning-tenant-isolation - id: prevent-unauthorized-side-effects
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 category: primary_intent
dimensions: dimensions:
- Narrow Correctness - Narrow Correctness
severity: crux severity: crux
call_site_key: voice-synthsizer-job-handler 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." guideline: The response should halt processing before executing voice synthesis,
elaboration: "Ensures that both queries and database updates in the speech synthesis handler enforce tenant isolation using userId." audio rendering, or database mutations when tenant validation fails or records
do not match the tenant context. **Answer key:** Handlers must halt before side
- id: prevent-unauthorized-side-effects effects (audio generation and database writes) if tenant verification fails.
elaboration: Crux criterion for multi-tenant isolation. Do not double-charge query
syntax omissions if points are charged here under this side-effects halting rule.
- id: cloning-tenant-isolation
category: primary_intent
dimensions:
- Narrow Correctness
severity: certain_dealbreaker
call_site_key: voice-cloning-job-handler
guideline: The response should scope database queries and updates in the voice cloning
handler using userId alongside record _id. **Answer key:** Reads and updates on
VoiceCloning and UserAudioProfile must filter by userId.
elaboration: Ensures voice cloning operations enforce tenant isolation. Do not charge
if already penalized under prevent-unauthorized-side-effects for the same operation.
- id: synthesis-tenant-isolation-queries-updates
category: primary_intent category: primary_intent
dimensions: dimensions:
- Narrow Correctness - Narrow Correctness
severity: certain_dealbreaker severity: certain_dealbreaker
call_site_key: voice-synthsizer-job-handler 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." guideline: The response should scope downstream speech synthesis queries and updates
elaboration: "Guarantees that unauthorized jobs do not trigger audio rendering, file creation, or database updates." on RecordingSalutation and Recording using the profile-derived userId. **Answer
key:** Downstream RecordingSalutation and Recording queries and updates must be
filtered by tenant userId.
elaboration: Ensures speech synthesis operations enforce tenant isolation. Do not
charge if already penalized under prevent-unauthorized-side-effects for the same
operation.
- id: initial-profile-tenant-resolution - id: initial-profile-tenant-resolution
category: dodged_bullet category: dodged_bullet
dimensions: dimensions:
- Narrow Correctness - Narrow Correctness
severity: possible_dealbreaker severity: possible_dealbreaker
call_site_key: voice-synthsizer-job-handler 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." guideline: 'The response should allow the initial UserAudioProfile lookup by _id:
elaboration: "Prevents improperly docking points for the initial profile query needed to discover the tenant identity." 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 - id: worker-loop-crash-prevention
category: primary_intent category: primary_intent
dimensions: dimensions:
- Broader Correctness / Systemic Impact - Broader Correctness
severity: possible_dealbreaker severity: possible_dealbreaker
call_site_key: voice-synthsizer-job-handler 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." guideline: The response should catch exceptions during message processing to prevent
elaboration: "Ensures background worker loops remain resilient against unhandled errors." 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 - id: error-status-lifecycle-logging
category: dodged_bullet category: dodged_bullet
dimensions: dimensions:
- Broader Correctness / Systemic Impact - Broader Correctness
severity: unlikely_dealbreaker severity: unlikely_dealbreaker
call_site_key: voice-synthsizer-job-handler 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." guideline: The response should permit updating job status to failed or error on
elaboration: "Clarifies that setting job status to failed on the requesting job record does not constitute an unauthorized cross-tenant mutation." 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
- id: tenant-refactor-documentation logging is acceptable lifecycle tracking.
category: extra_credit elaboration: Clarifies that setting job status to failed on the requesting job record
dimensions: does not constitute an unauthorized cross-tenant mutation.
- Communication
call_site_key: voice-synthsizer-job-handler
guideline: "The response should provide clear inline comments or documentation explaining the multi-tenant isolation logic and security boundary refactor across the background handlers. **Answer key:** Adding clear comments or documentation that explains the tenant isolation checks earns extra credit under Communication."
elaboration: "Awards extra credit under Communication for providing clear architectural documentation of the tenant isolation refactor."

View File

@@ -1,19 +1,18 @@
# Grader Context & Reference Answer Key # Grader Context & Ground Truth Reference
## Handler Architecture & Ground Truth Call Sites ## Architecture & Handler Behaviors
### 1. Voice Cloning Handler (`voice-cloning-job-handler`) ### 1. Voice Cloning Handler (`voice-cloning-job-handler`)
* **Payload Structure**: Receives job document directly via `job._doc` containing `_id`, `userAudioProfileId`, and `userId`. - **Queue Payload**: Receives `job._doc` containing `_id`, `userAudioProfileId`, and `userId`.
* **Verified Call Sites**: - **Verified Model Operations**: Reads and updates `VoiceCloning` and `UserAudioProfile` models.
* `VoiceCloning.findOne({ _id: jobId, userId })` or `VoiceCloning.findOneAndUpdate({ _id: jobId, userId }, ...)` - **Tenant Context**: `userId` is supplied directly in the job message. All queries and updates must include `userId` alongside record `_id`. Note: `voiceCloningService.update` requires explicit query filter object `{ _id, userId }` because passing `userId` as a top-level parameter to certain service wrappers may be ignored by underlying filters.
* `UserAudioProfile.findOne({ _id: profileId, userId })`
### 2. Speech Synthesis Handler (`voice-synthsizer-job-handler`) ### 2. Speech Synthesis Handler (`voice-synthsizer-job-handler`)
* **Payload Structure**: Receives SQS payload with `userAudioProfileId`, `recordingId`, and `salutationId`. - **Queue Payload**: Receives `userAudioProfileId`, `recordingId`, and `salutationId`.
* **Tenant Resolution Anchor**: - **Tenant Context Resolution**: The handler looks up `UserAudioProfile` by `_id: userAudioProfileId` to resolve `userAudioProfile.userId`. This initial profile query is the valid trust anchor that establishes tenant identity (`userId`).
* Initial lookup: `UserAudioProfile.findById(userAudioProfileId)` or `findOne({ _id: userAudioProfileId })` resolves `userAudioProfile.userId`. - **Downstream Operations**: Subsequent reads and updates on `RecordingSalutation` and `Recording` must be scoped by `userId` resolved from the profile.
* **Exemption**: The initial `UserAudioProfile` lookup by ID is a required tenant-resolution step to discover `userId` and must NOT be penalized for lacking `userId` in its own query filter. - **Halt Before Side Effects**: If profile lookup fails or downstream records do not match `userId`, the handler must halt before generating audio files or committing database mutations.
* **Downstream Verified Call Sites**:
* `RecordingSalutation.findOne({ _id: salutationId, userId })` ### 3. Error Logging & Worker Resilience
* `Recording.findOne({ _id: recordingId, userId })` - Setting `status: 'failed'` or `status: 'error'` on the requesting job record for error tracking is standard lifecycle logging and is permitted.
* **Halt Before Side Effects**: If profile lookup fails or downstream record `userId` does not match `userAudioProfile.userId`, the handler must halt processing before calling synthesis rendering services or mutating records. - Exceptions during job processing must be handled gracefully to prevent worker polling loops from crashing.

View File

@@ -1,22 +1,19 @@
# Holistic Evaluation Rubric: Potion Voice User Ownership # Holistic Evaluation Rubric
## Task Overview ## Grading Dimensions
The candidate is tasked with auditing and refactoring background worker handlers (`voice-cloning-job-handler` and `voice-synthsizer-job-handler`) to enforce multi-tenant isolation using `userId` scoping across database operations.
--- ### Narrow Correctness
## Grading Standards & Dimensions - **Crux Criterion — Halting Before Unauthorized Side Effects**: The primary dealbreaker is executing voice synthesis, audio rendering, or database mutations against unowned cross-tenant records. Handlers must halt execution before producing side effects if tenant validation fails or records do not belong to the tenant.
- **Tenant-Scoped Database Queries & Updates**: Database reads and updates in `voice-cloning-job-handler` (`VoiceCloning`, `UserAudioProfile`) and `voice-synthsizer-job-handler` (`RecordingSalutation`, `Recording`) should incorporate tenant filtering using `userId`.
- **Initial Profile Tenant Resolution Allowance**: In `voice-synthsizer-job-handler`, looking up `UserAudioProfile` by `_id: userAudioProfileId` to resolve `userId` is a valid tenant-resolution step to establish the tenant context for downstream queries.
- **Routing Note (Charge-Once Rule)**: Do not double-penalize. If an agent fails to halt before unauthorized side effects, charge the failure strictly under the Crux criterion. Do not deduct additional points for query syntax omissions on the same operation.
### 1. Narrow Correctness ### Broader Correctness
* **Crux Failure / Dealbreaker**: Executing voice synthesis rendering, file generation, or database mutations against unowned cross-tenant records due to missing tenant scoping (`userId`).
* **Tenant Isolation Requirements**:
* In `voice-cloning-job-handler`, all reads and updates on `VoiceCloning` and `UserAudioProfile` models must filter by `userId` in addition to record `_id`.
* In `voice-synthsizer-job-handler`, the initial `UserAudioProfile` query by `_id: userAudioProfileId` is a valid and necessary tenant-resolution step to discover `userAudioProfile.userId`. All downstream queries and updates on `RecordingSalutation` and `Recording` must be scoped by this profile-derived `userId`.
* **Routing Note**: Deduct points under Narrow Correctness strictly for missing query filters or executing unauthorized side effects. Do not double-penalize across overlapping criteria.
### 2. Broader Correctness / Systemic Impact - **Worker Polling-Loop Resilience**: Unhandled exceptions during message processing must be caught gracefully so that background worker polling loops remain active.
* **Worker Loop Resilience**: Unhandled exceptions during job processing must not crash the worker polling loop. - **Error Lifecycle Logging Allowance**: Updating job status to `'failed'` or `'error'` on the requesting job record itself for lifecycle tracking is acceptable and must not be penalized as an unauthorized cross-tenant mutation.
* **Lifecycle Error Tracking Allowance**: Setting `status: 'failed'` or `'error'` on the requesting job record itself for error logging when a job is rejected is an expected lifecycle tracking mechanism and must not be penalized.
### 3. Communication ### Communication
* **Extra Credit**: Award extra credit for providing clear documentation or inline comments explaining the multi-tenant isolation logic and security boundary design across the refactored handlers.
- Explanations and inline documentation should accurately describe the multi-tenant isolation approach implemented across the handlers.