Repository navigation
Commit 97fad97
test(cli): nightly e2e fixtures open their object from app navigation (#38534)
<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XHogQ9ogKPxHhiFfT2UQgJi)_
Fixes #38493
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 用户无感:只改了三个夜间测试里的示例配置,产品行为没有任何变化。
- 为什么做:夜间测试自昨天起一直报红,原因是新加的「应用导航」发布检查让这些本该干净的示例配置多出了警告。
- 出错会怎样:只影响测试,不影响用户;若有问题,直接撤回此改动即可。
- 要你做什么:无。
## What changes
Test fixtures only, in the three nightly-tier CLI suites the card names.
Each fixture that is meant to raise no advisory now declares an app
whose `navigation` opens its object (`{ id: 'nav_ticket', type:
'object', label: 'Tickets', objectName: ... }`) and gives that object a
list view (`listViews: { all: { type: 'grid', columns: ['title'] } }`).
No rule, assertion, test name or skip changed.
- `packages/cli/src/commands/validate-json-strict-exit.e2e.test.ts`: the
clean control, the conversions minimal pair and the severity minimal
pair (all three copy one object and app).
- `packages/cli/test/validate-json-warning-parity.e2e.test.ts`: the
clean control.
- `packages/cli/test/jsx-gate-manifest-notice.e2e.test.ts`: the
`stack()` and `packageCarried()` builders. The html-page members already
had a navigation entry, but it opened only the page, and an html page
names no object, so the object was unreachable. Every member now carries
the object entry, with the page entry beside it where there is a page.
## Why
The publish-time app-shell rules that d578952 (#38107) added in
`packages/lint/src/validate-app-shell-reach.ts` warn on an app with no
navigation entry (`app-navigation-empty`), on an object no entry opens
(`object-unreachable-from-navigation`), and on an object opened as a
list with no list view (`object-without-view`). The rules are intended
behaviour. The fixtures predate them, and these suites are
`*.e2e.test.*` files, which run only in the nightly tier
(`OS_TEST_TIERS=nightly`), so #38107's own PR checks never ran them. So
the "nothing to warn about" controls, `--strict` exit 0 and `lint`
`passed: true / failing: 0` went red.
The before log shows all three rules: 6 lines naming
`app-navigation-empty`, 14 naming `object-unreachable-from-navigation`
and 2 naming `object-without-view`. The third rule hit the `jsx-gate`
member with no pages, whose navigation already opened the object but
with no list view. That rule comes from the same commit and the same
validator file. No failure had any other cause.
Per test, nothing was out of scope: no failing test counts findings that
these rules add on purpose. Every failing test asserts a zero-advisory
baseline (exit 0 under `--strict`, an empty warning set, `failing: 0`,
or exactly one finding of a named kind). In each one, the right fix was
to make the baseline clean again, not to widen the count.
## Tests
<details><summary>Before / after, nightly tier, the three files (head
1af5b3e, origin/main merged)</summary>
Command (run under `scripts/pm/os-verify-lock.sh`, after `pnpm turbo run
build --filter='@objectstack/cli^...'`):
```
OS_TEST_TIERS=nightly pnpm --filter @objectstack/cli exec vitest run --maxWorkers=2 src/commands/validate-json-strict-exit.e2e.test.ts test/jsx-gate-manifest-notice.e2e.test.ts test/validate-json-warning-parity.e2e.test.ts
```
- Before (the three files restored to merge base 545a4fa, everything
else at the head): `Test Files 3 failed (3)`, `Tests 15 failed | 41
passed (56)`. That matches the 15 failures in run 46229659209.
- After: `Test Files 3 passed (3)`, `Tests 56 passed (56)`.
- `pnpm --filter @objectstack/cli typecheck`: exit 0. Both legs compile
these files (`src/**` through `tsconfig.json`, `test/**` through
`tsconfig.test.json`).
</details>
## Acceptance notes
- Other `*.e2e.test.*` / `*.live.test.*` files that declare apps with no
navigation (8 under `packages/cli/test/`: `artifact-pinned-boot`, three
`i18n-extract-*`, `serve-app-anchored-optional-import`,
`serve-cluster-driver-diagnosis`,
`serve-runtime-assets-branding-warning`, `start-signal-forwarding`) run
`serve`, `start` or `i18n`, never `validate`, `lint` or `build`. The
rules do not run there, and none of these files is in the nightly's
failing list. No finding.
## Verification
<details><summary>Gates</summary>
- `node scripts/pm/dispatch-gates.mjs --commands` on head 1af5b3e: 55
commands. 51 exit 0. 4 exit 3 (PREREQUISITE NOT MET, the workspace
`dist/` is not built): `check:dual-build-cjs-loads`, `check:i18n`,
`check:i18n-coverage`, `check:i18n-walk-parity`. These are NOT MEASURED
locally and left to CI: they read built output, which no file in this
diff feeds.
- `dispatch-gates --ran`: `55 derived famil(ies) accounted for — 51 run,
4 NOT-MEASURED (4 DERIVED from a recorded exit 3)`.
- `check-governed-merges --test` on the three-dot file list: NOT
governed.
- `overlap-check`: `VERDICT clean exit 0`.
- No changeset. Test files only, and neither package build ships them
(`tsconfig.build.json` excludes `src/**/*.test.ts`, and `test/` is
outside `files[]`), so this takes `skip-changeset`.
</details>
Two-minute check: run the command above. Expected: `Tests 56 passed
(56)`.
Read first: `packages/cli/test/jsx-gate-manifest-notice.e2e.test.ts`
`stack()` (the one fixture whose navigation shape changed rather than
grew).
<!-- signed: repo:objectstack#5 · os-project-manager ·
session_01FEkQ5oPfjnm2yWHEwkiYrn -->
---
_Generated by [Claude
Code](https://claude.ai/code/session_01FEkQ5oPfjnm2yWHEwkiYrn)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 1dccbb1 commit 97fad97
3 files changed
Lines changed: 51 additions & 13 deletions
File tree
- packages/cli
- src/commands
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
174 | 182 | | |
175 | 183 | | |
176 | 184 | | |
| |||
181 | 189 | | |
182 | 190 | | |
183 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
184 | 198 | | |
185 | | - | |
186 | 199 | | |
187 | 200 | | |
188 | 201 | | |
| |||
210 | 223 | | |
211 | 224 | | |
212 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
213 | 232 | | |
214 | | - | |
215 | 233 | | |
216 | 234 | | |
217 | 235 | | |
| |||
249 | 267 | | |
250 | 268 | | |
251 | 269 | | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
252 | 276 | | |
253 | | - | |
254 | 277 | | |
255 | 278 | | |
256 | 279 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
135 | 140 | | |
136 | | - | |
137 | | - | |
138 | | - | |
| 141 | + | |
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
| |||
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
147 | | - | |
| 150 | + | |
148 | 151 | | |
149 | 152 | | |
150 | 153 | | |
| |||
172 | 175 | | |
173 | 176 | | |
174 | 177 | | |
175 | | - | |
| 178 | + | |
176 | 179 | | |
177 | 180 | | |
178 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
136 | 143 | | |
137 | 144 | | |
138 | 145 | | |
| |||
143 | 150 | | |
144 | 151 | | |
145 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
146 | 159 | | |
147 | | - | |
148 | 160 | | |
149 | 161 | | |
150 | 162 | | |
| |||
0 commit comments