Skip to content

Add safe ClickOnce file graph staging - #1058

Open
dtivel wants to merge 1 commit into
dtivel/clickonce-file-graphfrom
dtivel/clickonce-safe-staging
Open

Add safe ClickOnce file graph staging#1058
dtivel wants to merge 1 commit into
dtivel/clickonce-file-graphfrom
dtivel/clickonce-safe-staging

Conversation

@dtivel

@dtivel dtivel commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Part of #1049.

Summary

  • Add dormant ClickOnce file-graph staging with explicit default, no-sign-dependencies, and no-update modes.
  • Assign deterministic, contained staging destinations while preserving original manifest target paths.
  • Preflight destination, update-path, file/directory, and reference collisions using an O(n log n) batch check.
  • Rebind manifest references to staged files and safely manage mapped .deploy suffixes during metadata updates.
  • Preserve diagnostics and restore state during rollback, disposal, and cleanup failures.
  • Add localized errors and comprehensive staging tests.

Behavior

No production signing behavior or CLI surface is changed. The staging implementation remains dormant and does not resolve files, update manifests, or sign files.

Testing

  • Solution build: 0 warnings, 0 errors.
  • Sign.Core.Test: 545 passed, 1 skipped.

Add dormant file-graph staging with mode-specific inputs, complete destination preflight, mapped-suffix update scopes, manifest-reference rebinding, cleanup, and neutral localized errors. Cover containment, collisions, rollback, lifecycle failures, and source-tree immutability.

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

Copilot-Session: be91288d-5106-4c59-a1fa-c5353dccb828
@dtivel
dtivel requested a review from a team as a code owner August 16, 2026 03:21
@dtivel
dtivel requested a review from kartheekp-ms August 16, 2026 03:21
@dtivel
dtivel requested a balanced review from Copilot August 16, 2026 03:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds dormant, contained ClickOnce file-graph staging for the future version 2 signing pipeline.

Changes:

  • Adds deterministic staging, collision preflight, reference rebinding, and rollback.
  • Supports default, no-dependency-signing, and no-update modes.
  • Adds localized errors and extensive staging tests.
Show a summary per file
File Description
src/Sign.Core/Tools/ClickOnce/ClickOnceFileGraphStager.cs Implements staging and collision validation.
src/Sign.Core/Tools/ClickOnce/ClickOnceStagingResult.cs Manages staged state and rollback.
src/Sign.Core/Tools/ClickOnce/ClickOnceStagedFile.cs Models a staged file.
src/Sign.Core/Tools/ClickOnce/ClickOnceSigningMode.cs Defines staging modes.
src/Sign.Core/Tools/ClickOnce/ClickOnceFileGraphStagingException.cs Adds staging-specific errors.
src/Sign.Core/Resources.resx Adds staging error resources.
src/Sign.Core/Resources.Designer.cs Exposes generated resource properties.
src/Sign.Core/xlf/Resources.cs.xlf Adds Czech localization entries.
src/Sign.Core/xlf/Resources.de.xlf Adds German localization entries.
src/Sign.Core/xlf/Resources.es.xlf Adds Spanish localization entries.
src/Sign.Core/xlf/Resources.fr.xlf Adds French localization entries.
src/Sign.Core/xlf/Resources.it.xlf Adds Italian localization entries.
src/Sign.Core/xlf/Resources.ja.xlf Adds Japanese localization entries.
src/Sign.Core/xlf/Resources.ko.xlf Adds Korean localization entries.
src/Sign.Core/xlf/Resources.pl.xlf Adds Polish localization entries.
src/Sign.Core/xlf/Resources.pt-BR.xlf Adds Brazilian Portuguese entries.
src/Sign.Core/xlf/Resources.ru.xlf Adds Russian localization entries.
src/Sign.Core/xlf/Resources.tr.xlf Adds Turkish localization entries.
src/Sign.Core/xlf/Resources.zh-Hans.xlf Adds Simplified Chinese entries.
src/Sign.Core/xlf/Resources.zh-Hant.xlf Adds Traditional Chinese entries.
test/Sign.Core.Test/Tools/ClickOnce/ClickOnceFileGraphStagerTests.cs Covers staging, collisions, and recovery.

Review details

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

Files not reviewed (1)
  • src/Sign.Core/Resources.Designer.cs: Generated file
  • Files reviewed: 20/21 changed files
  • Comments generated: 0
  • Review effort level: Balanced

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.

2 participants