Skip to content

fix(windows): enforce theme schemaVersion at runtime - #288

Open
rwang23 wants to merge 2 commits into
Fei-Away:mainfrom
rwang23:agent/audit-windows-schema-version
Open

fix(windows): enforce theme schemaVersion at runtime#288
rwang23 wants to merge 2 commits into
Fei-Away:mainfrom
rwang23:agent/audit-windows-schema-version

Conversation

@rwang23

@rwang23 rwang23 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary / 摘要

  • Require numeric schemaVersion: 1 in the Windows runtime loader.
  • Preserve the normalized schema version and add explicit compatibility coverage.

Type / 类型

  • Bug fix / 缺陷修复
  • Feature / 新功能
  • Docs / 文档
  • Theme / CSS / visual / 主题或视觉
  • Scripts / install / restore / 脚本或安装恢复
  • Chore / 杂项

Platform / 平台

  • macOS
  • Windows
  • Both / 双平台
  • Docs / repo only / 仅文档或仓库元数据

Self-check / 自测

Windows (when code under windows/ changes)

  • Relevant install / start / verify / restore scripts exercised / 已按改动跑过对应脚本
  • Environment noted below / 下方注明环境

User-facing / 用户可见变更

  • Updated windows/CHANGELOG.md / 已更新 changelog
  • N/A — no user-facing change / 无用户可见变更

Security / 安全

  • Does not modify official Codex install / asar / signatures / 未修改官方安装与签名
  • Does not silently write API Base URL or keys / 未静默写入 API Base URL 或 Key
  • CDP remains loopback-oriented (127.0.0.1) where applicable / CDP 仍仅本机回环(如适用)

Notes / 补充

macOS already requires raw.schemaVersion === 1; Windows silently treated
missing, string, and future values as v1. The patch makes the platforms agree.
All tracked theme fixtures declare numeric schema version 1. The former portable
theme-contract issue #63 is closed, so this PR deliberately does not claim to
close it.

Validated on Windows at main@611c101 with:

  • node --check windows/scripts/injector.mjs — passed
  • node --test windows/tests/theme-schema-contract.test.mjs — passed
  • powershell.exe -NoProfile -ExecutionPolicy RemoteSigned -File windows/tests/run-tests.ps1 — passed
  • git diff --check — passed

No live installer, launcher, or Codex theme was exercised.

Tracking issue / 追踪 Issue

Closes #299

@rwang23
rwang23 marked this pull request as ready for review July 27, 2026 18:58
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.

[Bug][Windows]: Require numeric schemaVersion 1 when loading themes

1 participant