Skip to content

land: redact-completion-previews - #596

Open
aft-alfonso[bot] wants to merge 3 commits into
mainfrom
land/redact-completion-previews
Open

aft-alfonso[bot] wants to merge 3 commits into
mainfrom
land/redact-completion-previews

Conversation

@aft-alfonso

@aft-alfonso aft-alfonso Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Accepted agent delivery; branch-keyed search descriptor included.


Summary by cubic

Masks background task completion previews and watch push text so credentials never reach OpenCode or Pi; raw output files and bash_status results are unchanged.

Details

  • Captures secret-named environment values from the child environment and redacts them along with common credential formats before any preview edge cut.
  • Restarted tasks withhold previews, returning a pointer to the output file, because secret values are never persisted.
  • Restores pipeline failure warnings and recovery markers after masking a completion body.
  • Fixes watch panics at Unicode scan boundaries by mapping offsets against the full lossy decoding and aligning to character boundaries.
  • Watch matching still scans raw bytes; only presented match text/context is masked, including matches split at chunk boundaries.
  • Tightens sk- redaction to length-qualified keys so ordinary sk- words remain visible.

Written for commit 27ebc01. Summary will update on new commits.

View guided diff Turn on auto-fix

RetriggerView in GreptileConfidence Score: 5/5

The changes appear safe to merge; no new actionable issues were found.

Summary

Masks background completion previews and watch text before shortening them. Raw output files and bash_status results remain unchanged.

  • Background completion notices hide credentials from printed output.
  • Watch notifications hide credentials in matched text and context.

Reviews (2) · Last reviewed commit: "mason: preserve safe watch ranges and ma..." · Reviewed by Greptile

ualtinok and others added 2 commits October 19, 2026 14:09
Reuse the Rust credential redactor for completion/wake previews and mask exact secret-named values from the selected child environment. Keep the secret list on the live task only; restarted tasks withhold preview text while retaining status and recovery pointers. Raw capture files and status/read results are unchanged.

Watch matching remains raw. Presentation is masked before context selection and before persistence/push, including matches split at scanner chunk edges. A hit requires one intact capture read: update the existing I/O assertion explicitly for that added security work. Replay tests now assert withheld text while retaining routing/count/offset/ack checks; the binary parity fixture normalizes the newly visible per-fixture storage roots. Narrow non-live sk- matching to key-length strings to preserve ordinary sk- words.

Verified Linux Rust redactor/background/subc-bash gates, binary tests and list envelopes; Windows cross-check; bridge build, all three typechecks and lint. Pi and bridge unit suites passed. OpenCode full suite had unrelated mock/order, permission-ask and timeout failures; the new host wake cases passed, and controls independently reddened OpenCode 1, OpenCode 2, Pi, exact-env masking and raw-token watch presentation. See delivery evidence for counts and the persistent permission fixture failure.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
…views

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Comment thread crates/aft/src/bash_background/registry.rs Outdated
Comment thread crates/aft/src/bash_background/completion_preview.rs Outdated
Map watch source offsets against the intact lossy UTF-8 decoding, expand ranges to character boundaries, and use checked slicing before rendering context. Cover the reported 64 KiB emoji cut, randomized multibyte cuts, invalid bytes, and out-of-range endpoints.

Restore cached recovery markers and pipeline warnings after masking a completion body. The live failing-pipeline regression exercises compressed and raw previews, queued completions and snapshots. Existing tests retain their contracts; all five new regressions pass alongside the bash_background and list_envelope gates. Mutation controls independently reddened the exact Unicode, randomized-cut, pipeline-warning, and recovery-marker tests.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
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