Repository navigation
Fix macOS /private path mismatches in report redaction and two test expects - #18
Closed
M3NT8L-One wants to merge 4 commits into
Closed
M3NT8L-One wants to merge 4 commits into
M3NT8L-One wants to merge 4 commits into
Conversation
Contributor
|
Thanks for the contribution! We take pull requests of one change each. Small pull requests that make one change each can be reviewed carefully and tested on their own, and one problem never holds up the others. This one seems to make several separate changes:
Could you open a pull request for each? One way to split it: Open one pull request for the redaction change (src/steve_desktop/diagnostics.py and tests/test_desktop_feedback.py) and a second for the test expectations (tests/test_legacy_profile.py and tests/test_windows_updates.py). We'll leave this one open until then. |
This was referenced Nov 4, 2026
Contributor
Author
|
Split per @10-X-eng's request into two PRs off current
Both are standalone. This PR can close once those two are up; happy to adjust either if anything looks off. |
10-X-eng
pushed a commit
that referenced
this pull request
Nov 6, 2026
On Darwin, /tmp and /var resolve under /private, so migrate_profile and pending return resolved Paths. Match the test expects. Split from #18.
10-X-eng
pushed a commit
that referenced
this pull request
Nov 6, 2026
* Redact home paths before long-value scrub (macOS /private) Apply email/home/username redaction before the ≥80-char wipe, and keep both lexical and resolved (/var vs /private/var) home forms so long temp paths become [home] instead of [long value omitted]. Split from #18. * Redact known secrets before home, email and account-name passes Changing part of a secret first (an account name inside a token) left the rest of it in the report. Secrets now go first; the long-value wipe still runs last. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: steve-maintainer <noreply@anthropic.com>
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What doesn't work
On macOS,
/tmpand/varare symlinks to/private/tmpand/private/var. Temp paths fromtempfiletherefore show up as/var/folders/…, while anything that callsPath.resolve()returns/private/var/folders/….Three unit tests fail only on Mac:
diagnostics.redact_report): the long-token wipe ([A-Za-z0-9_+/=.-]{80,}) runs before home redaction and includes/, so a long absolute path is replaced with[long value omitted]and never becomes[home]. Even with the order fixed, the helper only kepthomeandPath(home).resolve(), so the unresolved/var/…form (what the log actually contains when the home dir is a symlink) still leaked.target == root/'Steve/CAD'butmigrate_profilereturns a resolved path.pending(profile) == candidatebutpendingreturns a resolved candidate.The change
src/steve_desktop/diagnostics.py: collect home forms (raw,resolve(), symlinkreadlinktarget, and the/private-stripped twin), and redact email, home-folder patterns, those home forms and the username before_redact, so the long-value scrub cannot eat paths first. Long secrets and bearer/api-key rules still run afterward.tests/test_desktop_feedback.py: add a symlinked temp-root test that embeds both the lexical and resolved forms (it reproduces on Linux too) and asserts paths of 80+ chars become[home], not[long value omitted]. Add a both-ways check that ordinary short text survives while long opaque values are still scrubbed.tests/test_legacy_profile.py: expect(root/'Steve/CAD').resolve().tests/test_windows_updates.py: expectcandidate.resolve().No change to
windows_updates.py, the updater, signing,local_git.py, workflows, or deps.Tests
macOS (Apple Silicon, Python 3.13),
python -m unittest:35aad24)No Keychain prompt during the runs. Not run on Linux or Windows locally; the new symlink test is written to reproduce on Linux.
4 files, +67 / −7.