[PR #4946] [MERGED] fix(setup): preserve Windows environment override identity #6686

Closed
opened 2026-11-01 21:42:18 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4946
Author: @ShuaixinHuang
Created: 10/18/2026
Status: ✅ Merged
Merged: 10/20/2026
Merged by: @morluto

Base: main ← Head: codex/fix-windows-registration-environment


📝 Commits (4)

  • 7dd7cc6 fix(setup): preserve Windows environment override identity
  • e2215d2 fix(setup): preserve selected platform and YAML alias metadata
  • 234a041 fix(setup): reconcile layered environment and projected YAML identities
  • b4483ce chore: sync upstream setup environment isolation

📊 Changes

11 files changed (+561 additions, -43 deletions)

View changed files

📝 src/application/ClientConfigurationFiles.ts (+48 -9)
📝 src/application/ClientRegistrationEnvironment.ts (+26 -5)
📝 src/application/ClientRegistrationStatus.ts (+7 -2)
📝 src/application/DshCordisPatch.ts (+40 -9)
📝 src/application/DshCordisYaml.ts (+34 -5)
📝 src/application/SetupClientConfiguration.ts (+3 -1)
📝 src/process/snapshotEnvironment.test.ts (+28 -1)
📝 src/process/snapshotEnvironment.ts (+28 -11)
📝 tests/acceptance/setup/registrationRuntimeEnvironmentCli.test.ts (+64 -0)
📝 tests/boundary/filesystem/clientConfigurationEnvironment.test.ts (+237 -0)
📝 tests/boundary/filesystem/clientConfigurationLayeredEnvironment.test.ts (+46 -0)

📄 Description

Problem and outcome

Windows environment names are case-insensitive. Setup now merges stored values and explicit overrides by platform identity, validates the same winning values, and preserves their spelling when serializing. Differently cased inherited aliases cannot override a higher-priority setting.

The shared environment owner carries the selected platform through layered configuration, registration inspection and provider budgets. The DSH YAML owner reconciles projected scalar keys and preserves comments and unevaluated expressions. Linux/macOS environment names remain case-sensitive. Existing setup planning, approval, backup and cleanup boundaries are retained; no external provider/client execution is added.

Upstream synchronization

Current head: b4483ce8c81fc01ebebcd5fcbeef65e7ddfbc847, synchronized with upstream 833136507dd79d959340b09862a53af344e4f1b3.

There was one textual conflict in registrationRuntimeEnvironmentCli.test.ts: the Windows lowercase-setting regression and upstream's missing-provider environment fixture were inserted at the same location. Both are retained, and the Windows test now uses that same isolation fixture. No additional production behavior was introduced by this synchronization.

Executed validation

Windows x64, pinned Node 24.18.0/npm 11.16.0:

  • Core environment/DSH/layering/snapshot controls: 149/149 passed.
  • Combined five-file run: 164 passed / 1 failed. The CLI file passes 15/16, including the Windows lowercase-setting/no-write case. The remaining OpenCode layered CLI failure expects no launcher repair while its fixture omits Node on Windows; it is the previously documented independent fixture correction in #4947. Its assertion is unchanged here.
  • npm run check: six tasks passed, 2,231 resolved module boundaries and 1,589 architecture guards. git diff --check passed.
  • Initial sandbox runs could not create NTFS hard links and are not counted as successful validation. A minimal configuration-publication probe succeeded with normal permissions; the reported five-file results above use normal permissions.
  • Current-head hosted CI: https://github.com/morluto/rea/actions/runs/39352850029 — SUCCESS, including CI required. All 38 selected jobs passed; five portable shards passed 9,636 tests with zero failures and 175 skipped tests. The hosted Linux CLI registration file passed 15 tests with its one Windows-only case skipped; that Windows case passed in the local run above. Source/static/build, both Ubuntu/Debian recorded-crash lanes, browser/Web/SQLite compatibility and Windows/native package lanes passed. GitHub reports mergeable=true.

Historical baseline controls reproduced seven original failures against 47d3c6b1; later review controls reproduced the selected-platform/YAML and layering failures before their fixes. No real external MCP client, DSH application, Hopper, Ghidra or IDA session was launched by this verification. Prepared with AI assistance; the human owner's original initial-readiness declaration is preserved.

Author readiness

Human owner: @ShuaixinHuang

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/4946 **Author:** [@ShuaixinHuang](https://github.com/ShuaixinHuang) **Created:** 10/18/2026 **Status:** ✅ Merged **Merged:** 10/20/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `codex/fix-windows-registration-environment` --- ### 📝 Commits (4) - [`7dd7cc6`](https://github.com/morluto/rea/commit/7dd7cc6d1e7c113ee11b7200b4be887c43c0a44c) fix(setup): preserve Windows environment override identity - [`e2215d2`](https://github.com/morluto/rea/commit/e2215d23d4249446cb2095d89a6f0dd9fa5cb18f) fix(setup): preserve selected platform and YAML alias metadata - [`234a041`](https://github.com/morluto/rea/commit/234a04166409a1061df98f0ff6bfa07fdef0d6fb) fix(setup): reconcile layered environment and projected YAML identities - [`b4483ce`](https://github.com/morluto/rea/commit/b4483ce8c81fc01ebebcd5fcbeef65e7ddfbc847) chore: sync upstream setup environment isolation ### 📊 Changes **11 files changed** (+561 additions, -43 deletions) <details> <summary>View changed files</summary> 📝 `src/application/ClientConfigurationFiles.ts` (+48 -9) 📝 `src/application/ClientRegistrationEnvironment.ts` (+26 -5) 📝 `src/application/ClientRegistrationStatus.ts` (+7 -2) 📝 `src/application/DshCordisPatch.ts` (+40 -9) 📝 `src/application/DshCordisYaml.ts` (+34 -5) 📝 `src/application/SetupClientConfiguration.ts` (+3 -1) 📝 `src/process/snapshotEnvironment.test.ts` (+28 -1) 📝 `src/process/snapshotEnvironment.ts` (+28 -11) 📝 `tests/acceptance/setup/registrationRuntimeEnvironmentCli.test.ts` (+64 -0) 📝 `tests/boundary/filesystem/clientConfigurationEnvironment.test.ts` (+237 -0) 📝 `tests/boundary/filesystem/clientConfigurationLayeredEnvironment.test.ts` (+46 -0) </details> ### 📄 Description ## Problem and outcome Windows environment names are case-insensitive. Setup now merges stored values and explicit overrides by platform identity, validates the same winning values, and preserves their spelling when serializing. Differently cased inherited aliases cannot override a higher-priority setting. The shared environment owner carries the selected platform through layered configuration, registration inspection and provider budgets. The DSH YAML owner reconciles projected scalar keys and preserves comments and unevaluated expressions. Linux/macOS environment names remain case-sensitive. Existing setup planning, approval, backup and cleanup boundaries are retained; no external provider/client execution is added. ## Upstream synchronization Current head: `b4483ce8c81fc01ebebcd5fcbeef65e7ddfbc847`, synchronized with upstream `833136507dd79d959340b09862a53af344e4f1b3`. There was one textual conflict in `registrationRuntimeEnvironmentCli.test.ts`: the Windows lowercase-setting regression and upstream's missing-provider environment fixture were inserted at the same location. Both are retained, and the Windows test now uses that same isolation fixture. No additional production behavior was introduced by this synchronization. ## Executed validation Windows x64, pinned Node 24.18.0/npm 11.16.0: - Core environment/DSH/layering/snapshot controls: **149/149 passed**. - Combined five-file run: **164 passed / 1 failed**. The CLI file passes 15/16, including the Windows lowercase-setting/no-write case. The remaining OpenCode layered CLI failure expects no launcher repair while its fixture omits Node on Windows; it is the previously documented independent fixture correction in #4947. Its assertion is unchanged here. - `npm run check`: **six tasks passed**, 2,231 resolved module boundaries and 1,589 architecture guards. `git diff --check` passed. - Initial sandbox runs could not create NTFS hard links and are not counted as successful validation. A minimal configuration-publication probe succeeded with normal permissions; the reported five-file results above use normal permissions. - Current-head hosted CI: https://github.com/morluto/rea/actions/runs/39352850029 — **SUCCESS**, including **CI required**. All 38 selected jobs passed; five portable shards passed **9,636 tests with zero failures and 175 skipped tests**. The hosted Linux CLI registration file passed 15 tests with its one Windows-only case skipped; that Windows case passed in the local run above. Source/static/build, both Ubuntu/Debian recorded-crash lanes, browser/Web/SQLite compatibility and Windows/native package lanes passed. GitHub reports `mergeable=true`. Historical baseline controls reproduced seven original failures against `47d3c6b1`; later review controls reproduced the selected-platform/YAML and layering failures before their fixes. No real external MCP client, DSH application, Hopper, Ghidra or IDA session was launched by this verification. Prepared with AI assistance; the human owner's original initial-readiness declaration is preserved. ## Author readiness Human owner: @ShuaixinHuang - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:42:18 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#6686
No description provided.