Repository navigation
fix(scenarios): credit master-detail inline edit by the master's field groups, not inlineEdit: true - #37135
Conversation
…d groups, not inlineEdit: true The records-forms.master-detail-inline-edit tag credited the retired inlineEdit: true and missed a child placed by a field group of its master. It now asks the runtime's own placement test (isGroupPlaceableRelationship plus fieldGroupsPlaceRelationship over the master's fieldGroups), and still credits a declared 'grid' / 'form' form factor. Claude-Session: https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr Co-authored-by: Claude <noreply@anthropic.com>
…groups Claude-Session: https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 1 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 0486513878dd49ad8d91b023a172aa22c46ae8e1 && git checkout 0486513878dd49ad8d91b023a172aa22c46ae8e1
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 236c8044acb75d18b51d2a487a8624c0fc206594 d578ff08407a12586cfb8ca3cca239e3cc574458 && git checkout -B drift-repro 236c8044acb75d18b51d2a487a8624c0fc206594 && git merge --no-ff d578ff08407a12586cfb8ca3cca239e3cc574458
node scripts/docs-audit/affected-docs.mjs --json 236c8044acb75d18b51d2a487a8624c0fc206594 |
…, only a placing field group does Follows the field-group ruling over the card's grid/form arm: the runtime inlines nothing without a field group of the master placing the child. Claude-Session: https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr 席位核对 — ACCEPT · L1 · head
|
|
repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr Landing · head
State: L1 ACCEPT on this head (just above); 53 check-runs, none failed. Ready and auto-merge in this stroke. On MERGED, card #37127 closes by |
…e again, and each build's provenance names the scorer it passed (objectstack-ai#38009) <!-- claude-projects-attribution: {"github_login":"os-sales"} --> _Requested by **Sales** · [project thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4Uu4ADf6K3c79Bin3C2m4JZ5C)_ Fixes objectstack-ai#37917 ## What changes - `docs/qa/scenarios/builds/travel_expense.json`: one field group added to `demotravel_expense_claim.fieldGroups`, between `claim` and `status`: `{ "key": "lines", "label": "Expense Lines", "collapse": "none", "relatedList": "demotravel_claim_line" }`. Nothing else in the build moves; `demotravel_claim_line.claim` keeps `inlineEdit: "grid"` and `inlineTitle`. - `travel_expense.provenance.json`: `sha256` moved, with an `amended` entry (`from` = the old sha256) saying what changed and why; a new top-level `scored` = `{ "runner": "30a8047b", "on": "2026-11-27", "build": "141/141" }`. - `order_to_cash.provenance.json`: the same `scored` key (`174/174` at `30a8047b`); the build is untouched. - `packages/qa/scenarios/test/verified-builds.test.ts`: per build, one more test. It scores the build against the namespaced card with this tree's scorer (`scoreCardArtifact` + `rollupSourceCharges`, the runner's `scoreInto`) and requires every measured Build check to pass with no roll-up charge, and the provenance's `scored` to name a runner sha, a date and an all-pass reading. A scorer change that refuses a committed build now fails in the PR that makes it, and the message says what to do. - `docs/qa/scenarios/README.md` (Verified builds): `scored` described, and what a scorer change that fails a verified build does (re-score in the same PR; amend when the platform moved under the build, else rebuild; move `scored`). ## Why Which side is right: **the scorer**. The card asks for the lines "edited inline on the claim's form". The build was authored on 2026-11-18, when `inlineEdit` on a master-detail FK inlined the child in the master's form by itself. Since the maintainer's objectstack-ai#35889 ruling (ADR-0035, amended 2026-11-20: 「主从子表我认为不应该自动申明放在概览中,除非我通过 fieldGroup 强制指定」) the form inlines a child only where a field group of the MASTER names it, and `inlineEdit` only picks the form factor (`attachInlineSubforms`, `ui/packages/app-shell/src/providers/MetadataProvider.tsx`). The build names no such group, so on today's runtime the claim's form does not edit its lines inline. objectstack-ai#37135 moved the check to that same test (`scenario-tags.ts` `records-forms.master-detail-inline-edit`), so its "0 edited inline" is a true reading. No card expectation is in question, so no product call is needed. Re-verify by amendment, not by a new build: Sales paused new eval rounds (11:36Z), and the gap is one key the platform's own ruling moved under the build. That is the same kind of hand edit as the two earlier `amended` entries (objectstack-ai#36534, objectstack-ai#37229), recorded the same way. `verified` stays the authoring run's reading (135/135 under that day's checks); `scored` is the latest re-score. Small calls made in this thread (listed per the small-things rule): the key is named `scored` with `runner` (same 8-hex style as the top-level `runner`), not a per-file scorer hash; the test pins "all measured checks pass", not the exact count, so a scorer PR that only adds a passing check does not have to touch provenance; `order_to_cash` gets `scored` too so the test holds for every build. ## Verification - Re-score at `30a8047b` (namespaced card, `scoreCardArtifact` + `rollupSourceCharges`): - travel_expense, before: Build 140/141, failing only `master-detail-inline-edit` ("0 edited inline"), 0 roll-up charges (matches the objectstack-ai#34920 thread's reading). - travel_expense, after: Build 141/141, 0 charges. - order_to_cash: Build 174/174, 0 charges. - `verified-builds.test.ts`: 13/13 pass. With the old build put back it fails 2 (sha256 pin, and the new re-score test with `reads Build 140/141 … master-detail-inline-edit (0 edited inline)`). - `defineStack` on the build before and after reports the same 4 issues (duplicate action keys from the compiled artifact form, present on `main` too); the new field group adds none. - `@objectstack/scenarios`: `tsc --noEmit` clean; vitest 1386 passed, 1 failed + 2 files failed, all pre-existing in this container: `test/build/*` need the package's own build, `packages.test.ts` pinned-pnpm fails on `main` here too. - No eval round run. Clause-②: no Metadata-protocol: none ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (untouched) - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes. (eslint on the changed test file locally; full `pnpm lint` left to CI) - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. (nothing publishes: test, docs and fixtures only; `skip-changeset`) - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. (not touched) - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. - [x] The *Before Submitting* list in CONTRIBUTING.md is done. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L6bhgTfmRTz7mZ7LViQLam Co-authored-by: Claude <noreply@anthropic.com>
repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr
Fixes #37127
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
records-forms.master-detail-inline-edit(packages/qa/scenarios/src/score/scenario-tags.ts) credits a master-detail child as edited inline ONLY when a field group of its MASTER (the FK'sreference) names it infieldGroups[].relatedList(by child object name orobject.field) and the FK is one a group may place. This is the runtime's own test, with the same two spec predicates: objectuiattachInlineSubforms(ui/packages/app-shell/src/providers/MetadataProvider.tsx, lines 773-774) inlines a child only whenisGroupPlaceableRelationship(fk) && fieldGroupsPlaceRelationship(groupsOf(fk.reference), child, fk)(packages/spec/src/data/related-list-body-table.ts, lines 80 and 110).inlineEdittakes no part. Theassertssentence andpackages/qa/scenarios/README.md(the tag table) say the same.Deviation from the card
The card asks to credit a child also "when
inlineEditis'grid'/'form'". This PR does not. It follows the maintainer's field-group ruling on #35889 (record 7046311205, 「一律只看分组」), which outranks the card's wording: the runtime inlines nothing without a placing field group (MetadataProvider.tsx L773-775;inlineEditonly feedsresolveInlineMode, the form factor). A scorer that credited it would pass a build that inlines nothing. Decided by the PM (zone a4-A).Tests
packages/qa/scenarios/test/score/scenario-tags.test.ts:projectfield group namingtask, noinlineEditon the FK.inlineEdit: true.describepins: field-group placement credits, by child name and byobject.field; a group on the CHILD, or a group naming an FK withrelatedList: true, does not credit;inlineEdit: truealone does not credit;'grid'and'form'with no placing group do not credit; a placed child credits under either form factor.Acceptance notes
mainmerged into this branch since). Itscorpus.tsplaces the golden corpus control cards' children (invoice_with_line_items,project_with_tasks) with field groups; before it, those twoscenario-cards.test.tspins read red under the corrected tag. Measured green with feat(spec)!: retire the boolean arm of a relationship field's inlineEdit, which read as absent once a parent field group decides the placement #36802'scorpus.tsin place at head2c1f1e68fa: 137/137 acrossscenario-cards.test.tsandscenario-tags.test.ts. The CI run on the merged head is the verdict.Verification
Two-minute check:
pnpm --filter @objectstack/scenarios exec vitest run --maxWorkers=2 test/score/should pass, including themaster-detail inline editdescribe and both control cards.Files to read first:
packages/qa/scenarios/src/score/scenario-tags.ts, the tag'srun. The risk is the master lookup:rawObject(f, field.reference)is matched by normalised name.packages/qa/scenarios/test/score/scenario-tags.test.ts, the rich fixture edit inrichArtifact. Every other tag scores this fixture.Readings: the dev reports on #37127 (round 1 and fix round 7146536492).
🤖 Generated with Claude Code
https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr