[Routine - QP] fix: avoid logging full backup file path in PromptManager#49
Draft
winterdrive wants to merge 1 commit into
Draft
[Routine - QP] fix: avoid logging full backup file path in PromptManager#49winterdrive wants to merge 1 commit into
winterdrive wants to merge 1 commit into
Conversation
Log only the basename when reporting a created prompts.json backup, since the full path embeds the user's local workspace/home directory. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
1. Pre-flight Check
Open PRs / active branches checked (as of 2026-07-08):
routine/qp-fix-versionmanager-malformed-json-260707— touchessrc/core/VersionManager.ts,src/test/unit/versionManager.test.tsroutine/qp-fix-mcp-clipboard-non-array-260706— touchesmcp-server/src/tools/clipboardTools.tsroutine/qp-fix-versionhistory-substr-260703— touchessrc/services/VersionHistoryService.tschore/ignore-claude-worktrees-jest— touchesjest.config.jsroutine/qp-fix-path-traversal-prefix-260702— touchessrc/core/PathUtils.ts,src/test/unit/pathUtils.test.tsfix/quick-create-workspace-ux— touchessrc/commands.ts,src/promptProvider.ts,src/test/unit/promptProviderMultiroot.test.tsThis PR only touches
src/core/PromptManager.ts(a single log line increateBackup()), which does not overlap with any file above. It also does not overlap topically with recently closed duplicate-attempt PRs (#33–35, #39–41), which coveredsubstrdeprecation, non-array JSON guards, and corrupted-JSON handling — this change is purely about log output, not parsing/validation logic.2. Changes
PromptManager.createBackup()previously logged the full absolute path of the corruption backup file (console.error('[PromptManager] Created backup: ' + backupPath)), which embeds the user's workspace directory (and often their OS username via the home directory). This PR logs onlypath.basename(backupPath)instead, keeping the log useful (still shows the backup filename/timestamp) without leaking the local filesystem layout.mcp-server/src/tools/untouched).package.json/package-lock.jsonuntouched.CHANGELOG.mduntouched (per routine PR policy).3. Safety Verification
Commands run locally, all passed:
npx tsc -p ./— no errorsnpm run test:coverage— 7 test suites, 107 tests, all passed4. CI / Release Gate Note
This is a daily routine Draft PR. Package version bump and CHANGELOG consolidation are intentionally deferred to the weekend release/integration PR. If CI fails solely due to the repository's version-bump release gate, that is expected release-readiness behavior for a routine PR, not a code validation failure.