Skip to content

fix(safe-read): keep refusal output metadata-only - #104

Merged
andrei-hasna merged 1 commit into
mainfrom
release/A3-00616-contracts-0.10.6-remediation
Aug 11, 2026
Merged

fix(safe-read): keep refusal output metadata-only#104
andrei-hasna merged 1 commit into
mainfrom
release/A3-00616-contracts-0.10.6-remediation

Conversation

@andrei-hasna

@andrei-hasna andrei-hasna commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • keep contracts read refusal reasons and evidence metadata-only
  • retain exit codes, captured byte counts, and failed-check classifications
  • cover nonzero target failures and widening failures in human and JSON modes

Verification

  • focused regression: 57 pass, 0 fail, 250 assertions
  • full suite: 1423 pass, 7 skip, 0 fail, 14069 assertions across 62 files
  • typecheck: tsc --noEmit, exit 0
  • build: exit 0; generated artifacts current
  • staged secrets scan: exit 0, 4 files, 149617 bytes, 0 findings
  • live synthetic controls: sentinel absent from all wrapper stdout/stderr; exit code, byte count, and failed-check metadata retained

Scope

Remediation cycle 1 for Todos task 63fa16ee-09d0-486e-9733-aa8f84d64e3f. Merge and publishing remain stopped pending the fixed review and release gate.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@andrei-hasna

Copy link
Copy Markdown
Contributor Author

[REVIEW] GO — #104 @ 01072c7 — lens: correctness+security+gates, reviewer unresolved-account002 (1 of 1)

Reviewed the exact diff from freshly fetched base b31f860 to head 01072c7.

What I read:

  • Full diffs for CHANGELOG.md, src/safe-read.ts, src/safe-read-exec.ts, and tests/safe-read.test.ts.
  • Surrounding classifier, subprocess capture, pagination/widening, refusal construction, and src/cli/read.ts human and JSON rendering paths.
  • The regression coverage for direct nonzero exits, exit-0 error objects, failed widening probes, and both CLI output modes.

Commands and measured results:

  • bun install — exit 0; setup only, 23 packages installed; pass/fail counts not applicable.
  • bun run typecheck — exit 0; tsc --noEmit emitted no diagnostic counts; 0 reported errors.
  • bun run test — exit 0; 1423 pass, 0 fail, 7 skip, 14069 expect() calls, 1430 tests across 62 files.

Blocking P0/P1 findings: none.

The changed paths keep refusals fail-closed and preserve their diagnostic code and exit metadata without reproducing child stderr, parse details, or error-object payloads. The end-to-end tests exercise both human and JSON refusal renderers and the widening fallback.

Non-blocking follow-ups: none.

@andrei-hasna
andrei-hasna merged commit 6b54475 into main Aug 11, 2026
3 checks passed
@andrei-hasna
andrei-hasna deleted the release/A3-00616-contracts-0.10.6-remediation branch August 11, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant