Repository navigation
Commit a878ff6
test(cli): drive migrate record-currency-codes in the --json stdout purity family (#28375)
<!-- claude-projects-attribution: {"github_login":"os-zhuang"} -->
_Requested by **Sam** · [project
thread](https://claude.ai/code/project/chan_01LjZwNRFiG2fkp8SNf6rHNx?thread=cmsg_01LjZwNRFiG2fkp8SNf6rHNxTf8zbNsjBbtf4M2QEaButf)_
Fixes #27114
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:在 `json-stdout-purity.e2e.test.ts` 的 `FAMILY` 里补上 `migrate
record-currency-codes` 及其驱动参数,仅此一个测试文件。
- 为什么改:#28128 新增的命令带 `--json` 且启动内核,被 `discoverFamily()` 自动发现(26 个),而
`FAMILY` 只列 25 个,夜间 tier 因此变红。
- 风险与回滚:只改测试,不发布任何包;回滚即 revert 这一个文件。
- 先看:`packages/cli/test/json-stdout-purity.e2e.test.ts` 新增的那一条 `FAMILY`
及其注释。
- 两分钟验证:`cd packages/cli && OS_TEST_TIERS=nightly pnpm exec vitest run
--project integration test/json-stdout-purity.e2e.test.ts`,预期 80/80 通过(约
6 分钟)。
- 需要你做的:无,席位落地。
## What changes
`migrate record-currency-codes` joins `FAMILY` with argv `--object
jp_ticket --field title --code USD`. All three flags are required, so
without them the run stops at flag parsing and never boots. It runs as a
dry run (the default), which boots read-only and writes nothing.
`discoverFamily()` is unchanged and no case is skipped.
The face it reaches was measured, not assumed: on this deliberately
uncompiled fixture the command answers its "No app objects are loaded"
refusal after the boot, as one compact JSON document on stdout (exit 1),
with the boot diagnostics (no compiled artifact, Bootstrap complete,
Graceful shutdown complete) on stderr. The comment beside the entry
names that face. No `PREPARE` entry was needed.
## Tests
Nightly integration tier, local, under the verify lock, tree at merge
base `22ce3d13` with the cli dependency closure built.
- **Red** (test file restored from `origin/main` at `a0f86549`, which is
byte-identical to `22ce3d13` for this file): `Tests 1 failed | 76 passed
(77)`. The one failure is the reconciliation pin, and the
received-vs-expected diff is exactly `+ "migrate
record-currency-codes"`. That confirms 26 vs 25 and that no other member
is missing.
- **Green** (with the entry, commit `a8c47a44`): `Test Files 1 passed
(1)`, `Tests 80 passed (80)`. The second commit `1bdda92a` changes only
the comment beside the entry.
## Acceptance notes
- Skip-changeset: the diff is one test file, which no package ships.
- This file runs only in the nightly tier (`OS_TEST_TIERS=nightly`), so
PR CI does not exercise it. The next nightly on `main` is its real
verdict.
## Verification
Derived gate families (`node scripts/pm/dispatch-gates.mjs --commands`,
48 commands) were run locally. 45 exited 0. `--ran` reconciliation: 48
derived, 46 run, 2 not measured.
- `check:dual-build-cjs-loads` and `check-plugin-teardown-shape
--self-test` exited 3 (prerequisite not met: full dist missing, and a
shallow clone).
- `check:dts-closure` exited 1 only because the local closure was built
with `OS_SKIP_DTS=1`. Its self-test passed.
None of these three reads a test file, and CI runs all three.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01QUs3BuiMGLNsVXrDee61JM)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 1581ad3 commit a878ff6
1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
139 | 150 | | |
140 | 151 | | |
141 | 152 | | |
| |||
0 commit comments