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
objectql: insert and delete keep the after-abort unit at the door while update moves it inside the middleware #35167
area:datadomain:serverDomain lane — seat card indexed by label:pm:seatfindingRecorded observation — held, not dispatchable until the findings triage round grades itpriority:p2Medium: important, M3
PR #35165 (card #35142) moves update's own after-abort unit inside executeWithMiddleware, so the authorization gate's reads run before BEGIN. insert and delete still open their unit at the door, around the whole middleware chain:
So on an object that opens a unit (a metadata before* hook that side-writes, #34412, or a blocking or conditioned metadata after* hook, #22782), a middleware's post-next() work runs inside the row's unit for insert and delete but after the commit for update. On SQLite, the door-level unit also serialises concurrent writers behind the gate.
Readings so far (from the #35142 rounds, not re-measured)
The loser of a concurrent delete answers false with no metadata beforeDelete hook and RECORD_NOT_FOUND / 404 with one. The row really is gone, so this is not ADR-0142 D4's defect, but the answer depends on whether a hook is bound.
To decide
Should insert and delete move their unit inside executeWithMiddleware the same way, for one rule across the three verbs? Or should the asymmetry be stated where the unit is documented? Either way, should the delete loser's answer stop depending on a hook binding?
First touch: p2 · domain:server · pm:queue. Not a queue jump. It is an engine consistency follow-up to PR #35165 (#35142): insert and delete still open their after-abort unit at the door. No user break is named.
Ruling-ref: maintainer 2026-11-19T05:03Z on seat 5's decision card for #35167, option chosen verbatim: 「A 三个动词一条规则」. Analysis: project file objectstack-seat5/area-ux/data-1/decision-35167-35174-34292.md.
Execution (area data-1): insert and delete open their after-abort unit inside executeWithMiddleware, as update does since PR #35165, so the authorization reads run before BEGIN; the three fact-8 prose places are updated to one rule. Clause-②: no, size S. The delete-loser answer and the hooks that fire on that false path are #35329, which lands after this PR.
Claim: PM loop round 3 · area data-1 (the maintainer, verbatim, 2026-11-19T05:03Z on the seat's decision card: 「A 三个动词一条规则」, ruling record 7000283878) · 2026-11-19T06:04Z
Area: data-1
Session: session_01Utp6Ca1jJvsA1dHsPwMiQb
Account: os-bill
Branch: claude/issue-35167-unit-inside-middleware
Worktree: objectstack-issue-35167 (os-dev worktree in the data-1 container)
Domain: domain:server
Seat: repo:objectstack#5
File surface: packages/objectql/src/engine-insert.ts (:332) and packages/objectql/src/engine-delete-and-aggregate.ts (:157): open the after-abort unit inside executeWithMiddleware as engine-update.ts does since PR #35165; the three prose places that describe the door-level unit (engine-hook-dispatch.ts ~:74, engine-top-level.ts ~:104-107, engine-middleware-and-context.ts ~:207); one SQLite concurrency test per verb in new files named for this card; root .changeset/. ⛔ The delete loser's answer and the after-effects on a driver false (that is #35329, after this PR). Stop on breach and report.
Container & model: S, mode:subagent, model: default — no path-derived mandate, effort: medium
Clause-②: no (ruling record 7000283878)
Metadata-protocol: none
Responsibility: platform — insert / delete wrap the whole middleware chain in the after-abort unit on an object that opens one (a metadata before* hook that side-writes, or a blocking/conditioned metadata after* hook), so a middleware's post-next() work and the authorization reads run inside the row's unit for those two verbs but outside it for update; on SQLite the door-level unit also serialises concurrent writers behind the gate.
Thread-read: 7000283878
Premise: holds — on origin/main3819afec: engine-insert.ts:332 and engine-delete-and-aggregate.ts:157 are the only inAfterAbortUnit(() => this.…) door calls in packages/objectql/src; update moved inside in PR #35165.
Serial constraints cleared: none — overlap-check.mjs on a probe branch touching the five files: base merges cleanly; open PR #34817 shares engine-middleware-and-context.ts / engine-top-level.ts and merges cleanly. Area sibling #35174 (engine.ts, engine-scoped-context.ts, runtime) is disjoint.
Pre-claim lane: domain:server (packages/objectql/**)
Pre-claim deps: PR #35165 merged; no Blocked-by.
Prior rulings read: maintainer ruling 7000283878 (A); #7477 (after* stays in the write's unit — unchanged by A); PM ruling 5265092151 on #7867; ADR-0142 D4 (Proposed, update only); check-prior-rulings 162 hits — ADR-0096 D1, ADR-0103 D2, ADR-0119 D1, ADR-0035 §5, ADR-0055 §3, ADR-0061 D2, ADR-0092 D2, ADR-0139 D4 (term noise, none on point); thread: the ruling only
{
"issue": 35167,
"status": "done",
"branch": "claude/issue-35167-unit-inside-middleware",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35386",
"head": "155c9e54ec",
"session": "session_01Utp6Ca1jJvsA1dHsPwMiQb",
"premise_still_valid": true,
"summary": "insert and delete now open their after-abort unit around the executor handed to executeWithMiddleware (inOwnUnit), as update does since PR #35165; the door-level re-entry is gone, so the middleware chain (authorization reads, post-next() work) runs outside the unit and the before* side writes, the row and the after* chain stay inside it. The three fact-8 prose places state one rule. One SQLite concurrency test file per verb (plugin-security, real SqlDriver + SecurityPlugin) pins that a second writer lands while the first is parked in the middleware chain, with an after* rollback control. The delete loser's answer and the driver-false after-effects are untouched (follow-up card).",
"readings": {
"A1": "holds at origin/main 24cc61fab: git grep 'inAfterAbortUnit(() => this.' packages/objectql/src = 2 lines, engine-insert.ts:332 and engine-delete-and-aggregate.ts:157; engine-update.ts:172-174 inOwnUnit, :475 executeWithMiddleware(opCtx, inOwnUnit(...)). After the PR: 0 lines.",
"A2": "holds: engine-hook-dispatch.ts:74, engine-top-level.ts:104-107 (plus the 'door's own unit' parenthesis at :111, also updated), engine-middleware-and-context.ts:204-210. Three other files say 'the door's own unit' as a name (engine-transactions-section.ts:161, hook-wrappers.ts:533, unit-detach.ts:21); they make no claim about where it opens and were left alone.",
"A3": "holds: an after* hook that throws still rolls back on SQLite. The control cells in both new files are green after the change and stay green under ablation. Only the middleware chain moved out of the unit."
},
"tests": "head 155c9e54ec, under os-verify-lock: objectql typecheck + test 'Test Files 614 passed (614) / Tests 13878 passed (13878)'; the two new files + ownership-claim-race-sqlite 'Test Files 3 passed (3) / Tests 15 passed (15)'. Pre-merge d5bfdb05c: plugin-security typecheck exit 0, test 'Test Files 281 passed (281) / Tests 6993 passed | 45 skipped'. Ablation per verb (fix committed first; engine file restored from base 24cc61fab; restore = git checkout HEAD --, then hash match and empty git diff HEAD): insert 'Tests 2 failed | 2 passed (4)', both hooked cells 'Expected: fulfilled Received: still waiting'; delete the same. Census control re-point mutated through ablation-replace.mjs (anchor x1 to x0): self-test red 'resolution control moved', restored with hash match. No dist build was needed because plugin-security's vitest aliases objectql and driver-sql to src.",
"gates": "dispatch-gates --commands gives 94 families (75 before the script edit, +19 after it); --ran: '94 derived famil(ies) accounted for, 93 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)'. NOT MEASURED: check-plugin-teardown-shape --self-test exit 3, because its fixture commit is unreachable even after --deepen=3000 (checker-health only, script untouched). These first failed and then exited 0: check:dual-build-cjs-loads and check:i18n (exit 3 until built), check:type-check-debt (exit 99 then 3 under lock contention; exit 0 under the lock), check:swallow-census-controls (exit 1: vacuous control, fixed in this PR). check:pm-dispatch-gates exit 0 (fast tier, 2249 cases). Re-run on final head 155c9e54ec, all exit 0: swallow-census-controls, nul-bytes, type-check-coverage, test-source-alias, cross-package-test-inputs, check-empty-changeset, check-adr-0087-registration, issue-citations. spec check:generated after merge: up to date. overlap-check: VERDICT clean exit 0. CI check-runs: in_progress at report time, not waited for. test:repo is declared to CI.",
"dogfood_battery": "n/a: no ! in the PR title and no (narrowing) arm",
"line_budget": "+408/-36 across 9 files. Engine and prose +45/-23. Tests +331 (171 delete, 160 insert). Changeset +19. Census script +13/-13. The precedent was +222/-5 for one verb; this card covers two.",
"files_changed": [
".changeset/35167-insert-delete-unit-inside-middleware.md",
"packages/objectql/src/engine-delete-and-aggregate.ts",
"packages/objectql/src/engine-hook-dispatch.ts",
"packages/objectql/src/engine-insert.ts",
"packages/objectql/src/engine-middleware-and-context.ts",
"packages/objectql/src/engine-top-level.ts",
"packages/plugins/plugin-security/src/delete-unit-inside-middleware-sqlite.test.ts",
"packages/plugins/plugin-security/src/insert-unit-inside-middleware-sqlite.test.ts",
"scripts/measure-durability-swallow-family.mjs"
],
"deviations": [
"The file surface was breached by one file, scripts/measure-durability-swallow-family.mjs. Its RESOLUTION control was pinned on the delete door's this.delete(...) re-entry that this card removes, so check:swallow-census-controls went red: 'matched NO call site … passes VACUOUSLY'. I re-pointed the control at the same facet-stub shape (insertMany's this.insert in InsertFacet) rather than stopping, because the red is a direct consequence of the ruled change. The commit is separate (d5bfdb05c) and the seat may drop it. The claim's file surface needs this one path added.",
"The new test files are under packages/plugins/plugin-security/src/, as in the precedent. The real SqlDriver + SecurityPlugin stack lives there, and objectql has no driver-sql dependency.",
"The trimmed this-Picks ('insert' on InsertFacet.insert, 'delete' on DeleteAndAggregateFacet.delete) stay inside the fenced files.",
"I merged origin/main once before opening the PR (155c9e54ec) and re-ran the scoped checks."
],
"mcp_calls": "0",
"api_writes": "2: pr_create through the fleet-write relay (POST pulls + POST issues/35386/assignees), and this os-dev-report comment through post-stamped.mjs (POST issues/35167/comments). git push is not counted.",
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": []
}
Claim: amended by the area after the dev's measurement (os-dev-report 7002963247, deviations 1–2) · 2026-11-19T07:43Z
Area: data-1
Session: session_01Utp6Ca1jJvsA1dHsPwMiQb
Account: os-bill
Branch: claude/issue-35167-unit-inside-middleware
File surface: as claimed, plus (1) scripts/measure-durability-swallow-family.mjs: its RESOLUTION control was pinned on the delete door's this.delete(...) re-entry that this card removes, so check:swallow-census-controls went vacuous; the control is re-pointed at the same facet-stub shape (insertMany's this.insert), own commit d5bfdb05c; and (2) the two new SQLite concurrency test files live in packages/plugins/plugin-security/src/ (insert-unit-inside-middleware-sqlite.test.ts, delete-unit-inside-middleware-sqlite.test.ts), beside the precedent's, because that package carries the real SqlDriver + SecurityPlugin stack. PR: #35386.
Clause-②: no
Metadata-protocol: none
Addendum, fix round on PR #35386, head 155c9e5, CI check "Test Core (7/10)" (job 135415542075).
{
"issue": 35167,
"round": "fix-1",
"status": "done",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35386",
"head": "155c9e54ec",
"fix_commit": null,
"cause": "Not this PR's. One case timed out at vitest's 5000 ms default on a slow runner: plugin-security src/org-admin-assignment-boundary.posture.test.ts:1153, posture 'isolated' > auditorDelegate, 5534 ms. The other 6992 tests in the package passed. On this run the package took Duration 926.29s (import 1680.87s) and the file took 178960 ms. On main's last completed scheduled CI run (44455704227, job 135330913312) the same package took 430.85s (import 800.60s), the same file 81075 ms and the same case 2124 ms. That is about 2.2x for the whole package, imports included, which says the box was slow, not the code. Measured locally on the same box and tree, verbose reporter, swapping only the two engine files: with origin/main's engine-insert.ts and engine-delete-and-aggregate.ts the 12 cases take 320-642 ms (isolated auditorDelegate 611 ms, file Duration 36.58s); with this PR's files they take 280-595 ms (isolated auditorDelegate 595 ms, file Duration 32.90s). The file passes 104/104 on this branch. This PR makes no case slower.",
"tests": "plugin-security vitest run src/org-admin-assignment-boundary.posture.test.ts at 155c9e54ec, under os-verify-lock: Test Files 1 passed (1), Tests 104 passed (104), VERDICT command-exit 0. Comparison run with origin/main's two engine files restored: 104 passed. Afterwards the tree was restored with git checkout HEAD and git diff HEAD is empty.",
"gates": "No code change and no push, so the gates have nothing new to re-run. The rerun decision belongs to the seat (scripts/pm/rerun-failed.mjs: a dev never re-runs).",
"api_writes": "1: this comment",
"mcp_calls": "0",
"security_findings": "none",
"out_of_scope_findings": ["carrier: none · noted, not filed: the per-variant cases in org-admin-assignment-boundary.posture.test.ts run about 0.5-2 s on a normal CI box and come close to vitest's 5000 ms default when the runner is slow"]
}
Addendum, fix round 2 on PR #35386, head 155c9e5. Test Core (7/10) attempt 2 (job 135430866622) failed at plugin-security org-admin-assignment-boundary.posture.test.ts:1153, isolated, in auditorDelegate and orgAdminAuditorDelegate: "Test timed out in 5000ms".
{
"issue": 35167,
"round": "fix-2",
"status": "done",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35386",
"head": "155c9e54ec",
"fix_commit": null,
"cause": "Not this PR. The timeout is runner load on the Test Core shard, and runs without this change reach the same timings. (1) Code path: I probed every insert and delete door call in this file on both trees with the instrumentation uncommitted, then restored it (git diff HEAD empty). There are 3866 inserts and 484 deletes, and opensAfterAbortUnit answers false for every one on both this branch and origin/main's engine files. The after-abort unit opens 0 times on either tree. With ownUnit false, inOwnUnit hands executeWithMiddleware the same executor, so each write gets no added await, no unit, no retry and no timer. The only difference is one closure allocation per write. (2) Repeated A/B on the same box: the file was run 3x interleaved with the two engine files swapped and nothing else changed. Vitest tests time was main 21.03/20.61/19.21s against branch 20.09/19.76/19.31s. Isolated auditorDelegate was main 528/557/518 ms against branch 558/560/522 ms. Isolated orgAdminAuditorDelegate was main 576/538/511 ms against branch 601/562/522 ms. (3) Other CI runs today, none containing this change: main's latest scheduled CI run 44484542279 (2e9e1ac9dc, 08:04Z) had plugin-security at 645.59s (import 1191.47s), this file at 135108 ms, auditorDelegate at 3217/2905 ms. PR #35383 run 44480050457 (head 2919fe6ac7, still with the insert door re-entry, same shard partners scenarios/service-messaging/verify/http-conformance/connector-openapi) had 751.67s, file 124693 ms, auditorDelegate 4705/4547 ms. PR #35387 run 44481634712 (76fb831b21, also with the door re-entry) had 654.87s, file 142701 ms, auditorDelegate 3136/2412 ms. PR runs near 430s: #35397 431.82s, #35362 439.63s, #35351 413.88s. Main's 04:10Z scheduled run had 430.85s. This PR: attempt 1 926.29s, attempt 2 768.71s. The same case runs at 4.5-4.7s without this change when the shard is loaded.",
"tests": "Each run of the file passed 104/104 on both trees (one probe run and three timing runs per tree). The worktree was restored with git checkout HEAD, and git diff HEAD is empty.",
"gates": "No code change and no push, so the gates have nothing new to run.",
"api_writes": "1: this comment",
"mcp_calls": "0",
"security_findings": "none",
"proposed_follow_up_card": "Title: plugin-security: the per-variant officer cases in org-admin-assignment-boundary.posture.test.ts reach vitest's 5000 ms default on a loaded Test Core shard. Body: the 12 'adding and removing a holder' cases (two postures x six callers) take about 0.5 s locally. On CI they took 2-5.5 s today on shards that also run scenarios, service-messaging and verify: main scheduled 44484542279 hit 3217 ms, PR #35383 hit 4705 ms, PR #35386 hit 5534 ms and then timed out twice. The whole file takes 75-179 s on CI. Each case does a grant insert, a removal by id, a bulk removal and a position holding for every variant. Fix the time budget, not the assertions: declare a measured per-case budget with its class, as AGENTS.md's suite-weight rule allows, or split the per-variant loop so one case does less work. Do not just raise the global testTimeout.",
"out_of_scope_findings": ["carrier: the seat. The follow-up card text above is proposed, not filed."]
}
Close-out 2026-11-19T11:47Z: PR #35386 merged, and Fixes closed this card. The maintainer's ruling A (one rule for all three verbs) is delivered. insert and delete drop their door re-entry and wrap only the executor in their own unit, the same inOwnUnit shape update already ships (#35142). On single-connection SQLite, a hooked object's write no longer holds other writers behind the middleware chain. An after* hook that throws still rolls the row back.
Pins are in plugin-security on SQLite, per verb, with ablation. L1-a ACCEPT 7007598740 covers the full diff plus the merge delta. The red CI before the merge was the posture-test budget, measured not this PR's (7003622533, 7004622123) and fixed by #35436.
#35329 and #35149 (sequenced after this card) are now workable in this area. pm:dispatched off.
area:datadomain:serverDomain lane — seat card indexed by label:pm:seatfindingRecorded observation — held, not dispatchable until the findings triage round grades itpriority:p2Medium: important, M3
Activity
objectstack-fleet commentedon Nov 18, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
First touch: p2 ·
domain:server·pm:queue. Not a queue jump. It is an engine consistency follow-up to PR #35165 (#35142): insert and delete still open their after-abort unit at the door. No user break is named.objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ
Seat ruling record · 2026-11-19T05:05Z
Ruling-ref: maintainer 2026-11-19T05:03Z on seat 5's decision card for #35167, option chosen verbatim: 「A 三个动词一条规则」. Analysis: project file
objectstack-seat5/area-ux/data-1/decision-35167-35174-34292.md.Execution (area data-1):
insertanddeleteopen their after-abort unit insideexecuteWithMiddleware, asupdatedoes since PR #35165, so the authorization reads run beforeBEGIN; the three fact-8 prose places are updated to one rule.Clause-②: no, size S. The delete-loser answer and the hooks that fire on that false path are #35329, which lands after this PR.objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
Claim: PM loop round 3 · area data-1 (the maintainer, verbatim, 2026-11-19T05:03Z on the seat's decision card: 「A 三个动词一条规则」, ruling record 7000283878) · 2026-11-19T06:04Z
Area: data-1
Session:
session_01Utp6Ca1jJvsA1dHsPwMiQbAccount:
os-billBranch:
claude/issue-35167-unit-inside-middlewareWorktree:
objectstack-issue-35167(os-dev worktree in the data-1 container)Domain:
domain:serverSeat:
repo:objectstack#5File surface:
packages/objectql/src/engine-insert.ts(:332) and:157): open the after-abort unit insidepackages/objectql/src/engine-delete-and-aggregate.ts(executeWithMiddlewareasengine-update.tsdoes since PR #35165; the three prose places that describe the door-level unit (engine-hook-dispatch.ts~:74,engine-top-level.ts~:104-107,engine-middleware-and-context.ts~:207); one SQLite concurrency test per verb in new files named for this card; root.changeset/. ⛔ The delete loser's answer and the after-effects on a driverfalse(that is #35329, after this PR). Stop on breach and report.Container & model:
S,mode:subagent,model: default — no path-derived mandate,effort: mediumClause-②: no (ruling record 7000283878)
Metadata-protocol: none
Responsibility: platform —
insert/deletewrap the whole middleware chain in the after-abort unit on an object that opens one (a metadatabefore*hook that side-writes, or a blocking/conditioned metadataafter*hook), so a middleware's post-next()work and the authorization reads run inside the row's unit for those two verbs but outside it forupdate; on SQLite the door-level unit also serialises concurrent writers behind the gate.Thread-read: 7000283878
Premise: holds — on
origin/main3819afec:engine-insert.ts:332andengine-delete-and-aggregate.ts:157are the onlyinAfterAbortUnit(() => this.…)door calls inpackages/objectql/src;updatemoved inside in PR #35165.Serial constraints cleared: none —
overlap-check.mjson a probe branch touching the five files: base merges cleanly; open PR #34817 sharesengine-middleware-and-context.ts/engine-top-level.tsand merges cleanly. Area sibling #35174 (engine.ts, engine-scoped-context.ts, runtime) is disjoint.Pre-claim lane:
domain:server(packages/objectql/**)Pre-claim deps: PR #35165 merged; no Blocked-by.
Prior rulings read: maintainer ruling 7000283878 (A); #7477 (
after*stays in the write's unit — unchanged by A); PM ruling 5265092151 on #7867; ADR-0142 D4 (Proposed, update only); check-prior-rulings 162 hits — ADR-0096 D1, ADR-0103 D2, ADR-0119 D1, ADR-0035 §5, ADR-0055 §3, ADR-0061 D2, ADR-0092 D2, ADR-0139 D4 (term noise, none on point); thread: the ruling onlyobjectstack-fleet commentedon Nov 19, 2026
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
os-dev-report
{ "issue": 35167, "status": "done", "branch": "claude/issue-35167-unit-inside-middleware", "pr": "https://github.com/objectstack-ai/objectstack/pull/35386", "head": "155c9e54ec", "session": "session_01Utp6Ca1jJvsA1dHsPwMiQb", "premise_still_valid": true, "summary": "insert and delete now open their after-abort unit around the executor handed to executeWithMiddleware (inOwnUnit), as update does since PR #35165; the door-level re-entry is gone, so the middleware chain (authorization reads, post-next() work) runs outside the unit and the before* side writes, the row and the after* chain stay inside it. The three fact-8 prose places state one rule. One SQLite concurrency test file per verb (plugin-security, real SqlDriver + SecurityPlugin) pins that a second writer lands while the first is parked in the middleware chain, with an after* rollback control. The delete loser's answer and the driver-false after-effects are untouched (follow-up card).", "readings": { "A1": "holds at origin/main 24cc61fab: git grep 'inAfterAbortUnit(() => this.' packages/objectql/src = 2 lines, engine-insert.ts:332 and engine-delete-and-aggregate.ts:157; engine-update.ts:172-174 inOwnUnit, :475 executeWithMiddleware(opCtx, inOwnUnit(...)). After the PR: 0 lines.", "A2": "holds: engine-hook-dispatch.ts:74, engine-top-level.ts:104-107 (plus the 'door's own unit' parenthesis at :111, also updated), engine-middleware-and-context.ts:204-210. Three other files say 'the door's own unit' as a name (engine-transactions-section.ts:161, hook-wrappers.ts:533, unit-detach.ts:21); they make no claim about where it opens and were left alone.", "A3": "holds: an after* hook that throws still rolls back on SQLite. The control cells in both new files are green after the change and stay green under ablation. Only the middleware chain moved out of the unit." }, "tests": "head 155c9e54ec, under os-verify-lock: objectql typecheck + test 'Test Files 614 passed (614) / Tests 13878 passed (13878)'; the two new files + ownership-claim-race-sqlite 'Test Files 3 passed (3) / Tests 15 passed (15)'. Pre-merge d5bfdb05c: plugin-security typecheck exit 0, test 'Test Files 281 passed (281) / Tests 6993 passed | 45 skipped'. Ablation per verb (fix committed first; engine file restored from base 24cc61fab; restore = git checkout HEAD --, then hash match and empty git diff HEAD): insert 'Tests 2 failed | 2 passed (4)', both hooked cells 'Expected: fulfilled Received: still waiting'; delete the same. Census control re-point mutated through ablation-replace.mjs (anchor x1 to x0): self-test red 'resolution control moved', restored with hash match. No dist build was needed because plugin-security's vitest aliases objectql and driver-sql to src.", "gates": "dispatch-gates --commands gives 94 families (75 before the script edit, +19 after it); --ran: '94 derived famil(ies) accounted for, 93 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)'. NOT MEASURED: check-plugin-teardown-shape --self-test exit 3, because its fixture commit is unreachable even after --deepen=3000 (checker-health only, script untouched). These first failed and then exited 0: check:dual-build-cjs-loads and check:i18n (exit 3 until built), check:type-check-debt (exit 99 then 3 under lock contention; exit 0 under the lock), check:swallow-census-controls (exit 1: vacuous control, fixed in this PR). check:pm-dispatch-gates exit 0 (fast tier, 2249 cases). Re-run on final head 155c9e54ec, all exit 0: swallow-census-controls, nul-bytes, type-check-coverage, test-source-alias, cross-package-test-inputs, check-empty-changeset, check-adr-0087-registration, issue-citations. spec check:generated after merge: up to date. overlap-check: VERDICT clean exit 0. CI check-runs: in_progress at report time, not waited for. test:repo is declared to CI.", "dogfood_battery": "n/a: no ! in the PR title and no (narrowing) arm", "line_budget": "+408/-36 across 9 files. Engine and prose +45/-23. Tests +331 (171 delete, 160 insert). Changeset +19. Census script +13/-13. The precedent was +222/-5 for one verb; this card covers two.", "files_changed": [ ".changeset/35167-insert-delete-unit-inside-middleware.md", "packages/objectql/src/engine-delete-and-aggregate.ts", "packages/objectql/src/engine-hook-dispatch.ts", "packages/objectql/src/engine-insert.ts", "packages/objectql/src/engine-middleware-and-context.ts", "packages/objectql/src/engine-top-level.ts", "packages/plugins/plugin-security/src/delete-unit-inside-middleware-sqlite.test.ts", "packages/plugins/plugin-security/src/insert-unit-inside-middleware-sqlite.test.ts", "scripts/measure-durability-swallow-family.mjs" ], "deviations": [ "The file surface was breached by one file, scripts/measure-durability-swallow-family.mjs. Its RESOLUTION control was pinned on the delete door's this.delete(...) re-entry that this card removes, so check:swallow-census-controls went red: 'matched NO call site … passes VACUOUSLY'. I re-pointed the control at the same facet-stub shape (insertMany's this.insert in InsertFacet) rather than stopping, because the red is a direct consequence of the ruled change. The commit is separate (d5bfdb05c) and the seat may drop it. The claim's file surface needs this one path added.", "The new test files are under packages/plugins/plugin-security/src/, as in the precedent. The real SqlDriver + SecurityPlugin stack lives there, and objectql has no driver-sql dependency.", "The trimmed this-Picks ('insert' on InsertFacet.insert, 'delete' on DeleteAndAggregateFacet.delete) stay inside the fenced files.", "I merged origin/main once before opening the PR (155c9e54ec) and re-ran the scoped checks." ], "mcp_calls": "0", "api_writes": "2: pr_create through the fleet-write relay (POST pulls + POST issues/35386/assignees), and this os-dev-report comment through post-stamped.mjs (POST issues/35167/comments). git push is not counted.", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [] }objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
Claim: amended by the area after the dev's measurement (os-dev-report 7002963247, deviations 1–2) · 2026-11-19T07:43Z
Area: data-1
Session:
session_01Utp6Ca1jJvsA1dHsPwMiQbAccount:
os-billBranch:
claude/issue-35167-unit-inside-middlewareFile surface: as claimed, plus (1)
scripts/measure-durability-swallow-family.mjs: its RESOLUTION control was pinned on the delete door'sthis.delete(...)re-entry that this card removes, socheck:swallow-census-controlswent vacuous; the control is re-pointed at the same facet-stub shape (insertMany'sthis.insert), own commitd5bfdb05c; and (2) the two new SQLite concurrency test files live inpackages/plugins/plugin-security/src/(insert-unit-inside-middleware-sqlite.test.ts,delete-unit-inside-middleware-sqlite.test.ts), beside the precedent's, because that package carries the real SqlDriver + SecurityPlugin stack. PR: #35386.Clause-②: no
Metadata-protocol: none
objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
os-dev-report
Addendum, fix round on PR #35386, head 155c9e5, CI check "Test Core (7/10)" (job 135415542075).
{ "issue": 35167, "round": "fix-1", "status": "done", "pr": "https://github.com/objectstack-ai/objectstack/pull/35386", "head": "155c9e54ec", "fix_commit": null, "cause": "Not this PR's. One case timed out at vitest's 5000 ms default on a slow runner: plugin-security src/org-admin-assignment-boundary.posture.test.ts:1153, posture 'isolated' > auditorDelegate, 5534 ms. The other 6992 tests in the package passed. On this run the package took Duration 926.29s (import 1680.87s) and the file took 178960 ms. On main's last completed scheduled CI run (44455704227, job 135330913312) the same package took 430.85s (import 800.60s), the same file 81075 ms and the same case 2124 ms. That is about 2.2x for the whole package, imports included, which says the box was slow, not the code. Measured locally on the same box and tree, verbose reporter, swapping only the two engine files: with origin/main's engine-insert.ts and engine-delete-and-aggregate.ts the 12 cases take 320-642 ms (isolated auditorDelegate 611 ms, file Duration 36.58s); with this PR's files they take 280-595 ms (isolated auditorDelegate 595 ms, file Duration 32.90s). The file passes 104/104 on this branch. This PR makes no case slower.", "tests": "plugin-security vitest run src/org-admin-assignment-boundary.posture.test.ts at 155c9e54ec, under os-verify-lock: Test Files 1 passed (1), Tests 104 passed (104), VERDICT command-exit 0. Comparison run with origin/main's two engine files restored: 104 passed. Afterwards the tree was restored with git checkout HEAD and git diff HEAD is empty.", "gates": "No code change and no push, so the gates have nothing new to re-run. The rerun decision belongs to the seat (scripts/pm/rerun-failed.mjs: a dev never re-runs).", "api_writes": "1: this comment", "mcp_calls": "0", "security_findings": "none", "out_of_scope_findings": ["carrier: none · noted, not filed: the per-variant cases in org-admin-assignment-boundary.posture.test.ts run about 0.5-2 s on a normal CI box and come close to vitest's 5000 ms default when the runner is slow"] }objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
os-dev-report
Addendum, fix round 2 on PR #35386, head 155c9e5. Test Core (7/10) attempt 2 (job 135430866622) failed at plugin-security org-admin-assignment-boundary.posture.test.ts:1153, isolated, in auditorDelegate and orgAdminAuditorDelegate: "Test timed out in 5000ms".
{ "issue": 35167, "round": "fix-2", "status": "done", "pr": "https://github.com/objectstack-ai/objectstack/pull/35386", "head": "155c9e54ec", "fix_commit": null, "cause": "Not this PR. The timeout is runner load on the Test Core shard, and runs without this change reach the same timings. (1) Code path: I probed every insert and delete door call in this file on both trees with the instrumentation uncommitted, then restored it (git diff HEAD empty). There are 3866 inserts and 484 deletes, and opensAfterAbortUnit answers false for every one on both this branch and origin/main's engine files. The after-abort unit opens 0 times on either tree. With ownUnit false, inOwnUnit hands executeWithMiddleware the same executor, so each write gets no added await, no unit, no retry and no timer. The only difference is one closure allocation per write. (2) Repeated A/B on the same box: the file was run 3x interleaved with the two engine files swapped and nothing else changed. Vitest tests time was main 21.03/20.61/19.21s against branch 20.09/19.76/19.31s. Isolated auditorDelegate was main 528/557/518 ms against branch 558/560/522 ms. Isolated orgAdminAuditorDelegate was main 576/538/511 ms against branch 601/562/522 ms. (3) Other CI runs today, none containing this change: main's latest scheduled CI run 44484542279 (2e9e1ac9dc, 08:04Z) had plugin-security at 645.59s (import 1191.47s), this file at 135108 ms, auditorDelegate at 3217/2905 ms. PR #35383 run 44480050457 (head 2919fe6ac7, still with the insert door re-entry, same shard partners scenarios/service-messaging/verify/http-conformance/connector-openapi) had 751.67s, file 124693 ms, auditorDelegate 4705/4547 ms. PR #35387 run 44481634712 (76fb831b21, also with the door re-entry) had 654.87s, file 142701 ms, auditorDelegate 3136/2412 ms. PR runs near 430s: #35397 431.82s, #35362 439.63s, #35351 413.88s. Main's 04:10Z scheduled run had 430.85s. This PR: attempt 1 926.29s, attempt 2 768.71s. The same case runs at 4.5-4.7s without this change when the shard is loaded.", "tests": "Each run of the file passed 104/104 on both trees (one probe run and three timing runs per tree). The worktree was restored with git checkout HEAD, and git diff HEAD is empty.", "gates": "No code change and no push, so the gates have nothing new to run.", "api_writes": "1: this comment", "mcp_calls": "0", "security_findings": "none", "proposed_follow_up_card": "Title: plugin-security: the per-variant officer cases in org-admin-assignment-boundary.posture.test.ts reach vitest's 5000 ms default on a loaded Test Core shard. Body: the 12 'adding and removing a holder' cases (two postures x six callers) take about 0.5 s locally. On CI they took 2-5.5 s today on shards that also run scenarios, service-messaging and verify: main scheduled 44484542279 hit 3217 ms, PR #35383 hit 4705 ms, PR #35386 hit 5534 ms and then timed out twice. The whole file takes 75-179 s on CI. Each case does a grant insert, a removal by id, a bulk removal and a position holding for every variant. Fix the time budget, not the assertions: declare a measured per-case budget with its class, as AGENTS.md's suite-weight rule allows, or split the per-variant loop so one case does less work. Do not just raise the global testTimeout.", "out_of_scope_findings": ["carrier: the seat. The follow-up card text above is proposed, not filed."] }objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
Close-out 2026-11-19T11:47Z: PR #35386 merged, and
Fixesclosed this card. The maintainer's ruling A (one rule for all three verbs) is delivered.insertanddeletedrop their door re-entry and wrap only the executor in their own unit, the sameinOwnUnitshapeupdatealready ships (#35142). On single-connection SQLite, a hooked object's write no longer holds other writers behind the middleware chain. Anafter*hook that throws still rolls the row back.Pins are in plugin-security on SQLite, per verb, with ablation. L1-a ACCEPT 7007598740 covers the full diff plus the merge delta. The red CI before the merge was the posture-test budget, measured not this PR's (7003622533, 7004622123) and fixed by #35436.
#35329 and #35149 (sequenced after this card) are now workable in this area.
pm:dispatchedoff.