3rd file set and run of pre-trial detectors
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"version": 1,
|
||||
"capturedAt": "2026-10-14T16:49:27.570Z",
|
||||
"capturedAt": "2026-10-14T17:02:29.562Z",
|
||||
"capturedBy": "stamp",
|
||||
"inputs": {
|
||||
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
|
||||
"prompt": "a638af9fd3e8054a67f3ad6c22681cbd6d5ce96229553a6b642230ed267ecd2f",
|
||||
"graderGuidance": null,
|
||||
"sessionJsonl": null,
|
||||
"workspacePatch": null,
|
||||
"gitref": "fcd8a9d0",
|
||||
"graderGuidanceConsolidated": null,
|
||||
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
|
||||
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
|
||||
"holisticRubric": "228d7edc8ca0b468d3aacf66e4b56a6b6e5d054bafd78d6d379ac17342bb37e7",
|
||||
"atomicRubric": "639221adafe13992363ef0cb56b54cc55b7162956fb35f10a227d7af7f680c6e",
|
||||
"rubricsYaml": null,
|
||||
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
|
||||
"graderContext": "745525f6e186d769a420edfce89563aa2ae905ec61a023af1a0d6d41fc29d812"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
detector: detector-answer-obviousness
|
||||
verdict: obvious
|
||||
confidence: MEDIUM
|
||||
verdict: over-cued
|
||||
confidence: HIGH
|
||||
---
|
||||
# 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 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.
|
||||
The prompt specifies tenant-scoped ownership for both workers and dictates deriving the synthesis tenant from a completed UserAudioProfile before scoping RecordingSalutation and Recording operations.
|
||||
|
||||
## Per-expectation assessment
|
||||
|
||||
### Ownership checks — obvious
|
||||
### Cloning scoping — 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.
|
||||
- **What the rubric requires:** “both VoiceCloning and UserAudioProfile reads and updates must be scoped by userId.”
|
||||
- **Is it obvious from the prompt?** The prompt already states that all lookups and updates for those two records must verify the payload userId.
|
||||
- **Verdict for this expectation:** over-cued.
|
||||
|
||||
### Synthesis identity — obvious
|
||||
### Synthesis scoping — 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.
|
||||
- **What the rubric requires:** “userId resolved from UserAudioProfile must be used to scope downstream RecordingSalutation and Recording reads and updates.”
|
||||
- **Is it obvious from the prompt?** The prompt gives this exact sequence and the same resource names.
|
||||
- **Verdict for this expectation:** over-cued.
|
||||
|
||||
### Ordering and stability — obvious
|
||||
### Halt and loop — 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.
|
||||
- **What the rubric requires:** Halt before side effects and continue polling after rejection.
|
||||
- **Is it obvious from the prompt?** Requirements 2 and 3 state both outcomes directly.
|
||||
- **Verdict for this expectation:** over-cued.
|
||||
|
||||
## Overall verdict
|
||||
|
||||
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.
|
||||
The rubric largely scores behavior the prompt spells out. The source still makes execution difficult, but the central choice of what to do is handed to the agent.
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"version": 1,
|
||||
"capturedAt": "2026-10-14T16:49:27.570Z",
|
||||
"capturedAt": "2026-10-14T17:02:29.562Z",
|
||||
"capturedBy": "stamp",
|
||||
"inputs": {
|
||||
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
|
||||
"prompt": "a638af9fd3e8054a67f3ad6c22681cbd6d5ce96229553a6b642230ed267ecd2f",
|
||||
"graderGuidance": null,
|
||||
"sessionJsonl": null,
|
||||
"workspacePatch": null,
|
||||
"gitref": "fcd8a9d0",
|
||||
"graderGuidanceConsolidated": null,
|
||||
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
|
||||
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
|
||||
"holisticRubric": "228d7edc8ca0b468d3aacf66e4b56a6b6e5d054bafd78d6d379ac17342bb37e7",
|
||||
"atomicRubric": "639221adafe13992363ef0cb56b54cc55b7162956fb35f10a227d7af7f680c6e",
|
||||
"rubricsYaml": null,
|
||||
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
|
||||
"graderContext": "745525f6e186d769a420edfce89563aa2ae905ec61a023af1a0d6d41fc29d812"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,12 +9,10 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
|
||||
|
||||
## Verbatim grounding
|
||||
|
||||
> “A recent security audit raised concerns regarding tenant data isolation during job execution.”
|
||||
> “currently process asynchronous jobs using MongoDB document identifiers supplied in SQS queue payloads without verifying tenant ownership.”
|
||||
|
||||
> “Ensure that authorization rejections or invalid jobs are handled gracefully so that the worker polling loop remains stable.”
|
||||
|
||||
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.
|
||||
The workspace built, and node --check passed for all shipped JavaScript files. No deterministic test suite is declared by the package manifests.
|
||||
|
||||
## Rationale
|
||||
|
||||
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.
|
||||
The unscoped operations are the subject of the task. No unrelated broken build or missing source is evident. There are no reference runs yet to inspect for infrastructure corruption or package drift.
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"version": 1,
|
||||
"capturedAt": "2026-10-14T16:49:27.570Z",
|
||||
"capturedAt": "2026-10-14T17:02:29.562Z",
|
||||
"capturedBy": "stamp",
|
||||
"inputs": {
|
||||
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
|
||||
"prompt": "a638af9fd3e8054a67f3ad6c22681cbd6d5ce96229553a6b642230ed267ecd2f",
|
||||
"graderGuidance": null,
|
||||
"sessionJsonl": null,
|
||||
"workspacePatch": null,
|
||||
"gitref": "fcd8a9d0",
|
||||
"graderGuidanceConsolidated": null,
|
||||
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
|
||||
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
|
||||
"holisticRubric": "228d7edc8ca0b468d3aacf66e4b56a6b6e5d054bafd78d6d379ac17342bb37e7",
|
||||
"atomicRubric": "639221adafe13992363ef0cb56b54cc55b7162956fb35f10a227d7af7f680c6e",
|
||||
"rubricsYaml": null,
|
||||
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
|
||||
"graderContext": "745525f6e186d769a420edfce89563aa2ae905ec61a023af1a0d6d41fc29d812"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
|
||||
|
||||
## Findings
|
||||
|
||||
There is no environment/workspace.patch. The task has no authored patch additions on which to run the credential and checkout-path checks.
|
||||
No environment/workspace.patch exists, so there are no authored patch additions to scan for credentials or checkout paths.
|
||||
|
||||
## Overall verdict
|
||||
|
||||
Re-run if a workspace patch is added. This result does not make a claim about credentials already present in the source repository.
|
||||
Re-run if a workspace patch is added.
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"version": 1,
|
||||
"capturedAt": "2026-10-14T16:49:27.570Z",
|
||||
"capturedAt": "2026-10-14T17:02:29.562Z",
|
||||
"capturedBy": "stamp",
|
||||
"inputs": {
|
||||
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
|
||||
"prompt": "a638af9fd3e8054a67f3ad6c22681cbd6d5ce96229553a6b642230ed267ecd2f",
|
||||
"graderGuidance": null,
|
||||
"sessionJsonl": null,
|
||||
"workspacePatch": null,
|
||||
"gitref": "fcd8a9d0",
|
||||
"graderGuidanceConsolidated": null,
|
||||
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
|
||||
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
|
||||
"holisticRubric": "228d7edc8ca0b468d3aacf66e4b56a6b6e5d054bafd78d6d379ac17342bb37e7",
|
||||
"atomicRubric": "639221adafe13992363ef0cb56b54cc55b7162956fb35f10a227d7af7f680c6e",
|
||||
"rubricsYaml": null,
|
||||
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
|
||||
"graderContext": "745525f6e186d769a420edfce89563aa2ae905ec61a023af1a0d6d41fc29d812"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,10 +9,10 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
|
||||
|
||||
## Verbatim grounding
|
||||
|
||||
> “Voice Cloning Worker (voice-cloning-job-handler/index.js)”
|
||||
> “voice-cloning-job-handler”
|
||||
|
||||
> “Voice Synthesis Worker (voice-synthsizer-job-handler/index.js)”
|
||||
> “voice-synthsizer-job-handler”
|
||||
|
||||
## Rationale
|
||||
|
||||
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.
|
||||
These identify directories in this task's source workspace. Neither the prompt nor holistic rubric points to another graded task.
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"version": 1,
|
||||
"capturedAt": "2026-10-14T16:49:27.570Z",
|
||||
"capturedAt": "2026-10-14T17:02:29.562Z",
|
||||
"capturedBy": "stamp",
|
||||
"inputs": {
|
||||
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
|
||||
"prompt": "a638af9fd3e8054a67f3ad6c22681cbd6d5ce96229553a6b642230ed267ecd2f",
|
||||
"graderGuidance": null,
|
||||
"sessionJsonl": null,
|
||||
"workspacePatch": null,
|
||||
"gitref": "fcd8a9d0",
|
||||
"graderGuidanceConsolidated": null,
|
||||
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
|
||||
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
|
||||
"holisticRubric": "228d7edc8ca0b468d3aacf66e4b56a6b6e5d054bafd78d6d379ac17342bb37e7",
|
||||
"atomicRubric": "639221adafe13992363ef0cb56b54cc55b7162956fb35f10a227d7af7f680c6e",
|
||||
"rubricsYaml": null,
|
||||
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
|
||||
"graderContext": "745525f6e186d769a420edfce89563aa2ae905ec61a023af1a0d6d41fc29d812"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
detector: detector-dimension-misapplication
|
||||
verdict: partial-misapplication
|
||||
verdict: clean
|
||||
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
|
||||
|
||||
> “Message Contract Analysis (Communication / Extra Credit)”
|
||||
> “deduct under Narrow Correctness (Crux penalty).”
|
||||
|
||||
> “Agents that note the synthesis message contract gap (missing userId in payload) and implement profile-derived authorization while documenting the gap receive full credit.”
|
||||
> “Halt Before Side Effects” appears under Broader Correctness.
|
||||
|
||||
The Grading Standard assigns implementation correctness to Narrow or Broader Correctness, while Communication assesses how the work is explained.
|
||||
> “Message Contract Analysis (Extra Credit)” appears under Communication.
|
||||
|
||||
## Rationale
|
||||
|
||||
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.
|
||||
The rubric charges tenant-scoping failures to task correctness, broader sequencing and loop behavior to software craft, and the optional report about the message contract to Communication. No clause charges mere overconfidence to Integrity or an honest limitation as deception. The exact penalty weights may need alignment with the atomic rubric, but this detector found no clear wrong criterion route. No run grades exist to audit.
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"version": 1,
|
||||
"capturedAt": "2026-10-14T16:49:27.570Z",
|
||||
"capturedAt": "2026-10-14T17:02:29.562Z",
|
||||
"capturedBy": "stamp",
|
||||
"inputs": {
|
||||
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
|
||||
"prompt": "a638af9fd3e8054a67f3ad6c22681cbd6d5ce96229553a6b642230ed267ecd2f",
|
||||
"graderGuidance": null,
|
||||
"sessionJsonl": null,
|
||||
"workspacePatch": null,
|
||||
"gitref": "fcd8a9d0",
|
||||
"graderGuidanceConsolidated": null,
|
||||
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
|
||||
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
|
||||
"holisticRubric": "228d7edc8ca0b468d3aacf66e4b56a6b6e5d054bafd78d6d379ac17342bb37e7",
|
||||
"atomicRubric": "639221adafe13992363ef0cb56b54cc55b7162956fb35f10a227d7af7f680c6e",
|
||||
"rubricsYaml": null,
|
||||
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
|
||||
"graderContext": "745525f6e186d769a420edfce89563aa2ae905ec61a023af1a0d6d41fc29d812"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,37 +4,45 @@ verdict: fail
|
||||
confidence: HIGH
|
||||
claims:
|
||||
- id: c01
|
||||
verdict: partial
|
||||
verdict: "fail"
|
||||
loadBearing: true
|
||||
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-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: Verified cloning job lookup is an active call site
|
||||
rubricQuote: '`voiceCloningService.read({ _id, userId, userAudioProfileId })` or `VoiceCloningModel.findOne({ _id, userId, deleted: false })`.'
|
||||
summary: "Proposed cloning job lookup is labeled a verified call site"
|
||||
rubricQuote: "`voiceCloningService.read({ _id, userId, userAudioProfileId })` / `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: partial
|
||||
sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-cloning-job-handler/index.js (lines 100-143)"
|
||||
note: "No such read occurs in the current handler. The service exports read, but the rubric labels a proposed fix as a verified active call site."
|
||||
- id: c02
|
||||
verdict: "fail"
|
||||
loadBearing: true
|
||||
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.'
|
||||
summary: "Passing userId to cloning update is presented as a scoped write"
|
||||
rubricQuote: "`voiceCloningService.update({ _id, userId, status })` / `VoiceCloningModel.findOneAndUpdate({ _id, userId }, ...)`"
|
||||
sourceEvidence: "{ _id: data._id },"
|
||||
sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-cloning-job-handler/voice_cloning/voice_cloning_service.js (lines 65-75); user_audio_profile/user_audio_profile_service.js (lines 65-75)"
|
||||
note: "Both service update functions hardcode a filter by _id only. Passing userId in data does not scope the write; the rubric must require changing the service filter or using a genuinely scoped update."
|
||||
- id: c03
|
||||
verdict: "partial"
|
||||
loadBearing: true
|
||||
summary: "Cloning payload supplies userId"
|
||||
rubricQuote: "Payload supplies `_id` (cloning job ID), `userAudioProfileId`, and `userId`."
|
||||
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-107); voice_cloning/voice_cloning_model.js (lines 5-15)"
|
||||
note: "The model schema contains userId, so it may be serialized into job._doc, but the current handler does not read it and the SQS producer contract is not shipped."
|
||||
- id: c04
|
||||
verdict: "partial"
|
||||
loadBearing: true
|
||||
summary: "Synthesis payload never supplies direct userId or jobId"
|
||||
rubricQuote: "Payloads do **not** supply 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-105)"
|
||||
note: "The handler derives userId from a profile and does not consume a jobId. The producer is absent, so the absolute assertion about every payload is not verified."
|
||||
- id: c05
|
||||
verdict: "partial"
|
||||
loadBearing: true
|
||||
summary: "Profile owner is a trusted requester identity"
|
||||
rubricQuote: "The retrieved `userAudioProfile.userId` establishes the tenant context (`userId`) for all downstream queries."
|
||||
sourceEvidence: "const { training_model_path, userId } = userAudioProfile[0]"
|
||||
sourceProvenance: "harbor-tasks/potion-voice-user-ownership/environment/workspace/voice-synthsizer-job-handler/index.js (lines 96-105)"
|
||||
note: "The lookup supplies an owner for record-consistency checks. Without a separately trusted requester or producer guarantee, a payload-selected profile does not authenticate which tenant requested the job."
|
||||
---
|
||||
# Fact-check rubric claims: potion-voice-user-ownership
|
||||
|
||||
@@ -42,4 +50,4 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
|
||||
|
||||
Source: harbor-tasks/potion-voice-user-ownership/environment/workspace, built from potion-voice commit fcd8a9d0b00406bda1943c234a8f2fecaff9f774 with no workspace patch.
|
||||
|
||||
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.
|
||||
Checked five load-bearing claims. Two fail against the active source code. Three are only partly supported because the producer contract and authoritative requester are absent from the shipped repository.
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"version": 1,
|
||||
"capturedAt": "2026-10-14T16:49:27.570Z",
|
||||
"capturedAt": "2026-10-14T17:02:29.562Z",
|
||||
"capturedBy": "stamp",
|
||||
"inputs": {
|
||||
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
|
||||
"prompt": "a638af9fd3e8054a67f3ad6c22681cbd6d5ce96229553a6b642230ed267ecd2f",
|
||||
"graderGuidance": null,
|
||||
"sessionJsonl": null,
|
||||
"workspacePatch": null,
|
||||
"gitref": "fcd8a9d0",
|
||||
"graderGuidanceConsolidated": null,
|
||||
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
|
||||
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
|
||||
"holisticRubric": "228d7edc8ca0b468d3aacf66e4b56a6b6e5d054bafd78d6d379ac17342bb37e7",
|
||||
"atomicRubric": "639221adafe13992363ef0cb56b54cc55b7162956fb35f10a227d7af7f680c6e",
|
||||
"rubricsYaml": null,
|
||||
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
|
||||
"graderContext": "745525f6e186d769a420edfce89563aa2ae905ec61a023af1a0d6d41fc29d812"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,12 +9,12 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
|
||||
|
||||
## Positive target present?
|
||||
|
||||
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.
|
||||
The rubric states specific positive outcomes for scoped cloning reads and updates, scoped synthesis recording reads and updates, authorization before side effects, and stable polling. It also identifies an acceptable error-status update.
|
||||
|
||||
## What the grader has to infer
|
||||
|
||||
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.
|
||||
The grader must infer whether profile-derived userId represents an authoritative requester; this is a source-grounding and security-model issue, not absence of a positive target.
|
||||
|
||||
## Overall verdict
|
||||
|
||||
The grader has a concrete positive target for the main code behavior.
|
||||
The rubric gives a concrete affirmative target for the main behaviors.
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"version": 1,
|
||||
"capturedAt": "2026-10-14T16:49:27.570Z",
|
||||
"capturedAt": "2026-10-14T17:02:29.562Z",
|
||||
"capturedBy": "stamp",
|
||||
"inputs": {
|
||||
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
|
||||
"prompt": "a638af9fd3e8054a67f3ad6c22681cbd6d5ce96229553a6b642230ed267ecd2f",
|
||||
"graderGuidance": null,
|
||||
"sessionJsonl": null,
|
||||
"workspacePatch": null,
|
||||
"gitref": "fcd8a9d0",
|
||||
"graderGuidanceConsolidated": null,
|
||||
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
|
||||
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
|
||||
"holisticRubric": "228d7edc8ca0b468d3aacf66e4b56a6b6e5d054bafd78d6d379ac17342bb37e7",
|
||||
"atomicRubric": "639221adafe13992363ef0cb56b54cc55b7162956fb35f10a227d7af7f680c6e",
|
||||
"rubricsYaml": null,
|
||||
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
|
||||
"graderContext": "745525f6e186d769a420edfce89563aa2ae905ec61a023af1a0d6d41fc29d812"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,12 +9,12 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
|
||||
|
||||
## Plausible strong-response approaches
|
||||
|
||||
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.
|
||||
A strong agent could implement the specified record-consistency checks and explain that the queue lacks an independent requester identity. Another defensible response could identify that this prevents confirming the requesting tenant, secure the locally provable checks, and ask for the trusted producer or message contract before claiming complete tenant authorization.
|
||||
|
||||
## Coverage in the rubric
|
||||
|
||||
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.
|
||||
The rubric says the profile's userId “establishes the tenant context” and credits reporting that the queue lacks a trusted userId only as extra credit. It does not credit the agent for declining to claim that a profile ID chosen by a queue message authenticates the requester. Matching the ownership of profile, salutation, and recording establishes co-tenancy among records, not the identity of the party requesting the job.
|
||||
|
||||
## Overall verdict
|
||||
|
||||
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.
|
||||
The rubric excludes a major reasonable response to the missing trust anchor. No reference runs exist to assess whether this has affected grading yet.
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"version": 1,
|
||||
"capturedAt": "2026-10-14T16:49:27.570Z",
|
||||
"capturedAt": "2026-10-14T17:02:29.562Z",
|
||||
"capturedBy": "stamp",
|
||||
"inputs": {
|
||||
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
|
||||
"prompt": "a638af9fd3e8054a67f3ad6c22681cbd6d5ce96229553a6b642230ed267ecd2f",
|
||||
"graderGuidance": null,
|
||||
"sessionJsonl": null,
|
||||
"workspacePatch": null,
|
||||
"gitref": "fcd8a9d0",
|
||||
"graderGuidanceConsolidated": null,
|
||||
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
|
||||
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
|
||||
"holisticRubric": "228d7edc8ca0b468d3aacf66e4b56a6b6e5d054bafd78d6d379ac17342bb37e7",
|
||||
"atomicRubric": "639221adafe13992363ef0cb56b54cc55b7162956fb35f10a227d7af7f680c6e",
|
||||
"rubricsYaml": null,
|
||||
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
|
||||
"graderContext": "745525f6e186d769a420edfce89563aa2ae905ec61a023af1a0d6d41fc29d812"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
|
||||
|
||||
## Findings
|
||||
|
||||
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.
|
||||
The strongest external-sounding requirement concerns SQS, MongoDB, synthesis, and S3. The graded work is the local query filters and order of side effects; clients and model calls can be stubbed to verify those behaviors without a live tenant or bucket.
|
||||
|
||||
## Overall verdict
|
||||
|
||||
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.
|
||||
The code task is offline-completable and locally checkable. There is no existing test command, but no new dependency or live service is required by the prompt.
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"version": 1,
|
||||
"capturedAt": "2026-10-14T16:49:27.570Z",
|
||||
"capturedAt": "2026-10-14T17:02:29.562Z",
|
||||
"capturedBy": "stamp",
|
||||
"inputs": {
|
||||
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
|
||||
"prompt": "a638af9fd3e8054a67f3ad6c22681cbd6d5ce96229553a6b642230ed267ecd2f",
|
||||
"graderGuidance": null,
|
||||
"sessionJsonl": null,
|
||||
"workspacePatch": null,
|
||||
"gitref": "fcd8a9d0",
|
||||
"graderGuidanceConsolidated": null,
|
||||
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
|
||||
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
|
||||
"holisticRubric": "228d7edc8ca0b468d3aacf66e4b56a6b6e5d054bafd78d6d379ac17342bb37e7",
|
||||
"atomicRubric": "639221adafe13992363ef0cb56b54cc55b7162956fb35f10a227d7af7f680c6e",
|
||||
"rubricsYaml": null,
|
||||
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
|
||||
"graderContext": "745525f6e186d769a420edfce89563aa2ae905ec61a023af1a0d6d41fc29d812"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
detector: detector-over-hinting
|
||||
verdict: clean
|
||||
confidence: MEDIUM
|
||||
verdict: clear-hinting
|
||||
confidence: HIGH
|
||||
---
|
||||
# Over-hinting check: potion-voice-user-ownership
|
||||
|
||||
@@ -9,8 +9,20 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
|
||||
|
||||
## Findings
|
||||
|
||||
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.
|
||||
### Exact synthesis sequence — prompt-hint (clear)
|
||||
|
||||
- **Where:** instruction.md, Requirement 1.
|
||||
- **Quote:** “Ensure the worker resolves the owner userId from the completed UserAudioProfile and scopes downstream RecordingSalutation and Recording lookups/updates to that userId.”
|
||||
- **What it pre-empts:** This is the same sequence and the same call-site inventory the rubric grades.
|
||||
- **De-hinting option:** State the isolation goal and affected worker, leaving the agent to identify the authoritative tenant relationship and records.
|
||||
|
||||
### Exact cloning targets — prompt-hint (partial)
|
||||
|
||||
- **Where:** instruction.md, Requirement 1.
|
||||
- **Quote:** “All lookups and updates for VoiceCloning and UserAudioProfile records must verify that the records belong to the requesting userId.”
|
||||
- **What it pre-empts:** It names the records and filter the rubric checks.
|
||||
- **De-hinting option:** State the tenant isolation outcome and let the agent enumerate affected lookups and writes.
|
||||
|
||||
## Overall verdict
|
||||
|
||||
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.
|
||||
The prompt substantially hands over the graded approach. There is no authored workspace patch with comments to assess.
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"version": 1,
|
||||
"capturedAt": "2026-10-14T16:49:27.570Z",
|
||||
"capturedAt": "2026-10-14T17:02:29.562Z",
|
||||
"capturedBy": "stamp",
|
||||
"inputs": {
|
||||
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
|
||||
"prompt": "a638af9fd3e8054a67f3ad6c22681cbd6d5ce96229553a6b642230ed267ecd2f",
|
||||
"graderGuidance": null,
|
||||
"sessionJsonl": null,
|
||||
"workspacePatch": null,
|
||||
"gitref": "fcd8a9d0",
|
||||
"graderGuidanceConsolidated": null,
|
||||
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
|
||||
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
|
||||
"holisticRubric": "228d7edc8ca0b468d3aacf66e4b56a6b6e5d054bafd78d6d379ac17342bb37e7",
|
||||
"atomicRubric": "639221adafe13992363ef0cb56b54cc55b7162956fb35f10a227d7af7f680c6e",
|
||||
"rubricsYaml": null,
|
||||
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
|
||||
"graderContext": "745525f6e186d769a420edfce89563aa2ae905ec61a023af1a0d6d41fc29d812"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
detector: detector-rubric-clarity
|
||||
verdict: material-issues
|
||||
confidence: HIGH
|
||||
verdict: clear
|
||||
confidence: MEDIUM
|
||||
---
|
||||
# Rubric-clarity check: potion-voice-user-ownership
|
||||
|
||||
@@ -9,25 +9,12 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
|
||||
|
||||
## Material ambiguities
|
||||
|
||||
### Unscoped profile lookup versus universal tenant filter
|
||||
|
||||
- **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.
|
||||
|
||||
### Requester identity
|
||||
|
||||
- **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.
|
||||
|
||||
### Penalty target
|
||||
|
||||
- **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.
|
||||
None found. The rubric distinguishes cloning from synthesis, names the required query scopes, and states where its crux penalty applies. Its use of “Trust Anchor Resolution” may be substantively wrong, but its intended meaning is clear; the fact-check and exhaustiveness reports assess that issue.
|
||||
|
||||
## Copy-edit issues
|
||||
|
||||
None found that interrupts comprehension.
|
||||
None found that interrupts reading.
|
||||
|
||||
## Overall verdict
|
||||
|
||||
The unscoped-lookup exception and authorization trust anchor need clarification before consistent grading is possible.
|
||||
The current rubric is understandable enough to apply consistently, subject to the source-fact and security-model defects in other reports.
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"version": 1,
|
||||
"capturedAt": "2026-10-14T16:49:27.570Z",
|
||||
"capturedAt": "2026-10-14T17:02:29.562Z",
|
||||
"capturedBy": "stamp",
|
||||
"inputs": {
|
||||
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
|
||||
"prompt": "a638af9fd3e8054a67f3ad6c22681cbd6d5ce96229553a6b642230ed267ecd2f",
|
||||
"graderGuidance": null,
|
||||
"sessionJsonl": null,
|
||||
"workspacePatch": null,
|
||||
"gitref": "fcd8a9d0",
|
||||
"graderGuidanceConsolidated": null,
|
||||
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
|
||||
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
|
||||
"holisticRubric": "228d7edc8ca0b468d3aacf66e4b56a6b6e5d054bafd78d6d379ac17342bb37e7",
|
||||
"atomicRubric": "639221adafe13992363ef0cb56b54cc55b7162956fb35f10a227d7af7f680c6e",
|
||||
"rubricsYaml": null,
|
||||
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
|
||||
"graderContext": "745525f6e186d769a420edfce89563aa2ae905ec61a023af1a0d6d41fc29d812"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,40 +13,34 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md agai
|
||||
|
||||
| Holistic clause | Atomic criterion | Status |
|
||||
| --- | --- | --- |
|
||||
| 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 |
|
||||
| Cloning records scoped by userId | scopes-cloning-handler-queries-by-tenant | covered |
|
||||
| Synthesis recordings scoped by derived userId | scopes-synthesizer-handler-queries-by-tenant | covered |
|
||||
| Cross-tenant synthesis or updates are a Narrow Correctness crux | two scoping criteria and halts-processing-before-side-effects | partial |
|
||||
| Halt before synthesis, file rendering, and S3 work | halts-processing-before-side-effects | covered |
|
||||
| Allowed error status on requesting job | halts-processing-before-side-effects | covered |
|
||||
| Polling continues after rejection | maintains-worker-polling-loop-stability | covered |
|
||||
| Extra credit for message-contract report | reports-synthesis-queue-message-contract-limitation | covered |
|
||||
|
||||
## Coverage gaps
|
||||
|
||||
### Query predicate requirement weakened
|
||||
### Penalty strength and placement drift
|
||||
|
||||
- **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.
|
||||
|
||||
### Contract-gap implementation hidden
|
||||
|
||||
- **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.
|
||||
- **Holistic clause:** “deduct under Narrow Correctness (Crux penalty)” for cross-tenant effects.
|
||||
- **Closest criterion:** two scoping criteria at crux, plus halts-processing-before-side-effects at certain_dealbreaker under Broader Correctness.
|
||||
- **What is lost:** One failure can receive a different or heavier charge than the holistic rubric describes, even though a routing note asks to avoid double-penalizing.
|
||||
|
||||
## Invented content
|
||||
|
||||
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.
|
||||
The certain_dealbreaker severity on the halt criterion has no distinct matching heavy penalty in the holistic rubric.
|
||||
|
||||
## Context integrity
|
||||
|
||||
The context file reproduces the holistic rubric, so its facts are present. It also reproduces the unresolved factual and trust-anchor claims.
|
||||
The context document contains the main ground truth but reproduces the false “verified call sites” and profile trust-anchor assumptions noted by fact-check.
|
||||
|
||||
## Crux alignment
|
||||
|
||||
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.
|
||||
The holistic rubric identifies one cross-tenant crux behavior under Narrow Correctness. The atomic rubric uses two crux criteria plus a separate certain-dealbreaker for related behavior, without a precise one-defect allocation.
|
||||
|
||||
## Overall verdict
|
||||
|
||||
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.
|
||||
The conversion changes severity and criterion placement for the central failure.
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"version": 1,
|
||||
"capturedAt": "2026-10-14T16:49:27.570Z",
|
||||
"capturedAt": "2026-10-14T17:02:29.562Z",
|
||||
"capturedBy": "stamp",
|
||||
"inputs": {
|
||||
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
|
||||
"prompt": "a638af9fd3e8054a67f3ad6c22681cbd6d5ce96229553a6b642230ed267ecd2f",
|
||||
"graderGuidance": null,
|
||||
"sessionJsonl": null,
|
||||
"workspacePatch": null,
|
||||
"gitref": "fcd8a9d0",
|
||||
"graderGuidanceConsolidated": null,
|
||||
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
|
||||
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
|
||||
"holisticRubric": "228d7edc8ca0b468d3aacf66e4b56a6b6e5d054bafd78d6d379ac17342bb37e7",
|
||||
"atomicRubric": "639221adafe13992363ef0cb56b54cc55b7162956fb35f10a227d7af7f680c6e",
|
||||
"rubricsYaml": null,
|
||||
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
|
||||
"graderContext": "745525f6e186d769a420edfce89563aa2ae905ec61a023af1a0d6d41fc29d812"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,30 +11,30 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/atomic-rubric.yaml
|
||||
|
||||
## Deterministic contract
|
||||
|
||||
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.
|
||||
1. PASS: top-level task string and criteria list exist.
|
||||
2. PASS: task equals the slug.
|
||||
3. PASS: five ids are unique kebab-case.
|
||||
4. PASS: categories use the allowed vocabulary.
|
||||
5. PASS: severities use the allowed vocabulary and extra credit has none.
|
||||
6. PASS: exactly two criteria carry crux.
|
||||
7. FAIL: “Broader Correctness” is not the exact Grading Standard name “Broader Correctness / the craft of software engineering.”
|
||||
8. FAIL: criteria use guidelines (plural), not the required guideline field; as written, each criterion lacks guideline.
|
||||
9. PASS: numeric penalty pattern sweeps found no amount in the atomic rubric or context.
|
||||
10. The skill core skips number 10; no independent check exists.
|
||||
11. PASS in substance: the authored guideline text uses positive phrasing, although under the wrong key.
|
||||
|
||||
## Atomicity and self-containment
|
||||
|
||||
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.
|
||||
The scoping criteria bundle independently failing reads and writes, but these are closely related by one tenant boundary. No separate atomicity failure is asserted beyond the invalid schema.
|
||||
|
||||
## Phrasing and answer keys
|
||||
|
||||
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.
|
||||
The intended factual answer keys are bold inline in the guidelines text. The plural field name prevents the schema from receiving them as guidelines.
|
||||
|
||||
## Fair-grading findings
|
||||
|
||||
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.
|
||||
The two crux criteria and the certain-dealbreaker for unauthorized side effects overlap. A routing note says not to double-penalize, but the criteria still leave unclear which severity to apply to a single unscoped update.
|
||||
|
||||
## Overall verdict
|
||||
|
||||
The missing task field and invalid dimension break the deterministic contract. The elaboration and overlapping security criteria add grading risks.
|
||||
The invalid dimension and plural guidelines key break the deterministic contract. The overlapping severities merit a tighter allocation.
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"version": 1,
|
||||
"capturedAt": "2026-10-14T16:49:27.570Z",
|
||||
"capturedAt": "2026-10-14T17:02:29.562Z",
|
||||
"capturedBy": "stamp",
|
||||
"inputs": {
|
||||
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
|
||||
"prompt": "a638af9fd3e8054a67f3ad6c22681cbd6d5ce96229553a6b642230ed267ecd2f",
|
||||
"graderGuidance": null,
|
||||
"sessionJsonl": null,
|
||||
"workspacePatch": null,
|
||||
"gitref": "fcd8a9d0",
|
||||
"graderGuidanceConsolidated": null,
|
||||
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
|
||||
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
|
||||
"holisticRubric": "228d7edc8ca0b468d3aacf66e4b56a6b6e5d054bafd78d6d379ac17342bb37e7",
|
||||
"atomicRubric": "639221adafe13992363ef0cb56b54cc55b7162956fb35f10a227d7af7f680c6e",
|
||||
"rubricsYaml": null,
|
||||
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
|
||||
"graderContext": "745525f6e186d769a420edfce89563aa2ae905ec61a023af1a0d6d41fc29d812"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,4 +21,4 @@ None found.
|
||||
|
||||
## Overall verdict
|
||||
|
||||
The rubric describes response behavior in general terms and does not refer to reference-run outcomes or the evaluation framework.
|
||||
The rubric states general response qualities and does not rely on reference-run outcomes or name the evaluation framework.
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"version": 1,
|
||||
"capturedAt": "2026-10-14T16:49:27.570Z",
|
||||
"capturedAt": "2026-10-14T17:02:29.562Z",
|
||||
"capturedBy": "stamp",
|
||||
"inputs": {
|
||||
"prompt": "238a880bceef5a1a16501fedcde39077939695a4556905386c75e28317dd5512",
|
||||
"prompt": "a638af9fd3e8054a67f3ad6c22681cbd6d5ce96229553a6b642230ed267ecd2f",
|
||||
"graderGuidance": null,
|
||||
"sessionJsonl": null,
|
||||
"workspacePatch": null,
|
||||
"gitref": "fcd8a9d0",
|
||||
"graderGuidanceConsolidated": null,
|
||||
"holisticRubric": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb",
|
||||
"atomicRubric": "d9f08789f6c99755b7321eb070788246b669404640c272e5250147f38985766c",
|
||||
"holisticRubric": "228d7edc8ca0b468d3aacf66e4b56a6b6e5d054bafd78d6d379ac17342bb37e7",
|
||||
"atomicRubric": "639221adafe13992363ef0cb56b54cc55b7162956fb35f10a227d7af7f680c6e",
|
||||
"rubricsYaml": null,
|
||||
"graderContext": "662b11e96688136212a37e41caef4e3e5199d78903f539ecfd96d3bcfdaf1ceb"
|
||||
"graderContext": "745525f6e186d769a420edfce89563aa2ae905ec61a023af1a0d6d41fc29d812"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ No environment/session.jsonl or session-full.jsonl exists. The holistic rubric i
|
||||
|
||||
## Rationale
|
||||
|
||||
This scaffold-based task has no injected conversation, so there is no snapshot surface to compare against the rubric.
|
||||
This manual task has no injected conversation from which an answer could leak.
|
||||
|
||||
## Snapshot hygiene (advisory)
|
||||
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
# Backend Background Workers: Multi-Tenant Data Isolation Audit
|
||||
# Enforce Multi-Tenant Data Isolation in Background Workers
|
||||
|
||||
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.
|
||||
Our backend background workers (`voice-cloning-job-handler` and `voice-synthsizer-job-handler`) currently process asynchronous jobs using MongoDB document identifiers supplied in SQS queue payloads without verifying tenant ownership.
|
||||
|
||||
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. **Audit & Scope Database Queries**:
|
||||
- Refactor database operations across both worker handlers (`voice-cloning-job-handler` and `voice-synthsizer-job-handler`) and their associated services (`user_audio_profile_service`, `voice_cloning_service`, `job_service`, `salutation_service`) to ensure that reads and updates verify tenant ownership.
|
||||
- For `voice-cloning-job-handler`, payloads include a `userId`. All lookups and updates for `VoiceCloning` and `UserAudioProfile` records must verify that the records belong to the requesting `userId`.
|
||||
- For `voice-synthsizer-job-handler`, SQS payloads supply resource identifiers (`userAudioProfileId`, `recordingId`, `salutationId`). Ensure the worker resolves the owner `userId` from the completed `UserAudioProfile` and scopes downstream `RecordingSalutation` and `Recording` lookups/updates to that `userId`.
|
||||
|
||||
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.
|
||||
2. **Halt Unauthorized Operations**:
|
||||
- If a record does not exist or tenant authorization fails, the worker must halt processing before performing voice synthesis, file system operations, or downstream record mutations.
|
||||
- Updating job/status tracking records to reflect an error state (e.g., `status: 'error'` or `'failed'`) for lifecycle tracking is acceptable, but no unowned profile or recording data may be read or mutated.
|
||||
|
||||
3. **Maintain Worker Loop Stability**:
|
||||
- Ensure that rejected or unauthorized jobs do not cause uncaught exceptions that crash the background worker polling loop.
|
||||
|
||||
@@ -1,87 +1,56 @@
|
||||
task: potion-voice-user-ownership
|
||||
criteria:
|
||||
- id: validates-cloning-tenant-ownership
|
||||
- id: scopes-cloning-handler-queries-by-tenant
|
||||
category: primary_intent
|
||||
severity: crux
|
||||
dimensions:
|
||||
- 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
|
||||
- Narrow Correctness
|
||||
call_site_key: voice_cloning_handler_tenant_scope
|
||||
guidelines: 'The response should enforce tenant isolation in the voice cloning handler
|
||||
by including userId in all VoiceCloning and UserAudioProfile lookups and updates.
|
||||
Crux failure if cloning queries operate without userId filtering. Answer key:
|
||||
**voiceCloningService.read({ _id, userId, userAudioProfileId }) and userAudioProfileService.read({
|
||||
_id: userAudioProfileId, userId })**'
|
||||
- id: scopes-synthesizer-handler-queries-by-tenant
|
||||
category: primary_intent
|
||||
severity: crux
|
||||
dimensions:
|
||||
- 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
|
||||
- Narrow Correctness
|
||||
call_site_key: synthesizer_handler_tenant_scope
|
||||
guidelines: 'The response should enforce tenant isolation in the speech synthesizer
|
||||
handler by using the userId retrieved from UserAudioProfile to scope downstream
|
||||
RecordingSalutation and Recording lookups and updates. Crux failure if synthesis
|
||||
or updates run on unowned cross-tenant records. Answer key: **recordingSalutationModel.findOne({
|
||||
_id: salutationId, userId, deleted: false }) and recordingModel.findOne({ _id:
|
||||
recordingId, userId, deleted: false })**'
|
||||
- id: halts-processing-before-side-effects
|
||||
category: primary_intent
|
||||
severity: certain_dealbreaker
|
||||
dimensions:
|
||||
- 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
|
||||
call_site_key: halt_before_side_effects
|
||||
guidelines: 'The response should ensure background worker processing halts immediately
|
||||
if tenant authorization fails, preventing ML synthesis scripts or S3 file uploads
|
||||
from running on unauthorized jobs. Setting status to error/failed on the requesting
|
||||
job record is allowed. Routing note: Do not double-penalize if already penalized
|
||||
under crux tenant scoping. Answer key: **if (!cloningRecord || !audioProfile)
|
||||
throw new Error(''Unauthorized'')**'
|
||||
- id: maintains-worker-polling-loop-stability
|
||||
category: primary_intent
|
||||
severity: possible_dealbreaker
|
||||
dimensions:
|
||||
- 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
|
||||
- Broader Correctness
|
||||
call_site_key: worker_polling_loop_stability
|
||||
guidelines: 'The response should ensure that authorization rejections or missing
|
||||
tenant records are caught gracefully so the background worker polling loop continues
|
||||
processing subsequent queue messages without crashing. Answer key: **catch (error)
|
||||
block logs error and resolves/continues polling loop**'
|
||||
- id: reports-synthesis-queue-message-contract-limitation
|
||||
category: extra_credit
|
||||
dimensions:
|
||||
- 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.
|
||||
|
||||
'
|
||||
- Communication
|
||||
call_site_key: synthesis_message_contract_analysis
|
||||
guidelines: 'The response should receive extra credit if it notes that SQS synthesis
|
||||
payloads lack an explicit trusted userId field, explaining that tenant identity
|
||||
is derived from the UserAudioProfile lookup. Answer key: **Explicit analysis noting
|
||||
SQS synthesis messages carry userAudioProfileId rather than explicit userId**'
|
||||
|
||||
@@ -1,54 +1,27 @@
|
||||
# Holistic Evaluation Rubric: potion-voice Multi-Tenant Data Isolation
|
||||
# Grader Context: potion-voice-user-ownership
|
||||
|
||||
## 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`).
|
||||
## Domain & Codebase Overview
|
||||
This task evaluates multi-tenant security in the Potion voice background processing tier (`voice-cloning-job-handler` and `voice-synthsizer-job-handler`).
|
||||
|
||||
---
|
||||
## Verified Database Models & Handler Call Sites
|
||||
|
||||
## Technical Context & Verified Call Sites
|
||||
### Voice Cloning Worker (`voice-cloning-job-handler/index.js`)
|
||||
- Payload provides `_id`, `userAudioProfileId`, `userId`.
|
||||
- Verified service calls:
|
||||
- `voiceCloningService.read({ _id, userId, userAudioProfileId })`
|
||||
- `userAudioProfileService.read({ _id: userAudioProfileId, userId })`
|
||||
- `voiceCloningService.update({ _id, userId, status })`
|
||||
- `userAudioProfileService.update({ _id: userAudioProfileId, userId, status })`
|
||||
|
||||
### 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.
|
||||
### Speech Synthesizer Worker (`voice-synthsizer-job-handler/index.js`)
|
||||
- Payload provides `userAudioProfileId`, `recordingId`, `salutationId`. (Does NOT supply direct `userId` or `jobId`).
|
||||
- Trust Anchor: `UserAudioProfileModel.findOne({ _id: userAudioProfileId, status: 'completed' })` resolves `userId`.
|
||||
- Verified model calls using derived `userId`:
|
||||
- `recordingSalutationModel.findOne({ _id: salutationId, userId, deleted: false })`
|
||||
- `recordingModel.findOne({ _id: recordingId, userId, deleted: false })`
|
||||
- `recordingSalutationModel.findOneAndUpdate({ _id: salutationId, userId, deleted: false }, ...)`
|
||||
|
||||
### 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.
|
||||
## Evaluation Guidelines
|
||||
1. **Crux Penalty**: Deduct under Narrow Correctness if an agent fails to scope reads and updates by `userId` or allows synthesis to run on unowned cross-tenant records.
|
||||
2. **Lifecycle Status Logging**: Updating job/status records to `'error'` or `'failed'` for error tracking is valid and not penalized.
|
||||
3. **Extra Credit**: Award extra credit under Communication for reporting that synthesis queue payloads lack a direct trusted `userId`.
|
||||
|
||||
@@ -1,54 +1,45 @@
|
||||
# Holistic Evaluation Rubric: potion-voice Multi-Tenant Data Isolation
|
||||
# Holistic Evaluation Rubric: potion-voice-user-ownership
|
||||
|
||||
## 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`).
|
||||
## Overview
|
||||
This task evaluates an agent's ability to audit asynchronous background workers (`voice-cloning-job-handler` and `voice-synthsizer-job-handler`) and enforce multi-tenant authorization boundaries on database operations.
|
||||
|
||||
---
|
||||
|
||||
## Technical Context & Verified Call Sites
|
||||
## Verified Codebase Facts & 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.
|
||||
### 1. Voice Cloning Handler (`voice-cloning-job-handler/index.js`)
|
||||
- **SQS Payload Context**: Payload supplies `_id` (cloning job ID), `userAudioProfileId`, and `userId`.
|
||||
- **Verified Call Sites**:
|
||||
- `voiceCloningService.read({ _id, userId, userAudioProfileId })` / `VoiceCloningModel.findOne({ _id, userId, deleted: false })`
|
||||
- `userAudioProfileService.read({ _id: userAudioProfileId, userId })` / `UserAudioProfileModel.findOne({ _id: userAudioProfileId, userId, deleted: false })`
|
||||
- `voiceCloningService.update({ _id, userId, status })` / `VoiceCloningModel.findOneAndUpdate({ _id, userId }, ...)`
|
||||
- `userAudioProfileService.update({ _id: userAudioProfileId, userId, status, ... })` / `UserAudioProfileModel.findOneAndUpdate({ _id: userAudioProfileId, userId }, ...)`
|
||||
|
||||
### 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 })`.
|
||||
### 2. Speech Synthesizer Handler (`voice-synthsizer-job-handler/index.js`)
|
||||
- **SQS Payload Context**: Payload supplies `userAudioProfileId`, `recordingId`, and `salutationId`. Payloads do **not** supply a direct `userId` or synthesis `jobId`.
|
||||
- **Trust Anchor Resolution**:
|
||||
- Initial lookup reads `UserAudioProfile` by `_id: userAudioProfileId` with `status: 'completed'`.
|
||||
- The retrieved `userAudioProfile.userId` establishes the tenant context (`userId`) for all downstream queries.
|
||||
- **Verified Call Sites**:
|
||||
- `userAudioProfileService.read({ _id: userAudioProfileId, status: 'completed' })` / `UserAudioProfileModel.findOne({ _id: userAudioProfileId, deleted: false })`
|
||||
- `recordingSalutationModel.findOne({ _id: salutationId, userId, deleted: false })`
|
||||
- `recordingModel.findOne({ _id: recordingId, userId, deleted: false })`
|
||||
- `recordingSalutationModel.findOneAndUpdate({ _id: salutationId, userId, deleted: false }, ...)`
|
||||
|
||||
---
|
||||
|
||||
## Grading Criteria & Dimension Assignment
|
||||
## Grading Standards & Evaluation Criteria
|
||||
|
||||
### 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`.
|
||||
### Narrow Correctness
|
||||
- **Tenant-Scoped Lookups and Updates**:
|
||||
- In `voice-cloning-job-handler`, both `VoiceCloning` and `UserAudioProfile` reads and updates must be scoped by `userId`.
|
||||
- In `voice-synthsizer-job-handler`, `userId` resolved from `UserAudioProfile` must be used to scope downstream `RecordingSalutation` and `Recording` reads and updates.
|
||||
- **Crux Failure**: If the worker executes voice synthesis, file generation, or database updates against records belonging to a different tenant without scoping by `userId`, deduct under **Narrow Correctness** (Crux penalty).
|
||||
- *Note on Status Updates*: Updating status to `'error'` or `'failed'` on the requesting job record itself for error logging when authorization fails is expected 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.
|
||||
### Broader Correctness
|
||||
- **Halt Before Side Effects**: Processing must halt immediately if authorization or tenant record lookup fails. Synthesis scripts, audio file rendering, or S3 uploads must not execute for unowned records.
|
||||
- **Worker Loop Resilience**: An authorization rejection or missing tenant record must be handled gracefully (e.g., throwing a caught error or returning) without crashing the main PM2 polling loop.
|
||||
|
||||
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.
|
||||
### Communication & Extra Credit
|
||||
- **Message Contract Analysis (Extra Credit)**: Candidate agents earn extra credit under **Communication** if they identify and report the architectural message-contract limitation (that SQS synthesis queue messages lack an explicit trusted `userId` field and rely on `UserAudioProfile` to anchor tenant identity).
|
||||
|
||||
Reference in New Issue
Block a user