Skip to content

Match new Windows workspace naming to macOS - #966

Merged
coneilen merged 3 commits into
mainfrom
coneilen-native-workspace-naming
Nov 9, 2026
Merged

coneilen merged 3 commits into
mainfrom
coneilen-native-workspace-naming

Conversation

@coneilen

@coneilen coneilen commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

New native Windows workspaces follow macOS naming, preview, and validation rules, including Unicode transliteration and 32-character truncation. Existing directories retain their names, paths, and identities; explicit Rename keeps its existing behavior.

Changes

  • Use built-in Windows ICU through a System32-only loader for Latin transliteration, diacritic removal, lowercasing, and grapheme-aware ASCII mapping; fail explicitly rather than falling back to approximate ASCII normalization.
  • Share creation-only naming across preview, submit-time collision checks, and directory creation. Preserve file/directory collision detection after transliteration or truncation, Windows path safety, legacy rename rules, and raw directory discovery.
  • Reuse the existing Foundation-whitespace helper for preview only; validate every nonempty raw draft. Share owned naming messages between inline validation and creation-race errors.
  • Cover ICU error-handle cleanup, allocation failures, malformed UTF-8, Windows path restrictions, collisions, Unicode/length/whitespace behavior, and existing identity preservation. Document finite evidence limits.

Test plan

RED: & $env:GRAPHCODE_ZIG0152 test src\WorkspaceLifecycle.zig --test-filter 'workspace creation naming parity' -> 0/3 passed; expected cafe-zurich, found caf-z-rich; expected NameTaken, created a different directory; legacy-preservation scenario returned NameTaken
GREEN: & $env:GRAPHCODE_ZIG0152 test src\WorkspaceLifecycle.zig --test-filter 'workspace creation naming parity' -> 6/6 passed, including 27 Foundation naming fixtures
REGRESSION: & $env:GRAPHCODE_ZIG0152 test src\WorkspaceLifecycle.zig -> 22/22 passed on 040ba32

Direct Zig commands ran from graphcode-windows with repository-bootstrapped Zig 0.15.2 and owned temporary/cache roots. The original slug RED/GREEN logs are preserved separately from the later full regression.

& $env:GRAPHCODE_ZIG0152 test src\NewWorkspaceForm.zig --test-filter 'new workspace' -target x86_64-windows-msvc -lc -luser32 -lgdi32 -ladvapi32 "-I$env:GRAPHCODE_WINGHOSTTY_ROOT\include"

Result: 21/21 passed. With the same flags and --test-filter 'new workspace naming whitespace parity', the additional RED was 0/3: a space-only draft incorrectly stayed quiet, NBSP was not trimmed from preview, and collision wording omitted the normalized slug. After the fix, that focused command passed 5/5, including no-directory effects, owned preview/message lifetimes, and creation-race reporting.

Actual shared Workspace.slug, macOS preview, and shared naming-error source were compiled with pinned Swift/Foundation 6.3.3: 27 slug fixtures, 12 preview/validation examples, and an exhaustive 19-scalar Foundation .whitespaces set. These are finite oracle checks, not all-Unicode or cross-version equivalence.

The sole desktop executor ran the following admitted current-source gates using owned roots and the already-built canonical guard:

Exact command Result
Invoke-NamingAcceptance040ba325-CurrentWindow.ps1 -Mode Run -LaneStateSha256 3A65B799BDCC68F0549179AD9810D2E7FA6E86E73D35AE9143CDCEFB05E5B3B8 Exit 0; nine facts; two UI create/open operations with selected new workspaces; unchanged raw paths/names/native file IDs/semantic UI IDs for three legacy directories; all six cleanup fields true
Invoke-AcceptanceFullNaming040ba325.ps1 -Mode Run -LaneStateSha256 168F51E4822925612EECD664735B3EA9FBB2C374C143A4D34C3154D42232D51D Exit 0; complete unfiltered 684/684 units; 2,238 direct executions plus one derived proof; exact 77-case/seven-group ownership aggregate; fresh 14-artifact/seven-control fixture inventory; all six cleanup fields true
pwsh -NoProfile -File Tools\windows\Test-ShellSectionManifests.ps1 -Directory D:\namingunits040\sections -ShardCount 3 Exit 0; all 66 sections executed exactly once across original 23/18/25 shard manifests

The first two script paths are under C:\Users\coneilen\.copilot\session-state\481117da-1883-41d1-b2d3-bb19ae883cf4\files.

Canonical shell commands executed under those owned supervisors:

& .\Tools\windows\validate.ps1 -Task windows-shell -ShellPart unit -ShellTestShard 0 -ShellTestShardCount 3 -ShellTestManifest D:\namingunits040\sections\shard-0.json -ShellValidationRoot D:\nu0400
& .\Tools\windows\validate.ps1 -Task windows-shell -ShellPart unit -ShellTestShard 1 -ShellTestShardCount 3 -ShellTestManifest D:\namingunits040\sections\shard-1.json -ShellValidationRoot D:\nu0401
& .\Tools\windows\validate.ps1 -Task windows-shell -ShellPart unit -ShellTestShard 2 -ShellTestShardCount 3 -ShellTestManifest D:\namingunits040\sections\shard-2.json -ShellValidationRoot D:\nu0402

All three passed their positive section manifests and cleanup checks. Shard 1 includes lifecycle 22/22 and form 21/21. Shard 0 includes App 1,715 passed/19 skipped and native accessibility 280 passed; skips are not counted as passes. Aggregate output SHA: CCC33285A2F5796D00EEDC9EC851D36CA08F8B10B2DF2BE5AD27D5119AB4F719.

Default integration: the earlier admitted attempt failed waiting for a later Edit edge modal, despite an earlier editor opening successfully. Its 6F83DCA6211EB9A7858E9CCE4B25410CBFEE3A5395F1890C221744332E4BA0BF terminal remains a failure. WM_COMMAND fallback transport success is not semantic editor-dispatch proof; no naming coupling, physical-user activity, RDP cause, or product root cause is inferred.

A separately user-approved unchanged default attempt ran:

& 'C:\Users\coneilen\.copilot\session-state\481117da-1883-41d1-b2d3-bb19ae883cf4\files\Invoke-AcceptanceDefaultIntegrationNaming040ba325-NewGrant.ps1' -Mode Run -LaneStateSha256 8D539D411F160FB55DD8140EC3A1D6161E0E610EECA94193D35D726D4D230D45

Its canonical workload was Tools\windows\validate.ps1 -Task windows-shell -SkipTrayLive -ShellPart integration -ShellValidationRoot D:\n -SwiftExecutable with pinned Swift 6.3.3. Workload exit 0 in 434.5490696 seconds, all six cleanup fields true, isolation/provider/smoke/scrubbed-startup/real-daemon/tray-contract markers present, and complete default UIA JSON with two fixtures, seven action patterns, seven surface patterns, edge workflow, node creation, and multiproject rename.

The original wrapper remains passed=false solely because it stopped for a new untracked runtime batch, not a workload failure. That exact new 14-file/2,573-byte batch was separately user-approved for nonoverwriting verified preservation, with individual journals. No previous batch permission was reused. The coordinator accepted saved evidence, without rerunning the workload or rewriting its original wrapper receipt:

  • Raw default UIA: 9DE30D315302CC8C8EC0F79BB29E6ED51DDACE9FD5E437D5511746D3A8B5B462
  • Original policy-stop terminal: 9AE83B3056FC7D8688355A6DB983622AB9D66AD062F35DD56182F4FBD87CD054
  • Separate preservation completion: 88A31DA49EEDCF83D63B3F1936DADB84737D6EB9D4297AA986550BD629662C42
  • Separate saved acceptance: 827351E0BED00C3D81F3184C87D5E5C31CA2DF7A85EABFF785A83A13B6A773FB

These receipts are under D:\namingintegration040b. Saved acceptance verifies deadlines, all markers/cleanup, 876 historical archived files, 448 protected outputs, 23 source controls, preservation, and clean source. Producer custody and raw compiler-file EOF remain unproved. Earlier harness, activation, partial, and integration failures—including the old unknown outer cleanup—remain separate preserved failures; none was relabeled. Initial toolchain/JIT/build-argument errors and private mock-preparation errors are also retained, not used as behavioral RED or native qualification.

Current-head applicability: runtime evidence belongs to 040ba3252b754311de48376aa6772e8b5fec10d5. Current head c30b789c2cb70a970960550b6b9e01b5f4f1af7e merges main 2073e81af4f89f6eb11f27366f732b391808b3a8; the entire tree differs from the tested head only in docs/ramps.json. All 480 compiled-input occurrences (229/126/125), actual guard MVIDs, seven guard-file bindings, 36 qualified product/runtime bindings, and accepted provider/tool/source inputs were rehashed unchanged. This establishes unchanged-input applicability, not new-head native execution or a new guard build. Required PR CI must run on this actual head.

At current head:

& .\Tools\windows\validate.ps1 -Task @('privacy','tdd-evidence')
pwsh -NoProfile -File Tools\tdd\Test-TddEvidence.ps1 -BodyPath C:\Users\coneilen\.copilot\session-state\c7ce035c-0558-4176-8a38-bab05a8cfaeb\files\naming-published-pr-body.md

Results: canonical privacy passed with 121 investigation inputs; TDD validator scenarios passed 4/4; full-template body validator passed. Four changed files match committed UTF-8/LF, git diff --check passes, and all three commits have DCO/coauthor trailers.

Limits: no all-Unicode/version guarantee, original-window focus-restoration claim, paired visual/physical-pointer qualification, injected native creation-race proof, or complete parity-ledger promotion. Shared Swift and macOS code are unchanged. make test/make check were not run on this Windows host. Packaging/scheduler lifecycle work remains CI-only under the existing local exception because it can mutate user settings; it is not claimed as a local pass. No checks, merge protections, or policies are bypassed; no release or auto-merge is requested.

Checklist

  • I have read the Contributing Guidelines
  • I have signed off my commits (git commit -s) per the DCO
  • Tests pass locally (make test)
  • Code follows the existing style (make check)
  • I added the test/contract before the implementation and observed the intended RED failure

coneilen and others added 3 commits November 8, 2026 16:28
Use system ICU transliteration and grapheme boundaries for creation-only naming, preserving legacy rename rules and existing workspace identities.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Reuse the verified Foundation whitespace helper, validate raw nonempty drafts, and share owned naming errors across preview and creation races while retaining legacy workspace identities.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Intake only docs/ramps.json; native naming and validation inputs remain unchanged from 040ba32.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
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.

1 participant