| ... | ... | @@ -333,33 +333,6 @@ Counts: active `51` (`valid=33`, `partially-valid=18`), closed-invalid `6` |
| 333 | 333 | |
| 334 | 334 | ### Phase 6 |
| 335 | 335 | |
| 336 | | - [ ] `C006` Build script runs TypeScript file with bare node |
| 337 | | - Status: `TODO` |
| 338 | | - Verdict: `partially-valid` |
| 339 | | - Severity: `Medium` |
| 340 | | - Area: `Build/runtime portability` |
| 341 | | - File: `apps/server/package.json:14` |
| 342 | | - Threads: PRRT_kwDORLtfbc5wxsO- |
| 343 | | - Audit note: Node 24 makes this work, but script still relies on runtime-specific TS execution. |
| 344 | | |
| 345 | | - [ ] `C007` Build script uses `node` to run `.ts` file directly |
| 346 | | - Status: `TODO` |
| 347 | | - Verdict: `partially-valid` |
| 348 | | - Severity: `Medium` |
| 349 | | - Area: `Build/runtime portability` |
| 350 | | - File: `apps/server/package.json:14` |
| 351 | | - Threads: PRRT_kwDORLtfbc5wiLNS, PRRT_kwDORLtfbc5wj5fl (+1 duplicate thread(s)) |
| 352 | | - Audit note: Same as C006 (duplicate concern). |
| 353 | | |
| 354 | | - [ ] `C011` Template literal `${cause}` throws if `cause` is a `Symbol`. Consider using `String(cause)` instead. |
| 355 | | - Status: `TODO` |
| 356 | | - Verdict: `valid` |
| 357 | | - Severity: `Medium` |
| 358 | | - Area: `Other` |
| 359 | | - File: `apps/server/src/orchestration/Errors.ts:117` |
| 360 | | - Threads: PRRT_kwDORLtfbc5wBFv4 |
| 361 | | - Audit note: Template-literal interpolation of Symbol still throws. |
| 362 | | |
| 363 | 336 | - [ ] `C024` In `executeUnprepared`, preparing outside an effect and not closing the statement can cause uncaught errors and leaks. Suggest wrapping with `Effect.acquireUseRelease`: prepare in acquire (error-safe) and `finalize` in release. |
| 364 | 337 | - Status: `TODO` |
| 365 | 338 | - Verdict: `partially-valid` |
| ... | ... | @@ -378,15 +351,6 @@ Counts: active `51` (`valid=33`, `partially-valid=18`), closed-invalid `6` |
| 378 | 351 | - Threads: PRRT_kwDORLtfbc5v-XCu |
| 379 | 352 | - Audit note: Optimistic local+server dual update is intentional but can temporarily diverge. |
| 380 | 353 | |
| 381 | | - [ ] `C032` Dummy workflow marker accidentally committed to docs |
| 382 | | - Status: `TODO` |
| 383 | | - Verdict: `valid` |
| 384 | | - Severity: `Low` |
| 385 | | - Area: `Other` |
| 386 | | - File: `AGENTS.md:45` |
| 387 | | - Threads: PRRT_kwDORLtfbc5wlYgj, PRRT_kwDORLtfbc5w1C4H (+1 duplicate thread(s)) |
| 388 | | - Audit note: Dummy workflow marker comment is still present in docs. |
| 389 | | |
| 390 | 354 | - [ ] `C037` `Effect.callback` should return a cleanup function to close the server(s) on fiber interruption. Without it, the `Net.Server` handles keep the process alive and leak the port if the effect is cancelled. <details> <summary>🚀 Reply "<strong>fix it for me</strong>" or copy this <strong>AI Prompt</strong> for your agent:</summary> |
| 391 | 355 | - Status: `TODO` |
| 392 | 356 | - Verdict: `partially-valid` |
| ... | ... | @@ -396,15 +360,6 @@ Counts: active `51` (`valid=33`, `partially-valid=18`), closed-invalid `6` |
| 396 | 360 | - Threads: PRRT_kwDORLtfbc5wj4cO |
| 397 | 361 | - Audit note: Callback cleanup missing, but practical exposure is low in one-shot startup path. |
| 398 | 362 | |
| 399 | | - [ ] `C041` Template literal interpolation throws `TypeError` if `cause` is a `Symbol`. Consider using `String(cause)` for safe coercion. |
| 400 | | - Status: `TODO` |
| 401 | | - Verdict: `valid` |
| 402 | | - Severity: `Low` |
| 403 | | - Area: `Other` |
| 404 | | - File: `apps/server/src/orchestration/Errors.ts:126` |
| 405 | | - Threads: PRRT_kwDORLtfbc5wBFWs |
| 406 | | - Audit note: Same Symbol interpolation hazard as C011 remains. |
| 407 | | |
| 408 | 363 | - [ ] `C047` `SqlSchema.findOneOption` can produce both SQL errors and decode errors, but `mapError` wraps all as `PersistenceSqlError`. Consider distinguishing `ParseError` from SQL errors and mapping decode failures to `PersistenceDecodeError` instead. <details> <summary>🚀 Reply "<strong>fix it for me</strong>" or copy this <strong>AI Prompt</strong> for your agent:</summary> |
| 409 | 364 | - Status: `TODO` |
| 410 | 365 | - Verdict: `valid` |
| ... | ... | @@ -414,15 +369,6 @@ Counts: active `51` (`valid=33`, `partially-valid=18`), closed-invalid `6` |
| 414 | 369 | - Threads: PRRT_kwDORLtfbc5wiaR- |
| 415 | 370 | - Audit note: Decode and SQL errors still collapsed into one persistence error kind. |
| 416 | 371 | |
| 417 | | - [ ] `C048` `statement.run()` returns a `RunResult` object, not an array. Casting it to `ReadonlyArray<any>` will cause runtime errors when consumers call array methods. Consider wrapping the result (e.g., `[result]`) or returning a properly typed object. |
| 418 | | - Status: `TODO` |
| 419 | | - Verdict: `partially-valid` |
| 420 | | - Severity: `Low` |
| 421 | | - Area: `Other` |
| 422 | | - File: `apps/server/src/persistence/NodeSqliteClient.ts:99` |
| 423 | | - Threads: PRRT_kwDORLtfbc5wio-r |
| 424 | | - Audit note: Unsafe run() result cast remains; runtime risk depends on raw-result consumers. |
| 425 | | |
| 426 | 372 | - [ ] `C049` `JSON.stringify(cause)` returns `undefined` for `undefined`, functions, or symbols, violating the `string` return type. Consider coercing the result to a string (e.g., `String(JSON.stringify(cause))`) or adding a fallback. |
| 427 | 373 | - Status: `TODO` |
| 428 | 374 | - Verdict: `valid` |