new atomic-rubric

This commit is contained in:
2026-10-14 14:46:48 -04:00
parent ca5750d5f9
commit f93cf0033d
9 changed files with 215 additions and 128 deletions

View File

@@ -1,6 +1,6 @@
{ {
"version": 1, "version": 1,
"capturedAt": "2026-10-14T18:03:52.282Z", "capturedAt": "2026-10-14T18:38:21.252Z",
"capturedBy": "stamp", "capturedBy": "stamp",
"inputs": { "inputs": {
"prompt": "f2ae35d66777eea943d5169748d79ce3c3b59717ecfe84341c22e51c62894d39", "prompt": "f2ae35d66777eea943d5169748d79ce3c3b59717ecfe84341c22e51c62894d39",
@@ -10,8 +10,8 @@
"gitref": "fcd8a9d0", "gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null, "graderGuidanceConsolidated": null,
"holisticRubric": "0eb82f568598af36cbf94be5d2d9bcea436124e6f1e1c3bb63fcbb58cfe41ebd", "holisticRubric": "0eb82f568598af36cbf94be5d2d9bcea436124e6f1e1c3bb63fcbb58cfe41ebd",
"atomicRubric": "160e8e1e9f60ee6723570a4b96a92addafd6ade6c31210ae386b747fd483ac4c", "atomicRubric": "115a906280331e673e301d37382b1cdabea96bbca7b51f2f641085e014ab3579",
"rubricsYaml": null, "rubricsYaml": null,
"graderContext": "1ff97b7d5697855e47d3715269ce0e32f03215d8587a4d0eaf3684d4441c7a16" "graderContext": "29dce8f3926dd640892d9ab555ea8166c26b47d8c170082e22ffe49db7a6d7ef"
} }
} }

View File

@@ -1,7 +1,7 @@
--- ---
detector: detector-rubric-coverage detector: detector-rubric-coverage
verdict: clear verdict: material-issues
confidence: MEDIUM confidence: HIGH
--- ---
# Rubric-coverage check: potion-voice-user-ownership # Rubric-coverage check: potion-voice-user-ownership
@@ -9,33 +9,35 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md agai
## Coverage map ## Coverage map
| Holistic clause | Atomic criterion | Status | | Holistic clause (short, verbatim key phrase) | Criterion id(s) | Status |
| --- | --- | --- | | --- | --- | --- |
| Cloning operations use `userId` alongside record IDs | cloning-tenant-isolation | covered | | "All database operations in `voice-cloning-job-handler` ... must enforce `userId` scoping" | cloning-tenant-isolation | covered |
| Synthesis recording operations use profile-derived `userId` | synthesis-tenant-isolation-queries-updates | covered | | "All queries and updates to `RecordingSalutation` and `Recording` ... scoped by ... `userId`" | synthesis-tenant-isolation-queries-updates | covered |
| Initial profile ID lookup is allowed | initial-profile-tenant-resolution | covered | | "Looking up `UserAudioProfile` by `_id: userAudioProfileId` ... must not be penalized" | initial-profile-tenant-resolution | covered |
| Downstream effects halt on ownership failure | prevent-unauthorized-side-effects | covered | | "all downstream audio generation, file creation, and database mutations must be immediately halted" | prevent-unauthorized-side-effects | covered |
| Filter syntax and executed effects route separately | prevent-unauthorized-side-effects guideline | covered | | "Syntax omissions ... charged under ... handler scoping ... execution ... under side-effect prevention" | cloning-tenant-isolation; synthesis-tenant-isolation-queries-updates; prevent-unauthorized-side-effects | covered |
| Polling loop survives validation/database exceptions | worker-loop-crash-prevention | covered | | "Exceptions during message validation or database operations must be caught gracefully" | worker-loop-crash-prevention | covered |
| Requesting-job failed/error status is allowed | error-status-lifecycle-logging | covered | | "Updating `status: 'failed'` or `'error'` on the requesting job record ... is permitted" | error-status-lifecycle-logging | covered |
| Clear concise refactor explanation | refactor-summary-clarity | covered | | "clearly and concisely describe how multi-tenant isolation is enforced" | refactor-summary-clarity | covered |
## Coverage gaps ## Coverage gaps
None found. The side-effect criterion's guideline explicitly covers both handlers. Its call-site key points to synthesis, but the text supplies the general pass condition. None found in the behavior requirements or protected cases.
## Invented content ## Invented content
None found. The atomic criteria describe the same behaviors and allowances as the holistic rubric. ### Unsupported Crux designation
`prevent-unauthorized-side-effects` carries `severity: crux`, but the holistic rubric contains no Heavy penalties section or instruction applying a heavy penalty to the overall score. Its Narrow Correctness bullet calls side-effect prevention "(CRUX)" without defining the penalty target or non-trigger. Under the conversion contract, that label alone does not establish an overall-score penalty. The severity can change the score materially.
## Context integrity ## Context integrity
The context document retains the model matrix, profile lookup, downstream filter target, and side-effect requirement. The charge-routing language is preserved in the side-effect guideline. `tests/grader-context.md` preserves the source's Task Overview paragraph verbatim. The source has no separate Business context or Ground truth section. The answer-key facts used by the criteria appear in their guidelines.
## Crux alignment ## Crux alignment
The holistic side-effect prevention requirement is marked CRUX, and `prevent-unauthorized-side-effects` carries the atomic `crux` severity. No unsupported crux or missing heavy-penalty mapping was found. The holistic rubric states no heavy penalty targeting the overall score. The atomic rubric has one Crux criterion, `prevent-unauthorized-side-effects`, based on the source's parenthetical "(CRUX)" label. The source needs an explicit overall-score Heavy penalties rule with its non-trigger, or the atomic severity needs to be lowered.
## Overall verdict ## Overall verdict
The atomic package retains the load-bearing holistic content. The rubric-form detector independently checks whether the YAML artifact parses and meets schema rules. The behavioral mapping is complete, but the unsupported Crux designation creates a material scoring difference. Resolve the source's penalty intent before treating the conversion as final.

View File

@@ -1,6 +1,6 @@
{ {
"version": 1, "version": 1,
"capturedAt": "2026-10-14T18:03:52.282Z", "capturedAt": "2026-10-14T18:38:21.243Z",
"capturedBy": "stamp", "capturedBy": "stamp",
"inputs": { "inputs": {
"prompt": "f2ae35d66777eea943d5169748d79ce3c3b59717ecfe84341c22e51c62894d39", "prompt": "f2ae35d66777eea943d5169748d79ce3c3b59717ecfe84341c22e51c62894d39",
@@ -10,8 +10,8 @@
"gitref": "fcd8a9d0", "gitref": "fcd8a9d0",
"graderGuidanceConsolidated": null, "graderGuidanceConsolidated": null,
"holisticRubric": "0eb82f568598af36cbf94be5d2d9bcea436124e6f1e1c3bb63fcbb58cfe41ebd", "holisticRubric": "0eb82f568598af36cbf94be5d2d9bcea436124e6f1e1c3bb63fcbb58cfe41ebd",
"atomicRubric": "160e8e1e9f60ee6723570a4b96a92addafd6ade6c31210ae386b747fd483ac4c", "atomicRubric": "115a906280331e673e301d37382b1cdabea96bbca7b51f2f641085e014ab3579",
"rubricsYaml": null, "rubricsYaml": null,
"graderContext": "1ff97b7d5697855e47d3715269ce0e32f03215d8587a4d0eaf3684d4441c7a16" "graderContext": "29dce8f3926dd640892d9ab555ea8166c26b47d8c170082e22ffe49db7a6d7ef"
} }
} }

View File

@@ -1,30 +1,38 @@
--- ---
detector: detector-rubric-form detector: detector-rubric-form
verdict: clear verdict: clear
confidence: MEDIUM confidence: HIGH
--- ---
# Rubric-form check: potion-voice-user-ownership # 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
Assessed: harbor-tasks/potion-voice-user-ownership/tests/atomic-rubric.yaml and tests/grader-context.md
## Deterministic contract ## Deterministic contract
The YAML parses. The task slug, seven unique kebab-case IDs, category and severity vocabularies, one-crux cap, exact dimension names, nonempty guidelines, positive phrasing, and absence of numeric penalty amounts pass. No extra-credit criterion carries severity. 1. YAML parsing and top-level `task` and `criteria`: pass; the staging command parsed seven criteria.
2. Task slug: pass.
3. Unique kebab-case IDs: pass.
4. Category vocabulary: pass.
5. Severity vocabulary and placement: pass.
6. Crux cap: pass; one criterion carries Crux.
7. Dimension names: pass.
8. Nonempty guidelines: pass.
9. Numeric penalty language: pass; the pattern sweep found none.
10. Positive phrasing: pass. The sweep matched `does not require` inside an answer key and `do not belong` in a condition, rather than a negated instruction.
11. Each guideline begins with a positive `The response should ...` requirement: pass.
## Atomicity and self-containment ## Atomicity and self-containment
Each criterion has one response behavior or allowance. The side-effect criterion states its pass condition for both handlers before its routing note; the routing note governs grading of distinct syntax and executed-effect failures rather than adding a response requirement. None found. The two handler-specific scoping rules are independently judgeable. The side-effect criterion covers one stop condition across both handlers, and its elaboration routes filter syntax to the corresponding handler criterion.
## Phrasing and answer keys ## Phrasing and answer keys
The factual answer keys are inline and bold. The formerly unquoted colon-space strings are now parsed as YAML strings. No material phrasing issue was found. None found. Factual answer keys are bold and inline. Elaborations clarify fulfillment and charge routing.
## Fair-grading findings ## Fair-grading findings
The side-effect criterion is distinct from handler-specific query-filter criteria; its routing note says which failure each charges. No material bundle, unreachable requirement, or double-counting instruction was found. None found. The allowed initial profile lookup and error-status update are represented as protected behaviors, so the rubric does not charge them as isolation violations.
## Overall verdict ## Overall verdict
The artifact satisfies the deterministic contract and remains independently judgeable. The routing note inside one guideline is slightly dense but does not alter the pass condition. The atomic artifact parses and follows the criterion form rules. The source-to-atomic Crux alignment is assessed separately in detector-rubric-coverage.

View File

@@ -0,0 +1,6 @@
{
"created": [
"rubric-criteria.md",
"rubric-criteria.json"
]
}

View File

@@ -1,86 +1,69 @@
task: potion-voice-user-ownership task: potion-voice-user-ownership
source: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md
context: grader-context.md
criteria: criteria:
- id: cloning-tenant-isolation - id: cloning-tenant-isolation
category: primary_intent category: primary_intent
dimensions: severity: certain_dealbreaker
- Narrow Correctness dimensions:
severity: certain_dealbreaker - Narrow Correctness
call_site_key: voice-cloning-job-handler guideline: |
guideline: The response should enforce tenant isolation using userId on all VoiceCloning The response should scope every `VoiceCloning` and `UserAudioProfile` database operation in `voice-cloning-job-handler` by `userId` alongside the record ID. **Answer key: Both reads and updates must include the relevant `userId` and record ID.**
and UserAudioProfile queries and updates in the voice cloning handler. **Answer elaboration: |
key:** All database reads and updates in voice-cloning-job-handler must filter Judge query and update filters here. The execution of downstream work after an ownership failure belongs to `prevent-unauthorized-side-effects`.
by userId in addition to record _id.
elaboration: Verifies that voice cloning queries and updates incorporate userId - id: synthesis-tenant-isolation-queries-updates
to prevent unauthorized cross-tenant operations. category: primary_intent
- id: synthesis-tenant-isolation-queries-updates severity: certain_dealbreaker
category: primary_intent dimensions:
dimensions: - Narrow Correctness
- Narrow Correctness guideline: |
severity: certain_dealbreaker The response should scope every `RecordingSalutation` and `Recording` query and update in `voice-synthsizer-job-handler` by the `userId` derived from the initial `UserAudioProfile` lookup. **Answer key: Downstream reads and updates must use the profile-derived `userId` alongside each record ID.**
call_site_key: voice-synthsizer-job-handler elaboration: |
guideline: The response should scope all synthesis queries and database updates Judge query and update filters here. The execution of downstream work after an ownership failure belongs to `prevent-unauthorized-side-effects`.
by tenant identity (userId) across RecordingSalutation and Recording records.
**Answer key:** Downstream reads and updates to RecordingSalutation and Recording - id: initial-profile-tenant-resolution
in voice-synthsizer-job-handler must be scoped by the profile-derived userId. category: dodged_bullet
elaboration: Ensures that both queries and database updates in the speech synthesis severity: possible_dealbreaker
handler enforce tenant isolation using userId. dimensions:
- id: prevent-unauthorized-side-effects - Narrow Correctness
category: primary_intent guideline: |
dimensions: The response should allow the initial `UserAudioProfile` lookup by `_id: userAudioProfileId` to establish tenant context. **Answer key: This lookup resolves `userAudioProfile.userId` and does not require a `userId` filter.**
- Narrow Correctness elaboration: |
severity: crux The first profile lookup is the stated exception to downstream tenant scoping. Do not treat that lookup alone as a tenant isolation failure.
call_site_key: voice-synthsizer-job-handler
guideline: 'The response should prevent unauthorized side effects, including audio - id: prevent-unauthorized-side-effects
generation and database mutations across both voice cloning and speech synthesis category: primary_intent
handlers, when tenant validation fails or records do not match tenant context. severity: crux
Routing note: Charge syntax omissions under cloning-tenant-isolation or synthesis-tenant-isolation-queries-updates; dimensions:
charge side-effect execution under this criterion. **Answer key:** Synthesis audio - Narrow Correctness
generation and database mutations must be halted if tenant ownership checks fail.' guideline: |
elaboration: Guarantees that unauthorized jobs do not trigger audio rendering, file The response should halt downstream audio generation, file creation, and database mutations in both handlers when tenant ownership checks fail or records do not belong to the requesting tenant. **Answer key: Rejected or unauthorized jobs must stop before those side effects execute.**
creation, or database updates. elaboration: |
- id: initial-profile-tenant-resolution This criterion covers execution after a failed ownership check. Charge missing `userId` predicates under the respective handler scoping criterion. Updating `status: 'failed'` or `'error'` on the requesting job record for error tracking is allowed.
category: dodged_bullet
dimensions: - id: worker-loop-crash-prevention
- Narrow Correctness category: primary_intent
severity: possible_dealbreaker severity: possible_dealbreaker
call_site_key: voice-synthsizer-job-handler dimensions:
guideline: 'The response should allow the initial UserAudioProfile lookup by _id: - Broader Correctness / the craft of software engineering
userAudioProfileId as a valid tenant-resolution step without requiring userId guideline: |
in that initial query. **Answer key:** The initial lookup on UserAudioProfile The response should catch exceptions during message validation or database operations so the worker polling loops remain active after rejected or unauthorized jobs. **Answer key: The polling loops continue after those failures.**
by ID is necessary to resolve userId and establish tenant context.'
elaboration: Prevents improperly docking points for the initial profile query needed - id: error-status-lifecycle-logging
to discover the tenant identity. category: dodged_bullet
- id: worker-loop-crash-prevention severity: unlikely_dealbreaker
category: primary_intent dimensions:
dimensions: - Broader Correctness / the craft of software engineering
- Broader Correctness / the craft of software engineering guideline: |
severity: possible_dealbreaker The response should allow `status: 'failed'` or `'error'` updates on the requesting job record for error tracking after rejection. **Answer key: This lifecycle update is permitted.**
call_site_key: voice-synthsizer-job-handler elaboration: |
guideline: The response should catch and handle exceptions during message processing Do not treat this permitted update as an unauthorized downstream mutation.
to prevent background worker polling loops from crashing. **Answer key:** Errors
during job processing must be caught gracefully so the worker polling loop remains - id: refactor-summary-clarity
active. category: primary_intent
elaboration: Ensures background worker loops remain resilient against unhandled severity: unlikely_dealbreaker
errors. dimensions:
- id: error-status-lifecycle-logging - Communication
category: dodged_bullet guideline: |
dimensions: The response should clearly and concisely describe how multi-tenant isolation is enforced across both handlers.
- Broader Correctness / the craft of software engineering
severity: unlikely_dealbreaker
call_site_key: voice-synthsizer-job-handler
guideline: The response should permit updating job status to failed or error on
the requesting job record for error tracking when an unauthorized job is rejected.
**Answer key:** Setting status to failed on the requesting job record for error
logging is acceptable lifecycle tracking.
elaboration: Clarifies that setting job status to failed on the requesting job record
does not constitute an unauthorized cross-tenant mutation.
- id: refactor-summary-clarity
category: primary_intent
dimensions:
- Communication
severity: unlikely_dealbreaker
call_site_key: voice-synthsizer-job-handler
guideline: The response should clearly articulate how tenant isolation is enforced
across the refactored handlers in its written explanations. **Answer key:** The
written explanation must clearly describe the multi-tenant isolation approach.
elaboration: Evaluates the clarity and structure of the written refactoring summary.

View File

@@ -1,14 +1,4 @@
# Grader Context & Reference Answer Key # Grader Context — potion-voice-user-ownership
## Background & Architecture ## Task Overview
The repository processes background jobs using AWS SQS queue messages and MongoDB models (`VoiceCloning`, `UserAudioProfile`, `RecordingSalutation`, `Recording`). This task evaluates the candidate agent's ability to audit and refactor asynchronous background worker handlers (`voice-cloning-job-handler` and `voice-synthsizer-job-handler`) to enforce strict multi-tenant data isolation (`userId`) while maintaining worker polling resilience.
### Voice Cloning Handler (`voice-cloning-job-handler`)
* Receives a job payload containing job ID (`job._doc._id` / `job._id`) and `userId`.
* Must scope all database reads and updates on `VoiceCloning` and `UserAudioProfile` by `{ _id, userId }`.
### Speech Synthesis Handler (`voice-synthsizer-job-handler`)
* Receives SQS message payload containing `userAudioProfileId`, `recordingId`, and `salutationId`.
* **Trust Anchor Resolution**: Executes an initial query on `UserAudioProfile` by `_id: userAudioProfileId` to resolve `userAudioProfile.userId`.
* **Downstream Scoping**: All subsequent queries and updates to `RecordingSalutation` and `Recording` must include `{ _id, userId: userAudioProfile.userId }`.
* **Side-Effect Prevention**: If any record is missing or does not match `userId`, speech synthesis audio rendering and database writes must be halted immediately.

View File

@@ -0,0 +1,61 @@
{
"task": "potion-voice-user-ownership",
"criteria": [
{
"id": "cloning-tenant-isolation",
"category": "primary_intent",
"severity": "certain_dealbreaker",
"dimensions": [
"Narrow Correctness"
]
},
{
"id": "synthesis-tenant-isolation-queries-updates",
"category": "primary_intent",
"severity": "certain_dealbreaker",
"dimensions": [
"Narrow Correctness"
]
},
{
"id": "initial-profile-tenant-resolution",
"category": "dodged_bullet",
"severity": "possible_dealbreaker",
"dimensions": [
"Narrow Correctness"
]
},
{
"id": "prevent-unauthorized-side-effects",
"category": "primary_intent",
"severity": "crux",
"dimensions": [
"Narrow Correctness"
]
},
{
"id": "worker-loop-crash-prevention",
"category": "primary_intent",
"severity": "possible_dealbreaker",
"dimensions": [
"Broader Correctness / the craft of software engineering"
]
},
{
"id": "error-status-lifecycle-logging",
"category": "dodged_bullet",
"severity": "unlikely_dealbreaker",
"dimensions": [
"Broader Correctness / the craft of software engineering"
]
},
{
"id": "refactor-summary-clarity",
"category": "primary_intent",
"severity": "unlikely_dealbreaker",
"dimensions": [
"Communication"
]
}
]
}

View File

@@ -0,0 +1,37 @@
### Criterion: cloning-tenant-isolation
The response should scope every `VoiceCloning` and `UserAudioProfile` database operation in `voice-cloning-job-handler` by `userId` alongside the record ID. **Answer key: Both reads and updates must include the relevant `userId` and record ID.**
Judge query and update filters here. The execution of downstream work after an ownership failure belongs to `prevent-unauthorized-side-effects`.
### Criterion: synthesis-tenant-isolation-queries-updates
The response should scope every `RecordingSalutation` and `Recording` query and update in `voice-synthsizer-job-handler` by the `userId` derived from the initial `UserAudioProfile` lookup. **Answer key: Downstream reads and updates must use the profile-derived `userId` alongside each record ID.**
Judge query and update filters here. The execution of downstream work after an ownership failure belongs to `prevent-unauthorized-side-effects`.
### Criterion: initial-profile-tenant-resolution
The response should allow the initial `UserAudioProfile` lookup by `_id: userAudioProfileId` to establish tenant context. **Answer key: This lookup resolves `userAudioProfile.userId` and does not require a `userId` filter.**
The first profile lookup is the stated exception to downstream tenant scoping. Do not treat that lookup alone as a tenant isolation failure.
### Criterion: prevent-unauthorized-side-effects
The response should halt downstream audio generation, file creation, and database mutations in both handlers when tenant ownership checks fail or records do not belong to the requesting tenant. **Answer key: Rejected or unauthorized jobs must stop before those side effects execute.**
This criterion covers execution after a failed ownership check. Charge missing `userId` predicates under the respective handler scoping criterion. Updating `status: 'failed'` or `'error'` on the requesting job record for error tracking is allowed.
### Criterion: worker-loop-crash-prevention
The response should catch exceptions during message validation or database operations so the worker polling loops remain active after rejected or unauthorized jobs. **Answer key: The polling loops continue after those failures.**
### Criterion: error-status-lifecycle-logging
The response should allow `status: 'failed'` or `'error'` updates on the requesting job record for error tracking after rejection. **Answer key: This lifecycle update is permitted.**
Do not treat this permitted update as an unauthorized downstream mutation.
### Criterion: refactor-summary-clarity
The response should clearly and concisely describe how multi-tenant isolation is enforced across both handlers.