From 41fcd65464854b5d599f784c446aab713749b954 Mon Sep 17 00:00:00 2001 From: Joywayer Date: Sat, 5 Sep 2026 23:31:39 +0800 Subject: [PATCH] docs: finalize unified startup configuration acceptance --- .../2026-09-05-unified-startup-config.md | 26 +++++++++---------- ...09-05-unified-startup-config-acceptance.md | 4 +-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/superpowers/plans/2026-09-05-unified-startup-config.md b/docs/superpowers/plans/2026-09-05-unified-startup-config.md index 2dc94ee..2f58e83 100644 --- a/docs/superpowers/plans/2026-09-05-unified-startup-config.md +++ b/docs/superpowers/plans/2026-09-05-unified-startup-config.md @@ -26,19 +26,19 @@ **Interfaces:** export StartupConfig and STARTUP_CONFIG from profiles.ts. ResolveRuntimeConfigOptions replaces mode with optional startupConfig: Readonly; production default is the exported constant, test configuration is explicit. RuntimeConfig retains mode/isDebugger/identity/servers/remoteConfig/rawConfig and exposes validated startupConfig for local consumers to validate against the same source. No independent profile selector. runtime-mode.ts may export RuntimeMode and a pure reader but contains no environment or URL defaults. -- [ ] Write RED tests in framework-tests/config/{profiles,runtime-mode,runtime-config,local-startup,bootstrap}.test.ts and local-platform-login/host.test.ts. For example, inject `{...STARTUP_CONFIG,mode:'release',useLocalServer:true}`, search `?mode=debug&profile=prod`, fake fetch `{visitor_server_tcp:'visitor:1'}`; assert one fetch and local servers with mode release. Repeat mode debug/release and useLocalServer true/false, using valid remote game/player candidates when false. Assert the default no-query local host starts, and conflicting/duplicate mode/profile parameters do not select another configuration. -- [ ] Run focused RED from cocoscreator_projects: `node --import tsx --test --test-concurrency=1 framework-tests/config/profiles.test.ts framework-tests/config/runtime-mode.test.ts framework-tests/config/runtime-config.test.ts framework-tests/config/local-startup.test.ts framework-tests/config/bootstrap.test.ts framework-tests/local-platform-login/host.test.ts`. Repeat identical command require_escalated on known sandbox ENOMEM. -- [ ] Implement source and validation: explicit mode enum, boolean useLocalServer, valid http(s) gameserver, valid loopback localServers. Freeze the source/array. Reject malformed values; no consumer defaults. Remove URL/environment mode selection and PROFILES selector. Preserve resolveGameServer original injection decoding. -- [ ] Integrate runtime: `const startupConfig = ...options.startupConfig or STARTUP_CONFIG` through one validated source function; resolve identity/injected remote URL, await fetch, create memory view, choose `startupConfig.useLocalServer ? startupConfig.localServers : parseUrlServers(remoteConfig)`. Preserve errors. Derive mode/isDebugger from startupConfig. -- [ ] Integrate diagnostic and facade: remove scalar mode in component; local-startup checks code source debug/local and loopback and accepts empty search. Ignore mode/profile query while retaining identity/gameconfig diagnostic restrictions. Use the same source snapshot in forged-context checks. Keep internal profile local namespace for account storage. Bootstrap uses same runtime; old LoginFlow stops after config error rather than assigning fallback identity/server, and forwards real location.search. Do not rewire the old UI or login contract. -- [ ] Update affected test literals via existing fixtures as appropriate; replace obsolete mode/profile expectations with new contract without weakening lifecycle/source tests. Add behavior tests for malformed local addresses and gameserver, remote failure, local diagnostic refusal of release/remote settings, and native injection compatibility. -- [ ] GREEN focused suite; explicit full suite: `$testPaths = @(rg --files framework-tests -g '*.test.ts' | Sort-Object); node --import tsx --test --test-concurrency=1 @testPaths`; architecture: `node --test framework-tests/architecture/import-boundaries.test.mjs framework-tests/architecture/presentation-boundaries.test.mjs`; type: `node node_modules/typescript/bin/tsc -p tsconfig.framework.json --noEmit`; boundaries: `node scripts/check-import-boundaries.mjs`. -- [ ] Self-review and exact task-only commit. Report RED/GREEN commands/results and file list in task-1-report.md; no full remote data/logged secrets. -- [ ] Independent task spec/quality review, fix loop with targeted regressions, then scoped re-review. +- [x] Write RED tests in framework-tests/config/{profiles,runtime-mode,runtime-config,local-startup,bootstrap}.test.ts and local-platform-login/host.test.ts. For example, inject `{...STARTUP_CONFIG,mode:'release',useLocalServer:true}`, search `?mode=debug&profile=prod`, fake fetch `{visitor_server_tcp:'visitor:1'}`; assert one fetch and local servers with mode release. Repeat mode debug/release and useLocalServer true/false, using valid remote game/player candidates when false. Assert the default no-query local host starts, and conflicting/duplicate mode/profile parameters do not select another configuration. +- [x] Run focused RED from cocoscreator_projects: `node --import tsx --test --test-concurrency=1 framework-tests/config/profiles.test.ts framework-tests/config/runtime-mode.test.ts framework-tests/config/runtime-config.test.ts framework-tests/config/local-startup.test.ts framework-tests/config/bootstrap.test.ts framework-tests/local-platform-login/host.test.ts`. Repeat identical command require_escalated on known sandbox ENOMEM. +- [x] Implement source and validation: explicit mode enum, boolean useLocalServer, valid http(s) gameserver, valid loopback localServers. Freeze the source/array. Reject malformed values; no consumer defaults. Remove URL/environment mode selection and PROFILES selector. Preserve resolveGameServer original injection decoding. +- [x] Integrate runtime: `const startupConfig = ...options.startupConfig or STARTUP_CONFIG` through one validated source function; resolve identity/injected remote URL, await fetch, create memory view, choose `startupConfig.useLocalServer ? startupConfig.localServers : parseUrlServers(remoteConfig)`. Preserve errors. Derive mode/isDebugger from startupConfig. +- [x] Integrate diagnostic and facade: remove scalar mode in component; local-startup checks code source debug/local and loopback and accepts empty search. Ignore mode/profile query while retaining identity/gameconfig diagnostic restrictions. Use the same source snapshot in forged-context checks. Keep internal profile local namespace for account storage. Bootstrap uses same runtime; old LoginFlow stops after config error rather than assigning fallback identity/server, and forwards real location.search. Do not rewire the old UI or login contract. +- [x] Update affected test literals via existing fixtures as appropriate; replace obsolete mode/profile expectations with new contract without weakening lifecycle/source tests. Add behavior tests for malformed local addresses and gameserver, remote failure, local diagnostic refusal of release/remote settings, and native injection compatibility. +- [x] GREEN focused suite; explicit full suite: `$testPaths = @(rg --files framework-tests -g '*.test.ts' | Sort-Object); node --import tsx --test --test-concurrency=1 @testPaths`; architecture: `node --test framework-tests/architecture/import-boundaries.test.mjs framework-tests/architecture/presentation-boundaries.test.mjs`; type: `node node_modules/typescript/bin/tsc -p tsconfig.framework.json --noEmit`; boundaries: `node scripts/check-import-boundaries.mjs`. +- [x] Self-review and exact task-only commit. Report RED/GREEN commands/results and file list in task-1-report.md; no full remote data/logged secrets. +- [x] Independent task spec/quality review, fix loop with targeted regressions, then scoped re-review. ### Task 2: Real browser and documentation acceptance (controller) -- [ ] MCP verify actual main checkout Creator project and current dirty state; refresh only modified existing TS resources. -- [ ] Open actual LocalPlatformLogin preview without query parameters, verify remote config source, local target, login ready and no failure; stop afterward. Configuration-only browser calls may verify the other source selections without creating production sockets. -- [ ] Update docs/guides/配置与调试指南.md to remove obsolete URL profile/remote-bypass/aggregate-test instructions. Write docs/superpowers/reports/2026-09-05-unified-startup-config-acceptance.md with exact results, final current configuration location, publishing instructions and source limitation. Keep prior completed reports as history. -- [ ] Whole-change independent review; verify original dirty hashes/status unchanged; mark plan progress and commit exact documents. No merge/push. +- [x] MCP verify actual main checkout Creator project and current dirty state; refresh only modified existing TS resources. +- [x] Open actual LocalPlatformLogin preview without query parameters, verify remote config source, local target, login ready and no failure; stop afterward. Configuration-only browser calls may verify the other source selections without creating production sockets. +- [x] Update docs/guides/配置与调试指南.md to remove obsolete URL profile/remote-bypass/aggregate-test instructions. Write docs/superpowers/reports/2026-09-05-unified-startup-config-acceptance.md with exact results, final current configuration location, publishing instructions and source limitation. Keep prior completed reports as history. +- [x] Whole-change independent review; verify original dirty hashes/status unchanged; mark plan progress and commit exact documents. No merge/push. diff --git a/docs/superpowers/reports/2026-09-05-unified-startup-config-acceptance.md b/docs/superpowers/reports/2026-09-05-unified-startup-config-acceptance.md index 640884f..34dab5a 100644 --- a/docs/superpowers/reports/2026-09-05-unified-startup-config-acceptance.md +++ b/docs/superpowers/reports/2026-09-05-unified-startup-config-acceptance.md @@ -1,6 +1,6 @@ # 单文件启动配置验收 -日期:2026-09-05。分支 codex/local-platform-login。设计/计划提交239af0a,实现提交facceea。独立审查正在进行。 +日期:2026-09-05。分支 codex/local-platform-login。设计/计划提交239af0a,实现提交facceea。独立任务审查与整体审查均通过。 ## 范围 @@ -38,6 +38,6 @@ 发布时在同一配置文件明确设置 release/false,同时选择Creator适当构建选项;LocalPlatformLogin仍是本地诊断场景,不是生产UI入口。当前真实远程配置对BUILD身份缺少game/player TCP,选择远程地址时仍会显式失败;不改身份、不用游客服务器或本地地址兜底。 -独立Task1规格/质量审查覆盖239af0a..facceea,通过且无可操作问题;整体审查随后记录。 +独立Task1规格/质量审查覆盖239af0a..facceea,通过且无可操作问题;整体独立审查覆盖5d90891..af059b4,通过且无可操作P0/P1/P2/P3问题。 用户追加纠正:原工程启动资源加载界面应为 Layer1_Logo,当前诊断场景仍使用 Layer614_Loading。上述无参数启动证据只验收配置来源和就绪流程,不代表启动界面已忠实复刻。Logo 接线按下一批资源授权与原工程核对处理。