Skip to content

fix(scrub): capture Primary working directory form in keepClientCwd - #22

Open
mradwankhalil wants to merge 1 commit into
rynfar:mainfrom
mradwankhalil:fix/primary-working-directory
Open

mradwankhalil wants to merge 1 commit into
rynfar:mainfrom
mradwankhalil:fix/primary-working-directory

Conversation

@mradwankhalil

Copy link
Copy Markdown

Fixes #21

  • Accept the optional Primary prefix in the keepClientCwd capture regex (Claude Code env form), preserving the client cwd in the kept block
  • Case-insensitive matching preserved; legacy form unchanged
  • 3 new tests (Primary form, legacy form, mixed case) — suite 20/20
  • Verified live against the published 0.2.3 dist: cwd preserved through the bridge while all fingerprint scrubbing (identity lines, , brand tokens) remains intact

Claude Code env blocks emit "Primary working directory:" — the line-anchored
"Working directory:" capture missed it, so the kept <env> block lost the cwd
entirely. Consumers reading the client cwd from the scrubbed prompt (Meridian
session keying, model project context) degrade. Accept the optional Primary
prefix; case-insensitive as before. Fixes rynfar#21.
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.

keepClientCwd misses Primary working directory form — env cwd dropped from scrubbed prompt

1 participant