detectors run only

This commit is contained in:
2026-10-12 17:02:39 -04:00
parent 0e8616eeda
commit c195bf7975
7 changed files with 60 additions and 60 deletions

View File

@@ -1,6 +1,6 @@
{
"version": 1,
"capturedAt": "2026-10-12T20:51:18.235Z",
"capturedAt": "2026-10-12T21:01:50.269Z",
"capturedBy": "stamp",
"inputs": {
"prompt": "75042109a7aab36d9a50fe23f5ac417488f437efb25575a987c4fe35d8103b16",
@@ -10,7 +10,7 @@
"gitref": "fcd8a9d",
"graderGuidanceConsolidated": null,
"holisticRubric": "971d55418aed84635512e6a4b5f6a2a31373d2137f9ee48223ca795ed34f3f59",
"atomicRubric": "03b7520b7410abe26e6307883d884034ce77ca4a79bd01f630da80553fe0b20d",
"atomicRubric": "32e46b886bb6de46262448642ee2230e9bd31161d3c08d4aa5cee2c7e0c90d63",
"rubricsYaml": null,
"graderContext": "8234297676cda0c57a016d3d74cc2ebe6d3b98adf862b6fc8bdf48b813b73165"
}

View File

@@ -132,4 +132,4 @@ The rubric’s headline failure—cross-tenant access through unscoped MongoDB c
All three prongs hold. The task is **elicited** through the 4/4 rejection-state target. That miss is **real** because the final handlers demonstrably alter owned state after mixed-owner rejection, and it is **proportionate** at the holistic rubric’s Major state-integrity treatment. The stronger cross-tenant and startup/dependency-crash penalties also survive the guidance-wide audit.
The caught `CastError` deductions and reporting deductions are weaker secondary signals and do not carry the verdict. The queue-deletion contradiction identified by the form and coverage checks also does not create the 4/4 finding: all latest grades pass queue recovery despite retaining baseline early deletion and cite database mutations as the rejection failure. The result is therefore **meaningful**. Confidence remains **MEDIUM** because N=4 and the secondary deductions require judgment, not because the recurring authorization-state finding is uncertain.
The caught `CastError` deductions and reporting deductions are weaker secondary signals and do not carry the verdict. The job-identity wording mismatch identified by the form and coverage checks also does not create the 4/4 finding: all latest grades explicitly accept cloning’s `job._doc.userId` source and cite database mutations after authorization failure as the rejection defect. The result is therefore **meaningful**. Confidence remains **MEDIUM** because N=4 and the secondary deductions require judgment, not because the recurring authorization-state finding is uncertain.

View File

@@ -1,6 +1,6 @@
{
"version": 1,
"capturedAt": "2026-10-12T20:51:18.249Z",
"capturedAt": "2026-10-12T21:01:50.269Z",
"capturedBy": "stamp",
"inputs": {
"prompt": "75042109a7aab36d9a50fe23f5ac417488f437efb25575a987c4fe35d8103b16",
@@ -10,7 +10,7 @@
"gitref": "fcd8a9d",
"graderGuidanceConsolidated": null,
"holisticRubric": "971d55418aed84635512e6a4b5f6a2a31373d2137f9ee48223ca795ed34f3f59",
"atomicRubric": "03b7520b7410abe26e6307883d884034ce77ca4a79bd01f630da80553fe0b20d",
"atomicRubric": "32e46b886bb6de46262448642ee2230e9bd31161d3c08d4aa5cee2c7e0c90d63",
"rubricsYaml": null,
"graderContext": "8234297676cda0c57a016d3d74cc2ebe6d3b98adf862b6fc8bdf48b813b73165"
}

View File

@@ -13,7 +13,7 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md agai
| Holistic clause (short, verbatim key phrase) | Criterion id(s) | Status |
| --- | --- | --- |
| “restricting all MongoDB queries with `userId`” across both workers and wrappers | `scopes-active-worker-database-operations`, `completes-both-worker-and-wrapper-audits` | covered |
| Extract `userId` “directly from incoming job context (`job.userId` or `job._doc.userId`)” | `derives-tenant-id-from-job-context` | covered |
| Extract `userId` “directly from incoming job context (`job.userId` or `job._doc.userId`)” | `derives-tenant-id-from-job-context`; contradicted in part by `rejects-unauthorized-jobs-without-mutation` | partial |
| A message that “lacks `userId` or is unauthorized” must stop without changing records | `rejects-unauthorized-jobs-without-mutation` | covered |
| `recordingId` “can be read directly from the job payload or resolved from `salutationToUpdate.recordingId`” | `preserves-dependent-query-order`; grader context | covered |
| RecordingSalutation uses “`{ _id: salutationId, userId, deleted: false }`” | `scopes-active-worker-database-operations`; grader context | covered |
@@ -22,7 +22,7 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md agai
| Argument 3 security filters leave Argument 1 unscoped | `avoids-positional-argument-misplacement` | covered |
| Collection-level queries use “`{ userId, deleted: false }`” | `scopes-active-worker-database-operations`; grader context | covered |
| Unscoped owner discovery “is circular and represents an authorization vulnerability” | `derives-tenant-id-from-job-context` | covered |
| “Preserving this baseline delete-on-entry behavior is **not** a correctness deduction” | `preserves-sqs-message-recovery`, but contradicted by `rejects-unauthorized-jobs-without-mutation` | partial |
| “Preserving this baseline delete-on-entry behavior is **not** a correctness deduction” | `preserves-sqs-message-recovery` | covered |
| Post-success deletion “is rewarded as optional Thought Partnership credit” | `surfaces-adjacent-operational-risks` | covered |
| Same-tenant rejection mutations “represent a Major state-integrity defect” | `rejects-unauthorized-jobs-without-mutation` | covered |
| Runtime exceptions, syntax errors, promise rejections, and `CastError` are Narrow Correctness failures | `ensures-clean-worker-execution` | covered |
@@ -40,24 +40,24 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/holistic-rubric.md agai
## Coverage gaps
### Baseline delete-on-entry protection is contradicted
### The cloning worker’s accepted identity path is narrowed away
- **Holistic clause:** Ground Truth item 5 says, “Preserving this baseline delete-on-entry behavior is **not** a correctness deduction.” It separately says post-success deletion is optional Thought Partnership credit.
- **Closest criterion:** `preserves-sqs-message-recovery` correctly says, “Retaining baseline delete-on-entry behavior or executing post-success deletion is acceptable.” However, `rejects-unauthorized-jobs-without-mutation` requires rejection “without updating database records or deleting messages prematurely.”
- **What is lost:** A response that preserves the accepted baseline deletion timing but otherwise rejects an unauthorized job cleanly can fail a `possible_dealbreaker` criterion. The atomic package therefore no longer preserves the holistic non-trigger consistently.
- **Suggested criterion:** Remove “or deleting messages prematurely” from `rejects-unauthorized-jobs-without-mutation`; queue timing is already covered by `preserves-sqs-message-recovery` and the extra-credit criterion.
- **Holistic clause:** Ground Truth item 1 requires extracting `userId` “directly from incoming job context (`job.userId` or `job._doc.userId`) if present.” Ground Truth item 4 repeats that either path is an independent trusted source.
- **Closest criterion:** `derives-tenant-id-from-job-context` correctly preserves both paths. However, `rejects-unauthorized-jobs-without-mutation` says processing must halt when “job context lacks a valid **job.userId**,” and its elaboration repeats only **job.userId**.
- **What is lost:** A response that correctly derives cloning identity from `job._doc.userId` can be treated as missing authorization context under a `possible_dealbreaker` criterion. The atomic package therefore narrows an explicitly accepted holistic fulfillment shape.
- **Suggested criterion:** Use “a valid **job.userId or job._doc.userId**” in both the guideline and elaboration, or refer generically to a valid **userId from job context**.
## Invented content
### New prohibition on baseline deletion timing
### Top-level-only identity implication
The phrase “or deleting messages prematurely” in `rejects-unauthorized-jobs-without-mutation` introduces a scoring requirement with no holistic source. The holistic rubric expressly permits baseline near-entry deletion. This is the reverse-direction view of the same single mismatch above, not a second defect: it can turn an accepted response into a criterion failure.
The repeated **job.userId** wording in `rejects-unauthorized-jobs-without-mutation` implies that the identity must be top-level. Neither the holistic rubric nor `tests/grader-context.md` supports that restriction; both explicitly permit `job._doc.userId`. This is the reverse-direction view of the same mismatch above, not a second defect.
No other invented requirement, answer-key fact, condition, or severity was found.
## Context integrity
The Task Summary and all five Ground Truth sections survive in `tests/grader-context.md`. Both job-context identity forms, both accepted `recordingId` sources, the RecordingSalutation selector, Mongoose argument placement, collection-query shape, owner-discovery warning, rejection-mutation severity, and both accepted deletion-timing shapes remain available. The defect is in the conflicting criterion text, not missing context.
The Task Summary and all five Ground Truth sections survive in `tests/grader-context.md`. Both accepted job-identity forms, both accepted `recordingId` sources, the RecordingSalutation selector, Mongoose argument placement, collection-query shape, owner-discovery warning, rejection-mutation severity, and both accepted deletion-timing shapes remain available. The defect is in the narrowed criterion text, not missing context.
## Crux alignment
@@ -70,4 +70,4 @@ None of the three holistic heavy penalties targets the overall score, so zero at
## Overall verdict
Every authorization, query-scoping, execution, verification, communication, and heavy-penalty requirement otherwise maps cleanly, and no context fact is missing. The one queue-deletion phrase is nevertheless scoring-relevant: it both invents a prohibition and defeats an explicit holistic “do not penalize” rule. That load-bearing non-trigger mismatch makes the verdict **material-issues**.
The prior delete-on-entry non-trigger is now preserved correctly, and every other load-bearing requirement, penalty, context fact, and heavy-penalty encoding maps cleanly. The remaining identity-path mismatch is still scoring-relevant: it can fail a response for using the exact `job._doc.userId` source the holistic rubric permits. That lost fulfillment shape and top-level-only implication make the verdict **material-issues**.

View File

@@ -1,6 +1,6 @@
{
"version": 1,
"capturedAt": "2026-10-12T20:51:18.238Z",
"capturedAt": "2026-10-12T21:01:50.269Z",
"capturedBy": "stamp",
"inputs": {
"prompt": "75042109a7aab36d9a50fe23f5ac417488f437efb25575a987c4fe35d8103b16",
@@ -10,7 +10,7 @@
"gitref": "fcd8a9d",
"graderGuidanceConsolidated": null,
"holisticRubric": "971d55418aed84635512e6a4b5f6a2a31373d2137f9ee48223ca795ed34f3f59",
"atomicRubric": "03b7520b7410abe26e6307883d884034ce77ca4a79bd01f630da80553fe0b20d",
"atomicRubric": "32e46b886bb6de46262448642ee2230e9bd31161d3c08d4aa5cee2c7e0c90d63",
"rubricsYaml": null,
"graderContext": "8234297676cda0c57a016d3d74cc2ebe6d3b98adf862b6fc8bdf48b813b73165"
}

View File

@@ -24,23 +24,23 @@ Assessed: harbor-tasks/potion-voice-user-ownership/tests/atomic-rubric.yaml
## Atomicity and self-containment
### Authorization rejection is bundled with an independent queue policy
- **Criterion:** `rejects-unauthorized-jobs-without-mutation`.
- **Where:** “The response should halt worker execution cleanly when job context lacks a valid **`userId`** or authorization fails, without updating database records or deleting messages prematurely.”
- **Why:** Halting unauthorized database work without mutation and deciding when to delete an SQS message are independently judgeable behaviors. A response can satisfy the authorization requirement while retaining the explicitly accepted baseline delete-on-entry behavior, so the grader must improvise a partial verdict. The separate `preserves-sqs-message-recovery` criterion already owns queue deletion behavior.
- **Suggested split or rewrite:** “The response should halt worker execution cleanly when job context lacks a valid **`userId`** or authorization fails, without updating any database records.” Leave deletion timing solely to `preserves-sqs-message-recovery` and the optional operational-risk criterion.
All other criteria are independently judgeable from their own text plus `tests/grader-context.md`. The general query/execution criteria and their specifically worse Argument-3, missing-module, and premature-`Promise.all` variants are sanctioned base-plus-escalation pairs.
None found. Each criterion states one independently judgeable requirement. The single-record and collection-query facts in `scopes-active-worker-database-operations` express one tenant-scoping invariant, and the general criteria plus their specifically worse Argument-3, missing-module, and premature-`Promise.all` variants are sanctioned base-plus-escalation pairs.
## Phrasing and answer keys
None found. The current revision places the decisive factual keys inline and in bold, including **`job.userId` or `job._doc.userId`**, **`userId` in Argument 1**, the accepted **`recordingId`** sources, and all three dodged-bullet mechanisms. Elaborations clarify their guidelines rather than adding unrelated requirements.
None found. The current revision places the decisive factual keys inline and in bold, including **job.userId or job._doc.userId**, **userId in Argument 1 (conditions)**, the accepted **recordingId** sources, and all three dodged-bullet mechanisms. Elaborations clarify their guidelines rather than adding unrelated requirements.
## Fair-grading findings
The authorization/queue bundle above is also the only fair-grading defect. `preserves-sqs-message-recovery` says retaining baseline delete-on-entry is acceptable, while `rejects-unauthorized-jobs-without-mutation` can be read to penalize that same behavior. The package therefore gives a grader conflicting instructions and creates a possible double charge. No additional fair-grading findings were found.
### An accepted job identity path is foreclosed
- **Criterion:** `rejects-unauthorized-jobs-without-mutation`.
- **Where:** The guideline says, “when job context lacks a valid **job.userId** or authorization fails,” and the elaboration repeats, “when **job.userId** is missing or unauthorized.”
- **Why:** `derives-tenant-id-from-job-context` and `tests/grader-context.md` explicitly accept either **job.userId** or **job._doc.userId**. A cloning worker can therefore use the accepted `job._doc.userId` source yet appear to lack the top-level value this criterion requires, letting the grader penalize an implementation the same package permits.
- **Suggested split or rewrite:** Replace both occurrences with **job.userId or job._doc.userId**, or use “a valid **userId from job context**” and keep both accepted paths in the elaboration.
No other fair-grading finding was found. The prior queue-timing conflict is fixed: rejection handling now concerns database mutation only, while `preserves-sqs-message-recovery` expressly permits either baseline delete-on-entry or clean post-success deletion.
## Overall verdict
The deterministic contract passes in full, and the prior unbolded-answer-key issue is fixed. The remaining issue is load-bearing: one Major criterion bundles authorization-state integrity with a separate queue-deletion policy and contradicts an accepted behavior elsewhere in the same package. Because realistic responses require the grader to ignore or half-pass part of the guideline, the judgment layer yields **material-issues**.
The deterministic contract passes in full, the answer keys are properly bold, and the prior queue-policy bundle is resolved. The remaining judgment defect is load-bearing: a Major criterion can fail a realistic cloning implementation for using an identity path that the atomic package itself says is valid. Because that forecloses an explicitly accepted approach rather than merely creating awkward prose, the verdict remains **material-issues**.

View File

@@ -12,39 +12,39 @@ criteria:
severity: possible_dealbreaker
dimensions: ["Broader Correctness / the craft of software engineering"]
guideline: |
The response should extract the user ID directly from the SQS job context (**`job.userId`** or **`job._doc.userId`**) instead of running an unscoped search to discover the owner.
The response should extract the user ID directly from the SQS job context (**job.userId** or **job._doc.userId**) instead of running an unscoped search to discover the owner.
elaboration: |
**PASS**: Code reads **`userId`** directly from incoming job payload properties (**`job.userId`** or **`job._doc.userId`**) to check authorization.
**FAIL**: Code performs an unscoped database lookup (such as **`UserAudioProfile.findById(job.userAudioProfileId)`**) to discover the owner ID before checking permission.
**PASS**: Code reads **userId** directly from incoming job payload properties (**job.userId** or **job._doc.userId**) to check authorization.
**FAIL**: Code performs an unscoped database lookup (such as **UserAudioProfile.findById(job.userAudioProfileId)**) to discover the owner ID before checking permission.
- id: rejects-unauthorized-jobs-without-mutation
category: primary_intent
severity: possible_dealbreaker
dimensions: ["Broader Correctness / the craft of software engineering"]
guideline: |
The response should halt worker execution cleanly when job context lacks a valid **`userId`** or authorization fails, without updating database records or deleting messages prematurely.
The response should halt worker execution cleanly when job context lacks a valid **job.userId** or authorization fails, without updating database records.
elaboration: |
**PASS**: Worker stops processing and returns cleanly when user identity is missing or unauthorized, leaving database records untouched.
**FAIL**: Worker continues processing, runs unscoped updates, or modifies database records when **`userId`** is missing or unauthorized.
**FAIL**: Worker continues processing, runs unscoped updates, or modifies database records when **job.userId** is missing or unauthorized.
- id: scopes-active-worker-database-operations
category: primary_intent
severity: certain_dealbreaker
dimensions: ["Broader Correctness / the craft of software engineering"]
guideline: |
The response should include **`userId`** inside **Argument 1 (`conditions`)** for all Mongoose database lookups and updates on active worker execution paths.
The response should include **userId** inside **Argument 1 (conditions)** for all single-record Mongoose operations on active worker paths, and filter collection queries by **userId**.
elaboration: |
**PASS**: All active worker database queries place **`{ _id: recordId, userId }`** (or **`{ userId, deleted: false }`** for collection queries) directly inside **Argument 1 (`conditions`)**.
**FAIL**: Database operations place **`userId`** in **Argument 3 (`options`)**, leaving **Argument 1** unscoped as **`{ _id: data._id }`**.
**PASS**: Single-record queries place `{ _id: recordId, userId }` directly inside **Argument 1 (conditions)**, and collection queries include `{ userId, deleted: false }`.
**FAIL**: Database operations filter by `_id` without including **userId** in **Argument 1 (conditions)**, or place tenant filters into **Argument 3 (options)**.
- id: completes-both-worker-and-wrapper-audits
category: primary_intent
severity: possible_dealbreaker
dimensions: [Persistence]
guideline: |
The response should audit and update query scoping across both worker handlers (**`voice-synthsizer-job-handler`** and **`voice-cloning-job-handler`**) and active service helpers.
The response should audit and update query scoping across both worker handlers (**voice-synthsizer-job-handler** and **voice-cloning-job-handler**) and active service wrappers.
elaboration: |
**PASS**: Refactors queries in both worker handlers and their active database service wrappers (**`job_service.js`**, **`user_audio_profile_service.js`**, **`voice_cloning_service.js`**, **`salutation_service.js`**).
**PASS**: Refactors query filters across both worker handlers and active database service wrappers (**job_service.js**, **user_audio_profile_service.js**, **voice_cloning_service.js**, **salutation_service.js**).
**FAIL**: Fixes only one worker handler while leaving active database service wrappers unscoped.
- id: preserves-dependent-query-order
@@ -52,47 +52,47 @@ criteria:
severity: possible_dealbreaker
dimensions: [Common Sense]
guideline: |
The response should maintain proper step-by-step query order when parent records are needed before child lookups. It may read **`recordingId`** directly from the job payload or resolve it from the authorized **`RecordingSalutation`**.
The response should maintain proper step-by-step query order when parent records are needed before child lookups. It may read **recordingId** directly from the job payload or resolve it from the authorized **RecordingSalutation**.
elaboration: |
**PASS**: Awaits parent document lookups before using child fields, or reads **`recordingId`** directly from the job payload. Resolving **`recordingId`** from **`RecordingSalutation`** is also acceptable.
**FAIL**: Groups sequential dependent queries into concurrent **`Promise.all`** calls before parent documents resolve, causing runtime errors or undefined query parameters.
**PASS**: Awaits parent document lookups before using child fields, or reads **recordingId** directly from the job payload.
**FAIL**: Groups sequential dependent queries into concurrent **Promise.all** calls before parent documents resolve, causing runtime errors or undefined query parameters.
- id: preserves-sqs-message-recovery
category: primary_intent
severity: possible_dealbreaker
dimensions: [Common Sense]
guideline: |
The response should handle queue message processing reliably. Retaining baseline delete-on-entry behavior or executing post-success deletion is acceptable without introducing queue runtime errors or unhandled message loss.
The response should maintain queue message processing reliability. It may retain baseline delete-on-entry behavior or move deletion cleanly after successful job completion.
elaboration: |
**PASS**: Retains baseline worker message deletion behavior or moves deletion after successful job completion without runtime queue failures.
**FAIL**: Introduces new message deletion bugs, such as unhandled deletion runtime errors while leaving jobs in invalid states.
**PASS**: Retains baseline worker message deletion behavior (**deleteMessageFromSQS** near entry) or moves deletion after successful job completion.
**FAIL**: Introduces new queue message deletion bugs or unhandled promise rejections during queue processing.
- id: ensures-clean-worker-execution
category: primary_intent
severity: possible_dealbreaker
dimensions: [Narrow Correctness]
guideline: |
The response should ensure worker processes execute cleanly without throwing syntax errors, missing module crashes (**`MODULE_NOT_FOUND`**), **`CastError`** exceptions, or unhandled promise rejections.
The response should ensure worker handlers execute without syntax errors, unhandled runtime exceptions, or Mongoose **CastError** type errors.
elaboration: |
**PASS**: Worker processes run smoothly without crashing or throwing unhandled execution exceptions.
**FAIL**: Worker processes encounter runtime crashes, **`CastError`** exceptions, or unhandled promise rejections during execution.
**PASS**: Worker processes execute without runtime exceptions or Mongoose **CastError** exceptions on active call sites.
**FAIL**: Code throws unhandled syntax errors or Mongoose **CastError** exceptions during execution.
- id: verifies-query-condition-scoping
category: primary_intent
severity: possible_dealbreaker
dimensions: ["Verification & Thoroughness"]
guideline: |
The response should verify that database operations include **`userId`** in **Argument 1** across active worker call sites.
The response should verify that database operations include **userId** in **Argument 1 (conditions)** across active worker call sites.
elaboration: |
**PASS**: Checks that **Argument 1** of Mongoose database queries includes **`userId`** across active call sites using inspection, mocks, spies, or test scripts.
**FAIL**: Claims full multi-user retrieval without checking that **Argument 1** of database operations includes **`userId`**.
**PASS**: Verifies that **Argument 1 (conditions)** of Mongoose database queries includes **userId** across active call sites via code inspection, mocks, spies, or test execution.
**FAIL**: Claims full multi-user retrieval without checking that **Argument 1 (conditions)** of database operations includes **userId**.
- id: reports-work-and-verification-accurately
category: primary_intent
severity: possible_dealbreaker
dimensions: [Integrity]
guideline: |
The response should accurately describe code updates and verification results without false claims or fabricated audit reports.
The response should accurately describe code updates and verification results without false claims.
elaboration: |
**PASS**: Provides an honest account of code changes, tests run, and verification outcomes.
**FAIL**: Falsely claims that all database operations were scoped when the trajectory shows inspecting or writing unscoped update calls and asserting they were isolated.
@@ -112,36 +112,36 @@ criteria:
severity: certain_dealbreaker
dimensions: ["Broader Correctness / the craft of software engineering"]
guideline: |
The response should avoid placing user filters into Mongoose **Argument 3 (`options`)** while leaving **Argument 1 (`conditions`)** unscoped as **`{ _id: data._id }`**.
The response should avoid placing **userId** into Mongoose **Argument 3 (options)** while leaving **Argument 1 (conditions)** unscoped.
elaboration: |
**PASS**: Places all **`userId`** query parameters directly inside **Argument 1 (`conditions`)**.
**FAIL**: Places **`userId`** into **Argument 3 (`options`)**, leaving **Argument 1** unscoped.
**PASS**: Places **userId** directly inside **Argument 1 (conditions)** for all Mongoose query filters.
**FAIL**: Places **userId** in **Argument 3 (options)**, leaving **Argument 1 (conditions)** unscoped as `{ _id }`.
- id: avoids-missing-tenant-helper-module
category: dodged_bullet
severity: certain_dealbreaker
dimensions: [Narrow Correctness]
guideline: |
The response should avoid importing non-existent utility modules that cause worker startup crashes (**`MODULE_NOT_FOUND`**).
The response should avoid importing non-existent utility modules that cause worker startup crashes (**MODULE_NOT_FOUND**).
elaboration: |
**PASS**: Creates all imported helper files or implements functions directly within existing service files.
**FAIL**: Adds **`require`** statements for missing helper modules without creating the files, causing **`MODULE_NOT_FOUND`** startup crashes.
**FAIL**: Adds `require` statements for missing helper modules without creating the files, causing **MODULE_NOT_FOUND** startup crashes.
- id: avoids-premature-dependent-promise-all
category: dodged_bullet
severity: certain_dealbreaker
dimensions: [Common Sense, Narrow Correctness]
guideline: |
The response should avoid running dependent queries concurrently in **`Promise.all`** before parent records resolve.
The response should avoid running dependent queries concurrently in **Promise.all** before parent records resolve.
elaboration: |
**PASS**: Resolves parent records sequentially before querying child relationships.
**FAIL**: Wraps dependent queries in a concurrent **`Promise.all`** before parent records resolve, causing runtime exceptions or undefined query arguments.
**FAIL**: Wraps dependent queries in a concurrent **Promise.all** before parent records resolve, causing runtime exceptions or undefined query arguments.
- id: surfaces-adjacent-operational-risks
category: extra_credit
dimensions: [Thought Partnership]
guideline: |
The response should identify extra queue or operational risks, such as moving **`deleteMessageFromSQS`** to run after successful processing or flagging visibility timeouts.
The response should surface extra operational or queue risks, such as moving **deleteMessageFromSQS** to run after successful processing or flagging SQS visibility timeouts.
elaboration: |
**PASS**: Refactors message deletion to run after successful job processing or points out operational queue risks.
**FAIL**: Asserts that queue processing is completely bulletproof while leaving unhandled rejection paths that drop messages silently.