You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rest: the cross-object batch refusal names the failing operation's index, so a multi-pick related-list add can say which record failed #35726
Filing gate: ③ a measured finding of the #35601 dev (os-dev-report on #35601; PR #35725 open question). It is a child of #35601 (epic #35590) and is nested under it. #35601's acceptance ("把其中一个改成会失败的,结果是一行都没加,并提示是哪一个") is held open on this card: PR #35725 says Part of #35601.
Reader: domain:server (packages/rest), UI consumer in ui/packages/plugin-detail (RelatedList.tsx). Suggested grade: p2, the parent's grade.
Dedupe: batch failing operation index, batch refusal op index → only #35601.
Blocked-by: #35601's PR #35725 (the UI consumer lands there).
A refused batch answers e.g. 404 {error:'Record ID not found in showcase_contact', code:'RECORD_NOT_FOUND', userMessage} with NO operation index (measured live by the 相关子表的页签:不放筛选排序,右上角只留「添加」和「在列表中打开」;批量添加要么全成要么全不成 #35601 dev). The message names the record for not-found / permission refusals, but not for validation refusals.
packages/rest/src/batch-routes.ts already tracks index per op for dropped-field events (~:429-491) and resolves { $ref: <opIndex> }; the refusal path does not carry it.
Ask
Add the failing operation's index (and its object) to the cross-object POST {basePath}/batch refusal body, additively (a new optional key; Clause-② yes, widening — contract L2). Then have RelatedList.tsx's add path name the picked record at that index in its error. Keep the rulings at batch-routes.ts ~:463 (#14147 option C) and ~:495 (A-prime) intact. Pin: a 3-pick add whose 2nd op fails reports index 1 and the UI names that record; CONTROL: success unchanged.
Triage: lands in domain:server · pm:blocked; rationale: area:ux · Bug (a cross-object batch refusal does not name the failing operation's index, so a multi-pick related-list add cannot say which row failed) · holds #35601's acceptance in record-page topic #35590 → p2 as set.
Unblocked · area ux-2 · 2026-11-20T05:57Z: the related tab's atomic add landed in PR #35725 (merged as bae933b57c), which is what this card names the failing op for. Back to the queue.
Claim · area ux-2 · 2026-11-20T07:44Z · under #35601 (its done-criterion: the refusal names the record), seat ruling 11-20 07:43Z
Area: ux-2
Session: session_01Utp6CZrgaiMgTJCnswR6jQ
Account: os-bill
Seat: repo:objectstack#5
Branch: claude/issue-35726-batch-op-index
File surface: packages/rest/src/batch-routes.ts (the cross-object POST {basePath}/batch refusal path and its envelope only: an additive optional failing-op index and object) and its tests; the spec/contract declaration of that refusal envelope if one exists (one additive optional key); ui/packages/plugin-detail/src/RelatedList.tsxhandleAddRecords error path (name the picked record at that index) and its enlarged-toolbar test; a changeset. ⛔ The rulings at batch-routes.ts ~:463 (#14147 option C) and ~:495 (A-prime) stay as they are; no other route.
Clause-②: yes
Metadata-protocol: none
Pre-claim deps: none open (#35601's UI consumer landed in PR #35725 as bae933b57c)
Prior rulings read: ADR-0119 D4 (atomic is real or refused) and ADR-0035 §5 (runtime backbone) bind; this widens the refusal envelope only, never the all-or-none semantics.
Review path: L1-a, then the seat's contract L2; Tier H handoff if check-governed-merges says so.
Report · 2026-11-20T09:16Z · PR #35811 · head d6b03538
{
"issue": 35726,
"status": "done",
"branch": "claude/issue-35726-batch-op-index",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35811",
"head": "d6b03538fc4843e560c83ded2038f5c9fd938bc2",
"session": "session_01Utp6CZrgaiMgTJCnswR6jQ",
"premise_still_valid": true,
"summary": "The cross-object POST {basePath}/batch refusal now carries an additive failedOperation {index, object} when one op is the cause: the up-front missing-id 400, and any throw while the transaction runs (engine refusal, unresolved $ref, fault), via a thin res wrapper around the unchanged handleRouteError. Absent on whole-request refusals, on the object-level exposure / API-key gates, and on a post-loop (commit) failure; success body and all-or-none untouched, the #14147 option C and A-prime blocks unedited. No spec edit: the refusal envelope is not declared in packages/spec. The client already passes a flat body through as err.details, so RelatedList handleAddRecords reads err.details.failedOperation.index, maps it to the picked record behind that op (op-aligned list) and shows 'LABEL: reason' with the picker's display field; without an index the reason alone, as before.",
"tests": "rest (d6b03538): full vitest --project local Test Files 423 passed (423), Tests 8632 passed | 351 skipped (8983), lock VERDICT command-exit 0; the earlier full run at c6fe2c39 had 9 red = exactly the package-scoped 409 exact-body pins in rest-batch-endpoint.test.ts, updated in cf93d9fa; new cross-object-batch-failed-operation.test.ts 4/4 (2 index-1 pins: 404 RECORD_NOT_FOUND and 400 VALIDATION_FAILED, nothing lands; 2 controls: success has no key, BATCH_NOT_ATOMIC names no op); rest typecheck VERDICT 0. plugin-detail: enlargedToolbar file 16/16 (3 new: names Bravo for index 1; controls no index / index 7 show reason alone); full package Test Files 391 passed | 1 skipped, Tests 3568 passed | 18 skipped, VERDICT 0; type-check VERDICT 0 after closure build. Ablations via scripts/ablation-replace.mjs (subjects resolve from src, no dist leg): server anchor 'failedOperation = { index, object: op.object };' -> 2 failed | 2 passed, restored blob == HEAD f321bb114e1e, git diff HEAD empty; UI anchor 'const failedIndex = err?.details?.failedOperation?.index;' -> 1 failed | 15 passed, restored blob == HEAD acdaba8815ce, git diff HEAD empty.",
"gates": "dispatch-gates --commands at d6b03538: 72 derived; 70 exit 0; 2 exit 3 PREREQUISITE NOT MET = NOT MEASURED (check-plugin-teardown-shape --self-test: shallow clone cannot reach pinned commit; check:dual-build-cjs-loads: needs every package's dist). --ran reconciliation: 72 derived, 70 run, 2 NOT-MEASURED, 0 UNRUN. Includes check:route-envelope 0, check:doc-authoring 0, check:type-check-debt 0, check:issue-citations 0, ui scripts/ vitest 5092 passed | 2 skipped. check-platform-checklist --changed-from origin/main OK (0 anchors lost); check-nul-bytes 0. PR check-runs: in_progress at report time (not awaited, per contract).",
"dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "2 relay strokes — fleet-write pr_create (POST /repos/objectstack-ai/objectstack/pulls draft + POST /issues/35811/assignees os-bill), post-stamped comment POST /repos/objectstack-ai/objectstack/issues/35726/comments; plus git push (not REST)",
"deviations": [
"origin/main not merged before opening: 187 files moved past base 1e018d6ed, none a file this diff touches; PR CI runs the merge ref.",
"test:repo not run locally (diff touches no repo-project test).",
"Gates check-plugin-teardown-shape --self-test and check:dual-build-cjs-loads NOT MEASURED locally (prerequisites), left to CI."
],
"open_questions": [
{
"question": "Declare the cross-object batch refusal envelope (with failedOperation) in packages/spec?",
"options": [
"A leave undeclared as today (this PR); key documented in changeset",
"B add CrossObjectBatchErrorSchema to @objectstack/spec/api: new export, api-surface regen, contract L2"
],
"recommendation": "A, because no refusal body of this route is declared today and a new export is a contract decision outside this card"
},
{
"question": "A refusal carrying its own details (package-scoped 409 with details.candidates) keeps failedOperation on the body, but @objectstack/client exposes only details as err.details, so the console cannot name the record there.",
"options": [
"A accept (rare path; reason still shown)",
"B have the client keep the raw body on the error (client change, separate card)"
],
"recommendation": "A, because the 409 sentence already names the holders and the client change widens the SDK error shape for one rare case"
}
],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: none · noted, not filed — ObjectStackAdapter.batchTransaction on a backend without capabilities.transactionalBatch reads any 404 (including RECORD_NOT_FOUND) as a missing endpoint and replays via the non-atomic emulation; documented legacy behaviour, PR Acceptance notes"
]
}
Claim: area ux-2 · 2026-11-20T09:20Z · under #35601 (its done-criterion: the refusal names the record), seat ruling 11-20 07:43Z
Area: ux-2
Session: session_01Utp6CZrgaiMgTJCnswR6jQ
Account: os-bill
Seat: repo:objectstack#5
Branch: claude/issue-35726-batch-op-index
File surface: packages/rest/src/batch-routes.ts (the cross-object POST {basePath}/batch refusal path and its envelope only: an additive optional failing-op index and object) and its tests; the spec/contract declaration of that refusal envelope if one exists (one additive optional key); ui/packages/plugin-detail/src/RelatedList.tsxhandleAddRecords error path (name the picked record at that index) and its enlarged-toolbar test; a changeset. ⛔ The rulings at batch-routes.ts ~:463 (#14147 option C) and ~:495 (A-prime) stay as they are; no other route.
Clause-②: yes
Metadata-protocol: none
Pre-claim deps: none open (#35601's UI consumer landed in PR #35725 as bae933b57c)
Prior rulings read: ADR-0119 D4 (atomic is real or refused) and ADR-0035 §5 (runtime backbone) bind; this widens the refusal envelope only, never the all-or-none semantics.
Review path: L1-a, then the seat's contract L2; Tier H handoff if check-governed-merges says so.
(1) A: the refusal envelope stays undeclared in packages/spec. (2) A: the package-scoped 409 refuses the batch as a whole and names no record.
Delivered:
A refused atomic cross-object batch now carries an optional failedOperation: { index, object } when one operation caused it. A successful response is unchanged, and the batch still lands all or nothing.
The related list's multi-record Add names the refused record as LABEL: reason. Without an index it shows the reason alone, as before.
State: pm:dispatched removed. #35601 is closed out next.
Activity
objectstack-fleet commentedon Nov 20, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in
domain:server·pm:blocked; rationale: area:ux · Bug (a cross-object batch refusal does not name the failing operation's index, so a multi-pick related-list add cannot say which row failed) · holds #35601's acceptance in record-page topic #35590 → p2 as set.objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#5 · os-bill · session_01Utp6CZrgaiMgTJCnswR6jQ
Unblocked · area ux-2 · 2026-11-20T05:57Z: the related tab's atomic add landed in PR #35725 (merged as
bae933b57c), which is what this card names the failing op for. Back to the queue.objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#5 · os-bill · session_01Utp6CZrgaiMgTJCnswR6jQ
Claim · area ux-2 · 2026-11-20T07:44Z · under #35601 (its done-criterion: the refusal names the record), seat ruling 11-20 07:43Z
Area: ux-2
Session:
session_01Utp6CZrgaiMgTJCnswR6jQAccount:
os-billSeat:
repo:objectstack#5Branch:
claude/issue-35726-batch-op-indexFile surface:
packages/rest/src/batch-routes.ts(the cross-objectPOST {basePath}/batchrefusal path and its envelope only: an additive optional failing-op index and object) and its tests; the spec/contract declaration of that refusal envelope if one exists (one additive optional key);ui/packages/plugin-detail/src/RelatedList.tsxhandleAddRecordserror path (name the picked record at that index) and its enlarged-toolbar test; a changeset. ⛔ The rulings atbatch-routes.ts~:463 (#14147 option C) and ~:495 (A-prime) stay as they are; no other route.Clause-②: yes
Metadata-protocol: none
Pre-claim deps: none open (#35601's UI consumer landed in PR #35725 as
bae933b57c)Prior rulings read: ADR-0119 D4 (atomic is real or refused) and ADR-0035 §5 (runtime backbone) bind; this widens the refusal envelope only, never the all-or-none semantics.
Review path: L1-a, then the seat's contract L2; Tier H handoff if check-governed-merges says so.
objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#5 · os-bill · session_01Utp6CZrgaiMgTJCnswR6jQ
os-dev-report
Report · 2026-11-20T09:16Z · PR #35811 · head
d6b03538{ "issue": 35726, "status": "done", "branch": "claude/issue-35726-batch-op-index", "pr": "https://github.com/objectstack-ai/objectstack/pull/35811", "head": "d6b03538fc4843e560c83ded2038f5c9fd938bc2", "session": "session_01Utp6CZrgaiMgTJCnswR6jQ", "premise_still_valid": true, "summary": "The cross-object POST {basePath}/batch refusal now carries an additive failedOperation {index, object} when one op is the cause: the up-front missing-id 400, and any throw while the transaction runs (engine refusal, unresolved $ref, fault), via a thin res wrapper around the unchanged handleRouteError. Absent on whole-request refusals, on the object-level exposure / API-key gates, and on a post-loop (commit) failure; success body and all-or-none untouched, the #14147 option C and A-prime blocks unedited. No spec edit: the refusal envelope is not declared in packages/spec. The client already passes a flat body through as err.details, so RelatedList handleAddRecords reads err.details.failedOperation.index, maps it to the picked record behind that op (op-aligned list) and shows 'LABEL: reason' with the picker's display field; without an index the reason alone, as before.", "tests": "rest (d6b03538): full vitest --project local Test Files 423 passed (423), Tests 8632 passed | 351 skipped (8983), lock VERDICT command-exit 0; the earlier full run at c6fe2c39 had 9 red = exactly the package-scoped 409 exact-body pins in rest-batch-endpoint.test.ts, updated in cf93d9fa; new cross-object-batch-failed-operation.test.ts 4/4 (2 index-1 pins: 404 RECORD_NOT_FOUND and 400 VALIDATION_FAILED, nothing lands; 2 controls: success has no key, BATCH_NOT_ATOMIC names no op); rest typecheck VERDICT 0. plugin-detail: enlargedToolbar file 16/16 (3 new: names Bravo for index 1; controls no index / index 7 show reason alone); full package Test Files 391 passed | 1 skipped, Tests 3568 passed | 18 skipped, VERDICT 0; type-check VERDICT 0 after closure build. Ablations via scripts/ablation-replace.mjs (subjects resolve from src, no dist leg): server anchor 'failedOperation = { index, object: op.object };' -> 2 failed | 2 passed, restored blob == HEAD f321bb114e1e, git diff HEAD empty; UI anchor 'const failedIndex = err?.details?.failedOperation?.index;' -> 1 failed | 15 passed, restored blob == HEAD acdaba8815ce, git diff HEAD empty.", "gates": "dispatch-gates --commands at d6b03538: 72 derived; 70 exit 0; 2 exit 3 PREREQUISITE NOT MET = NOT MEASURED (check-plugin-teardown-shape --self-test: shallow clone cannot reach pinned commit; check:dual-build-cjs-loads: needs every package's dist). --ran reconciliation: 72 derived, 70 run, 2 NOT-MEASURED, 0 UNRUN. Includes check:route-envelope 0, check:doc-authoring 0, check:type-check-debt 0, check:issue-citations 0, ui scripts/ vitest 5092 passed | 2 skipped. check-platform-checklist --changed-from origin/main OK (0 anchors lost); check-nul-bytes 0. PR check-runs: in_progress at report time (not awaited, per contract).", "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "2 relay strokes — fleet-write pr_create (POST /repos/objectstack-ai/objectstack/pulls draft + POST /issues/35811/assignees os-bill), post-stamped comment POST /repos/objectstack-ai/objectstack/issues/35726/comments; plus git push (not REST)", "deviations": [ "origin/main not merged before opening: 187 files moved past base 1e018d6ed, none a file this diff touches; PR CI runs the merge ref.", "test:repo not run locally (diff touches no repo-project test).", "Gates check-plugin-teardown-shape --self-test and check:dual-build-cjs-loads NOT MEASURED locally (prerequisites), left to CI." ], "open_questions": [ { "question": "Declare the cross-object batch refusal envelope (with failedOperation) in packages/spec?", "options": [ "A leave undeclared as today (this PR); key documented in changeset", "B add CrossObjectBatchErrorSchema to @objectstack/spec/api: new export, api-surface regen, contract L2" ], "recommendation": "A, because no refusal body of this route is declared today and a new export is a contract decision outside this card" }, { "question": "A refusal carrying its own details (package-scoped 409 with details.candidates) keeps failedOperation on the body, but @objectstack/client exposes only details as err.details, so the console cannot name the record there.", "options": [ "A accept (rare path; reason still shown)", "B have the client keep the raw body on the error (client change, separate card)" ], "recommendation": "A, because the 409 sentence already names the holders and the client change widens the SDK error shape for one rare case" } ], "security_findings": "none", "out_of_scope_findings": [ "carrier: none · noted, not filed — ObjectStackAdapter.batchTransaction on a backend without capabilities.transactionalBatch reads any 404 (including RECORD_NOT_FOUND) as a missing endpoint and replays via the non-atomic emulation; documented legacy behaviour, PR Acceptance notes" ] }objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#5 · os-bill · session_01Utp6CZrgaiMgTJCnswR6jQ
Claim: area ux-2 · 2026-11-20T09:20Z · under #35601 (its done-criterion: the refusal names the record), seat ruling 11-20 07:43Z
Area: ux-2
Session:
session_01Utp6CZrgaiMgTJCnswR6jQAccount:
os-billSeat:
repo:objectstack#5Branch:
claude/issue-35726-batch-op-indexFile surface:
packages/rest/src/batch-routes.ts(the cross-objectPOST {basePath}/batchrefusal path and its envelope only: an additive optional failing-op index and object) and its tests; the spec/contract declaration of that refusal envelope if one exists (one additive optional key);ui/packages/plugin-detail/src/RelatedList.tsxhandleAddRecordserror path (name the picked record at that index) and its enlarged-toolbar test; a changeset. ⛔ The rulings atbatch-routes.ts~:463 (#14147 option C) and ~:495 (A-prime) stay as they are; no other route.Clause-②: yes
Metadata-protocol: none
Pre-claim deps: none open (#35601's UI consumer landed in PR #35725 as
bae933b57c)Prior rulings read: ADR-0119 D4 (atomic is real or refused) and ADR-0035 §5 (runtime backbone) bind; this widens the refusal envelope only, never the all-or-none semantics.
Review path: L1-a, then the seat's contract L2; Tier H handoff if check-governed-merges says so.
objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#5 · os-bill · session_01Utp6CZrgaiMgTJCnswR6jQ
Closed-out · area ux-2 · 2026-11-20T10:09Z
a8126d244d(Fixes #35726; this card closed completed)packages/spec. (2) A: the package-scoped 409 refuses the batch as a whole and names no record.Delivered:
failedOperation: { index, object }when one operation caused it. A successful response is unchanged, and the batch still lands all or nothing.LABEL: reason. Without an index it shows the reason alone, as before.State:
pm:dispatchedremoved. #35601 is closed out next.