Skip to content

feat(ui): an edit form's state-machine select offers only the moves the server accepts - #26033

Merged
objectstack-fleet[bot] merged 12 commits into
mainfrom
claude/project-thread-aetoxp
Oct 26, 2026
Merged

objectstack-fleet[bot] merged 12 commits into
mainfrom
claude/project-thread-aetoxp

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread
Part of #25933 — this PR is the edit form half; the board half (drop gate on the Kanban columns) follows in a second PR from the same branch.

Clause-②: yes
Metadata-protocol: none

What changes

An object whose field is governed by an error-severity state_machine validation (the showcase task's status, for one) used to offer every option in the record edit form. The server refused the invalid move only after submit, with "Invalid task status transition." and no list of the allowed next states. The edit form now offers the persisted value plus the states the machine declares as its next moves, and leaves the rest out.

  • @object-ui/core — new export stateMachineNextValues(objectSchema, fieldName, currentValue) in validation/validators/state-machine-next-values.ts, published through the validators barrel. It was the grid's private helper (plugin-grid/src/inline-edit-options.ts); it now narrows exactly where the server's rule validator refuses: severity error (the spec default), active not false, events covering update (the default covers it). An undeclared from-state stays unconstrained, and several applicable rules on one field intersect. It reads the declared transition map for choice controls; it does not import, mirror or wire the deprecated object-level rule engine (validation-engine-stays-unwired.test.ts still green).
  • @object-ui/plugin-form — the narrowing runs in gateFormFields, the one field-gate step every form layout draws its resolved fields through. It takes an optional previousValues (the persisted record) and narrows a single-value select on both carriers: the entry's own options (the form renderer's built-in select) and field.options (the registered select widget). All six layouts pass their persisted record: the simple form, ModalForm, DrawerForm, TabbedForm, SplitForm and WizardForm. The from-state is the stored row, never the live value. A create form is unconstrained, and the current value always stays offered.
  • @object-ui/plugin-grid re-exports the helper from core, so ObjectGrid.tsx is untouched.

Visible change in the grid's inline editor (intended)

The grid used to narrow on ANY state_machine rule for the field. It now narrows only on a rule the server enforces on update. A severity: 'warning' / 'info' machine (for example the showcase project_health_progression), an active: false rule, or an events: ['insert'] rule no longer narrows the inline editor: the server never refuses those moves, so every option is offered again.

Why gateFormFields and not ObjectForm.tsx alone

The console's record edit dialog is ModalForm, rendered directly by app-shell AppContent.tsx (formType: 'modal', mode: 'edit'), not ObjectForm's default arm; ObjectForm also routes drawer / tabbed / split / wizard to their own files. Narrowing only the default arm would have left the reported dialog unchanged. The seat approved the wider file surface (Claim amendment on the card).

Tests

Run at head 80690c5b from ui/ under the verify lock:

  • packages/core/src/validation/__tests__/state-machine-next-values.test.ts (new, 12): default severity narrows; warning / info / inactive / insert-only do not; undeclared and empty from-states are unconstrained; several rules intersect; published from the package root.
  • packages/core/src/validation/__tests__/validation-engine-stays-unwired.test.ts — still green.
  • packages/plugin-grid/src/inline-edit-options.test.ts — existing pins green, plus the warning-machine case.
  • packages/plugin-form/src/stateMachineOptions.test.ts (new, 11): both carriers narrowed, create unconstrained, unloaded record unconstrained, warning keeps every option, string options, multi-value untouched, and through gateFormFields.
  • packages/plugin-form/src/__tests__/stateMachineSelect-25933.test.tsx (new, 5, rendered): the console edit dialog on a backlog task offers backlog, todo; an in_review task offers in_progress, in_review, done; the simple edit form on a done task offers in_progress, done; CONTROLS: a create dialog and a warning-severity machine offer all five.

Result: the five files above, 41 + 5 tests, all pass. The full @object-ui/core and @object-ui/plugin-form suites (npx vitest run --maxWorkers=2 packages/core/ packages/plugin-form/, 413 files, 6484 passed, 28 skipped) ran at 8e28b0ff; their one red, column-identity.ratchet.test.ts reading f?.name || f.multiple || f.field?.multiple as a column-identity dual read, was fixed by splitting the guard and re-run green with the four pinned files. pnpm --filter @object-ui/core --filter @object-ui/plugin-form --filter @object-ui/plugin-grid run type-check: exit 0. The @object-ui/plugin-grid suite was narrowed to inline-edit-options.test.ts (its only change is the re-export); the full grid suite is left to CI Test Core.

Ablation (fix committed first; scripts/ablation-replace.mjs, mutation proven on disk, restored to the HEAD blob): handing narrowStateMachineOptions previousValues: undefined inside gateFormFields turned the 4 narrowing pins red (the gateFormFields unit pin and the three rendered narrowing pins) while the 12 others, controls included, stayed green.

Gates. node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 46 commands at 573a23e7; 45 exited 0 there. node scripts/check-sdui-manifest.mjs was red there because the record predated the last source commit; after the re-record it exits 0 at the final head 80690c5b, whose only further change is scripts/sdui-manifest.record.json. --ran reconciliation: 46 derived, 46 run, 0 NOT-MEASURED (a derived zero: every row carries its exit code). Repo-wide scans (pnpm lint, the full check:* farm) are CI's.

Acceptance notes

  • The wizard narrows from persistedRecord, the record as first read; it does not advance after a mid-flow save. The wizard only writes at its final commit, so this matches its own previousValues.
  • Only top-level state_machine rules narrow. A state_machine nested inside a conditional rule's then / otherwise is not read; that leaves the control permissive, never stricter than the server.
  • The refusal message after submit is unchanged; it still does not name the allowed next states. With the select narrowed the user should no longer reach it from the form.

Session: session_015Kzn5VKHAGKe251waHoUqj (card thread, domain:ui#2)


Generated by Claude Code

…w the edit form's state-machine select

Claude-Session: https://claude.ai/code/session_015Kzn5VKHAGKe251waHoUqj
Co-authored-by: Claude <noreply@anthropic.com>
…log and the simple form

Claude-Session: https://claude.ai/code/session_015Kzn5VKHAGKe251waHoUqj
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Kzn5VKHAGKe251waHoUqj
Co-authored-by: Claude <noreply@anthropic.com>
…het reads no dual read

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

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 80690c5bb12e18531733cc8d0dc8c83980892424
Local-runs: none

Scope: the Clause-②: yes declaration face. The committed tree touches no packages/spec/src/** and no governed path, so it is owed at TIER_DEFAULT and written by the lane seat. Files read: ui/packages/core/src/validation/validators/{state-machine-next-values.ts,index.ts}, ui/packages/plugin-grid/src/inline-edit-options.ts, ui/packages/plugin-form/src/{fieldWriteGate.ts,stateMachineOptions.ts} and the six form arms' gateFormFields call sites.

① Derived judgments

  • New public export, @object-ui/core stateMachineNextValues(objectSchema, fieldName, currentValue): Set<string> | null. This widens the package's public surface, which is the declared reason for yes. It is a pure read of the served validations with no runtime dependency on the deprecated engine next door. That is correct.
  • What the export narrows on. Only type: 'state_machine' rules for the field that are active !== false, (severity ?? 'error') === 'error', and have events (default ['insert','update']) that include update. An undeclared from-state is unconstrained, and several rules intersect. This mirrors where the server refuses, and the absent-key-as-default reading is right for /meta output. That is correct.
  • @object-ui/plugin-grid stateMachineNextValues. It keeps the same name and signature and is now a re-export, so it is not removed or renamed for any importer. Its behaviour widens what the grid offers: warning, info, inactive and insert-only machines no longer narrow, and a null/undefined current value now returns null instead of matching a '' from-state. Both are consistent with the server and named in the changeset. Correct, and not a narrowing of any acceptance set.
  • @object-ui/plugin-form GateFormFieldsOptions.previousValues?. An optional key, additive. When absent, gateFormFields returns the same fields as before (narrowStateMachineOptions passes them through by identity off edit mode and with no record). Correct.
  • From-value. Modal, Drawer, Tabbed and Split pass formData. In those arms formData is written only by the record and initial loaders (setFormData(data || {}) and the edit-seed lines), and it was already their renderer's previousValues. Wizard passes persistedRecord, and Simple passes initialData. None of them is the live edit value. Correct.

② Semver level

Metadata-protocol: none means patch on each moved package (AGENTS.md: a non-protocol change ships patch). The changeset declares patch for @object-ui/core, @object-ui/plugin-form and @object-ui/plugin-grid, which are exactly the three packages the diff moves. Consistent.

③ Boundary flags

  • No permission boundary is moved. The read is presentation only, and the server's validator stays the authority.
  • The PR author is objectstack-fleet[bot] (relay pr_create), so there is no out-of-relay login to name.
  • The dev's flags have answers. The reviewer request was not sent, but no Tier H path is touched, so none is owed. The narrowed grid run (inline-edit-options.test.ts only) is left to CI, and landing waits on CI's full plugin-grid run at the head.

Implemented-by: claude/project-thread-aetoxp
Reviewed-by: session_01SMps7wq7rBTk53e8KTSEup

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对

ACCEPT (PR 1 of 2) · domain:ui seat 2 · session_01SMps7wq7rBTk53e8KTSEup · 2026-10-26T09:52Z · head 80690c5b

  1. 形态: draft → main, assigned to os-steve. The first content line is Part of #25933, which is right because the board half is still owed on this branch. No closing keyword appears anywhere in the body. Clause-②: yes and Metadata-protocol: none each lead their own line in the body and in the changeset.
  2. 前提实测: the card thread's own premise read widened the surface from ObjectForm.tsx to gateFormFields plus all six layouts, because the console's edit form is ModalForm. The seat recorded that in amendment 6411987055 before any code was written, and this diff stays inside the amended surface. The from-value in every arm is the persisted record, never the live form value, and create mode is unconstrained. Both option carriers are narrowed (options and field.options). The contract review below covers the details.
  3. Contract review: declaration face TIER_DEFAULT, PASS at this head (comment 6413093140).
  4. 门禁 check-runs: there are none at this head. GitHub reports mergeable=false / dirty, so no pull_request run has started. Landing waits on a conflict-free head with Lint & Repo Gates and TypeScript Type Check at success, and every other check green, including CI's full plugin-grid run, which the dev narrowed locally.
  5. 接受的偏差 / 范围外:
    • The grid's inline editor stops narrowing on warning, inactive and insert-only machines. That is intended, it matches where the server refuses, and the changeset names it.
    • The detail-page inline editor (plugin-detail) is a third surface that still offers every option. It is left out on purpose, because seat 1 holds those files, and is noted here.
  6. 落地条款: no governed path, +704/−55, scripts/sdui-manifest.record.json re-recorded, and a root .changeset/ patch for core, plugin-form and plugin-grid. A merge of main that changes only the conflict resolution and the re-recorded manifest keeps this ACCEPT, and the seat re-records the contract review at the new head. The seat then lands it through relay pr_ready + automerge_enable once the checks are green.

…-aetoxp

# Conflicts:
#	scripts/sdui-manifest.record.json
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tests tooling labels Oct 26, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 39f9d3be5a66e0261e5455c6ff1ace4990f97aa1
Local-runs: none

Scope: same declaration face as the PASS at 80690c5b (comment 6413093140). The head moved only by merging main (904af38f) and re-recording scripts/sdui-manifest.record.json. The PR's file list at this head is the same 16 files plus that manifest record, 17 in all.

① Derived judgments

Unchanged from 6413093140. The same new @object-ui/core export stateMachineNextValues, the same plugin-grid re-export, and the same optional GateFormFieldsOptions.previousValues. The merge brought in no change to these files.

② Semver level

Unchanged: patch on core, plugin-form and plugin-grid, with Metadata-protocol: none.

③ Boundary flags

None new. Regen-provenance: scripts/sdui-manifest.record.json re-recorded with node scripts/gen-sdui-manifest-node.mjs at the merged head (check-sdui-manifest exit 0, per the card thread's report).

Implemented-by: claude/project-thread-aetoxp
Reviewed-by: session_01SMps7wq7rBTk53e8KTSEup

VERDICT: PASS

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 26, 2026 10:27
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 26, 2026 10:27
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 26, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 26, 2026
os-zhuang pushed a commit that referenced this pull request Oct 26, 2026
… different packages stop conflicting (#26120)

<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DPXV532seCFDcrkAJybGzsf)_

Fixes #26051

Clause-②: no
Metadata-protocol: none

Part of the p1 merge-queue backlog work (#26074). Dispatched by seat
`domain:devx#1` (#6023), claim 6415558140, card-thread session
`session_01SMJGPXxFBpbgAgXdnsXKVS`.

## What changes

`scripts/sdui-manifest.record.json` carried ONE
`inTree.registrySourcesSha256` over the `src/` of all 27 ui registry
packages, so any two ui PRs that touched any registry package conflicted
on that line. Now:

- **One record per registry package**, one file each, one line each:
`scripts/sdui-manifest.sources/PACKAGE.json` =
`{"package","sources","sha256","manifestSha256"}` (the package's own
`src/` digest, its file count, and the sha256 of the artefact it was
verified against). 27 files.
- **The shared record** (`scripts/sdui-manifest.record.json`, same path)
keeps only what describes the artefact: `sha256`, `components`,
`generatedAt`, and `inTree` = `modulesRoot`, `objectuiWorkspaceVersion`,
`registryRecords` (the directory). The retired `registryPackages` /
`registrySources` / `registrySourcesSha256` are refused if they
reappear.
- **The reached package set** is the set of record files: a reached
package with no record (new package, new dependency edge into the
registry, deleted record) is RED; a record the registry no longer
reaches (removed package, dropped edge) is RED.
- `sdui.manifest.json` is byte-identical (sha256 `1f6e1ccb925a…`, 106
components).

`lint.yml`'s command line (`node scripts/check-sdui-manifest.mjs
--self-test && node scripts/check-sdui-manifest.mjs`) is unchanged and
keeps working. No `.github/**` or `ui/.github/**` edit.

## Measured first (Ask 1): own `src/` per package, not
dependency-inclusive

Tree: objectstack `0a6948210c` (base), 27 reached packages, 922 non-test
sources.

**Detection is the same as one digest over the set.** Any edit under any
reached package's `src/` moves exactly that package's digest, so a
single PR's edit is caught exactly as before; a dependency's edit is
caught through the dependency's own record. Dependency-inclusive digests
add no single-PR detection. They would only add conflicts, and at this
cost (records a `src/` edit would touch):

| package edited | own `src/` (this PR) | dependency-inclusive |
|:--|:-:|:-:|
| `types` | 1 | 25 |
| `core` | 1 | 21 |
| `data-objectstack`, `i18n` | 1 | 19 |
| `react`, `react-runtime`, `sdui-parser` | 1 | 18 |
| `components` | 1 | 17 |
| `fields` | 1 | 14 |
| `plugin-detail` | 1 | 10 |
| `plugin-form`, `plugin-grid` | 1 | 2 |
| the other 11 plugins | 1 | 1 |

**Merge experiment, real tree, `git merge-tree --write-tree` (no merge
driver routes these paths; `git check-attr merge` = unspecified, so this
is GitHub's answer):** each branch appends a comment to one `src/` file
and runs the generator.

| pair | before (single digest, on `0a6948210c`) | after (this PR, on
`a8114011`) |
|:--|:--|:--|
| `plugin-grid/src/FormulaBar.tsx` × `plugin-form/src/DrawerForm.tsx` |
exit 1, CONFLICT in `scripts/sdui-manifest.record.json` | exit 0, clean;
the merged tree passes `check-sdui-manifest` (exit 0) |
| `plugin-grid/src/FormulaBar.tsx` × `plugin-grid/src/ObjectGrid.tsx` |
(conflicts) | exit 1, CONFLICT in
`scripts/sdui-manifest.sources/plugin-grid.json` only, by design |

**The open ui PRs today** (registry packages each changes, non-test
`src/` only; none changes `sdui.manifest.json`): #25987 i18n,
plugin-grid, plugin-list · #25998 plugin-detail · #26040 components,
i18n · #26045 i18n · #26027 plugin-dashboard · #26030 plugin-grid ·
#26033 core, plugin-form, plugin-grid · #26042 plugin-form · #26044 i18n
· #26048 i18n, plugin-map · #26050 fields, plugin-grid · #26062 fields.
Under the single digest all 12 conflict pairwise (12 serial landings).
Under this layout they conflict only within a shared package; the
largest group is `i18n` (5 PRs), so they can land in 5 rounds, e.g.
{#25987, #25998, #26027, #26042, #26062} → {#26040, #26030} → {#26045,
#26033} → {#26044, #26050} → {#26048}, assuming no source-level
conflicts between them.

## The check (Ask 2)

`checkTreeWithoutPin` compares each reached package's digest with its
own record and names every stale package (`ui/packages/plugin-grid: now
38 file(s) sha256 …, recorded …`), every unrecorded package, every
record the registry no longer reaches, every record verified against
another artefact, and every malformed record, then prints the one
command: `node scripts/gen-sdui-manifest-node.mjs`. The pin mode
(`.objectui-sha` present) is untouched.

**Why `manifestSha256` is in every package record, and why one line:** a
PR that changes the artefact re-records every package against the new
sha256, so it still conflicts with every in-flight registry PR, which
must regenerate on the merged tree (that is today's behaviour, kept for
the case where it matters). Two PRs on the same package touch the same
line and conflict. One line per file guarantees git cannot merge a
digest from one side with an artefact sha256 from the other; a record
that is not in the producer's one-line form is RED.

**What this does not force, stated rather than implied:** two PRs on
different packages that each leave the artefact unchanged, where only
their combination would change it, land without any run seeing the
combination. Under the single digest their textual conflict forced that
run. Here the next regeneration of any registry package sees the
combination. Dependency-inclusive digests would close this only along
import edges (not between siblings that interact through
`ComponentRegistry`), at the fan-out above. No stale or missing registry
source passes: every source edit still reds until regenerated, and every
package added to or removed from the reached set still reds.

## Self-test (Ask 3)

29 rows (was 22), roster and floor updated. New or changed in-tree rows:
a staged edit to one package is RED naming that package and NOT naming
`plugin-form` or `core`; a new package the registry reaches; a new
workspace edge (now names `ui/packages/unrelated`); a removed package
(names `scripts/sdui-manifest.sources/types.json`); a deleted package
record; a record verified against another artefact; a record out of its
one-line form; a record from the single-digest layout; and the producer
re-recording only the moved package (it back-dates the shared record
first, so a producer that stamps today's date reds the row).

Ablations, one at a time through `scripts/ablation-replace.mjs`, each
restored with `git diff HEAD` empty:

| guard removed | self-test |
|:--|:--|
| the other-artefact comparison (gate) | exit 1, row "a package record
verified against another artefact is RED" expected RED got GREEN |
| the one-line form comparison (gate) | exit 1, row "a package record
out of its one-line form is RED" |
| the unreached-record list (gate) | exit 1, row "a removed registry
package is RED naming its record" |
| the `generatedAt` carry (producer) | exit 1, row "the producer
re-records only the package whose sources moved": the second run changed
the shared record too |
| the per-package record write (producer) | exit 1, the two producer
rows |

## The generator (Ask 4)

It re-records only the packages whose line changed and leaves the others
byte-identical; it removes a record the registry no longer reaches; it
prints which packages it re-recorded. The shared record moves only with
the artefact: `generatedAt` and the provenance version are carried while
the artefact's sha256 is unchanged (the same rule the pin-keyed fields
already follow), so a regeneration on another day no longer moves a
shared line.

**It still builds, and why:** the build plus the enumeration is the only
oracle that says whether `sdui.manifest.json` moved. A record written
without it would stamp a current digest on a manifest no run checked,
which is the narrowing this card forbids. The 8 minutes is a cold turbo
cache, not the build of one package. Measured on `0a6948210c`, one
container, no remote cache (`TURBO_TOKEN` unset):

| run | wall | turbo |
|:--|:-:|:--|
| cold | 8m49s | 0 of 63 cached, 8m43s |
| nothing moved | 6s | 63 of 63 cached |
| one edit under `plugin-grid/src` | 33s | 61 of 63 cached, 27s |
| one edit under `core/src` | 2m50s | 41 of 63 cached, 2m44s |

## Readers moved (Ask 5)

- `docs/releases-maintenance.md`: the regenerate section describes the
per-package records, the re-record rule and which PRs still conflict.
- `scripts/check-changeset-no-major.mjs`: the "measured out" comment,
the real-build assertion (neither record is shipped) and the
records-only control now cover `scripts/sdui-manifest.sources/`. Its
`--self-test` passes (456 assertions).
- `scripts/ui-import/README.md` is not edited: line 140 records what the
cutover's step 4 wrote at the time, and that file still exists at that
path.
- `git grep -n "sdui-manifest.record"` outside CHANGELOGs: only the two
scripts, the docs page, `check-changeset-no-major.mjs` and that
historical README line. `git grep registrySourcesSha256`: only the
retired-field list and its self-test row.

## After this lands: what an in-flight ui PR does (once)

A ui PR whose branch re-recorded the old single digest conflicts once on
`scripts/sdui-manifest.record.json`:

```sh
git merge origin/main                                   # conflict in scripts/sdui-manifest.record.json
git checkout --theirs scripts/sdui-manifest.record.json  # take main's layout
node scripts/gen-sdui-manifest-node.mjs                  # re-records only this PR's package(s)
git add scripts/sdui-manifest.record.json scripts/sdui-manifest.sources sdui.manifest.json
git commit
```

After that, PRs on different registry packages no longer conflict with
each other on the record.

## Gates

Local, on `a8114011` (derived with `node scripts/pm/dispatch-gates.mjs
--commands`): 39 of the 40 derived families exit 0, including `node
scripts/check-sdui-manifest.mjs --self-test` (29 cases) and `node
scripts/check-sdui-manifest.mjs`, `node
scripts/check-changeset-no-major.mjs --self-test` and `--base
origin/main`, `pnpm check:nul-bytes`, `pnpm check:watch-hint-literal`,
`pnpm check:required-contexts`, `pnpm check:doc-authoring` and `pnpm
--filter @objectstack/lint run check:doc-formula-expressions` (after the
lint closure build). `pnpm check:pm-dispatch-gates` was still running
when this PR opened; its reading goes into the report comment on #26051,
and CI runs it in Lint & Repo Gates.

CI on the PR's check-runs: pending at the time of writing; the seat
reads them.

Changeset: none, `skip-changeset`. The diff touches only root `scripts/`
(private), `docs/` and the records; `sdui.manifest.json` is
byte-identical and neither record is copied into
`packages/console/dist/` (the `check-changeset-no-major` real-build
assertion above).

Not Tier H: no governed path (`git diff --name-only` has no `.github/`,
`.claude/`, `docs/adr/`, `skills/`, `AGENTS.md`, `CLAUDE.md`).

## Acceptance notes

- `i18n` is the hot package: 5 of the 12 open ui PRs touch its `src/`,
so they still serialize on `scripts/sdui-manifest.sources/i18n.json`.
Whether locale data belongs in the digest at all is a narrowing question
(it would let a source change pass unregenerated), not something this PR
decides.
- The cold-cache cost of a regeneration (8m43s here) is a
fresh-container property; card threads run with no turbo remote cache.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01SMJGPXxFBpbgAgXdnsXKVS)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
…-aetoxp

# Conflicts:
#	scripts/sdui-manifest.record.json
…and plugin-grid at the merged head

Claude-Session: https://claude.ai/code/session_015Kzn5VKHAGKe251waHoUqj
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 40354367596 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Test UI (11/16) — 失败步骤: Run the ui tests (shard 11/16)

    × has no near-spelling for any of them — unlike objectui#6041, nothing here is a rename 6ms
    FAIL   unit  packages/app-shell/src/services/MetadataService.specKeyObjectPayload.test.ts > the instrument > has no near-spelling for any of them — unlike objectui#6041, nothing here is a rename
      ↳ 失败原因: AssertionError: expected 48 to be 47 // Object.is equality
    
  • Test UI (12/16) — 失败步骤: Run the ui tests (shard 12/16)

    × has no on/off flag to rename to — `enable` is a capabilities object, not a boolean 6ms
    FAIL   unit  packages/app-shell/src/services/MetadataService.retiredObjectEnabled.test.ts > objectui#6238 · the schema oracle — both tombstone keys are refused BY NAME > has no on/off flag to rename t
      ↳ 失败原因: AssertionError: expected 48 to be 47 // Object.is equality
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 31 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

Merged via the queue into main with commit 4f48d2b Oct 26, 2026
61 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-aetoxp branch October 26, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/l tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants