2nd file set and run of pre-trial detectors

This commit is contained in:
2026-10-14 12:50:51 -04:00
parent a336717532
commit 32acebb1c5
34 changed files with 373 additions and 352 deletions

View File

@@ -1,17 +1,17 @@
{
"version": 1,
"capturedAt": "2026-10-14T16:37:57.200Z",
"capturedAt": "2026-10-14T16:49:27.570Z",
"capturedBy": "stamp",
"inputs": {
"prompt": "4c44bf9a51d54c2ff9d91b946d875cf59cb094a0c007be5be75b9a47babe1ddb",
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
"graderGuidance": null,
"sessionJsonl": null,
"workspacePatch": null,
"gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null,
"holisticRubric": "e1a8a0612bd3bde9d31e0ad9cc8ba0406494041376daeea484cb6d93834395b5",
"atomicRubric": "f3801722301f9957b14417d9e82255c98cc355c580954a2b4c969765b05088d0",
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
"rubricsYaml": null,
"graderContext": "4a190e72b383ce4d40095fae5a9d1d42fae9bbae7c245ffa2ad7410ebc18fb1d"
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
}
}

View File

@@ -1,7 +1,7 @@
---
detector: detector-answer-obviousness
verdict: over-cued
confidence: HIGH
verdict: obvious
confidence: MEDIUM
---
# Answer-obviousness check: potion-voice-user-ownership
@@ -9,28 +9,28 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
## What the prompt asks
The prompt asks to “audit and refactor all database queries and execution flows” for ownership, explicitly requires `userId` filters, verification before side effects, stable polling, and tests. These are the same behaviors the rubric scores.
The request is to enforce tenant ownership across two workers, stop unauthorized work before side effects, and keep polling. It describes outcomes, leaving the agent to identify the record relationships and implementation.
## Per-expectation assessment
### Tenant filters — over-cued
### Ownership checks — obvious
- **What the rubric requires:** “All database lookups and updates in both worker handlers incorporate `userId` filters alongside record IDs.”
- **Is it obvious from the prompt?** The prompt already says “Ensure every database operation filters by `userId` ... in addition to record identifiers.” This hands over the scored behavior.
- **Verdict for this expectation:** `over-cued`.
- **What the rubric requires:** “Voice cloning queries must match _id, userAudioProfileId, and userId.”
- **Is it obvious from the prompt?** Inspecting the job, linked profile, and tenant is a reasonable way to implement the stated ownership goal. The exact query is an implementation choice, but the rubric also permits equivalent forms elsewhere.
- **Verdict for this expectation:** obvious.
### Authorization order — over-cued
### Synthesis identity — obvious
- **What the rubric requires:** “Tenant ownership is fully validated before initiating voice synthesis model calls, profile creation, or modifying linked audio assets.”
- **Is it obvious from the prompt?** The prompt explicitly says to verify ownership “before executing heavy side effects.”
- **Verdict for this expectation:** `over-cued`.
- **What the rubric requires:** “Voice synthesis queries must look up the UserAudioProfile to resolve userId.”
- **Is it obvious from the prompt?** The handler does not consume a payload userId, so a source-grounded response must address identity. Whether profile-derived identity is sufficient authorization is a separate coverage concern.
- **Verdict for this expectation:** obvious.
### Worker stability and tests — over-cued
### Ordering and stability — obvious
- **What the rubric requires:** “The polling loop continues processing subsequent queue messages cleanly without crashing” and “Candidate provides automated unit tests, mock suites, or verification scripts.”
- **Is it obvious from the prompt?** Requirements 3 and 4 state these outcomes directly.
- **Verdict for this expectation:** `over-cued`.
- **What the rubric requires:** “Tenant verification must occur BEFORE processing audio” and unauthorized work must not terminate the polling loop.
- **Is it obvious from the prompt?** Both behaviors are directly requested as outcomes.
- **Verdict for this expectation:** obvious.
## Overall verdict
The rubric largely scores compliance with explicit instructions. The exact call-site inventory adds requirements that are not grounded in the current source; that is separately recorded in the fact-check and exhaustiveness reports.
The central expectations follow from the request. The prompt does not prescribe the detailed call sites or a test plan. The unresolved trusted-identity question is assessed in the exhaustiveness and clarity reports.

View File

@@ -1,17 +1,17 @@
{
"version": 1,
"capturedAt": "2026-10-14T16:37:57.200Z",
"capturedAt": "2026-10-14T16:49:27.570Z",
"capturedBy": "stamp",
"inputs": {
"prompt": "4c44bf9a51d54c2ff9d91b946d875cf59cb094a0c007be5be75b9a47babe1ddb",
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
"graderGuidance": null,
"sessionJsonl": null,
"workspacePatch": null,
"gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null,
"holisticRubric": "e1a8a0612bd3bde9d31e0ad9cc8ba0406494041376daeea484cb6d93834395b5",
"atomicRubric": "f3801722301f9957b14417d9e82255c98cc355c580954a2b4c969765b05088d0",
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
"rubricsYaml": null,
"graderContext": "4a190e72b383ce4d40095fae5a9d1d42fae9bbae7c245ffa2ad7410ebc18fb1d"
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
}
}

View File

@@ -1,6 +1,6 @@
---
detector: detector-broken-dev-env
verdict: premise-mismatch
verdict: clean
confidence: MEDIUM
---
# Broken-dev-env check: potion-voice-user-ownership
@@ -9,16 +9,12 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
## Verbatim grounding
> “tenant/userId specified in the job payload” — instruction.md, Overview.
> “A recent security audit raised concerns regarding tenant data isolation during job execution.”
> “SpeechSynthesisJob.findOne({ _id: jobId, userId })” — holistic-rubric.md, Database Call-Site Inventory.
> “Ensure that authorization rejections or invalid jobs are handled gracefully so that the worker polling loop remains stable.”
> `const { userAudioProfileId, text, firstName, salutationId, recordingId, baseUrlForPotionAi, env } = job` — voice-synthsizer-job-handler/index.js, lines 74–82.
> `const { training_model_path, userId } = userAudioProfile[0]` — same file, line 101.
The workspace build completed and a node --check sweep of all shipped JavaScript files passed. The package manifests have no test script; the toolkit reported no deterministic test gate.
## Rationale
The current synthesis flow neither reads a payload `userId` nor a `jobId`; it derives `userId` from the profile after a lookup by profile ID. Its `Job` model is used to insert downstream jobs, not to look up a synthesis job before processing. The prompt and rubric therefore assume an ingress contract that the source does not show. The payload might carry unused fields from an external producer, so the mismatch is about the shipped handler behavior, not proof of the external message shape.
The workspace built successfully and `node --check` passed on all JavaScript files. No reference runs exist yet, so this report makes no claim about run corruption or package drift.
The baseline contains the authorization problem the prompt asks the agent to repair. The synthesis identity gap is part of that problem, not an incidental broken environment. No reference runs exist, so run corruption and package drift cannot yet be assessed.

View File

@@ -1,17 +1,17 @@
{
"version": 1,
"capturedAt": "2026-10-14T16:37:57.200Z",
"capturedAt": "2026-10-14T16:49:27.570Z",
"capturedBy": "stamp",
"inputs": {
"prompt": "4c44bf9a51d54c2ff9d91b946d875cf59cb094a0c007be5be75b9a47babe1ddb",
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
"graderGuidance": null,
"sessionJsonl": null,
"workspacePatch": null,
"gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null,
"holisticRubric": "e1a8a0612bd3bde9d31e0ad9cc8ba0406494041376daeea484cb6d93834395b5",
"atomicRubric": "f3801722301f9957b14417d9e82255c98cc355c580954a2b4c969765b05088d0",
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
"rubricsYaml": null,
"graderContext": "4a190e72b383ce4d40095fae5a9d1d42fae9bbae7c245ffa2ad7410ebc18fb1d"
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
}
}

View File

@@ -9,8 +9,8 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
## Findings
`environment/workspace.patch` does not exist. The authored prompt and rubric were read, but there are no added patch lines to scan for shipped credentials or checkout paths.
There is no environment/workspace.patch. The task has no authored patch additions on which to run the credential and checkout-path checks.
## Overall verdict
Re-run after any workspace patch is added. The Dockerfile is the shared toolkit copy, not an authored patch.
Re-run if a workspace patch is added. This result does not make a claim about credentials already present in the source repository.

View File

@@ -1,17 +1,17 @@
{
"version": 1,
"capturedAt": "2026-10-14T16:37:57.200Z",
"capturedAt": "2026-10-14T16:49:27.570Z",
"capturedBy": "stamp",
"inputs": {
"prompt": "4c44bf9a51d54c2ff9d91b946d875cf59cb094a0c007be5be75b9a47babe1ddb",
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
"graderGuidance": null,
"sessionJsonl": null,
"workspacePatch": null,
"gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null,
"holisticRubric": "e1a8a0612bd3bde9d31e0ad9cc8ba0406494041376daeea484cb6d93834395b5",
"atomicRubric": "f3801722301f9957b14417d9e82255c98cc355c580954a2b4c969765b05088d0",
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
"rubricsYaml": null,
"graderContext": "4a190e72b383ce4d40095fae5a9d1d42fae9bbae7c245ffa2ad7410ebc18fb1d"
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
}
}

View File

@@ -9,10 +9,10 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
## Verbatim grounding
> “Voice Cloning Job Handler (`voice-cloning-job-handler`)”
> “Voice Cloning Worker (voice-cloning-job-handler/index.js)”
> “Speech Synthesis Job Handler (`voice-synthsizer-job-handler`)”
> “Voice Synthesis Worker (voice-synthsizer-job-handler/index.js)”
## Rationale
These names identify directories in this task's source workspace. Neither the prompt nor the rubric refers to a sibling task or borrows calibration from another task.
These are paths within this task's source workspace. The current prompt and holistic rubric do not refer to a sibling task or rely on its rubric.

View File

@@ -1,17 +1,17 @@
{
"version": 1,
"capturedAt": "2026-10-14T16:37:57.200Z",
"capturedAt": "2026-10-14T16:49:27.570Z",
"capturedBy": "stamp",
"inputs": {
"prompt": "4c44bf9a51d54c2ff9d91b946d875cf59cb094a0c007be5be75b9a47babe1ddb",
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
"graderGuidance": null,
"sessionJsonl": null,
"workspacePatch": null,
"gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null,
"holisticRubric": "e1a8a0612bd3bde9d31e0ad9cc8ba0406494041376daeea484cb6d93834395b5",
"atomicRubric": "f3801722301f9957b14417d9e82255c98cc355c580954a2b4c969765b05088d0",
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
"rubricsYaml": null,
"graderContext": "4a190e72b383ce4d40095fae5a9d1d42fae9bbae7c245ffa2ad7410ebc18fb1d"
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
}
}

View File

@@ -1,7 +1,7 @@
---
detector: detector-dimension-misapplication
verdict: partial-misapplication
confidence: HIGH
confidence: MEDIUM
---
# Dimension-misapplication check: potion-voice-user-ownership
@@ -9,12 +9,12 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
## Verbatim grounding
> “Any database query that fetches or mutates records using only primary keys without tenant filters hits Section 1 penalty.”
> “Message Contract Analysis (Communication / Extra Credit)”
> “If an agent performs state mutations, profile updates, or audio synthesis against **unowned cross-tenant records**, apply heavy penalty to Section 2.”
> “Agents that note the synthesis message contract gap (missing userId in payload) and implement profile-derived authorization while documenting the gap receive full credit.”
The Grading Standard uses Integrity, Narrow Correctness, Broader Correctness / the craft of software engineering, Persistence, Communication, Verification & Thoroughness, Common Sense, and Thought Partnership. “Section 1” and “Section 2” are rubric subsections, not grading criteria.
The Grading Standard assigns implementation correctness to Narrow or Broader Correctness, while Communication assesses how the work is explained.
## Rationale
The failure descriptions are substantive correctness failures, but their penalties are routed to invented section labels rather than the shared criteria or an explicit overall penalty. A grader cannot tell how “Section 2” maps into the eight scored dimensions. Route security defects to Narrow Correctness or Broader Correctness as appropriate, and state separately if a heavy overall penalty is intended. No reference-run grades exist to audit.
The clause combines reporting the contract gap, which Communication can own, with implementing authorization, which is a correctness behavior. Crediting both only under Communication or extra credit misroutes the implementation part. The ownership and polling penalties are otherwise routed to correctness dimensions. No run grades exist to check for grading drift.

View File

@@ -1,17 +1,17 @@
{
"version": 1,
"capturedAt": "2026-10-14T16:37:57.200Z",
"capturedAt": "2026-10-14T16:49:27.570Z",
"capturedBy": "stamp",
"inputs": {
"prompt": "4c44bf9a51d54c2ff9d91b946d875cf59cb094a0c007be5be75b9a47babe1ddb",
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
"graderGuidance": null,
"sessionJsonl": null,
"workspacePatch": null,
"gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null,
"holisticRubric": "e1a8a0612bd3bde9d31e0ad9cc8ba0406494041376daeea484cb6d93834395b5",
"atomicRubric": "f3801722301f9957b14417d9e82255c98cc355c580954a2b4c969765b05088d0",
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
"rubricsYaml": null,
"graderContext": "4a190e72b383ce4d40095fae5a9d1d42fae9bbae7c245ffa2ad7410ebc18fb1d"
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
}
}

View File

@@ -4,50 +4,42 @@ verdict: fail
confidence: HIGH
claims:
- id: c01
verdict: fail
verdict: partial
loadBearing: true
summary: Cloning handler has a VoiceCloningJob lookup
rubricQuote: 'Job Record Lookup: `VoiceCloningJob.findOne({ _id: jobId, userId })` or equivalent scoping check.'
sourceEvidence: "const voiceCloningService = require('./voice_cloning')"
sourceProvenance: 'harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-cloning-job-handler/index.js (lines 11-14, 100-105, 138-142)'
note: 'The handler consumes a serialized job._doc and updates VoiceCloning by _id; it has no VoiceCloningJob model or incoming jobId lookup. The rubric can ask for a justified ownership check, but this named call-site is not a current source fact.'
- id: c02
verdict: fail
loadBearing: true
summary: Cloning handler has a Recording source lookup
rubricQuote: 'Source Recording Lookup: `Recording.findOne({ _id: recordingId, userId })` ensuring source audio belongs to the user.'
summary: Cloning message contains a userId
rubricQuote: 'Message Payload: Ingests `{ _id, userAudioProfileId, userId, metadata, input, env }`.'
sourceEvidence: 'const { metadata, input, _id, userAudioProfileId } = job._doc'
sourceProvenance: 'harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-cloning-job-handler/index.js (lines 100-104, 156-171)'
note: 'Cloning inputs contain waveUrl and originalText, and the handler has no Recording import or recordingId in its consumed payload. A new lookup would require a new relationship or input contract.'
sourceProvenance: 'harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-cloning-job-handler/index.js (lines 100-107); voice_cloning/voice_cloning_model.js (lines 5-16)'
note: 'The VoiceCloning schema has userId, so a serialized job may carry it, but the current handler does not read it. The exact producer payload is not available locally.'
- id: c02
verdict: partial
loadBearing: true
summary: Synthesis message contains no direct userId or jobId
rubricQuote: 'Note: SQS synthesis payloads do NOT contain a direct `userId` or synthesis `jobId`'
sourceEvidence: 'const { training_model_path, userId } = userAudioProfile[0]'
sourceProvenance: 'harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 74-82, 96-101)'
note: 'The handler does not consume either field and derives userId from a profile. The external producer is not shipped, so absence from every SQS payload is unverified.'
- id: c03
verdict: fail
loadBearing: true
summary: Synthesis handler has a SpeechSynthesisJob lookup
rubricQuote: 'Job Record Lookup: `SpeechSynthesisJob.findOne({ _id: jobId, userId })` or equivalent scoping check.'
sourceEvidence: "const jobService = require('./job')"
sourceProvenance: 'harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 11-14, 74-82, 214-235)'
note: 'The handler has no SpeechSynthesisJob symbol or consumed jobId. Its Job service inserts downstream work after synthesis. This required lookup is not grounded in the shipped workflow.'
summary: Verified cloning job lookup is an active call site
rubricQuote: '`voiceCloningService.read({ _id, userId, userAudioProfileId })` or `VoiceCloningModel.findOne({ _id, userId, deleted: false })`.'
sourceEvidence: "await voiceCloningService.update({ _id, status: 'processing' })"
sourceProvenance: 'harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-cloning-job-handler/index.js (lines 138-142); voice_cloning/voice_cloning_service.js (lines 30-39)'
note: 'A read method exists in the service but this lookup is not an active handler call site. The section calls these Verified Call Sites, conflating proposed fixes with existing code.'
- id: c04
verdict: pass
verdict: partial
loadBearing: true
summary: Synthesis handler looks up a salutation recording
rubricQuote: 'Salutation Recording Lookup: `RecordingSalutation.findOne({ _id: salutationId, userId })` ensuring salutation audio belongs to the user.'
sourceEvidence: 'const salutationToUpdate = await recordingSalutationModel.findOne({'
sourceProvenance: 'harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 152-155)'
note: 'The lookup exists and lacks userId; adding an ownership constraint is reachable from the local code.'
- id: c05
verdict: pass
loadBearing: true
summary: Both workers run a polling loop
rubricQuote: 'The polling loop continues processing subsequent queue messages cleanly without crashing.'
sourceEvidence: 'await processQueue()'
sourceProvenance: 'harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-cloning-job-handler/index.js (lines 321-329); voice-synthsizer-job-handler/index.js (lines 258-262)'
note: 'Both handlers have long-running processQueue loops, so the stability requirement is source-grounded.'
summary: Profile-derived userId authorizes the requesting tenant
rubricQuote: 'Agents that note the synthesis message contract gap (missing `userId` in payload) and implement profile-derived authorization while documenting the gap receive full credit.'
sourceEvidence: 'const { training_model_path, userId } = userAudioProfile[0]'
sourceProvenance: 'harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 96-105)'
note: 'Deriving userId from a payload-selected profile supports consistency checks among linked records. It does not independently establish the requesting tenant without a trusted message principal or producer contract.'
---
# Fact-check rubric claims: potion-voice-user-ownership
Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
Source: `harbor-tasks/potion-voice-user-ownership/environment/workspace/`, built from `potion-voice` commit `fcd8a9d0b00406bda1943c234a8f2fecaff9f774` with no workspace patch.
Source: harbor-tasks/potion-voice-user-ownership/environment/workspace, built from potion-voice commit fcd8a9d0b00406bda1943c234a8f2fecaff9f774 with no workspace patch.
Checked five load-bearing claims. Three required call-site claims fail against the source. The real handler structure is available to the test agent in the workspace, so this is factual drift in the rubric, not hidden evidence.
Checked four load-bearing claims in the structured frontmatter. The “Verified Call Sites” label describes lookups that are not active call sites in the shipped workers. The external SQS producer is absent, so the exact set of payload fields cannot be proven from the handler alone. The handler can derive a userId from a profile, but that does not independently identify the requesting tenant.

View File

@@ -1,17 +1,17 @@
{
"version": 1,
"capturedAt": "2026-10-14T16:37:57.200Z",
"capturedAt": "2026-10-14T16:49:27.570Z",
"capturedBy": "stamp",
"inputs": {
"prompt": "4c44bf9a51d54c2ff9d91b946d875cf59cb094a0c007be5be75b9a47babe1ddb",
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
"graderGuidance": null,
"sessionJsonl": null,
"workspacePatch": null,
"gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null,
"holisticRubric": "e1a8a0612bd3bde9d31e0ad9cc8ba0406494041376daeea484cb6d93834395b5",
"atomicRubric": "f3801722301f9957b14417d9e82255c98cc355c580954a2b4c969765b05088d0",
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
"rubricsYaml": null,
"graderContext": "4a190e72b383ce4d40095fae5a9d1d42fae9bbae7c245ffa2ad7410ebc18fb1d"
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
}
}

View File

@@ -9,12 +9,12 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
## Positive target present?
The rubric states “All database lookups and updates in both worker handlers incorporate `userId` filters alongside record IDs” and “Tenant ownership is fully validated before initiating voice synthesis model calls, profile creation, or modifying linked audio assets.” It also specifies stable polling and verification as passing outcomes.
The rubric affirmatively describes tenant-scoped cloning, profile-derived synthesis checks on both linked recordings, authorization before side effects, and continued polling. It also permits lifecycle status updates on an owned requesting job.
## What the grader has to infer
The grader still has to infer how the proposed lookup inventory fits the actual message and model flow. That is a factual and scope problem, not an absence of a positive success target.
The rubric does not establish how profile-derived identity proves the requesting tenant. That is a substantive answer-key issue, not a lack of positive success language.
## Overall verdict
The rubric gives a concrete affirmative target for the central ownership and sequencing work.
The grader has a concrete positive target for the main code behavior.

View File

@@ -1,17 +1,17 @@
{
"version": 1,
"capturedAt": "2026-10-14T16:37:57.200Z",
"capturedAt": "2026-10-14T16:49:27.570Z",
"capturedBy": "stamp",
"inputs": {
"prompt": "4c44bf9a51d54c2ff9d91b946d875cf59cb094a0c007be5be75b9a47babe1ddb",
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
"graderGuidance": null,
"sessionJsonl": null,
"workspacePatch": null,
"gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null,
"holisticRubric": "e1a8a0612bd3bde9d31e0ad9cc8ba0406494041376daeea484cb6d93834395b5",
"atomicRubric": "f3801722301f9957b14417d9e82255c98cc355c580954a2b4c969765b05088d0",
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
"rubricsYaml": null,
"graderContext": "4a190e72b383ce4d40095fae5a9d1d42fae9bbae7c245ffa2ad7410ebc18fb1d"
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
}
}

View File

@@ -9,12 +9,12 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
## Plausible strong-response approaches
The handler can validate ownership through a tenant-scoped persisted job and related resources if an authoritative tenant is available. It can also identify that the shipped synthesis handler does not consume a payload `userId` or `jobId`, explain the missing trust anchor, and implement only the checks that can be justified from local data while flagging the message-contract gap. Both are reasonable responses to this source.
A source-grounded agent could implement tenant scoping among the job, profile, and recordings, then report that the synthesis message lacks an independently verified requester. Another reasonable response would ask for the producer's trusted tenant contract before asserting that profile-derived identity authorizes a requester, while securing checks the local code can support.
## Coverage in the rubric
The rubric names `SpeechSynthesisJob.findOne({ _id: jobId, userId })` as a required call site. No `SpeechSynthesisJob` symbol exists in the shipped handler; the `Job` model is used for downstream `insertMany`. The second approach is not credited and may be marked down for omitting a lookup that has no current input ID. No reference runs exist to check whether that penalty fires.
The rubric says agents who “implement profile-derived authorization while documenting the gap receive full credit.” A payload containing only an unverified profile ID can select a different tenant's profile and matching records, so deriving userId from that profile only checks mutual ownership among selected records. The rubric does not credit a response that surfaces this remaining authorization gap rather than claiming the requester was verified.
## Overall verdict
The rubric should credit a source-grounded implementation that reports the missing authoritative tenant/job identity, rather than requiring the named synthesis lookup in all cases.
A major reasonable security response is uncredited. The rubric should distinguish record consistency from authorization against an authoritative requester. No reference runs exist to test whether this exclusion has fired in scoring.

View File

@@ -1,17 +1,17 @@
{
"version": 1,
"capturedAt": "2026-10-14T16:37:57.200Z",
"capturedAt": "2026-10-14T16:49:27.570Z",
"capturedBy": "stamp",
"inputs": {
"prompt": "4c44bf9a51d54c2ff9d91b946d875cf59cb094a0c007be5be75b9a47babe1ddb",
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
"graderGuidance": null,
"sessionJsonl": null,
"workspacePatch": null,
"gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null,
"holisticRubric": "e1a8a0612bd3bde9d31e0ad9cc8ba0406494041376daeea484cb6d93834395b5",
"atomicRubric": "f3801722301f9957b14417d9e82255c98cc355c580954a2b4c969765b05088d0",
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
"rubricsYaml": null,
"graderContext": "4a190e72b383ce4d40095fae5a9d1d42fae9bbae7c245ffa2ad7410ebc18fb1d"
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
}
}

View File

@@ -9,8 +9,8 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
## Findings
The strongest near-miss is the rubric's “Audio synthesis model execution and S3 storage operations.” These are effects to guard, not live outcomes the prompt requires the agent to perform. Local tests can stub Mongo model calls, process execution, S3, and SQS to verify ownership order. The existing package declares the JavaScript dependencies; no new package fetch is required by the request.
The strongest external-sounding requirement concerns SQS, MongoDB, model execution, and media uploads. The task asks for local authorization logic around these effects; model calls and clients can be stubbed for local verification. The prompt does not require a live tenant, queue, or bucket outcome.
## Overall verdict
The requested code changes and the essential authorization-order checks can be completed and tested locally. The task should grade local behavior and code evidence, since no live tenant, S3 bucket, or model runtime is supplied.
The essential code changes and verification can be completed within the shipped repository. The manifests do not provide an existing test command, so a test harness may need to be created locally, but that does not require internet access or a live service.

View File

@@ -1,17 +1,17 @@
{
"version": 1,
"capturedAt": "2026-10-14T16:37:57.200Z",
"capturedAt": "2026-10-14T16:49:27.570Z",
"capturedBy": "stamp",
"inputs": {
"prompt": "4c44bf9a51d54c2ff9d91b946d875cf59cb094a0c007be5be75b9a47babe1ddb",
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
"graderGuidance": null,
"sessionJsonl": null,
"workspacePatch": null,
"gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null,
"holisticRubric": "e1a8a0612bd3bde9d31e0ad9cc8ba0406494041376daeea484cb6d93834395b5",
"atomicRubric": "f3801722301f9957b14417d9e82255c98cc355c580954a2b4c969765b05088d0",
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
"rubricsYaml": null,
"graderContext": "4a190e72b383ce4d40095fae5a9d1d42fae9bbae7c245ffa2ad7410ebc18fb1d"
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
}
}

View File

@@ -1,7 +1,7 @@
---
detector: detector-over-hinting
verdict: clear-hinting
confidence: HIGH
verdict: clean
confidence: MEDIUM
---
# Over-hinting check: potion-voice-user-ownership
@@ -9,20 +9,8 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
## Findings
### Exact filters — prompt-hint (clear)
- **Where:** instruction.md, Requirement 1.
- **Quote:** “Ensure every database operation filters by `userId` (or verified tenant identifier) in addition to record identifiers (`jobId`, `recordingId`, `profileId`).”
- **What it pre-empts:** The rubric's central check is whether the agent identifies and applies those ownership filters.
- **De-hinting option:** State the desired tenant isolation outcome and let the agent identify which queries need a tenant predicate.
### Authorization order and tests — prompt-hint (clear)
- **Where:** instruction.md, Requirements 2 and 4.
- **Quote:** “Perform tenant validation and ownership verification **before** executing heavy side effects” and “Add unit or integration tests to verify multi-tenant query scoping.”
- **What it pre-empts:** These sentences prescribe two other rubric pass conditions directly.
- **De-hinting option:** Keep concrete product constraints while removing professional-diligence directives that the rubric is meant to measure.
The strongest near-miss is “Ensure that all database read and write operations strictly enforce tenant isolation by verifying user ownership before processing data or mutating records.” This states the requested security outcome. It does not name the missing predicates, the code locations beyond the two worker directories, or an exact fix. There is no authored workspace patch containing comments.
## Overall verdict
The prompt gives away most of the central graded behavior. There is no authored workspace patch with comments to assess. This is advisory; the author may intentionally keep an explicit implementation request.
The prompt is specific about behavior a real requester would require, while leaving source investigation and implementation to the agent. It does not prescribe tests or expose an answer key.

View File

@@ -1,17 +1,17 @@
{
"version": 1,
"capturedAt": "2026-10-14T16:37:57.200Z",
"capturedAt": "2026-10-14T16:49:27.570Z",
"capturedBy": "stamp",
"inputs": {
"prompt": "4c44bf9a51d54c2ff9d91b946d875cf59cb094a0c007be5be75b9a47babe1ddb",
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
"graderGuidance": null,
"sessionJsonl": null,
"workspacePatch": null,
"gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null,
"holisticRubric": "e1a8a0612bd3bde9d31e0ad9cc8ba0406494041376daeea484cb6d93834395b5",
"atomicRubric": "f3801722301f9957b14417d9e82255c98cc355c580954a2b4c969765b05088d0",
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
"rubricsYaml": null,
"graderContext": "4a190e72b383ce4d40095fae5a9d1d42fae9bbae7c245ffa2ad7410ebc18fb1d"
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
}
}

View File

@@ -9,25 +9,25 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
## Material ambiguities
### Undefined penalty destination
### Unscoped profile lookup versus universal tenant filter
- **Where:** “apply heavy penalty to Section 2” and “hits Section 1 penalty.”
- **Why it's ambiguous:** The Grading Standard scores eight named criteria and an optional overall penalty; Sections 1 and 2 are local rubric headings. Two graders could assign different criterion and overall deductions.
- **Where:** “All database queries and updates must include tenant filters (userId).” The same rubric permits “UserAudioProfile lookup: userAudioProfileService.read({ _id: userAudioProfileId }) ... to resolve the tenant's userId.”
- **Why it's ambiguous:** One reading penalizes the initial profile lookup; another exempts it. The two readings can produce different scores on the same implementation.
### Scope of every database operation
### Requester identity
- **Where:** “All database lookups and updates in both worker handlers incorporate `userId` filters alongside record IDs.”
- **Why it's ambiguous:** This could mean all active handler call sites, all generic service methods, and inserts that do not yet have a record ID. These interpretations change the score.
- **Where:** “resolve the tenant's userId” and “implement profile-derived authorization ... receive full credit.”
- **Why it's ambiguous:** The rubric does not say how a profile selected by an unverified message identifies the requesting tenant. A grader might treat matching profile, salutation, and recording ownership as sufficient, while another would require a trusted principal.
### Expected job failure status
### Penalty target
- **Where:** “Marking the rejected job itself as `status: 'error'` or `status: 'failed'` on the requesting job record is valid lifecycle tracking.”
- **Why it's ambiguous:** The synthesis handler does not consume a persisted job ID, so it is unclear which job record this protects or expects.
- **Where:** “Crux Failure (Broader Correctness)” and “Major Penalty (Narrow Correctness).”
- **Why it's ambiguous:** The text does not say whether “Crux Failure” adjusts the named criterion or the overall score. The atomic rubric encodes a separate dodged-bullet penalty plus two crux criteria.
## Copy-edit issues
None found that materially interrupts reading.
None found that interrupts comprehension.
## Overall verdict
The undefined scoring destinations and uncertain call-site scope make this rubric hard to apply consistently. There are no reference grades yet to resolve how the wording was interpreted.
The unscoped-lookup exception and authorization trust anchor need clarification before consistent grading is possible.

View File

@@ -1,17 +1,17 @@
{
"version": 1,
"capturedAt": "2026-10-14T16:37:57.200Z",
"capturedAt": "2026-10-14T16:49:27.570Z",
"capturedBy": "stamp",
"inputs": {
"prompt": "4c44bf9a51d54c2ff9d91b946d875cf59cb094a0c007be5be75b9a47babe1ddb",
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
"graderGuidance": null,
"sessionJsonl": null,
"workspacePatch": null,
"gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null,
"holisticRubric": "e1a8a0612bd3bde9d31e0ad9cc8ba0406494041376daeea484cb6d93834395b5",
"atomicRubric": "f3801722301f9957b14417d9e82255c98cc355c580954a2b4c969765b05088d0",
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
"rubricsYaml": null,
"graderContext": "4a190e72b383ce4d40095fae5a9d1d42fae9bbae7c245ffa2ad7410ebc18fb1d"
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
}
}

View File

@@ -5,47 +5,48 @@ confidence: HIGH
---
# Rubric-coverage check: potion-voice-user-ownership
Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md against tests/atomic-rubric.yaml and tests/grader-context.md
## Coverage map
| Holistic clause | Criterion id(s) | Status |
| Holistic clause | Atomic criterion | Status |
| --- | --- | --- |
| “All database lookups and updates ... incorporate `userId` filters” | scopes-active-worker-database-operations | partial |
| “Tenant ownership is fully validated before initiating voice synthesis” | prevents-unauthorized-cross-tenant-mutations | covered |
| “apply heavy penalty to Section 2” | prevents-unauthorized-cross-tenant-mutations | partial |
| “prematurely on a user's own tenant records” | none | missing |
| “Marking the rejected job itself ... is valid ... must NOT be penalized” | none | missing |
| “polling loop continues” | ensures-clean-worker-execution | covered |
| “preserve existing service patterns ... compile” | maintains-syntax-and-import-integrity; preserves-existing-service-architecture | covered |
| “automated unit tests, mock suites, or verification scripts” | provides-accurate-verification-reporting | covered |
| VoiceCloning and UserAudioProfile ownership checks | validates-cloning-tenant-ownership | covered |
| Tenant filters on all updates | avoids-unauthorized-cross-tenant-mutations | partial |
| Synthesis profile, salutation, and recording checks | validates-synthesis-tenant-ownership | covered |
| Authorization before side effects | avoids-premature-processing-before-authorization | covered |
| Owned requesting job failure status is allowed | avoids-unauthorized-cross-tenant-mutations elaboration | covered |
| Stable polling | maintains-worker-loop-stability | covered |
| Contract-gap reporting and implementation | handles-synthesis-contract-gap | partial |
## Coverage gaps
### Premature own-tenant processing
### Query predicate requirement weakened
- **Holistic clause:** “If an agent executes processing/synthesis prematurely on a user's **own tenant records** before completing authorization checks, apply a moderate deduction to Section 2.”
- **Closest criterion:** `prevents-unauthorized-cross-tenant-mutations` only addresses unowned records.
- **What is lost:** A response with premature processing on owned records may score cleanly under the atomic form.
- **Holistic clause:** “All database queries and updates must include tenant filters (userId).”
- **Closest criterion:** validates-cloning-tenant-ownership and avoids-unauthorized-cross-tenant-mutations.
- **What is lost:** The atomic rubric can pass code that first reads owned records but later updates by bare _id; the holistic rubric explicitly requires scoped updates.
### Rejected-job status protection
### Contract-gap implementation hidden
- **Holistic clause:** “Marking the rejected job itself as `status: 'error'` or `status: 'failed'` ... must NOT be penalized.”
- **Closest criterion:** None.
- **What is lost:** The atomic rubric does not protect valid lifecycle tracking from being mistaken for an unauthorized mutation.
- **Holistic clause:** “implement profile-derived authorization while documenting the gap receive full credit.”
- **Closest criterion:** handles-synthesis-contract-gap.
- **What is lost:** Its guideline requires only identifying and reporting the gap. Implementation appears only in elaboration, changing what a guideline-only grade would assess.
## Invented content
The atomic criterion `ensures-clean-worker-execution` carries `severity: certain_dealbreaker`, while the holistic rubric only says a loop crash “hit Section 3 penalty” without an equivalent high-severity rule. The atomic severity is unsupported.
The atomic rubric assigns crux severity to both ownership criteria and a separate certain-dealbreaker to cross-tenant effects. The holistic rubric identifies one “Crux Failure” for cross-tenant mutations or synthesis, so this creates a possible duplicate charge for the same defect.
## Context integrity
The context document carries the main call-site list, but it changes the rubric's cloning “Source Recording Lookup” into no corresponding cloning recording lookup. It also omits the job-status call sites. These facts are missing or drifted.
The context file reproduces the holistic rubric, so its facts are present. It also reproduces the unresolved factual and trust-anchor claims.
## Crux alignment
The holistic rubric's heavy Section 2 penalty has no defined overall-score target. The atomic rubric marks both scoping and cross-tenant mutation as crux, even though the holistic rubric labels only the latter as a heavy crux failure. The conversion changes penalty weight.
One holistic crux behavior, cross-tenant side effects, maps to a dodged-bullet criterion and overlaps two crux primary-intent criteria. No routing note says how to avoid charging the same failure repeatedly.
## Overall verdict
Material protections and sequencing distinctions are lost; other severities are invented. The atomic file also fails its own schema, covered by detector-rubric-form.
Update-filter scoping is weakened and the same security defect can be charged more than once. The contract-gap criterion places part of the requirement only in elaboration.

View File

@@ -1,17 +1,17 @@
{
"version": 1,
"capturedAt": "2026-10-14T16:37:57.200Z",
"capturedAt": "2026-10-14T16:49:27.570Z",
"capturedBy": "stamp",
"inputs": {
"prompt": "4c44bf9a51d54c2ff9d91b946d875cf59cb094a0c007be5be75b9a47babe1ddb",
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
"graderGuidance": null,
"sessionJsonl": null,
"workspacePatch": null,
"gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null,
"holisticRubric": "e1a8a0612bd3bde9d31e0ad9cc8ba0406494041376daeea484cb6d93834395b5",
"atomicRubric": "f3801722301f9957b14417d9e82255c98cc355c580954a2b4c969765b05088d0",
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
"rubricsYaml": null,
"graderContext": "4a190e72b383ce4d40095fae5a9d1d42fae9bbae7c245ffa2ad7410ebc18fb1d"
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
}
}

View File

@@ -5,39 +5,36 @@ confidence: HIGH
---
# Rubric-form check: potion-voice-user-ownership
Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
Assessed: harbor-tasks/potion-voice-user-ownership/tests/atomic-rubric.yaml
## Deterministic contract
1. FAIL: top-level `requirements:` appears where the schema requires `criteria:`.
2. PASS: `task: potion-voice-user-ownership` matches the slug.
3. PASS: all six IDs are unique kebab-case.
4. FAIL: categories such as `database`, `security`, and `reliability` are outside `primary_intent`, `extra_credit`, `dodged_bullet`.
5. PASS: the severity values shown are in vocabulary, though placement cannot validate under invalid categories.
6. PASS: exactly two criteria carry `severity: crux`.
7. FAIL: dimensions such as `correctness`, `security`, and `testing` do not name Grading Standard criteria.
8. FAIL: criteria have `guidelines:` rather than the required singular `guideline:` field.
9. PASS: numeric-penalty pattern sweeps found no candidate amounts in the atomic file or grader-context.md.
10. The skill's core document skips number 10; there is no separate check to apply.
11. FAIL: guidelines begin “Verify that” / “Ensure” / “Confirm” rather than the required positive response statements.
1. FAIL: top-level task string is absent; the document contains only criteria.
2. FAIL: no task value names the slug.
3. PASS: all six ids are unique kebab-case.
4. PASS: categories use primary_intent, extra_credit, or dodged_bullet.
5. PASS: severity values and extra-credit placement obey the vocabulary.
6. PASS: two criteria carry crux.
7. FAIL: “Broader Correctness” is not the exact Grading Standard dimension name “Broader Correctness / the craft of software engineering.”
8. PASS: each criterion has a nonempty guideline.
9. PASS: numeric-penalty pattern sweeps found no penalty amount in the atomic rubric or context.
10. The skill core has no separately numbered tenth check.
11. PASS: guidelines use positive “The response should” phrasing.
## Atomicity and self-containment
### Broad database bundle
- **Criterion:** `scopes-active-worker-database-operations`.
- **Where:** “Verify that VoiceCloningJob, SpeechSynthesisJob, Recording, RecordingSalutation, and UserAudioProfile queries include userId scoping.”
- **Why:** Several independent worker paths and resource types are bundled, so one missed call site forces an improvised partial verdict.
- **Suggested split or rewrite:** Separate active call-site groups by worker or resource relationship.
The two ownership criteria each cover multiple independently failing record and update paths. A grader may need to invent a partial verdict when only one linked resource is scoped.
## Phrasing and answer keys
The factual model inventory is not stated as a bold inline answer key. The `guidelines` text is phrased as instructions to the grader rather than one response requirement per criterion.
The contract-gap criterion's elaboration adds “implement profile-derived tenant validation,” while the guideline asks only to identify and report the gap. That is a hidden requirement.
## Fair-grading findings
The invented model names and call sites are not all reachable as current operations in the workspace; see the fact-check report.
Two crux ownership criteria and the certain-dealbreaker for cross-tenant effects can all fail on one unscoped operation, with no routing note to prevent duplicate charging. The validity of profile-derived identity as requester authorization is unresolved.
## Overall verdict
The artifact fails the deterministic schema and would need conversion to the current atomic-rubric format before it can be graded as intended.
The missing task field and invalid dimension break the deterministic contract. The elaboration and overlapping security criteria add grading risks.

View File

@@ -1,17 +1,17 @@
{
"version": 1,
"capturedAt": "2026-10-14T16:37:57.200Z",
"capturedAt": "2026-10-14T16:49:27.570Z",
"capturedBy": "stamp",
"inputs": {
"prompt": "4c44bf9a51d54c2ff9d91b946d875cf59cb094a0c007be5be75b9a47babe1ddb",
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
"graderGuidance": null,
"sessionJsonl": null,
"workspacePatch": null,
"gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null,
"holisticRubric": "e1a8a0612bd3bde9d31e0ad9cc8ba0406494041376daeea484cb6d93834395b5",
"atomicRubric": "f3801722301f9957b14417d9e82255c98cc355c580954a2b4c969765b05088d0",
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
"rubricsYaml": null,
"graderContext": "4a190e72b383ce4d40095fae5a9d1d42fae9bbae7c245ffa2ad7410ebc18fb1d"
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
}
}

View File

@@ -21,4 +21,4 @@ None found.
## Overall verdict
The rubric describes response behavior without tying scores to particular reference runs or naming the evaluation framework. Its other defects are covered by separate detectors.
The rubric describes response behavior in general terms and does not refer to reference-run outcomes or the evaluation framework.

View File

@@ -1,17 +1,17 @@
{
"version": 1,
"capturedAt": "2026-10-14T16:37:57.200Z",
"capturedAt": "2026-10-14T16:49:27.570Z",
"capturedBy": "stamp",
"inputs": {
"prompt": "4c44bf9a51d54c2ff9d91b946d875cf59cb094a0c007be5be75b9a47babe1ddb",
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
"graderGuidance": null,
"sessionJsonl": null,
"workspacePatch": null,
"gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null,
"holisticRubric": "e1a8a0612bd3bde9d31e0ad9cc8ba0406494041376daeea484cb6d93834395b5",
"atomicRubric": "f3801722301f9957b14417d9e82255c98cc355c580954a2b4c969765b05088d0",
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
"rubricsYaml": null,
"graderContext": "4a190e72b383ce4d40095fae5a9d1d42fae9bbae7c245ffa2ad7410ebc18fb1d"
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
}
}

View File

@@ -9,12 +9,12 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
## Verbatim grounding
There is no `environment/session.jsonl` or `session-full.jsonl` in this scaffold-based task. The rubric is present, but there is no injected conversation to compare against it.
No environment/session.jsonl or session-full.jsonl exists. The holistic rubric is present.
## Rationale
This is a manual task. Snapshot leakage cannot occur without a snapshot. Re-run only if a session is added.
This scaffold-based task has no injected conversation, so there is no snapshot surface to compare against the rubric.
## Snapshot hygiene (advisory)
No hygiene issues noted.
No snapshot is present.

View File

@@ -1,24 +1,11 @@
# Voice Service Multi-Tenant Isolation & User Ownership Audit
# Backend Background Workers: Multi-Tenant Data Isolation Audit
## Overview
Our backend background workers currently execute voice cloning and speech synthesis jobs retrieved from background queue messages. However, these worker handlers do not consistently verify that database records, linked audio samples, and output profiles belong to the tenant/userId specified in the job payload before processing.
Our asynchronous background workers (`voice-cloning-job-handler` and `voice-synthsizer-job-handler`) process voice cloning and speech synthesis jobs received via Amazon SQS queue messages.
You must audit and refactor all database queries and execution flows in the voice background job handlers to enforce strict multi-tenant data isolation and proper authorization sequencing.
A recent security audit raised concerns regarding tenant data isolation during job execution. Specifically, background workers retrieve, process, and update MongoDB records based on message payload parameters without consistently validating that all target records belong to the requesting tenant.
## Requirements
## Task Requirements
### 1. Multi-Tenant Query Scoping
- Audit every database lookup, query, update, and deletion across all voice job worker handlers (`voice-cloning-job-handler` and `voice-synthsizer-job-handler`).
- Ensure every database operation filters by `userId` (or verified tenant identifier) in addition to record identifiers (`jobId`, `recordingId`, `profileId`).
- Do not rely solely on unverified primary keys passed in queue payload messages.
### 2. Authorization & Execution Ordering
- Perform tenant validation and ownership verification **before** executing heavy side effects, processing audio artifacts, or modifying linked models.
- If a job payload attempts to access or modify resources that do not belong to the requesting `userId`, immediately halt processing and reject the job.
- Marking an unauthorized or invalid job as failed (`status: 'error'` or `status: 'failed'`) on the job record itself is expected behavior for job tracking. However, no linked user profiles, audio recordings, or cross-tenant records may be read or mutated for unauthorized requests.
### 3. Worker Polling Loop Stability
- Rejections and error handling must be contained cleanly within worker handlers. Uncaught authorization errors or invalid job payloads must not crash the main polling loop or stop worker execution.
### 4. Verification & Testing
- Add unit or integration tests to verify multi-tenant query scoping and confirm that unauthorized cross-tenant requests are blocked before side effects occur.
1. **Audit Multi-Tenant Authorization**: Inspect all database queries and updates across both job handlers (`voice-cloning-job-handler` and `voice-synthsizer-job-handler`) and their associated services. Ensure that all database read and write operations strictly enforce tenant isolation by verifying user ownership before processing data or mutating records.
2. **Halt Unauthorized Execution**: If tenant verification fails or records do not belong to the authorized tenant, worker processing must immediately halt before executing resource-intensive operations or mutating cross-tenant data.
3. **Ensure Worker Stability**: Ensure that authorization rejections or invalid jobs are handled gracefully so that the worker polling loop remains stable and continues processing subsequent queue messages.

View File

@@ -1,64 +1,87 @@
task: potion-voice-user-ownership
requirements:
- id: scopes-active-worker-database-operations
category: database
description: All database lookups and updates in active worker handlers include
userId tenant filters.
criteria:
- id: validates-cloning-tenant-ownership
category: primary_intent
severity: crux
dimensions:
- correctness
- security
guidelines: Verify that VoiceCloningJob, SpeechSynthesisJob, Recording, RecordingSalutation,
and UserAudioProfile queries include userId scoping.
call_site_key: voice-worker-db-queries
- id: prevents-unauthorized-cross-tenant-mutations
category: security
description: Authorization checks occur before side effects, preventing mutations
or synthesis on unowned records.
- Broader Correctness
call_site_key: voice-cloning-job-handler/index.js:read
guideline: 'The response should ensure that **voice cloning jobs validate that both
the VoiceCloning record and UserAudioProfile belong to the payload userId before
processing**.
'
elaboration: 'Verify that the cloning worker reads VoiceCloning and UserAudioProfile
using the payload userId as a required query filter.
'
- id: validates-synthesis-tenant-ownership
category: primary_intent
severity: crux
dimensions:
- security
- correctness
guidelines: Ensure ownership is validated prior to executing model synthesis or
profile mutations. Operations on unowned records must be rejected.
call_site_key: voice-worker-authz-sequence
- id: ensures-clean-worker-execution
category: reliability
description: Rejected unauthorized jobs are handled gracefully without crashing
the worker polling loop.
- Broader Correctness
call_site_key: voice-synthsizer-job-handler/index.js:read
guideline: 'The response should ensure that **speech synthesis jobs resolve tenant
identity via UserAudioProfile and validate ownership on RecordingSalutation and
Recording before generating media or updating records**.
'
elaboration: 'Verify that the synthesis worker obtains tenant userId from UserAudioProfile
and enforces userId matching on RecordingSalutation and Recording queries.
'
- id: handles-synthesis-contract-gap
category: extra_credit
dimensions:
- Communication
call_site_key: voice-synthsizer-job-handler/index.js:contract
guideline: 'The response should **identify and report the synthesis message contract
gap where payload userId is missing from SQS payloads**.
'
elaboration: 'Credit responses that explicitly document that synthesis payloads
lack direct userId and implement profile-derived tenant validation.
'
- id: avoids-unauthorized-cross-tenant-mutations
category: dodged_bullet
severity: certain_dealbreaker
dimensions:
- reliability
guidelines: Confirm that invalid or unauthorized queue messages do not trigger uncaught
exceptions that terminate the worker loop.
call_site_key: voice-worker-loop-error-handling
- id: maintains-syntax-and-import-integrity
category: quality
description: Codebase builds cleanly without syntax, TypeScript compilation, or
module resolution errors.
severity: certain_dealbreaker
dimensions:
- completeness
guidelines: Check that all imports and service references resolve correctly and
compile without errors.
call_site_key: codebase-compilation
- id: preserves-existing-service-architecture
category: architecture
description: Refactoring maintains existing service interfaces and background processing
design patterns.
- Broader Correctness
call_site_key: voice-cloning-job-handler/index.js:update
guideline: 'The response should avoid **updating database records, generating audio,
or executing shell processes when tenant ownership checks fail**.
'
elaboration: 'Failing tenant authorization must halt processing. Updating the requesting
user''s own job status to failed/error for lifecycle tracking is acceptable, but
cross-tenant records must remain untouched.
'
- id: avoids-premature-processing-before-authorization
category: primary_intent
severity: possible_dealbreaker
dimensions:
- maintainability
guidelines: Ensure worker structure follows established service patterns without
breaking surrounding architecture.
call_site_key: architecture-preservation
- id: provides-accurate-verification-reporting
category: testing
description: Includes verification tests or scripts confirming multi-tenant query
scoping and authorization rejection.
severity: unlikely_dealbreaker
- Narrow Correctness
call_site_key: voice-cloning-job-handler/index.js:order
guideline: 'The response should ensure that **tenant authorization checks execute
before initiating audio processing or updating database status to processing**.
'
elaboration: 'Performing processing steps on owned records prior to verifying authorization
represents premature execution and receives a deduction.
'
- id: maintains-worker-loop-stability
category: primary_intent
severity: possible_dealbreaker
dimensions:
- testing
guidelines: Verify presence of unit tests, mock tests, or verification scripts testing
cross-tenant security.
call_site_key: verification-tests
- Narrow Correctness
call_site_key: voice-cloning-job-handler/index.js:loop
guideline: 'The response should ensure that **rejected or unauthorized jobs fail
gracefully without crashing the background worker polling loop**.
'
elaboration: 'The worker loop must catch authorization errors, log the rejection,
and continue polling subsequent SQS messages.
'

View File

@@ -1,24 +1,54 @@
# Grader Context: Voice User Ownership & Multi-Tenant Isolation
# Holistic Evaluation Rubric: potion-voice Multi-Tenant Data Isolation
## Core Architecture
The application runs background workers handling voice cloning and speech synthesis jobs.
Handlers read messages containing `jobId` and `userId` and perform database lookups against MongoDB models (`VoiceCloningJob`, `SpeechSynthesisJob`, `Recording`, `RecordingSalutation`, `UserAudioProfile`).
## Task Overview
This task evaluates the candidate agent's ability to audit and enforce multi-tenant authorization boundaries in asynchronous background workers (`voice-cloning-job-handler` and `voice-synthsizer-job-handler`).
## Key Answer Key & Call Sites
- **Voice Cloning Handler**:
- `VoiceCloningJob.findOne({ _id: jobId, userId })`
- `Recording.findOne({ _id: recordingId, userId })`
- `UserAudioProfile` creation/update scoped by `userId`
- **Speech Synthesis Handler**:
- `SpeechSynthesisJob.findOne({ _id: jobId, userId })`
- `RecordingSalutation.findOne({ _id: salutationId, userId })`
- Synthesis execution blocked if tenant validation fails
---
## Grading Rules
1. **Scoping**: All queries must filter by `userId`.
2. **Sequencing**:
- Unauthorized cross-tenant mutations or synthesis hit Crux heavy penalty under Section 2.
- Premature execution on own-tenant records before authorization receives a moderate penalty under Section 2.
- Updating job status to `error` or `failed` on the job record itself is allowed and expected.
3. **Polling Loop**: Workers must handle rejected jobs without crashing the polling loop.
4. **Verification**: Automated unit tests or mock tests verifying multi-tenant security are acceptable verification methods.
## Technical Context & Verified Call Sites
### 1. Voice Cloning Worker (`voice-cloning-job-handler/index.js`)
* **Message Payload**: Ingests `{ _id, userAudioProfileId, userId, metadata, input, env }`.
* **Database Call Sites**:
* `VoiceCloning` job lookup: `voiceCloningService.read({ _id, userId, userAudioProfileId })` or `VoiceCloningModel.findOne({ _id, userId, deleted: false })`.
* `UserAudioProfile` lookup: `userAudioProfileService.read({ _id: userAudioProfileId, userId })` or `UserAudioProfileModel.findOne({ _id: userAudioProfileId, userId, deleted: false })`.
* Updates: Status updates to `VoiceCloning` and `UserAudioProfile` must include the `userId` tenant filter.
### 2. Voice Synthesis Worker (`voice-synthsizer-job-handler/index.js`)
* **Message Payload**: Ingests `{ userAudioProfileId, text, firstName, salutationId, recordingId }` (Note: SQS synthesis payloads do NOT contain a direct `userId` or synthesis `jobId`).
* **Database Call Sites**:
* `UserAudioProfile` lookup: `userAudioProfileService.read({ _id: userAudioProfileId })` or `findOne({ _id: userAudioProfileId, deleted: false })` to resolve the tenant's `userId`.
* `RecordingSalutation` lookup & update: `recordingSalutationModel.findOne({ _id: salutationId, userId, deleted: false })` and `recordingSalutationModel.findOneAndUpdate({ _id: salutationId, userId, deleted: false }, ...)`.
* `Recording` lookup: `recordingModel.findOne({ _id: recordingId, userId, deleted: false })`.
---
## Grading Criteria & Dimension Assignment
### Core Requirements
1. **Multi-Tenant Scoping (`Broader Correctness`)**:
* All database queries and updates must include tenant filters (`userId`).
* Voice cloning queries must match `_id`, `userAudioProfileId`, and `userId`.
* Voice synthesis queries must look up the `UserAudioProfile` to resolve `userId`, then enforce `userId` checks on `RecordingSalutation` and `Recording`.
2. **Authorization Order & Halt before Side Effects (`Broader Correctness`)**:
* Tenant verification must occur BEFORE processing audio, running ML scripts, or modifying cross-tenant records.
* If authorization fails, the worker must halt immediately and avoid mutating cross-tenant records.
* *Allowance*: Marking the requesting job's own status record as `failed` or `error` for lifecycle tracking is permitted and NOT penalized.
3. **Worker Stability (`Narrow Correctness`)**:
* Handling an unauthorized job must catch errors gracefully and allow the SQS polling loop to continue running.
4. **Message Contract Analysis (`Communication` / `Extra Credit`)**:
* Agents that note the synthesis message contract gap (missing `userId` in payload) and implement profile-derived authorization while documenting the gap receive full credit.
---
## Penalties & Deductions
* **Crux Failure (`Broader Correctness`)**:
* Performing database mutations or audio synthesis on unowned cross-tenant records due to missing or bypassed tenant filters.
* **Major Penalty (`Narrow Correctness`)**:
* Premature execution: Running processing steps on a user's own tenant records before performing tenant authorization checks.
* **Major Penalty (`Narrow Correctness`)**:
* Worker loop instability: Throwing an unhandled exception that terminates the main worker polling loop upon encountering an unauthorized job.

View File

@@ -1,47 +1,54 @@
# Holistic Evaluation Rubric: Voice User Ownership & Multi-Tenant Isolation
# Holistic Evaluation Rubric: potion-voice Multi-Tenant Data Isolation
## Task Overview
The goal of this task is to enforce multi-tenant security and correct authorization sequencing across background voice workers (`voice-cloning-job-handler` and `voice-synthsizer-job-handler`).
This task evaluates the candidate agent's ability to audit and enforce multi-tenant authorization boundaries in asynchronous background workers (`voice-cloning-job-handler` and `voice-synthsizer-job-handler`).
---
## Database Call-Site Inventory (Answer Key)
## Technical Context & Verified Call Sites
Graders must check the following specific database call sites in the worker handlers to verify tenant scoping:
### 1. Voice Cloning Worker (`voice-cloning-job-handler/index.js`)
* **Message Payload**: Ingests `{ _id, userAudioProfileId, userId, metadata, input, env }`.
* **Database Call Sites**:
* `VoiceCloning` job lookup: `voiceCloningService.read({ _id, userId, userAudioProfileId })` or `VoiceCloningModel.findOne({ _id, userId, deleted: false })`.
* `UserAudioProfile` lookup: `userAudioProfileService.read({ _id: userAudioProfileId, userId })` or `UserAudioProfileModel.findOne({ _id: userAudioProfileId, userId, deleted: false })`.
* Updates: Status updates to `VoiceCloning` and `UserAudioProfile` must include the `userId` tenant filter.
### Voice Cloning Job Handler (`voice-cloning-job-handler`)
1. **Job Record Lookup**: `VoiceCloningJob.findOne({ _id: jobId, userId })` or equivalent scoping check.
2. **Source Recording Lookup**: `Recording.findOne({ _id: recordingId, userId })` ensuring source audio belongs to the user.
3. **User Audio Profile Mutation**: `UserAudioProfile.create` or `UserAudioProfile.updateOne` scoped strictly to `userId`.
4. **Job Status Update**: `VoiceCloningJob.updateOne({ _id: jobId, userId }, { status: ... })` (or updating job status on failure).
### Speech Synthesis Job Handler (`voice-synthsizer-job-handler`)
1. **Job Record Lookup**: `SpeechSynthesisJob.findOne({ _id: jobId, userId })` or equivalent scoping check.
2. **Salutation Recording Lookup**: `RecordingSalutation.findOne({ _id: salutationId, userId })` ensuring salutation audio belongs to the user.
3. **Synthesis Processing / Side Effects**: Audio synthesis model execution and S3 storage operations.
4. **Job Status Update**: `SpeechSynthesisJob.updateOne({ _id: jobId, userId }, { status: ... })` (or updating job status on failure).
### 2. Voice Synthesis Worker (`voice-synthsizer-job-handler/index.js`)
* **Message Payload**: Ingests `{ userAudioProfileId, text, firstName, salutationId, recordingId }` (Note: SQS synthesis payloads do NOT contain a direct `userId` or synthesis `jobId`).
* **Database Call Sites**:
* `UserAudioProfile` lookup: `userAudioProfileService.read({ _id: userAudioProfileId })` or `findOne({ _id: userAudioProfileId, deleted: false })` to resolve the tenant's `userId`.
* `RecordingSalutation` lookup & update: `recordingSalutationModel.findOne({ _id: salutationId, userId, deleted: false })` and `recordingSalutationModel.findOneAndUpdate({ _id: salutationId, userId, deleted: false }, ...)`.
* `Recording` lookup: `recordingModel.findOne({ _id: recordingId, userId, deleted: false })`.
---
## Grading Standards & Penalty Guidance
## Grading Criteria & Dimension Assignment
### §1 Scoping Active Worker Database Operations
- **Pass**: All database lookups and updates in both worker handlers incorporate `userId` filters alongside record IDs.
- **Fail / Deductions**: Any database query that fetches or mutates records using only primary keys without tenant filters hits Section 1 penalty.
### Core Requirements
1. **Multi-Tenant Scoping (`Broader Correctness`)**:
* All database queries and updates must include tenant filters (`userId`).
* Voice cloning queries must match `_id`, `userAudioProfileId`, and `userId`.
* Voice synthesis queries must look up the `UserAudioProfile` to resolve `userId`, then enforce `userId` checks on `RecordingSalutation` and `Recording`.
### §2 Authorization Sequencing & Side-Effect Isolation
- **Pass**: Tenant ownership is fully validated before initiating voice synthesis model calls, profile creation, or modifying linked audio assets.
- **Deductions**:
- **Heavy Penalty (Crux Failure)**: If an agent performs state mutations, profile updates, or audio synthesis against **unowned cross-tenant records**, apply heavy penalty to Section 2.
- **Moderate Penalty**: If an agent executes processing/synthesis prematurely on a user's **own tenant records** before completing authorization checks, apply a moderate deduction to Section 2.
- **Allowed Behavior**: Marking the rejected job itself as `status: 'error'` or `status: 'failed'` on the requesting job record is valid lifecycle tracking and must NOT be penalized.
2. **Authorization Order & Halt before Side Effects (`Broader Correctness`)**:
* Tenant verification must occur BEFORE processing audio, running ML scripts, or modifying cross-tenant records.
* If authorization fails, the worker must halt immediately and avoid mutating cross-tenant records.
* *Allowance*: Marking the requesting job's own status record as `failed` or `error` for lifecycle tracking is permitted and NOT penalized.
### §3 Worker Loop Execution Stability
- **Pass**: Unauthorized job rejections or payload errors are handled gracefully. The polling loop continues processing subsequent queue messages cleanly without crashing.
- **Fail / Deductions**: Unhandled exceptions that cause the worker process or polling loop to crash hit Section 3 penalty.
3. **Worker Stability (`Narrow Correctness`)**:
* Handling an unauthorized job must catch errors gracefully and allow the SQS polling loop to continue running.
### §4 Architectural & Import Integrity
- **Pass**: The refactored handlers preserve existing service patterns, maintain clean imports, and compile without syntax or module resolution errors.
4. **Message Contract Analysis (`Communication` / `Extra Credit`)**:
* Agents that note the synthesis message contract gap (missing `userId` in payload) and implement profile-derived authorization while documenting the gap receive full credit.
### §5 Verification & Test Quality
- **Pass**: Candidate provides automated unit tests, mock suites, or verification scripts confirming multi-tenant isolation and unauthorized job rejection.
---
## Penalties & Deductions
* **Crux Failure (`Broader Correctness`)**:
* Performing database mutations or audio synthesis on unowned cross-tenant records due to missing or bypassed tenant filters.
* **Major Penalty (`Narrow Correctness`)**:
* Premature execution: Running processing steps on a user's own tenant records before performing tenant authorization checks.
* **Major Penalty (`Narrow Correctness`)**:
* Worker loop instability: Throwing an unhandled exception that terminates the main worker polling loop upon encountering an unauthorized job.