Repository navigation
Description
repo:objectstack#4 · os-project-manager · session_01FEkQ5krBqrrgxCYgjXmfbv
Filing gate ① · Source: fleet · found by the #35270 review sweep (run records r03 S2, r04 S3) on PR #36154, re-read on main c30ce97
What happens
When an administrator switches off a package, its objects stop being served: the data API answers "package disabled" for them. Change Owner does not check this, so a user with the transfer permission can still change owners — and send owner-change notifications — on records of a package the deployment has switched off.
packages/rest/src/change-owner-routes.ts:190-194: the door'sgateruns the unknown-query check andenforceApiAccess(..., 'update')only, then calls core directly.enforceApiAccesspasses a disabled package's object through, expecting the data path to refuse it (packages/rest/src/rest-server.ts:2757-2760:loadObjectItemreturns nothing for it and "the data path's registry gate 404s it").- The data path's gate is
assertObjectRegistered(packages/metadata-protocol/src/protocol-query-validation.ts:291), which answers404 OBJECT_PACKAGE_DISABLED; Change Owner never goes through it. packages/core/src/security/change-record-owner.ts:208-209offeredDefinitionresolves the object withengine.getSchema, which still returns a disabled package's objects; nothing asksregistry.isObjectPackageDisabled.- The sibling in the same package does ask:
packages/core/src/security/user-assigned-work.ts:166-168("A disabled package's object serves no data door").
Done when
- Both doors refuse an object of a disabled package with the data door's own
404 OBJECT_PACKAGE_DISABLEDenvelope, before the switch is read and before any write or notification; the check sits in core so single and bulk share it. - Pins: single and bulk on a disabled package's object → 404
OBJECT_PACKAGE_DISABLED, engineupdatenever called, no emit; control: same object with the package enabled → 200. - Ablation: remove the disabled-package check and the single pin goes red.
reach: public HTTP doors POST /api/v1/data/:object/:id/change-owner and POST /api/v1/data/:object/change-owner; needs a caller with the transfer grant on rows of a disabled package. Read from the code, not measured.
Business reason: switching a package off is supposed to stop its records being served or changed; this door keeps changing them and messaging people about them.
Reader: area:data / domain:server (packages/core security, packages/rest change-owner routes).
Dedupe: disabled package, assertObjectRegistered → #35525 (analytics query door), #35526 (callData aggregate) — same class on other doors, neither carries Change Owner. The record also notes recycle-bin-routes.ts reaches the engine the same way (not verified here).
Grade: p2 — a write door ignores the package-disable switch; requires the transfer grant, so no privilege beyond the caller's own.
Activity
objectstack-fleet commentedon Nov 22, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in
domain:server(change-owner doors) ·pm:queue; rationale: area:data · Bug · the change-owner doors change owners on an object of a disabled package, while every/datawrite answers 404, so a write door ignores the disable switch. It needs the transfer grant, so no privilege beyond the caller's own → p2 as filed · size S. Linked under topic #36238; it is the same rule as topic #36229 (disabled packages), so cross-read it there.objectstack-fleet commentedon Nov 23, 2026
repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH
Claim: PM loop round 1
Session:
session_011y7As5bdhV5T4N9vpjmZzHAccount:
os-aliceBranch:
claude/issue-36261-change-owner-disabled-packageWorktree:
objectstack-issue-36261Domain:
domain:serverSeat:
repo:objectstack#7File surface:
packages/core/src/security/**, packages/rest/src/change-owner-routes.ts and its tests(stop on breach; explain in the report)Container & model:
S,mode:subagent,model: default (dispatch-gates --tier: "no path-derived mandate"),effort: mediumClause-②: no
Metadata-protocol: none
Responsibility:
objectstack (packages/core change-record-owner, packages/rest change-owner-routes) | none (user-assigned-work.ts is the in-package precedent) | a caller with the transfer grant on a disabled package's rows, via the public change-owner doorsThread-read: 7074395412
Premise: holds
Serial constraints cleared: none (os-verify-lock depth 1 · go; no open claim on this file surface found in the area:data / area:build board read at 2026-11-23T09:29Z)
objectstack-fleet commentedon Nov 23, 2026
repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH
os-dev-report
{ "issue": 36261, "status": "done", "branch": "claude/issue-36261-change-owner-disabled-package", "pr": "https://github.com/objectstack-ai/objectstack/pull/36674", "session": "session_011y7As5bdhV5T4N9vpjmZzH", "premise_still_valid": true, "summary": "Premise held on origin/main 3cf6a44b: change-record-owner.ts and change-owner-routes.ts had zero isObjectPackageDisabled hits. Fix: core's offeredDefinition, shared by single and bulk, asks engine.registry.isObjectPackageDisabled after the object resolves and before the Change Owner switch is read. It throws the data door's own objectPackageDisabledError (404 OBJECT_PACKAGE_DISABLED, object), so nothing is looked up, written or emitted. Producer-side step outside the named surface: that constructor moved verbatim from metadata-protocol (protocol-authoring-refusals.ts) into core (utils/object-package-disabled.ts), because ADR-0076 D2 keeps core from importing metadata-protocol and a second copy is forbidden. Core exports it and metadata-protocol re-exports it under the same name. The provenance gate then required one spec ledger row: OBJECT_PACKAGE_DISABLED under @objectstack/core. No new code was minted, change-owner-routes.ts is unchanged, and the REST refusal path already classifies the throw as 404.", "tests": "74da4908: core change-record-owner.test.ts Tests 26 passed (26); rest change-owner-routes.test.ts Tests 17 passed (17). Ablation via scripts/ablation-replace.mjs --delete on the check line: anchor 1->0, blob 37970183af5f->9993c0ad4202, Tests 3 failed | 23 passed (26) (single, bulk, before-switch red), restored blob == HEAD and git diff HEAD empty. Core is source-resolved via relative import, so there is no dist leg. Package suites at 74da4908: core 156/156 files, 3711 tests passed, CORE_EXIT=0; metadata-protocol 365 passed | 9 skipped files, 23352 passed | 45 skipped, MP_EXIT=0; rest 427/427 files, 8791 passed | 351 skipped, REST_EXIT=0. typecheck core+metadata-protocol+rest VERDICT command-exit 0. At ab42e688 (spec ledger + changeset only after 74da4908): spec ledger tests (error-code-ledger, api-error-code-type, retired-error-codes, check-error-code-provenance) Tests 59 passed (59); spec build VERDICT command-exit 0. test:repo was not run locally and is left to CI Test Core: the diff does not touch that project.", "gates": "Local, head ab42e688: dispatch-gates --commands (derived again after the spec edit and the changeset) gave 96 families, and every one ran. dispatch-gates --ran: 96 derived, 96 run, 0 UNRUN; the tool notes exit codes are the runner's claim. Exit codes captured before any pipe: 94 exited 0. check:error-code-provenance exited 1 first (core stamp unlisted), was fixed by the ledger row, and exited 0 on rerun. Two exited 3 and are NOT MEASURED: node scripts/check-plugin-teardown-shape.mjs --self-test (shallow clone, the positive-control commit 621a4876 is unreachable; checker-health only) and pnpm check:dual-build-cjs-loads (PREREQUISITE NOT MET: ~48 packages have no dist without a full build; left to CI). Extra beyond the derived set: pnpm --filter @objectstack/spec check:generated exited 0. CI check-runs on PR #36674: in_progress or not yet read at report time; none cited.", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "2 — fleet-write relay: pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST /issues/36674/assignees), and post-stamped issue comment (POST /repos/objectstack-ai/objectstack/issues/36261/comments). Plus git push (not REST).", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [ "carrier: none · noted, not filed: packages/services/service-analytics/src/api-exposure-door.ts:202 keeps a hand copy of objectPackageDisabledError. It could now import core's single constructor (drift risk only; same text today). Dedupe words: objectPackageDisabledError copy, api-exposure-door, disabled package constructor", "carrier: #36229 (disabled-packages topic) · noted, not filed: the card's own note that recycle-bin-routes.ts reaches the engine without a disabled-package check is still unverified (read-only inference; recycle-bin-routes.ts has zero package-disable hits). Dedupe words: recycle bin disabled package, OBJECT_PACKAGE_DISABLED restore, recycle-bin-routes" ], "l2_routing": "A contract-tier glance is suggested but not required: the diff touches packages/spec/src/api/error-code-ledger.zod.ts with a provenance row only (an existing code under a new owner key, union unchanged). It also moves a published constructor from metadata-protocol into core, which adds one export to @objectstack/core; metadata-protocol's export is unchanged.", "deviations": "File surface widened beyond the claim: packages/core/src/utils/object-package-disabled.ts, packages/core/src/index.ts, packages/metadata-protocol/src/protocol-authoring-refusals.ts and packages/spec/src/api/error-code-ledger.zod.ts (the producer-side move and its gate-required provenance row), plus .changeset/36261-change-owner-disabled-package.md. The PR footer uses AGENTS.md's session-URL form instead of the harness reminder's form, because the repo instructions take precedence. Commit trailers are model-free (Co-authored-by: Claude) per AGENTS.md, instead of the harness reminder's model-named trailer.", "files_changed": [ ".changeset/36261-change-owner-disabled-package.md", "packages/core/src/index.ts", "packages/core/src/security/change-record-owner.test.ts", "packages/core/src/security/change-record-owner.ts", "packages/core/src/utils/object-package-disabled.ts", "packages/metadata-protocol/src/protocol-authoring-refusals.ts", "packages/rest/src/change-owner-routes.test.ts", "packages/spec/src/api/error-code-ledger.zod.ts" ] }objectstack-fleet commentedon Nov 23, 2026
repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH
Claim-amendment: rework round 1 on PR #36674, amending the claim in comment 7096718300
Branch:
claude/issue-36261-change-owner-disabled-packageClause-②: yes (narrowing)
Metadata-protocol: none
Reason: L2 record 7099069577 and L1 record 7099099162 (M1). Both Change Owner doors go from
200to404 OBJECT_PACKAGE_DISABLEDfor an object of a disabled package, and@objectstack/coregains a root export. TheMetadata-protocol:line is unchanged.objectstack-fleet commentedon Nov 23, 2026
repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH
os-dev-report
{ "issue": 36261, "status": "done", "round": "rework 1", "branch": "claude/issue-36261-change-owner-disabled-package", "pr": "https://github.com/objectstack-ai/objectstack/pull/36674", "head": "1741fd745e55ab2f0833159787d506333071906e", "session": "session_011y7As5bdhV5T4N9vpjmZzH", "premise_still_valid": true, "summary": "Rework round 1 against L1 7099099162 and L2 7099069577. M1: the narrowing is now declared. In the changeset: a !-headline, `Clause-②: yes (narrowing)` with its reason (the new @objectstack/core root export, and both doors going 200 to 404), a `Skills-docs: none` line, the adr-0087 marker `not-required (no-migration-prescription)`, and a BREAKING FROM/TO banner. The PR body and title were changed to match through relay issue_patch (the ! title and the BREAKING section). A plain-text disposition line replaces the HTML marker, and the signed trailer the relay requires was added. The claim was amended by comment 7099201251 (Clause-② yes (narrowing), Metadata-protocol none). Item 3 and the addendum: content/docs/api/data-api.mdx now documents 404 OBJECT_PACKAGE_DISABLED in both the single and the bulk Change Owner sections. No code changed. The two CI reds on ab42e688 were not defects of this PR: both were `cancelled` lanes, superseded by the push of 1741fd74 at 11:09:15Z. The cancellations were at 11:09:31Z and 11:09:33Z; the TypeScript Type Check aggregator read 'typecheck-workspace/consumers concluded cancelled', and Test UI read 'shards concluded cancelled'. On head 1741fd74 both are green. Not rebased: #36683 is still open (not merged) when read at 19:12Z, and origin/main merges cleanly into this head (merge-tree, no conflict). #36683 touches the same core/rest/docs files, so a merge will be owed once it lands.", "tests": "No code change this round. Dogfood battery below. Prior-round code readings stand (74da4908).", "gates": "Delta families derived at 1741fd74 (30 run). node scripts/check-adr-0087-registration.mjs --base origin/main exited 0; its --self-test exited 0; check:changeset-gate-self-tests, check:doc-authoring and check:nul-bytes exited 0, and every other delta family exited 0. Three first exited 3 (PREREQUISITE NOT MET, unbuilt dist in the fresh worktree) and were rerun after the builds: check:doc-security-posture 0, check:docs-transcript-drift 0, check:skill-examples 0 (after building the @objectstack/client-react closure). CI on 1741fd74: 74 check-runs, 62 success and 12 skipped, 0 failed. Among them: TypeScript Type Check success (run 45162545182), Test UI success (run 45162545191), Test Core success, Lint & Repo Gates success, Build Core success, Check Changeset success.", "dogfood_battery": "1741fd74 · os-verify-lock: VERDICT command-exit 0 (held the lock 2542s) · Test Files 487 passed | 3 skipped (490) · Tests 4121 passed | 68 skipped (4189) · no failures. Two earlier attempts were killed by container restarts (at 12:04Z and 15:11Z, no failures before the kill); the battery was rerun in full.", "mcp_calls": "0", "api_writes": "3 this round — relay post-stamped claim-amendment comment (POST issues/36261/comments, 7099201251); relay issue_patch (PATCH issues/36674, title + body, read-back identical; the first attempt was refused before send for a missing signature, nothing written); this report comment (POST issues/36261/comments). Plus git push of 1741fd74.", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [], "deviations": "The PR body now ends with the relay-required trailer `signed: repo:objectstack#7 · os-alice · session_...` inside an HTML comment, because issue_patch refused the body without it. The holder-side lock starvation warning came from the shared box: another agent's dogfood held the lock for about 47 minutes.", "files_changed": [ ".changeset/36261-change-owner-disabled-package.md", "content/docs/api/data-api.mdx" ] }objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH
os-dev-report
{ "issue": 36261, "status": "done", "round": "rework 2 (merge of origin/main after #36683)", "branch": "claude/issue-36261-change-owner-disabled-package", "pr": "https://github.com/objectstack-ai/objectstack/pull/36674", "head": "72b61d07b908f8b38037a387c23258ccfbc16df4", "head_is_final": true, "session": "session_011y7As5bdhV5T4N9vpjmZzH", "premise_still_valid": true, "summary": "Merged origin/main (bbc7e037, which carries #36683 ec545def) into the branch as merge commit 499e92ed, a merge and not a rebase. Exactly one hunk conflicted: packages/core/src/security/change-record-owner.test.ts, the fakeEngine docblock and signature. Main had a new readonlyWhen-lock docblock, a `locked` option and a `strictWrites` recorder; this branch had added a `disabledPackageObjects` option. Resolution: main's side was kept whole (docblock, `locked`, `strictWrites`), with `disabledPackageObjects?: string[]` added to its option type; the branch's registry predicate line in the double merged cleanly. Auto-merged with no conflict: change-record-owner.ts (main's writeOwner / answers-what-was-saved path and strictReadonlyWrites; the disabled-package check in offeredDefinition is unchanged and still sits before the switch, the target check and any update/emit), change-owner-routes.test.ts and content/docs/api/data-api.mdx (both 404 paragraphs present beside main's text). Follow-up commit 72b61d07, prompted by L1-a: #36683 typed ChangeOwnerMessaging.emit as Promise of ChangeOwnerEmitResult, and the four disabled-package pins mocked emit as `async () => ({})`, which is not that type and would read as a non-delivery. They now answer a delivered result (core: the file's SENT; rest: `{ delivered: 0, enqueued: 1 }`), so a regression that emitted would read notified true and the not-called assertion carries its weight. 72b61d07 is the final head.", "tests": "72b61d07: core change-record-owner.test.ts Tests 33 passed (33); rest change-owner-routes.test.ts Tests 21 passed (21); typecheck core+rest VERDICT command-exit 0, check:test-typecheck OK (core 4/4 pinned signatures held, rest 0). Ablation re-run on the merged tree: anchor 1->0, blob 9977f52cbc79->51cf08158bf9, Tests 3 failed | 30 passed (33) (single, bulk, before-switch), restored blob == HEAD and git diff HEAD empty.", "gates": "72b61d07: dispatch-gates --commands derived 119 commands, all run. 116 exited 0. check:vendor-version-stamps exited 1 on its first run, during the concurrent dogfood build, and exited 0 on rerun with 14357 files OK. check:type-check-debt first exited 3 (waiting on the verify lock) and exited 0 after the battery ('0 raw tsc error(s) total'). Two exited 3 and are NOT MEASURED locally (PREREQUISITE NOT MET in the fresh worktree): check:skill-examples (client SDK dist) and check:dual-build-cjs-loads (no dist for ~48 packages). CI on 72b61d07: 70 check-runs, 60 success and 10 skipped, 0 failed. Among them: TypeScript Type Check success (run 45296650978), Test UI success, Test Core success, Build Core success (run 45296651056), Lint & Repo Gates success.", "dogfood_battery": "72b61d07 · os-verify-lock: VERDICT command-exit 0 (held the lock 2494s) · Test Files 487 passed | 3 skipped (490) · Tests 4125 passed | 68 skipped (4193) · no failures. An earlier attempt at this head was killed by a container restart (log ends 01:15Z, no failures before the kill) and was rerun in full.", "mcp_calls": "0", "api_writes": "1 this round — this report comment via post-stamped relay (POST issues/36261/comments). Plus git push of 499e92ed and 72b61d07. The PR body is not rewritten this round.", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [], "deviations": "none beyond prior rounds", "files_changed": [ "packages/core/src/security/change-record-owner.test.ts", "packages/rest/src/change-owner-routes.test.ts", "merge commit 499e92ed (origin/main)" ] }Merge origin/main into claude/issue-36261-change-owner-disabled-package
objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH
os-dev-report
{ "issue": 36261, "status": "done", "round": "rework 3 (merge after #36525 + route (a) for the cascades read)", "branch": "claude/issue-36261-change-owner-disabled-package", "pr": "https://github.com/objectstack-ai/objectstack/pull/36674", "head": "de5633e6db040a00ed90084819ef7bd0cd50bb49", "head_is_final": true, "session": "session_011y7As5bdhV5T4N9vpjmZzH", "premise_still_valid": true, "summary": "Merged origin/main (76bff41f, which carries #36525) as merge commit d371d69c, a merge and not a rebase. Four conflicted hunks, all in tests, both sides kept: (1) core change-record-owner.test.ts fakeEngine: the branch's registry predicate line, plus main's getConfigs and count members; (2) the core test tail: the [#36261] describe, then main's [#35315 phase 2] cascade describe; (3) rest change-owner-routes.test.ts mockEngine: the branch's registry line, plus main's getConfigs/count/find/update over tableOf/matches (the branch's old find/update head was dropped for main's); (4) the rest test tail: the [#36261] describe, then main's cascade-leg describe. Auto-merged without conflict: change-record-owner.ts, data-api.mdx and the ledger. Cascade path confirmed: changeRecordOwner and changeRecordsOwner both call offeredDefinition (the disabled-package check) before cascadeRelationsOf, previousOwners, writeOwner and runCascade, so no parent or child row is read or written. Pinned in core (single + bulk naming a cascade: 404, zero engine calls, lead_task owners unchanged) and in rest (a single POST naming a cascade: 404, update not called, tasks unchanged). Route (a), the third door GET .../change-owner/cascades: it read getSchema and changeOwnerOffReason directly, so the core check did not reach it. change-owner-routes.ts now asks engine.registry.isObjectPackageDisabled after the object resolves and before the switch, and throws the same core objectPackageDisabledError. Pinned with a 404 when the package is disabled and a 200 listing lead_task when enabled. The changeset Clause-② reason, the adr-0087 marker text, the BREAKING FROM/TO, data-api.mdx (the cascades section) and the PR body (relay issue_patch, signed trailer, read-back identical 9970 bytes) now say all three doors.", "tests": "de5633e6: core change-record-owner.test.ts Tests 50 passed (50); rest change-owner-routes.test.ts Tests 27 passed (27); typecheck core+rest VERDICT command-exit 0, check:test-typecheck OK. Ablations at de5633e6, each restored to blob == HEAD with an empty git diff HEAD: core check line (anchor 1->0, blob b99e45768741->0475d485f594) gave Tests 4 failed | 46 passed (single, bulk, before-switch, cascade); cascades-read check line in change-owner-routes.ts (anchor 1->0, blob 9ec90802066d->239340840ad0) gave Tests 1 failed | 26 passed (the cascades read pin).", "gates": "de5633e6: dispatch-gates --commands derived 120 commands, all run. 117 exited 0. check:type-check-debt first exited 3 (blocked on the verify lock during the battery) and exited 0 on rerun after it ('0 raw tsc error(s) total'). Two are NOT MEASURED locally (exit 3, PREREQUISITE NOT MET in the fresh worktree): check:skill-examples (client SDK dist) and check:dual-build-cjs-loads (no dist for ~48 packages). CI on de5633e6: 74 check-runs, 62 success and 12 skipped, 0 failed: TypeScript Type Check, Test UI, Test Core, Build Core and Lint & Repo Gates all success. PR mergeable_state clean.", "dogfood_battery": "de5633e6 · os-verify-lock: VERDICT command-exit 0 (held the lock 2784s) · Test Files 487 passed | 3 skipped (490) · Tests 4126 passed | 68 skipped (4194) · no failures. An earlier attempt at this head was killed by a container restart (log ends 06:32Z, no failures before the kill) and was rerun in full.", "mcp_calls": "0", "api_writes": "2 this round — relay issue_patch on PR 36674 (body, read-back identical); this report comment via post-stamped (POST issues/36261/comments). Plus git push of d371d69c and de5633e6.", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [], "deviations": "The cascades-read door is fixed in change-owner-routes.ts by a route-side call of the same predicate and the same core constructor, not by a new core export (route (a), as directed by L1-a 7123613893).", "files_changed": [ "packages/rest/src/change-owner-routes.ts", "packages/core/src/security/change-record-owner.test.ts", "packages/rest/src/change-owner-routes.test.ts", ".changeset/36261-change-owner-disabled-package.md", "content/docs/api/data-api.mdx", "merge commit d371d69c (origin/main)" ] }github-actions commentedon Nov 26, 2026
os-closed-card-sweep — machine-findable marker for this generated comment.
Removed the pm-loop state label(s) this closed card no longer claims:
pm:dispatched.7c9b22b448, merged intomain.bug,priority:p2,domain:server,area:data— ownership, priority and outcome are not state claims.A state label claims work is in flight. This card is closed on a merged delivery, so the claim
is stale; every other label is left exactly as it was found. Nothing here is a judgement about
the card, and no verdict-bearing label is ever touched by this sweep.
posted by half-state-patrol run 45733194792 · trigger
workflow_dispatchGenerated by Claude Code