fix: improve account enrollment and exercise start - #2
Merged
Merged
Conversation
added 5 commits
August 21, 2026 14:47
Change-ID: FIX-20260821-IMA-ENROLLMENT-RECOVERY Change-Record: .planning/changes/FIX-20260821-IMA-ENROLLMENT-RECOVERY.md User-Goal: 修复扫码登录完成后账号未进入池、接入窗口无法关闭的问题,同时不破坏现有账号登录态。 Commit-Intent: 让二维码接入任务可准确呈现授权状态、可立即取消恢复,并兼容 IMA 登录态存储形态。 Problem: 活动接入任务的关闭按钮在进行中直接返回,且登录态捕获仅识别一个固定 localStorage 键,导致扫码后的授权状态无法进入后续校验。 Change: 活动窗口关闭操作会立即关闭界面并取消服务端任务;新增扫码确认提示;捕获兼容 IMA account/auth/session/user 结构的本地存储记录,仍以完整凭证和 initSession 作为持久化门槛;补充自动化测试与治理记录。 Verification: Provider A npm test passed 193/193; focused enrollment tests passed 20/20; Node syntax checks, git diff --check, and governance check passed with 0 failures; local 3117 browser acceptance confirmed close/cancel cleanup kept the existing two-account pool unchanged. Rollout: 本机 com.openlongxia.ima-qa-web 已重启加载修复;下一次真实扫码仅在共享知识库校验通过后新增账号。 Rollback: Revert this commit and restart com.openlongxia.ima-qa-web; no account credential or runtime store is tracked by this commit.
Change-ID: FIX-20260821-IMA-ENROLLMENT-COMPLETION Change-Record: .planning/changes/FIX-20260821-IMA-ENROLLMENT-COMPLETION.md User-Goal: 二维码接入在真实 IMA 登录成功后自动关闭临时窗口和管理弹窗,明确提示账号已加入池。 Commit-Intent: 补齐成功状态自动收口,并扩展受控 IMA 会话的登录态读取兼容性。 Problem: 已完成的接入任务仍保留管理弹窗;仅检查 localStorage 会遗漏部分 IMA 会话中的授权记录;此前真实任务也未收到任何 IMA 回调,无法触发完成流程。 Change: 完成状态停止轮询、收起接入弹窗、刷新账号列表并显示成功回执;有限读取 IMA 页面 sessionStorage 与 localStorage 的授权候选项,且继续要求 initSession 验证;补充 sessionStorage 测试与治理记录。 Verification: Focused enrollment tests passed 21/21; Provider A npm test passed 194/194; git diff --check and governance check passed with 0 failures; restarted local 3117 and verified served admin.js plus two-account health state. Rollout: com.openlongxia.ima-qa-web 已重启。下一次真实扫码通过回调和 initSession 后,浏览器、接入弹窗和轮询会自动收口。 Rollback: Revert this commit and restart com.openlongxia.ima-qa-web; no runtime account credential is tracked by this commit.
Change-ID: FIX-20260821-IMA-VISIBLE-ENROLLMENT Change-Record: .planning/changes/FIX-20260821-IMA-VISIBLE-ENROLLMENT.md User-Goal: 使用真实独立浏览器完成 IMA 账号登录,避免后台二维码回调不稳定导致接入无法完成。 Commit-Intent: 将可见受控浏览器设为新账号接入的默认体验,并使管理页与公开文档保持一致。 Problem: 管理页嵌入二维码在真实扫码时未稳定收到 IMA 网页授权回调,不能作为默认接入路径;此前文案还引导用户扫描该页面二维码。 Change: 默认 enrollment browser mode 改为 visible;管理页以独立 IMA 窗口为主、可聚焦窗口并隐藏并行二维码截图;更新环境示例、README、部署说明和配置测试;后台模式保留为显式兼容选项。 Verification: Provider A npm test passed 194/194; focused config and enrollment tests passed 41/41; git diff --check and governance check passed with 0 failures. A real no-scan local probe launched a visible isolated browser, reached waiting_for_scan with browserWindowAvailable=true in about 11 seconds, then was cancelled and cleaned; local 3117 restart and served-page checks passed. Rollout: runtime/ima-web-agent.env is locally configured for visible mode and com.openlongxia.ima-qa-web has been restarted. Future fresh deployments use visible mode by default. Rollback: Set IMA_WEB_AGENT_ENROLLMENT_BROWSER_MODE=background locally and restart, or revert this commit for the public default; no account credentials are included.
Change-ID: FIX-20260821-EXERCISE-CONFIRMATION Change-Record: .planning/changes/FIX-20260821-EXERCISE-CONFIRMATION.md User-Goal: 在账号管理页可见地确认并启动真实 IMA 并发演练,而不是点击后无响应。 Commit-Intent: 用页面内确认窗口替代内嵌浏览器会阻塞的原生确认框,并避免管理页资源缓存造成新界面配旧脚本。 Problem: 开始真实演练依赖 window.confirm();当前内嵌浏览器会在该调用处阻塞,使请求无法提交且没有可见反馈。admin.html 禁止缓存,但其脚本和样式仍可能与页面版本错配。 Change: 新增页面内确认对话框,确认后沿用受保护的 confirm:true 演练接口;管理页 HTML、JS、CSS 统一 no-store;补静态接口回归和工程记录。 Verification: Provider A npm test passed 194/194; node --check public/admin.js; staged diff check; governance check 0 failures. Restarted 3117 and browser-tested confirmation open then return-without-start. A subsequent live three-client baseline completed 3/3 initial and 3/3 follow-up, peak active 3, no failures, with account coverage and session continuity passing. Rollout: com.openlongxia.ima-qa-web has been restarted on 3117; refreshed admin pages receive non-cached assets. Rollback: Revert this commit to restore the former native confirmation and cache policy; no account credentials or runtime reports are committed.
Change-ID: REL-20260821-PROVIDER-A-0.2.1 Change-Record: .planning/changes/REL-20260821-PROVIDER-A-0.2.1.md User-Goal: 将今天验证通过的账号接入和并发演练体验优化,以安全的公开发布流程提供给其他部署者。 Commit-Intent: 将 Provider A 发布元数据升级为 0.2.1,并记录公开 subtree 发布范围和回滚方式。 Problem: 当前公开 v0.2.0 仍把后台二维码作为默认接入路径,且没有包含接入完成、可见浏览器和演练确认窗口的体验修复。 Change: 版本与锁文件升级为 0.2.1;更新公开更新日志和发布指南;记录独立发布变更单与项目状态。 Verification: npm ci completed with 0 vulnerabilities; npm test passed 194/194; npm pack --dry-run produced 81 explicit files for ima-qa-web@0.2.1; staged diff check and governance check passed with 0 failures. Rollout: Generate and audit codex/provider-a-v0.2.1-public subtree branch, push a Draft PR to github-ima-qa, await CI, then merge and release v0.2.1. Rollback: Keep public v0.2.0 as the deployment fallback; close the Draft PR before merge or redeploy the v0.2.0 tag after release. No runtime data is included.
19Chris19
marked this pull request as ready for review
August 21, 2026 08:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v0.2.1 patch candidate
Included
Validation
npm ci: 0 vulnerabilitiesnpm test: 194/194 passednpm pack --dry-run: 81 explicit package filesRelease boundaries
This PR contains only the Provider A subtree. It excludes runtime data, accounts, login state, browser profiles, credentials, corpus data, and exercise reports.
Rollback
Deployers can remain on the existing
v0.2.0tag. This PR is a Draft until CI completes and the release is approved.