Skip to content

fix(queue): prevent redact_secrets from corrupting code excerpts and repair missing + on closing delimiters (ticket-467) - #729

Merged
tom-sapletta-com merged 1 commit into
mainfrom
ticket/467-fix-redact-secrets-code-excerpts-728
Oct 19, 2026
Merged

tom-sapletta-com merged 1 commit into
mainfrom
ticket/467-fix-redact-secrets-code-excerpts-728

Conversation

@tom-sapletta-com

Copy link
Copy Markdown
Contributor

Closes #728

Summary

  • Narrow _SECRET_PATTERNS in src/koru/queue/patch_mode.py so quoted secret assignments and env-style secret assignments remain redacted while normal source code expressions (===, new Set([, decryptJson(...), this.key = encryptionKey) are preserved in current_file_excerpt and build_verify_retry_prompt.
  • In src/koru/queue/diff_repair.py, recover closing delimiters (}, };, ), );, ], ];) whose leading + was emitted as a space immediately following an added + block, and anchor pre_ctx on its last non-empty line when trailing blank context lines are present.
  • Add unit coverage in tests/test_planfile_queue.py.

Verification

  • PYTHONPATH=src pytest -q -o addopts='' tests/test_planfile_queue.py -k 'redact or context_excerpt' tests/test_queue_evidence.py -k 'secrets' -> 2 passed
  • python3 -m ruff check src/koru/queue/patch_mode.py src/koru/queue/diff_repair.py tests/test_planfile_queue.py -> All checks passed
  • ./project/governance-check.sh --no-cache -> GOV-PASS (0 errors, 0 warnings)

@tom-sapletta-com
tom-sapletta-com force-pushed the ticket/467-fix-redact-secrets-code-excerpts-728 branch from 61cff42 to ef7e6ae Compare October 19, 2026 14:21
…repair missing + on closing delimiters (ticket-467, Closes #728)
@tom-sapletta-com
tom-sapletta-com force-pushed the ticket/467-fix-redact-secrets-code-excerpts-728 branch from ef7e6ae to e976b65 Compare October 19, 2026 14:34
@tom-sapletta-com
tom-sapletta-com merged commit e976b65 into main Oct 19, 2026
4 checks passed
@tom-sapletta-com
tom-sapletta-com deleted the ticket/467-fix-redact-secrets-code-excerpts-728 branch October 19, 2026 14:40

This branch was successfully deployed

1 active deployment
github-pages — e976b654 Deployed Oct 19, 2026 by tom-sapletta-com via deploy #648
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.

fix(queue): prevent redact_secrets from corrupting code excerpts and repair missing + on closing delimiters

1 participant