Skip to content

Detect same-metadata customization edits in chat - #336402

Merged
Dmitriy Vasyura (dmitrivMS) merged 2 commits into
mainfrom
dmitrivMS/fix-synced-customization-nonce
Sep 16, 2026
Merged

Dmitriy Vasyura (dmitrivMS) merged 2 commits into
mainfrom
dmitrivMS/fix-synced-customization-nonce

Conversation

@dmitrivMS

Copy link
Copy Markdown
Collaborator

Fixes microsoft/vscode-engineering#3814.
Replaces #335190 with the same reviewed patch, submitted under my account.

Summary

  • Remove the metadata-only cache shortcut so same-size, same-mtime edits update synced customization bundles.
  • Reuse the content hashing and recovery from agentHost: Recover customization sync after reconnect #336329; unchanged content still skips tree rewrites.
  • Add deterministic text/binary regressions and coverage for cached provenance, enablement, read errors, and disposal.

Unchanged rebundles now reread and hash source files, using the existing 10-operation filesystem limiter.

Validation

  • 110 targeted Windows Electron tests passed (bundler and filesystem provider).
  • Scoped TypeScript check and two-file repository hygiene passed.

Check source content before reusing synced bundles, preserving existing content hashing, recovery, and unchanged-content write skipping. Cover same-size, same-mtime edits and cached-state behavior deterministically.

Fixes microsoft/vscode-engineering#3814

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 16, 2026 11:08
@dmitrivMS Dmitriy Vasyura (dmitrivMS) changed the title chat: detect same-metadata customization edits Detect same-metadata customization edits in chat Sep 16, 2026
@dmitrivMS Dmitriy Vasyura (dmitrivMS) added vscode-build VS Code build process issues engineering VS Code - Build / issue tracking / etc. chat labels Sep 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The correctness fix is well covered; remaining feedback is a non-blocking filesystem optimization.

Review tier: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Fixes stale customization bundles when edits preserve file size and mtime.

Changes:

  • Always hash source contents before cache reuse.
  • Add deterministic text, binary, provenance, enablement, failure, and disposal tests.
  • Preserve tree reuse when contents are unchanged.
File Description
syncedCustomizationBundler.ts Removes unsafe metadata-only cache reuse.
syncedCustomizationBundler.test.ts Adds regression and recovery coverage.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Read validation already stats each source. Pass source URIs directly when collecting entries and retain metadata checks for directory traversal. Verify per-source stat counts on both initial bundles and rebundles.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The focused implementation correctly addresses stale cache reuse and includes comprehensive regression coverage.

Review effort: Balanced
Findings: None

Resolved since last review (1)

@dmitrivMS
Dmitriy Vasyura (dmitrivMS) merged commit 75e4978 into main Sep 16, 2026
34 checks passed
@dmitrivMS
Dmitriy Vasyura (dmitrivMS) deleted the dmitrivMS/fix-synced-customization-nonce branch September 16, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chat engineering VS Code - Build / issue tracking / etc. vscode-build VS Code build process issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants