diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/.rubric-staged.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/.rubric-staged.json new file mode 100644 index 00000000..4ff20be8 --- /dev/null +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/.rubric-staged.json @@ -0,0 +1,6 @@ +{ + "created": [ + "rubric-criteria.md", + "rubric-criteria.json" + ] +} diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/rubric-criteria.json b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/rubric-criteria.json new file mode 100644 index 00000000..7f6a48d5 --- /dev/null +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/rubric-criteria.json @@ -0,0 +1,47 @@ +{ + "task": "potion-voice-user-ownership", + "criteria": [ + { + "id": "scopes-active-worker-database-operations", + "category": "primary_intent", + "severity": "critical", + "dimensions": [] + }, + { + "id": "rejects-unauthorized-jobs-without-mutation", + "category": "primary_intent", + "severity": "critical", + "dimensions": [] + }, + { + "id": "ensures-clean-worker-execution", + "category": "primary_intent", + "severity": "high", + "dimensions": [] + }, + { + "id": "maintains-syntax-and-import-integrity", + "category": "primary_intent", + "severity": "critical", + "dimensions": [] + }, + { + "id": "avoids-unbounded-concurrency-traps", + "category": "primary_intent", + "severity": "medium", + "dimensions": [] + }, + { + "id": "preserves-existing-service-architecture", + "category": "primary_intent", + "severity": "medium", + "dimensions": [] + }, + { + "id": "provides-accurate-verification-reporting", + "category": "primary_intent", + "severity": "medium", + "dimensions": [] + } + ] +} diff --git a/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/rubric-criteria.md b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/rubric-criteria.md new file mode 100644 index 00000000..993207a6 --- /dev/null +++ b/worker-toolkit-potion-polyglot-v1.0.1/harbor-tasks/potion-voice-user-ownership/tests/rubric-criteria.md @@ -0,0 +1,27 @@ +### Criterion: scopes-active-worker-database-operations + +Refactor active worker database queries across VoiceCloningService and SpeechSynthesisService to enforce user/tenant scoping. Accept both inline Mongoose filters ({ _id, userId }) and explicit fetch-then-verify checks (if record.userId !== job.userId throw). + +### Criterion: rejects-unauthorized-jobs-without-mutation + +Halt worker processing and prevent unowned downstream writes (such as salutation audio generation or unowned record updates) when authorization or ownership validation fails. Explicitly credit tenant-scoped status 'error' or 'failed' job record updates on the requesting user's own job. + +### Criterion: ensures-clean-worker-execution + +Ensure background worker polling loops handle missing records, invalid job payloads, or authorization failures gracefully without crashing or throwing unhandled runtime exceptions. + +### Criterion: maintains-syntax-and-import-integrity + +Ensure all refactored TypeScript/JavaScript files compile without syntax errors or missing module import references (MODULE_NOT_FOUND). + +### Criterion: avoids-unbounded-concurrency-traps + +Avoid premature Promise.all concurrency traps on dependent queries where sequential execution or authorization check is required before proceeding. + +### Criterion: preserves-existing-service-architecture + +Maintain existing service boundaries, S3 storage interfaces, and Python worker execution workflows without unnecessary architectural rewrites or breaking API signatures. + +### Criterion: provides-accurate-verification-reporting + +Provide truthful, accurate summary reports of changes made and verifications performed without fabricating test suite execution or overstating refactoring completion.