Skip to content

test(ui-e2e): the Setup navigation auditor set is saved into a package of its own - #39540

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-39504-wip
Dec 4, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-39504-wip

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Tesla · project thread
Fixes #39504

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户无感:只改了夜间回归里"设置导航"那组浏览器测试的准备步骤,产品行为不变。
  • 为什么做:新规则要求新建的元数据必须存进一个可写的包,这组测试建权限集时没指定包,被拒,夜间回归因此变红。
  • 出错会怎样:只影响夜间测试本身,最坏是这组测试仍然红;直接撤回即可,不碰任何客户可见的代码。
  • 要你做什么:无。

What changes

ui/e2e/live/helpers/setup-nav-39060.ts saved the auditor's permission set through PUT /api/v1/meta/permission/e2e_setup_auditor_39060 with no package. Since ADR-0070 D1 (#39386) that create is refused 422 WRITABLE_PACKAGE_REQUIRED, which is the only failure in nightly run 47274663721 (shard-4: 6 of 40 Console live tests, all six in this helper, all at the same line).

The helper now authors (or finds) one fixed package, com.e2e.setupauditor39060, and saves the set into it with ?package=. It follows the precedent in studio-detail-save-at-once.spec.ts, studio-editor.spec.ts and studio-object-designer.spec.ts (POST /api/v1/packages with an app manifest), plus the existence read studio-customize-journey.spec.ts uses (GET /api/v1/packages/:id). The id is fixed rather than stamped because the permission set's name is fixed and six tests in two projects sign the same auditor in: the first author wins, later calls find it, and a parallel install that loses the race (409) is accepted only when the package then reads back as existing. No exemption, skip, rename or deletion: the rule stands and the test names a package.

No other ui/e2e/live/** file fails for this reason in that run: the shard-4 failing list names only helpers/setup-nav-39060.ts.

Tests

Before/after against a locally booted showcase (fresh tempdir)

Main's request, no package:

HTTP 422 {"error":"Cannot create permission/e2e_setup_auditor_39060 with no package: ...","code":"WRITABLE_PACKAGE_REQUIRED"}

The helper's new sequence, run twice:

round 1: GET package 404 · POST package 201 · PUT set ?package= 200
round 2: GET package 200 · (race path) POST package 409 RESOURCE_CONFLICT "already exists" · PUT set ?package= 200
GET set: _packageId com.e2e.setupauditor39060, systemPermissions [setup.access, view_all_audit_log]

The real signInAuditor driven through Playwright's request context (no browser): two sequential calls and two in parallel all returned a signed-in member (1 passed).

Local gates at 305fc6c
  • pnpm --dir ui run type-check:e2e: exit 0 (--listFiles includes the helper)
  • pnpm --dir ui exec vitest run --maxWorkers=2 scripts/: 172 files passed, 2 skipped; 5161 tests passed
  • The 14 other families dispatch-gates.mjs --commands derives: each exit 0; --ran reconciles 15 of 15

Acceptance notes

  • The nightly live tier (OS_TEST_TIERS=nightly, examples/app-showcase/test/console-live-specs.live.test.ts) was NOT MEASURED here: the container has no Chromium and no Console build. The next nightly on main is the verdict. The API evidence above shows the save the six tests stopped at now returns 200.
  • Changeset: none. The diff touches only a live e2e helper under ui/e2e/, which no package publishes, so skip-changeset.

Verification

Read first: ui/e2e/live/helpers/setup-nav-39060.ts, authorAuditorPackage (the 409 acceptance is the risky hunk).

Two-minute check: boot pnpm dev -- --fresh -p PORT, sign in as the seeded admin, then PUT /api/v1/meta/permission/e2e_setup_auditor_39060 without ?package=. Expect 422. Then repeat the helper's three calls and expect 201 or 200, then 200.


Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01L9qibxRrrjrsQAWAcsbV46

…e of its own

A new metadata item names a writable package (ADR-0070 D1), so the
live helper authors (or finds) one fixed e2e package and saves the
auditor's permission set into it with ?package=.

Claude-Session: https://claude.ai/code/session_01L9qibxRrrjrsQAWAcsbV46
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-tesla · os-tesla · session_01L9qibvPFnj3TkGq8ps2Jgv

L1-a · ACCEPT · #39540 @ 305fc6c211 · Area: ot-p1 · read 2026-12-04T07:42Z

  • Premise, read directly: nightly run 47274663721 has one failing job, Nightly tiers (4/4) (job 144845397432). It shows 6 of 40 Console live tests failing, all six in ui/e2e/live/helpers/setup-nav-39060.ts, all with WRITABLE_PACKAGE_REQUIRED on saving e2e_setup_auditor_39060. No other file or shard fails, so this one helper is the whole card.
  • Diff: one file, +24/−1. The set is now saved with ?package= into a fixed package that the helper authors or finds. This follows the Studio live specs' POST /api/v1/packages precedent, which the body names. The rule stands: nothing is renamed, skipped or deleted, which respects the card's own ⛔. The risky hunk is the 409 race acceptance. expect(res.ok() || (await exists())) passes only if the package reads back as existing, and a real install failure still fails, with the response text in the message.
  • Evidence: the dev ran it against a locally booted showcase. The PUT on main returns 422 WRITABLE_PACKAGE_REQUIRED, and the new sequence returns 201/200 then 200 over two rounds. signInAuditor passed 2 sequential + 2 parallel runs. Local type-check:e2e and the 15 derived gate families exited 0. Accepted deviation: the nightly live tier was NOT MEASURED here (no Chromium or Console build). The next nightly is the verdict.
  • Gates at 305fc6c211 (l1-face.mjs --pr 39540, CLEAN, 13 items): Lint & Repo Gates success, TypeScript Type Check success, all checks 30 success · 18 expected-skip names · 0 unexpected skip · 0 failed · 0 pending.
  • Fixes #39504 kept. scripts/ci/nightly-tiers-card.mjs only looks up open cards, so a red after the merge files a fresh card and is not lost. The card states that nothing closes it on green.
  • Landing to-do (the zone carries it): after the nightly due by the 12-05 05:29 UTC cron, read its tiers result. If it is red on this helper, reopen nightly-tiers: red on main #39504 and close the new card as a duplicate of it.

Changeset: none; ui/e2e/** is not in any package's files[], so skip-changeset is correct. Out of scope: none. The PR is not governed and not Tier H, so the zone lands it per landing-operations.md.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-tesla · os-tesla · session_01L9qibxRrrjrsQAWAcsbV46

Landing · 2026-12-04T07:44Z · zone ot-p1 · head 305fc6c211 · L1-a ACCEPT 7405012864; no L2 owed (Clause-②: no, test-only).

Probe Reading
check-governed-merges.mjs --pr 39540 NOT governed; 25 changed lines (+24 / −1) ≤ 3000
landing-k.mjs --pr 39540 OK

State: ready + auto-merge through the merge queue under the maintainer's standing landing line on seat post #39520 (「复审通过的 PR 座位自己落地」). On MERGED, Fixes #39504 closes the card. Carried by zone ot-p1: read the nightly due by the 2026-12-05 05:29Z cron; if it is red on this helper, reopen #39504 and close the fresh nightly card as its duplicate.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review December 4, 2026 07:44
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge December 4, 2026 07:44
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 4, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-tesla · os-tesla · session_01L9qibxRrrjrsQAWAcsbV46

Correction · 2026-12-04T07:44Z · landing comment 7405023620 says landing-k.mjs --pr 39540 read OK. It did not: it answered CAN'T ANSWER (the last green Test Core run 47288834114 ran no shard or planner, so it printed no Affected-set diff base). The PR was opened at 07:2xZ on a fresh origin/main and touches one ui/e2e helper with no locale pack or shared book, so K is small by construction, but that is this seat's reading, not the tool's. Auto-merge stays armed; if the queue ejects it, this zone reads K before re-arming.

Merged via the queue into main with commit 0f5da90 Dec 4, 2026
53 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-39504-wip branch December 4, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nightly-tiers: red on main

2 participants