Skip to content

fix(redaction): preserve raw JSON layout atomically - #929

Draft
seonghobae wants to merge 6 commits into
fix/sandbox-log-redaction-clean-history-v2-20260810from
fix/atomic-layout-preserving-json-redaction-20260811
Draft

fix(redaction): preserve raw JSON layout atomically#929
seonghobae wants to merge 6 commits into
fix/sandbox-log-redaction-clean-history-v2-20260810from
fix/atomic-layout-preserving-json-redaction-20260811

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Stack identity

Fail-first boundary

Issue #908 requires raw JSON to be structurally redacted before line splitting without dict reserialization. The test-only contract reproduces:

  • multiline key/colon/value separation leaking an opaque credential;
  • duplicate sensitive keys collapsing to one member;
  • sensitive scalar/container type and shape loss;
  • malformed multiline structural fallback leaking the tail; and
  • missing explicit byte/depth/token/string/replacement/work limits.

Local RED on the exact parent implementation is 5 failed, 1 passed. The permanent Sandbox Log Redaction Quality CI now owns this test file. No production change is present on this initial head.

Required GREEN

Implement a bounded iterative token/span rewriter that preserves untouched slices, duplicate-member order/count, escape spelling, layout and stable markers; fail closed on unsafe parser state or limit exhaustion. Keep #766 output/service-file quotas separate. Keep Draft until exact-head focused/full coverage, security, source review, and independent approval pass.

Closes #908 only after protected integration and protected-main synthetic acceptance.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ab2713f3-ae12-4b3a-8a75-e8b8ab54aa9a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Contributor Author

GREEN implementation published at exact head 730274cceece6db95986bf65fc46f7c5a132f467 on unchanged parent #906 18a6d125fead8cb95972fe3e1a97e4cc4163e9d2.

Proof before publication:

  • fail-first boundary on the parent: 5 failed, 1 passed;
  • focused security/wrapper/sandbox selection: 155 passed;
  • owned modules: 1,039/1,039 statements and 416/416 branches;
  • complete repository suite: 1,073 passed + 16 subtests;
  • complete owned production: 7,650/7,650 statements and 3,074/3,074 branches;
  • public callable docstrings: 100%;
  • compilation, diff integrity, and Strix quick gate: passed.

The production path is an iterative token/span parser plus iterative replacement traversal. It preserves untouched slices, escape spelling, duplicate-member order/count, layout, scalar categories, and container shape. Input/depth/token/string/replacement/work bounds fail closed without parser diagnostics. Command-field fallback preserves the original JSON array shape. Issue #766 remains explicitly separate.

Hosted exact-head checks and current source review remain authoritative; this local proof does not promote the Draft or count as approval.

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