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
security parity: a cascade delete through the predicate-delete arm still refuses (and rolls back) on a child the caller may not delete — pins for #33699 #33782
carries item 2 of #33699; #33699 keeps the engine change
Filing gate: ④ child of epic #33631 (SQL performance), split from #33699 by the maintainer's ruling 6893104201 (option B, 2026-11-15T10:39Z).
What this card carries
The security-parity pins for #33699's cascade delete through the predicate-delete arm. Ruling 6893104201, point (2), verbatim: "a refused child rolls back the whole cascade, never skipped". Point (4): "record hooks still run per row".
Today (measured, os-dev-report 6892420600 at d7e1a5a): every cascaded child runs the caller's by-id controlled-by-parent write gate (plugin-security) plus sharing canDelete. Any refusal rolls the whole cascade back. The predicate arm instead composes a row scope, and could skip an out-of-scope child silently.
Expected
Pins in plugin-security / plugin-sharing test suites that hold on the engine change of #33699:
a child the caller may not delete makes the whole cascade answer the same refusal as today, and no row (parent or child) is deleted;
scoped matches that differ from the probed children refuse, never shrink;
the audit, sharing-cleanup and file-reference hooks still run once per child.
Each pin is red against a deliberately skipping arm (ablation) and green against today's per-dependent path and #33699's change.
Reader
domain:server#5 area A2 (S1). Serial with #33699 (A4, S2): the pins can land first against today's path, then guard #33699's PR. Size S–M.
Dedupe
repo:objectstack-ai/objectstack is:issue cascade predicate-delete parity → only #33699 and epic #33631.
Claim: server area S1 (A1+A2) under #33751 §2 area-lease mode, area A2, seat domain:server#5 · p2 (epic #33631, precondition of #33699 per ruling 6893661036) · executed by an os-dev subagent of the area S1 thread · posted at 2026-11-15T13:07Z
Session: session_01QsR2jVPGBoi3MCGoKbW1Hv
Account: zhuangjianguo
Branch: claude/area-A2-33782
Worktree: objectstack-area-A2-33782
Domain: domain:server
Seat: domain:server#5
File surface: tests only: new or extended cascade-delete parity pins in packages/plugins/plugin-security/src/**/*.test.ts and packages/plugins/plugin-sharing/src/**/*.test.ts (a test-only helper beside them if needed); no source file; skip-changeset (stop on breach; explain in the report)
Container & model: S-M, mode:subagent, model: default (no path-derived mandate), effort: high
Clause-②: no
Metadata-protocol: none
Responsibility: n/a — not a defect card (parity pins that guard #33699's engine change)
Thread-read: none
Premise: holds
Serial constraints cleared: #33699 (S2, claude/area-A4-33699): these pins merge before or together with it (ruling 6893661036 precondition 1); #33696 / #33524 (this area, plugin-security source files, disjoint: this card adds tests only); #32753 (S3, catalog files, disjoint)
{
"issue": 33782,
"status": "done",
"branch": "claude/area-A2-33782",
"pr": "https://github.com/objectstack-ai/objectstack/pull/33927",
"session": "session_01QsR2jVPGBoi3MCGoKbW1Hv",
"premise_still_valid": true,
"summary": "Added one test file, packages/plugins/plugin-security/src/cascade-delete-security-parity.test.ts: 8 pins on a real kernel (ObjectQLPlugin over better-sqlite3, AuditPlugin, SecurityPlugin, SharingServicePlugin) for the four cascade-delete invariants, observed only through stored rows, audit ledger rows, record-share rows and what an object-less hook pair was handed: (1) a refused child (unreadable; readable via edit share but not deletable) refuses the whole cascade with today's refusal, 403 FORBIDDEN from sharing, and nothing is deleted; (2) never fewer rows; (3) never more rows, including a child written after the probe by a sibling's beforeDelete; (4) audit row, share revocation and each object-less hook phase exactly once per child, a child two relations reach included. PM hypothesis measured: today each cascaded child is gated by sharing's by-id delete gate and any refusal rolls the whole cascade back (held). The pins are RED against #33699's branch head cb2cafef (4 of 8): see out_of_scope_findings; with a scratch sharing fix all 8 pass on it.",
"tests": "Head 9455c222c (origin/main 63e47feec merged). Under os-verify-lock, VERDICT command-exit 0: closure build exit 0; `pnpm --filter @objectstack/plugin-security exec vitest run --maxWorkers=2` exit 0, Test Files 268 passed (268), Tests 6689 passed | 45 skipped; `pnpm --filter @objectstack/plugin-security typecheck` exit 0 (test layer via tsconfig.test.json, src/**/*, 0 ledgered errors). New file 8/8. Ablations (objectql resolves to src through this package's vitest alias, so no dist leg; each via scripts/ablation-replace.mjs, anchor 1->0, restored blob == HEAD, git diff HEAD empty): A1 skipping arm (by-id child delete .catch swallowed) 4 red: both invariant-1 pins and both invariant-2 refusal pins, 'expected { kind: landed } to match object { kind: refused ... }'; A2 widening arm (child delete by FK predicate, multi) 5 red: four refusal pins plus invariant 3 'm2_a_written_after_probe' expected, [] received; A3 hookless arm (by-id before/afterDelete dispatch skipped when referentialCascadeDelete) 3 red incl. invariant 4 'expected { h1: 1 } to deeply equal { h1: 1, h1_by_alt: 1, ... }'. Two earlier A3 spellings never reached the engine (timeout; 'this.buildDriverOptions is not a function') and were discarded as no-ops. Against #33699: S2's objectql diff (git diff origin/main...cb2cafef, tests excluded) applied to this tree: 4 failed | 4 passed (the four landing cascades refused 403 FORBIDDEN; refusal pins green); same plus a scratch inferTargetId fix and a scratch plugin-sharing src alias: 8/8; main plus the scratch fix: 8/8. All scratch edits restored, git status clean.",
"gates": "dispatch-gates --commands --repo objectstack-ai/objectstack at 9455c222c: 53 families; 52 run locally each with exit captured before any pipe: 50 exit 0; check:dual-build-cjs-loads exit 3 and check:i18n exit 3 (PREREQUISITE NOT MET, needs a whole-workspace build: NOT MEASURED locally); check:type-check-debt NOT MEASURED locally (verify lock queue-timeout exit 99 twice). --ran reconciliation: 53 derived, 50 run, 2 NOT-MEASURED, 1 UNRUN (type-check-debt). dispatch-gates --tier: no path-derived mandate; Clause-② not reachable from paths. pnpm lint (repo-wide) NOT MEASURED locally (lock queue-timeout); narrowed to `eslint --no-inline-config` on the one file: exit 0. PR body gates on the final body: check-closing-keyword-parity 0, check-changeset-no-major 0, check-adr-0087-registration 0, check-partof-closing-keyword 0; control-byte scan of body and test file: no hit. PR check-runs at 9455c222c: Lint & Repo Gates success, Lint · ESLint success, Type Check · debt ledger success, TypeScript Type Check success, Build Core success, Check Changeset success, Governed Surface Queue Guard success, Dogfood Regression Gate success, Live E2E UI success, Test UI success, Test Core 2,4,5,6,7,8/8 success, Test Core 1/8 and 3/8 in_progress at report time.",
"dogfood_battery": "n/a - no `!` in the PR title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "2 - POST pulls (pr_create via scripts/pm/fleet-write/dispatch.mjs, PR #33927, label skip-changeset in the same call); POST issues/33782/comments (this report via scripts/pm/post-stamped.mjs). Plus git pushes of claude/area-A2-33782 (empty probe, then commits; not REST writes).",
"files_changed": [
"packages/plugins/plugin-security/src/cascade-delete-security-parity.test.ts"
],
"line_budget": "393 added, 0 removed, 1 file; under the 3000-line human-merge threshold; no skills/** file",
"deviations": [
"Contract self-check (maintainer rule via coordinator): Clause-② no, Metadata-protocol none, skip-changeset match the claim; no difference.",
"No changeset: common.txt asks for a real changeset, the dispatch and the claim say test-only with skip-changeset; followed the dispatch (plugin-security publishes dist built from src/index.ts; a *.test.ts is no entry).",
"PR body order: Fixes and the two declaration lines precede the 维护者速读 block (os-dev order); common.txt lists 维护者速读 first. All required parts present.",
"pnpm lint and check:type-check-debt not run locally (verify lock queue-timeout, holder a sibling's long battery); narrowed to one-file eslint; CI Lint & Repo Gates and Type Check · debt ledger are green on the head.",
"Dependents of plugin-security not run: test-only diff, no published byte moves.",
"Real service-storage file-reference hooks not wired (not a dependency of plugin-security; adding it is outside the claim surface); an object-less before/afterDelete pair with its registration shape stands in."
],
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": [
"class: b · reach: named producer: #33699's cascade batch (branch claude/area-A4-33699 at cb2cafef, deleteCascadedChildren issues delete(child, { where: { id: { $in: chunk } }, multi: true }) under the caller's context) · Seam: spec:metadata-core engine-delete-dispatch case 'multi alongside an $in id set' -> multi → runtime:plugin-sharing sharing-plugin.ts inferTargetId (write middleware by-id gate) · evidence: inferTargetId returns options.where.id whenever it is non-null, so an operator object { $in: [...] } is gated as ONE by-id delete of the row String(...) and canDelete denies. Repro on main 45dee177 (no #33699 change): a member's ql.delete(qa_ccp_line, { where: { id: { $in: ['own_row'] } }, multi: true }) on a private-OWD object whose row it owns answers 403 FORBIDDEN from sharingMiddleware (stack at sharing-plugin.ts the FORBIDDEN throw). With #33699's objectql diff applied, every cascade that should land is refused 403 (4 of the 8 parity pins red); with a scratch fix that keeps an object-valued where.id out of the by-id gate, #33699's diff passes all 8 pins. Blocks #33699 landing. Coordinator is taking it to the seat as a separate card · dedupe words: inferTargetId, $in multi delete FORBIDDEN, sharing middleware by-id gate operator object"
]
}
Activity
objectstack-fleet commentedon Nov 15, 2026
domain:server#5 · zhuangjianguo · session_01QsR2jVPGBoi3MCGoKbW1Hv
Claim: server area S1 (A1+A2) under #33751 §2 area-lease mode, area A2, seat
domain:server#5· p2 (epic #33631, precondition of #33699 per ruling 6893661036) · executed by anos-devsubagent of the area S1 thread · posted at 2026-11-15T13:07ZSession:
session_01QsR2jVPGBoi3MCGoKbW1HvAccount:
zhuangjianguoBranch:
claude/area-A2-33782Worktree:
objectstack-area-A2-33782Domain:
domain:serverSeat:
domain:server#5File surface: tests only: new or extended cascade-delete parity pins in
packages/plugins/plugin-security/src/**/*.test.tsandpackages/plugins/plugin-sharing/src/**/*.test.ts(a test-only helper beside them if needed); no source file; skip-changeset (stop on breach; explain in the report)Container & model:
S-M,mode:subagent,model: default (no path-derived mandate),effort: highClause-②: no
Metadata-protocol: none
Responsibility: n/a — not a defect card (parity pins that guard #33699's engine change)
Thread-read: none
Premise: holds
Serial constraints cleared: #33699 (S2,
claude/area-A4-33699): these pins merge before or together with it (ruling 6893661036 precondition 1); #33696 / #33524 (this area, plugin-security source files, disjoint: this card adds tests only); #32753 (S3, catalog files, disjoint)objectstack-fleet commentedon Nov 15, 2026
domain:server#5 · zhuangjianguo · session_01QsR2jVPGBoi3MCGoKbW1Hv
os-dev-report
{ "issue": 33782, "status": "done", "branch": "claude/area-A2-33782", "pr": "https://github.com/objectstack-ai/objectstack/pull/33927", "session": "session_01QsR2jVPGBoi3MCGoKbW1Hv", "premise_still_valid": true, "summary": "Added one test file, packages/plugins/plugin-security/src/cascade-delete-security-parity.test.ts: 8 pins on a real kernel (ObjectQLPlugin over better-sqlite3, AuditPlugin, SecurityPlugin, SharingServicePlugin) for the four cascade-delete invariants, observed only through stored rows, audit ledger rows, record-share rows and what an object-less hook pair was handed: (1) a refused child (unreadable; readable via edit share but not deletable) refuses the whole cascade with today's refusal, 403 FORBIDDEN from sharing, and nothing is deleted; (2) never fewer rows; (3) never more rows, including a child written after the probe by a sibling's beforeDelete; (4) audit row, share revocation and each object-less hook phase exactly once per child, a child two relations reach included. PM hypothesis measured: today each cascaded child is gated by sharing's by-id delete gate and any refusal rolls the whole cascade back (held). The pins are RED against #33699's branch head cb2cafef (4 of 8): see out_of_scope_findings; with a scratch sharing fix all 8 pass on it.", "tests": "Head 9455c222c (origin/main 63e47feec merged). Under os-verify-lock, VERDICT command-exit 0: closure build exit 0; `pnpm --filter @objectstack/plugin-security exec vitest run --maxWorkers=2` exit 0, Test Files 268 passed (268), Tests 6689 passed | 45 skipped; `pnpm --filter @objectstack/plugin-security typecheck` exit 0 (test layer via tsconfig.test.json, src/**/*, 0 ledgered errors). New file 8/8. Ablations (objectql resolves to src through this package's vitest alias, so no dist leg; each via scripts/ablation-replace.mjs, anchor 1->0, restored blob == HEAD, git diff HEAD empty): A1 skipping arm (by-id child delete .catch swallowed) 4 red: both invariant-1 pins and both invariant-2 refusal pins, 'expected { kind: landed } to match object { kind: refused ... }'; A2 widening arm (child delete by FK predicate, multi) 5 red: four refusal pins plus invariant 3 'm2_a_written_after_probe' expected, [] received; A3 hookless arm (by-id before/afterDelete dispatch skipped when referentialCascadeDelete) 3 red incl. invariant 4 'expected { h1: 1 } to deeply equal { h1: 1, h1_by_alt: 1, ... }'. Two earlier A3 spellings never reached the engine (timeout; 'this.buildDriverOptions is not a function') and were discarded as no-ops. Against #33699: S2's objectql diff (git diff origin/main...cb2cafef, tests excluded) applied to this tree: 4 failed | 4 passed (the four landing cascades refused 403 FORBIDDEN; refusal pins green); same plus a scratch inferTargetId fix and a scratch plugin-sharing src alias: 8/8; main plus the scratch fix: 8/8. All scratch edits restored, git status clean.", "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack at 9455c222c: 53 families; 52 run locally each with exit captured before any pipe: 50 exit 0; check:dual-build-cjs-loads exit 3 and check:i18n exit 3 (PREREQUISITE NOT MET, needs a whole-workspace build: NOT MEASURED locally); check:type-check-debt NOT MEASURED locally (verify lock queue-timeout exit 99 twice). --ran reconciliation: 53 derived, 50 run, 2 NOT-MEASURED, 1 UNRUN (type-check-debt). dispatch-gates --tier: no path-derived mandate; Clause-② not reachable from paths. pnpm lint (repo-wide) NOT MEASURED locally (lock queue-timeout); narrowed to `eslint --no-inline-config` on the one file: exit 0. PR body gates on the final body: check-closing-keyword-parity 0, check-changeset-no-major 0, check-adr-0087-registration 0, check-partof-closing-keyword 0; control-byte scan of body and test file: no hit. PR check-runs at 9455c222c: Lint & Repo Gates success, Lint · ESLint success, Type Check · debt ledger success, TypeScript Type Check success, Build Core success, Check Changeset success, Governed Surface Queue Guard success, Dogfood Regression Gate success, Live E2E UI success, Test UI success, Test Core 2,4,5,6,7,8/8 success, Test Core 1/8 and 3/8 in_progress at report time.", "dogfood_battery": "n/a - no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "2 - POST pulls (pr_create via scripts/pm/fleet-write/dispatch.mjs, PR #33927, label skip-changeset in the same call); POST issues/33782/comments (this report via scripts/pm/post-stamped.mjs). Plus git pushes of claude/area-A2-33782 (empty probe, then commits; not REST writes).", "files_changed": [ "packages/plugins/plugin-security/src/cascade-delete-security-parity.test.ts" ], "line_budget": "393 added, 0 removed, 1 file; under the 3000-line human-merge threshold; no skills/** file", "deviations": [ "Contract self-check (maintainer rule via coordinator): Clause-② no, Metadata-protocol none, skip-changeset match the claim; no difference.", "No changeset: common.txt asks for a real changeset, the dispatch and the claim say test-only with skip-changeset; followed the dispatch (plugin-security publishes dist built from src/index.ts; a *.test.ts is no entry).", "PR body order: Fixes and the two declaration lines precede the 维护者速读 block (os-dev order); common.txt lists 维护者速读 first. All required parts present.", "pnpm lint and check:type-check-debt not run locally (verify lock queue-timeout, holder a sibling's long battery); narrowed to one-file eslint; CI Lint & Repo Gates and Type Check · debt ledger are green on the head.", "Dependents of plugin-security not run: test-only diff, no published byte moves.", "Real service-storage file-reference hooks not wired (not a dependency of plugin-security; adding it is outside the claim surface); an object-less before/afterDelete pair with its registration shape stands in." ], "open_questions": [], "security_findings": "none", "out_of_scope_findings": [ "class: b · reach: named producer: #33699's cascade batch (branch claude/area-A4-33699 at cb2cafef, deleteCascadedChildren issues delete(child, { where: { id: { $in: chunk } }, multi: true }) under the caller's context) · Seam: spec:metadata-core engine-delete-dispatch case 'multi alongside an $in id set' -> multi → runtime:plugin-sharing sharing-plugin.ts inferTargetId (write middleware by-id gate) · evidence: inferTargetId returns options.where.id whenever it is non-null, so an operator object { $in: [...] } is gated as ONE by-id delete of the row String(...) and canDelete denies. Repro on main 45dee177 (no #33699 change): a member's ql.delete(qa_ccp_line, { where: { id: { $in: ['own_row'] } }, multi: true }) on a private-OWD object whose row it owns answers 403 FORBIDDEN from sharingMiddleware (stack at sharing-plugin.ts the FORBIDDEN throw). With #33699's objectql diff applied, every cascade that should land is refused 403 (4 of the 8 parity pins red); with a scratch fix that keeps an object-valued where.id out of the by-id gate, #33699's diff passes all 8 pins. Blocks #33699 landing. Coordinator is taking it to the seat as a separate card · dedupe words: inferTargetId, $in multi delete FORBIDDEN, sharing middleware by-id gate operator object" ] }objectstack-fleet commentedon Nov 15, 2026
domain:server#5 · zhuangjianguo · session_01QsR2jVPGBoi3MCGoKbW1Hv
Landed: PR #33927 merged as 6f9a2e8; card closed by its Fixes line.
pm:dispatchedremoved · 2026-11-15T16:04Ztest(plugin-security): security-parity pins for cascade delete across…