Code review 2026-12-02 WP7: CLI and remaining Lows #158

Closed
opened 2026-12-02 16:06:56 -05:00 by dohertj2 · 1 comment
Owner

From the 2026-12-02 full code review (commit 28b6651a).

  • Findings: docs/plans/2026-12-02-full-code-review.md
  • Plan: docs/plans/2026-12-02-full-code-review-remediation.md → WP7
Task Findings Change
7.1 CLI-1, CLI-5, CLI-6 Exit 1 on success:false. Export writes to a temp file and renames it, exiting 1 on a size mismatch. Report a clean error message for user and bodyless errors.
7.2 CLI-3 Parse numbers and dates with the invariant culture (custom parsers). Add a de-DE test.
7.3 CLI-4, CLI-7 Streaming export has no fixed 30 s idle cap (use a configurable idle timeout). debug stream retries a failed re-subscribe.
7.4 DEP-2 Take the operation lock before validating the state.
7.5 CMN-6, CMN-7, CMN-8, CMN-9, CMN-12 The flow fold orders by lifecycle rank, then time. The schema required matching is case-insensitive. Unknown legacy types get a clear error. CSV tolerates trailing commas. ParseEnum ignores case.
7.6 INB-1, SEC-1 Run inbound scripts so the timeout covers the synchronous prefix (Task.Run with deadline). Persist a refreshed role ticket on passive requests.
From the 2026-12-02 full code review (commit 28b6651a). - Findings: `docs/plans/2026-12-02-full-code-review.md` - Plan: `docs/plans/2026-12-02-full-code-review-remediation.md` → WP7 | Task | Findings | Change | |---|---|---| | 7.1 | CLI-1, CLI-5, CLI-6 | Exit 1 on `success:false`. Export writes to a temp file and renames it, exiting 1 on a size mismatch. Report a clean error message for user and bodyless errors. | | 7.2 | CLI-3 | Parse numbers and dates with the invariant culture (custom parsers). Add a `de-DE` test. | | 7.3 | CLI-4, CLI-7 | Streaming export has no fixed 30 s idle cap (use a configurable idle timeout). `debug stream` retries a failed re-subscribe. | | 7.4 | DEP-2 | Take the operation lock before validating the state. | | 7.5 | CMN-6, CMN-7, CMN-8, CMN-9, CMN-12 | The flow fold orders by lifecycle rank, then time. The schema `required` matching is case-insensitive. Unknown legacy types get a clear error. CSV tolerates trailing commas. `ParseEnum` ignores case. | | 7.6 | INB-1, SEC-1 | Run inbound scripts so the timeout covers the synchronous prefix (`Task.Run` with deadline). Persist a refreshed role ticket on passive requests. |
dohertj2 added the type:review-findingpriority:p2 labels 2026-12-02 16:06:56 -05:00
Author
Owner

Fixed on main (pushed, 922021c4). Plan: docs/plans/2026-12-02-full-code-review-remediation.md (see its Outcome section).

All 6 tasks done.

  • SEC-1: reworked after the first approach broke the "passive requests never re-issue the cookie" rule. Each node now remembers, per session, a role refresh that changed nothing; a refresh that changed roles is still re-derived on each request until a non-passive request writes it into the cookie.
  • 7.1: the documented CLI exit codes are unchanged, apart from the new exit 1 on success:false.

Still to check live on QA:

  • certs trust/remove exit codes against a real site pair.
  • debug stream re-subscribe after a central failover.
  • A large audit export --timeout-seconds run.

Commits:

  • 6dd6c50e fix(security): remember an unchanged passive-request role refresh per session instead of re-issuing the cookie (SEC-1, WP7 task 7.6)
  • 0a62f33a fix(inbound): bound the sync prefix of inbound scripts by the method timeout (INB-1, WP7 task 7.6)
  • 76c50a29 fix(commons): flow fold ranks lifecycle before time, schema required/legacy-type checks, CSV trailing comma, case-insensitive audit enum parse (CMN-6,7,8,9,12, WP7 task 7.5)
  • 517f093c fix(deployment): take the operation lock before validating the state transition (DEP-2, WP7 task 7.4)
  • 47a7c0dd fix(cli): exit 1 on success:false, atomic bundle export, invariant parsing, export timeout, re-subscribe retry (CLI-1,3,4,5,6,7, WP7 tasks 7.1-7.3)
  • 18311eb3 test(deployment): race-delete test asserts LogAndSaveAsync (merge fix)

Deploying to QA and DEV is tracked in #160. Closing.

Fixed on `main` (pushed, `922021c4`). Plan: `docs/plans/2026-12-02-full-code-review-remediation.md` (see its Outcome section). All 6 tasks done. - **SEC-1:** reworked after the first approach broke the "passive requests never re-issue the cookie" rule. Each node now remembers, per session, a role refresh that changed nothing; a refresh that changed roles is still re-derived on each request until a non-passive request writes it into the cookie. - **7.1:** the documented CLI exit codes are unchanged, apart from the new exit 1 on `success:false`. **Still to check live on QA:** - `certs trust/remove` exit codes against a real site pair. - `debug stream` re-subscribe after a central failover. - A large `audit export --timeout-seconds` run. **Commits:** - 6dd6c50e fix(security): remember an unchanged passive-request role refresh per session instead of re-issuing the cookie (SEC-1, WP7 task 7.6) - 0a62f33a fix(inbound): bound the sync prefix of inbound scripts by the method timeout (INB-1, WP7 task 7.6) - 76c50a29 fix(commons): flow fold ranks lifecycle before time, schema required/legacy-type checks, CSV trailing comma, case-insensitive audit enum parse (CMN-6,7,8,9,12, WP7 task 7.5) - 517f093c fix(deployment): take the operation lock before validating the state transition (DEP-2, WP7 task 7.4) - 47a7c0dd fix(cli): exit 1 on success:false, atomic bundle export, invariant parsing, export timeout, re-subscribe retry (CLI-1,3,4,5,6,7, WP7 tasks 7.1-7.3) - 18311eb3 test(deployment): race-delete test asserts LogAndSaveAsync (merge fix) Deploying to QA and DEV is tracked in #160. Closing.
Sign in to join this conversation.