fix: refusals never quote model values or JSON parser text (#1873) #1908

Merged
jason.woltje merged 2 commits from org-redact2 into refactor 2026-11-10 21:43:53 +00:00
Owner

The two value echoes that PR #1905 deferred, plus the same rule applied to every config and organization JSON reader (#1873).

  • packages/harness/src/bundle.mjs: an unknown model table selection now names the route var (primary or fallback) and never the model value from the organization file.
  • packages/organization/src/util.mjs: readJsonFile says the file is not valid JSON and names the file. It never attaches the parser's message, because on Node 26 that message can quote the bytes near the fault. The new helper parseJsonFileText is shared by these other readers:
    • organization.mjs: the writer read, the preimage, and the recovery and project-addition receipt lines;
    • org-registry.mjs: the registry and marker metadata, and the writer read;
    • org-service.mjs: the template, owner metadata, the current document, notifier config and the deletion receipt.
  • Review fixes:
    • scripts/mosaic-config.mjs: the system config and instance marker;
    • packages/cli/src/org.mjs: the validate, create and update document read.
  • Tests (json-redaction in organization and cli, plus bundle.test.mjs): a value or malformed file holding sk-test-NOT-A-SECRET-1234 near the fault refuses, names the var or file, and leaves the value out. Each test fails on BASE.

Lane: Sol, gate 1081/0. Review: Opus, changes 2 (both P3), fixed. Bounded follow-ups recorded in the lane report: semantic-validation echoes in generic id, integer and date checks, and parser echoes in packages outside this lane's audit (control-board, discord, seat, runs, project, queue, mosaic-task, case2-precheck).

The two value echoes that PR #1905 deferred, plus the same rule applied to every config and organization JSON reader (#1873). - `packages/harness/src/bundle.mjs`: an unknown model table selection now names the route var (primary or fallback) and never the model value from the organization file. - `packages/organization/src/util.mjs`: `readJsonFile` says the file is not valid JSON and names the file. It never attaches the parser's message, because on Node 26 that message can quote the bytes near the fault. The new helper `parseJsonFileText` is shared by these other readers: - `organization.mjs`: the writer read, the preimage, and the recovery and project-addition receipt lines; - `org-registry.mjs`: the registry and marker metadata, and the writer read; - `org-service.mjs`: the template, owner metadata, the current document, notifier config and the deletion receipt. - Review fixes: - `scripts/mosaic-config.mjs`: the system config and instance marker; - `packages/cli/src/org.mjs`: the `validate`, `create` and `update` document read. - Tests (`json-redaction` in organization and cli, plus `bundle.test.mjs`): a value or malformed file holding `sk-test-NOT-A-SECRET-1234` near the fault refuses, names the var or file, and leaves the value out. Each test fails on BASE. Lane: Sol, gate 1081/0. Review: Opus, changes 2 (both P3), fixed. Bounded follow-ups recorded in the lane report: semantic-validation echoes in generic id, integer and date checks, and parser echoes in packages outside this lane's audit (control-board, discord, seat, runs, project, queue, mosaic-task, case2-precheck).
jason.woltje added 2 commits 2026-11-10 21:43:51 +00:00
jason.woltje merged commit 8f7de8c4d3 into refactor 2026-11-10 21:43:53 +00:00
Sign in to join this conversation.