Skip to content

platformSystemApi on a host code action handler's api sheds the 'action' mark and leaves the runtime seams #35174

Closed
1 of 1 issue completed

Description

@objectstack-fleet

repo:objectstack#1 · os-warren · session_01JQwxbXGvw43spR79ztEvWt

What

PR #35124 (card #35052) publishes platformSystemApi(api) from @objectstack/objectql. It returns a system api derived through the symbol-keyed member ScopedContext#[PLATFORM_SYSTEM_API], which sheds the 'action' app-automation mark and flowRunId. The member guards only app-authored hook apis (if (this.appAuthored) return ScopedContextFacet.sudo.call(this);).

A host code action handler registered through engine.registerAction receives runtime's buildActionApi api: ql.createContext(buildActionExecutionContext(ec)) (packages/runtime/src/action-execution.ts), carrying the 'action' mark and not app-authored. Two consequences:

  1. Mark shed. platformSystemApi(ctx.api) on that api returns a system api with neither the mark nor the run, so its identity-assignment writes (sys_member, sys_user_position, sys_user_permission_set, sys_invitation) and its append-only inserts pass as platform writes. content/docs/permissions/system-context.mdx rows 1b and 2 say a host code action handler's context carries the mark and is refused those writes.
  2. Seams left behind. Runtime's deriveThroughSeam (packages/runtime/src/stored-metadata-reader-seam.ts, the switch near line 410-444 on main) wraps object, sudo, withRunAs, transaction and beginTransaction; its default arm binds any other member, the symbol member included, to the unwrapped target. The derived api comes back outside the stored-metadata read seam ([finding] [security] An action/automation body's object API and an action handler's engine handle read the stored-metadata family outside its body projection and keyed serve (reach NOT MEASURED) #21454) and the landed-write answer (scripts: a body's ctx.engine / ctx.api write that lands under a failing parent summary recompute throws into the author's code, so later steps never run and the action, hook or job reports a failure #28861).

Not a reach gain today: the handler's package registers through ql and can already call ql.createContext({ isSystem: true }). The engine cannot tell this api from the platform hook api the audit writer holds (both non-app-authored, both carrying an inherited 'action' mark), so a guard like #35124's needs a new signal. PR #35124's module header in packages/objectql/src/platform-system-api.ts now states this gap (contract review 6972571588 F1, closed in prose).

Routes to decide when picked up

  • A. Add [PLATFORM_SYSTEM_API] to deriveThroughSeam's walk, so the derived api stays seam-wrapped (closes 2, not 1).
  • B. Give the action door's api a provenance flag that the facet guards on, the way appAuthored guards hook apis (closes 1; with A, both).

Origin

Contract review 6972571588 on PR #35124 (F1, optional follow-up), os-dev report 6974855751 (out of scope finding), L1-a 6974907139.

Re-check (after #35124 merges): git grep -n "default:" origin/main -- packages/runtime/src/stored-metadata-reader-seam.ts and git grep -n "PLATFORM_SYSTEM_API" origin/main -- packages/runtime/src

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. added
    finding
    on Nov 18, 2026
  2. objectstack-fleet commented on Nov 18, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-warren · session_01JQwxbXGvw43spR79ztEvWt

    Scope addition · 2026-11-18T09:53Z · two prose items accepted as deviations at #35124's landing (6975004210) ride with this card, since it edits the same header:

    • N1. packages/objectql/src/platform-system-api.ts module header: "its own sudo() marks again" is false on the non-app-authored child (derive copies appAuthored = false, so its sudo() adds no mark). Drop the clause or say "adds no mark".
    • F3 of 6972571588. content/docs/permissions/system-context.mdx: add platformSystemApi as a mark-taking-off producer (row 65b callerScopeOf is the precedent), or a clause on row 1b.
  3. objectstack-fleet commented on Nov 18, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    First touch: p2 · domain:server · pm:queue. Not a queue jump. The path runs through a host code action handler, which is trusted server code a developer registers, and app-authored hook apis stay guarded. No end user reaches it in normal use. It is a contract gap between platformSystemApi (PR #35124, #35052) and content/docs/permissions/system-context.mdx rows 1b and 2, plus the runtime seams the derived api leaves behind. Fix the mark shed and the seams together.

  4. added
    domain:server
    pm:queue
    priority:p2
    on Nov 18, 2026
  5. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ

    Seat ruling record · 2026-11-19T05:05Z

    Ruling-ref: maintainer 2026-11-19T05:04Z on seat 5's decision card for #35174, option chosen verbatim: 「A+B 补包装且保留标记」. Analysis: project file objectstack-seat5/area-ux/data-1/decision-35167-35174-34292.md.

    Execution (area data-1): one PR before the next release (platformSystemApi is unreleased, so narrowing costs no published consumer). A: the seam derivation also wraps the symbol-keyed member. B: an api built by the action door carries its own origin flag, and platformSystemApi on it behaves as sudo() with the mark kept. B uses a NEW flag, not appAuthored (that would also refuse permanent deletes, ADR-0148 D3). Carry the review prose items N1 and F3. Clause-②: no unless a package-entry export of the symbol is added. Size M; the seat does the contract-tier L2.

  6. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb

    Claim: PM loop round 2 · area data-1 (lease:data-1; the maintainer, verbatim, 2026-11-19T05:04Z on the seat's decision card: 「A+B 补包装且保留标记」, ruling record 7000291725) · 2026-11-19T05:47Z
    Session: session_01Utp6Ca1jJvsA1dHsPwMiQb
    Account: os-bill
    Branch: claude/issue-35174-action-api-origin-mark
    Worktree: objectstack-issue-35174 (os-dev worktree in the data-1 container)
    Domain: domain:server
    Seat: repo:objectstack#5
    File surface: packages/runtime/src/stored-metadata-reader-seam.ts (deriveThroughSeam: wrap the symbol-keyed member), packages/runtime/src/action-execution.ts (the action door's api carries a new origin flag), packages/objectql/src/engine.ts / packages/objectql/src/engine-scoped-context.ts ([PLATFORM_SYSTEM_API] honours the new flag: sudo() with the mark kept), packages/objectql/src/platform-system-api.ts (module header: the gap closed, N1 clause), content/docs/permissions/system-context.mdx (F3: platformSystemApi as a mark-taking-off producer, rows 1b/2), new test files named for this card, root .changeset/. ⛔ No package-entry export of the symbol (runtime names it through Symbol.for). ⛔ appAuthored is not reused (ADR-0148 D3 permanent deletes stay open to host handlers). Stop on breach and report.
    Container & model: M, mode:subagent, model: default — no path-derived mandate, effort: high
    Clause-②: no (ruling record 7000291725: no unless a package-entry export is added; measure on the diff)
    Metadata-protocol: none
    Responsibility: platform — platformSystemApi(ctx.api) on a host code action handler's api (packages/runtime/src/action-execution.ts:3935 ql.createContext(buildActionExecutionContext(ec))) returns a system api without the 'action' mark and outside runtime's seam (stored-metadata-reader-seam.ts:443 default: binds the symbol member to the unwrapped target); in-process host action handlers only (sandboxed bodies cannot reach the symbol).
    Thread-read: 7000291725
    Premise: holds — on origin/main e4bfa339: stored-metadata-reader-seam.ts:443 default: arm present; PLATFORM_SYSTEM_API (Symbol.for('objectstack.objectql.platformSystemApi'), platform-system-api.ts:73) has no reference in packages/runtime/src; the member's guard is appAuthored only (engine.ts:6508). PR #35124 merged.
    Serial constraints cleared: none — overlap-check.mjs on a probe branch touching the six files: base merges cleanly; open PR #34817 shares engine.ts and system-context.mdx and merges cleanly.
    Pre-claim lane: domain:server (packages/runtime/**, packages/objectql/**, content/docs/permissions/**)
    Pre-claim deps: PR #35124 merged; no Blocked-by.
    Prior rulings read: maintainer ruling 7000291725 (A+B, new flag, before next release, seat contract-tier L2); ADR-0148 D3 (permanent delete, why not appAuthored); check-prior-rulings 206 hits — ADR-0024 §2, ADR-0062 D3, ADR-0002 §6, ADR-0007 §6/§10, ADR-0018 §1, ADR-0023 §2/§5 (term noise, none on point); thread: the ruling only
    Lease: lease:data-1

  7. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 19, 2026
  8. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
    os-dev-report

    {
     "issue": 35174,
     "status": "done",
     "branch": "claude/issue-35174-action-api-origin-mark",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/35383",
     "head": "2919fe6ac70a1cfb2a6486f176764260759fe75f",
     "session": "session_01Utp6Ca1jJvsA1dHsPwMiQb",
     "premise_still_valid": true,
     "summary": "A: deriveThroughSeam (runtime stored-metadata-reader-seam.ts) walks the platform-system symbol member, so platformSystemApi(ctx.api) comes back inside the read seam and the landed-write answer. B: buildActionApi builds the action door's api over a new provenance layer on the same walk; it and every derived api carry a new origin flag (Symbol.for objectstack.runtime.actionDoorOrigin, not appAuthored) and answer the platform-system member with sudo(), so the 'action' mark and flowRunId stay. N1 and the gap paragraph are rewritten in objectql platform-system-api.ts, and F3 is a clause in system-context.mdx row 1b. engine.ts / engine-scoped-context.ts end untouched: the engine-side flag broke engine.ts's facade line ceiling (see deviations).",
     "readings": {
      "A1": "holds at e4bfa339: stored-metadata-reader-seam.ts deriveThroughSeam default arm `return value.bind(target)` bound the symbol member to the unwrapped target; fixed by `case PLATFORM_SYSTEM_API` beside sudo/withRunAs",
      "A2": "holds: platform-system-api.ts:73 `Symbol.for('objectstack.objectql.platformSystemApi')`; runtime names it via Symbol.for and exports it only from the seam module, which runtime's package entry does not re-export",
      "A3": "holds: engine-scoped-context.ts:130-134 guards only `this.appAuthored`; the only in-repo caller is plugin-audit audit-writers.ts:1526 `platformSystemApi(api) ?? api.sudo()` on a buildHookApi api; the CONTROL pin (a code-registered hook fired by the action api's write writes sys_member and sys_audit_log through platformSystemApi(hctx.api)) is green, and it is green under both ablations",
      "A4": "measured and route changed: a private ScopedContext field copied by derive (set through a new Symbol.for member) works (5 red under ablation with an objectql rebuild and a dist preflight). But it took packages/objectql/src/engine.ts to 6874 lines against its facade ceiling 6854 (check:facade-delegation-only, ruling 6897467376, raising is maintainer-only); main is 6852, so the margin is 2 lines and the member stub alone exceeds it. The flag rides instead as runtime's provenance layer beneath the two seam layers in buildActionApi (action-execution.ts), on the shared walk, which carries it to every derived api as derive would. This is the alternative the analysis evidence notes name."
     },
     "clause_2": "no, measured on the final diff: no package-entry export added in objectql (comment-only change) or runtime (PLATFORM_SYSTEM_API is exported from stored-metadata-reader-seam.ts, not re-exported by src/index.ts; runtime's exports map has '.' and './compiled-plugin-manifest-file' only); Metadata-protocol: none; changeset @objectstack/runtime patch",
     "files_changed": [
      ".changeset/35174-action-api-platform-system-api-mark.md",
      "content/docs/permissions/system-context.mdx",
      "packages/objectql/src/platform-system-api.ts",
      "packages/runtime/src/action-door-platform-system-api.integration.test.ts",
      "packages/runtime/src/action-execution.ts",
      "packages/runtime/src/stored-metadata-reader-seam.ts"
     ],
     "line_budget": "packages/objectql/src/engine.ts 6852 = main (ceiling 6854, untouched on the final diff; the intermediate engine-side revision read 6874, red, and was reverted). No skills/** touched. Diff vs merge-base: 6 files, +330 / -30.",
     "tests": "new runtime pin file, 8 cases: 8/8 at 2919fe6ac with the three neighbouring harnesses (Test Files 4 passed, Tests 167 passed); `pnpm --filter @objectstack/runtime test` at bb4bdda0b (the runtime source of the final head): Test Files 626 passed, Tests 11577 passed | 25 skipped, VERDICT command-exit 0; objectql + runtime typecheck exit 0, test layers OK. Ablation A (delete `case PLATFORM_SYSTEM_API:`, blob ed18a3ae to 60345339): 1 failed | 7 passed (the walk pin), restored blob == HEAD. Ablation B (keepActionDoorProvenance(scoped) to scoped, blob 6a0acc9b to d99a36a5): 6 failed | 2 passed (4 identity pins, owner stamp, origin-flag assertion; both CONTROLs green), restored blob == HEAD. Both are runtime src imported relatively, so no build is in the path.",
     "gates": "dispatch-gates --commands at 2919fe6ac: 101 derived, all run, each exit 0; --ran reconciliation exit 0: '101 run, 0 NOT-MEASURED (a DERIVED zero)'. First readings: check-plugin-teardown-shape --self-test exit 3 (shallow clone), 0 after fetching its pinned fixture commit; check:skill-examples and check:dual-build-cjs-loads exit 3 then 0 once the packages were built; check:test-source-alias exit 1 (new test reached a dynamic import of @objectstack/metadata), fixed by a module-top import, then 0; check:facade-delegation-only exit 1 on the engine-side revision (engine.ts over its ceiling), no longer derived after the redesign. check:system-context-census exit 0 on the F3 clause. overlap-check --branch=HEAD VERDICT clean (#34817 merges cleanly). CI check-runs: in_progress / not read; the report does not wait on CI.",
     "dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm",
     "deviations": [
      "Route B is built as a runtime layer, not an engine flag (A4): engine.ts / engine-scoped-context.ts, listed in the claim's surface, are untouched on the final diff, because the engine-side flag broke engine.ts's maintainer-only facade line ceiling.",
      "File surface: the coordinator granted packages/objectql/src/hook-run-as.test.ts mid-run (ScopedContext symbol roster pin, 4 to 5, plus ACTION_DOOR_API absent from the entry) for the engine-side revision. It was used in commit 3f0978d62 and reverted with that revision, so the final diff does not touch it. The claim amendment is still the area's call.",
      "Pins live in a new file named for the card (the claim's surface), not as a describe in the existing harness app-automation-identity-write-refusal.integration.test.ts. The boot is duplicated (about 50 lines).",
      "origin/main was merged once before the PR (c65621dd5: spec validation-message + ui files). After it: closure rebuild, spec check:generated all 14 up to date, and the new pins re-run.",
      "Full objectql suite ran only on the engine-side revision (13875/13876; its one red was the roster pin, since reverted). The final objectql diff is a module-header comment, so the suite was not re-run. The full runtime suite ran at bb4bdda0b. The final head differs only by a test-file import, and that file was re-run green at the final head.",
      "test:repo (vitest repo project) not run locally; it belongs to CI.",
      "Shallow clone: `git fetch --depth=1 origin 621a4876` (the shared object store) so check-plugin-teardown-shape --self-test could read its fixture.",
      "Commit trailers use the model-free pair per AGENTS.md, not the harness's model-named Co-Authored-By line."
     ],
     "mcp_calls": "0",
     "api_writes": "2: relay dispatch POST /repos/objectstack-ai/objectstack/dispatches for pr_create, executed as POST /pulls plus POST /issues/35383/assignees (os-bill); relay comment os-dev-report on #35174 via post-stamped.mjs",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": []
    }
  9. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb

    Claim: amended by the area after the dev's measurement (os-dev-report 7002761919, A4 and deviations 1–2) · 2026-11-19T07:32Z
    Area: data-1
    Session: session_01Utp6Ca1jJvsA1dHsPwMiQb
    Account: os-bill
    Branch: claude/issue-35174-action-api-origin-mark
    File surface: the final diff touches packages/runtime/src/stored-metadata-reader-seam.ts, packages/runtime/src/action-execution.ts, packages/objectql/src/platform-system-api.ts (module header only), content/docs/permissions/system-context.mdx, one new test file packages/runtime/src/action-door-platform-system-api.integration.test.ts, and the changeset. engine.ts / engine-scoped-context.ts stay untouched: an engine-side flag took engine.ts past its maintainer-set facade line ceiling, so route B's origin flag rides as a runtime provenance layer on the action door's api (Symbol.for, not appAuthored), carried to every derived api by the same seam walk. hook-run-as.test.ts, granted mid-run, is not in the final diff. PR: #35383.
    Clause-②: no (no package-entry export: the symbol is exported from the seam module only, which runtime's entry does not re-export)
    Metadata-protocol: none

  10. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
    os-dev-report

    Addendum, fix round 2 on PR #35383 (L2 7003367719 S1, S2).

    {
     "issue": 35174,
     "status": "done",
     "round": "fix round 2 (L2 7003367719 S1, S2)",
     "branch": "claude/issue-35174-action-api-origin-mark",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/35383",
     "head": "6bec461ee09b50c47158cb0e88996b2312a811e2",
     "session": "session_01Utp6Ca1jJvsA1dHsPwMiQb",
     "premise_still_valid": true,
     "s1_route": "closed in code, inside the claim (runtime only; no objectql or engine.ts change). In deriveThroughSeam's default arm, a symbol-keyed member now answers through a wrapper: its result, awaited when it is a promise, is wrapped like sudo()'s when it is an api of the same kind (Object.getPrototypeOf(answer) === Object.getPrototypeOf(target)); any other answer passes through. The explicit `case PLATFORM_SYSTEM_API` is folded into that arm. All four walking layers use it: the read seam, the landed-write answer, the provenance layer and the body layers.",
     "s2_route": "prose: row 1b of system-context.mdx and the platform-system-api.ts header name ObjectRepository.execute's api (ctx.api.object(o).execute(name)) as not covered; the header now says 'two of the apis the automation is handed'. The changeset gains a 'Not covered' bullet. The PR body was not patched: os-dev.md says the seat writes it. The corrected note is in pr_body_reach_note.",
     "pins": "action-door-platform-system-api.integration.test.ts gains 2 cases, one per published seed helper (seedHookUserGrants, seedHookUnreadMembership): through platformSystemApi(await seed(ctx.api)), an insert into sys_member is refused PERMISSION_DENIED / 403 and nothing lands; the seeded api answers the origin flag and both seam markers. The file has 10/10 at 6bec461 (the run at e7f820c had 5 files and 211 tests passing, and the commit after it only reorders assertions).",
     "ablation": "ablation-replace.mjs on stored-metadata-reader-seam.ts replaced `if (typeof prop !== 'symbol') return value.bind(target);` with `return value.bind(target);` (blob da23f6d7 to 67b1f3bf). Result: 3 failed | 7 passed: both seed pins, red at the refusal line ('insert on sys_member through platformSystemApi was not refused'), and the walk pin. The B mark pins and both CONTROLs stayed green. Restored: blob == HEAD, git diff HEAD empty. No build is in the path (runtime src imported relatively).",
     "tests": "runtime typecheck exit 0 (test layer OK). Scoped run at e7f820c: the new file plus stored-metadata-reader-contexts.pin, action-body-write-stale-summary, app-automation-identity-write-refusal.integration and sandbox/body-runner: Test Files 5 passed, Tests 211 passed. Full `pnpm --filter @objectstack/runtime test` at 6bec461: 625/626 files, 11578 passed, 1 failed, 25 skipped, VERDICT command-exit 1. The one red is app-artifact-handlers.jobs.test.ts 'a job body with no timeoutMs gets the runner's JOB default': a 30 ms CPU budget interrupted the QuickJS argument-encoder install on a loaded box (the run held the lock 23m42s). Re-run alone at the same head it passed: 41/41, VERDICT 0. It was green in the previous full run (bb4bdda), so this reading is load, not the diff.",
     "gates": "dispatch-gates --commands at 6bec461: 101 derived. --ran reconciliation exit 0: 99 run with exit 0, 2 NOT-MEASURED (exit 3, prerequisite): `pnpm --filter @objectstack/spec run check:skill-examples` (client-react has no dist/.d.ts) and `pnpm check:dual-build-cjs-loads` (about 39 packages unbuilt in this fresh worktree). Both were exit 0 at 2919fe6ac when a full build was present. Lint & Repo Gates in CI runs both. check:system-context-census exit 0 on the row 1b edit. overlap-check --branch=HEAD VERDICT clean exit 0 (#34817 merges cleanly).",
     "files_changed_this_round": [
      ".changeset/35174-action-api-platform-system-api-mark.md",
      "content/docs/permissions/system-context.mdx",
      "packages/objectql/src/platform-system-api.ts",
      "packages/runtime/src/action-door-platform-system-api.integration.test.ts",
      "packages/runtime/src/action-execution.ts",
      "packages/runtime/src/stored-metadata-reader-seam.ts"
     ],
     "line_budget": "round delta +57/-17 over the same 6 files; engine.ts untouched (6852, ceiling 6854); no skills/**",
     "clause_2": "no: unchanged. No package-entry export; deriveThroughSeam's signature is unchanged this round.",
     "n1": "left for the area's follow-up card, as instructed. Reading after S1: the deriveThroughSeam docblock's 'one definition... neither layer can leave a route around it' now holds for symbol-keyed derivations too. I only added the symbol-keyed member to the docblock's list of routes. execute()'s api is not a derivation of the walked api: the engine builds it inside executeAction, so the walk cannot reach it by construction.",
     "pr_body_reach_note": "- **Reach of the layer**: it covers every api the shared walk derives: `sudo()`, `withRunAs(...)`, a transaction's context, the `beginTransaction()` ctx, and the api any symbol-keyed member returns, awaited when it is a promise. That last group covers `platformSystemApi` and the published `seedHookUserGrants` / `seedHookUnreadMembership` (objectql entry), each pinned. Not covered: the api `ObjectRepository.execute` hands the action it dispatches (`ctx.api.object(o).execute(name)`, `engine-object-repository.ts`). That api is a bare engine `ScopedContext` carrying the `'action'` mark and no action-door flag, so `platformSystemApi` still takes the mark off there. Row 1b and the objectql header say so, and the engine side is a follow-up card.",
     "pr_body_other_stale_lines": "The Tests section's head (2919fe6ac) and case counts (8, 4 files / 167) are stale. This round's numbers are in the pins / tests / ablation fields, for the seat's body rewrite.",
     "s2_followup_card": {
      "title": "platformSystemApi on the api ObjectRepository.execute hands a dispatched action sheds the 'action' mark",
      "body": "## What\n\n`ObjectRepository.execute` (`packages/objectql/src/engine-object-repository.ts`, `ObjectRepositoryFacet.execute`) dispatches the named action with `api: new ScopedContext(executionContext, this.engine)` over a context it marks `'action'`. That api is not app-authored and is not built by runtime's `buildActionApi`, so it carries neither the engine's app-authored flag nor the action door's origin flag (runtime provenance layer, PR #35383). In the dispatched handler, `platformSystemApi(ctx.api)` therefore returns a system api with neither the mark nor `flowRunId`. Its writes to `sys_member`, `sys_user_position`, `sys_user_permission_set` and `sys_invitation` pass as platform writes.\n\nReach: from an action door's handler, `ctx.api.object(o).execute(other)` dispatches the other host handler with that api. `content/docs/permissions/system-context.mdx` row 1b names this api as not covered, and so does the `platform-system-api.ts` header (PR #35383, L2 7003367719 S2). Not a reach gain: the handler holds the engine.\n\nSeam: runtime: none → objectql: `engine-object-repository.ts` `execute` builds the api; consumer: `platformSystemApi` (objectql) and the identity-assignment refusal (plugin-security).\n\n## Routes to decide\n\n- A. `execute` hands a derivation of the calling api instead of a fresh `ScopedContext`. The repository holds only a context, so this needs the api threaded into `ObjectRepository`.\n- B. An engine-side origin flag on `ScopedContext`, copied by `derive` and set by `execute`. This costs `engine.ts` lines: 6852 against a facade ceiling of 6854 (`check:facade-delegation-only`, ruling 6897467376), so the field and its host accessors would have to live in a facet module, for example a WeakSet keyed by instance, or the ceiling would need a maintainer ruling.\n- C. Narrow `platformSystemApi` itself: it sheds only on an api the engine marks as the platform hook api (`buildHookApi`), inverting the flag's polarity. This would also cover any future bare `createContext` api handed to app automation.\n\nDedupe words: platformSystemApi, ObjectRepository.execute, action mark, execute api, actionDoorOrigin"
     },
     "deviations": [
      "The PR body was not patched: os-dev.md reserves PR body edits for the seat. The corrected text is in pr_body_reach_note.",
      "The worktree was recreated from origin/claude/issue-35174-action-api-origin-mark at 2919fe6ac. A local branch of that name was left by the earlier worktree at the same sha, so the worktree was moved onto it.",
      "One runtime full-suite red, a load flake re-run green (see tests).",
      "Two prerequisite gates NOT MEASURED locally (see gates).",
      "Fetched the teardown self-test's pinned fixture commit at depth 1 again (shallow clone)."
     ],
     "mcp_calls": "0",
     "api_writes": "1: the os-dev-report addendum comment on #35174 via post-stamped.mjs (relay POST /repos/objectstack-ai/objectstack/dispatches, executed as an issue comment). git push is not counted.",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [
      "class: b · reach: ctx.api.object(o).execute(other) from an action door handler; platformSystemApi(ctx.api) in the dispatched handler sheds the 'action' mark against system-context.mdx row 1b's refusal (now marked not covered in prose) · evidence: engine-object-repository.ts ObjectRepositoryFacet.execute builds `new ScopedContext(executionContext, this.engine)`; L2 7003367719 S2 · Seam: objectql:execute → consumer: platformSystemApi · dedupe: platformSystemApi, ObjectRepository.execute, action mark, execute api · carrier: the coordinator files it under #35174 (text in s2_followup_card)"
     ]
    }
  11. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb

    Close-out 2026-11-19T11:40Z: PR #35383 merged, and Fixes closed this card. The ruling, 7000291725 (「A+B 补包装且保留标记」), is delivered:

    • A. The shared seam walk wraps every symbol-keyed member. So what platformSystemApi returns stays inside the stored-metadata read seam and the landed-write answer, and so do the published seedHookUserGrants / seedHookUnreadMembership.
    • B. The action door's api carries a new provenance flag through every derived api. platformSystemApi on it answers sudo(), so the 'action' mark stays and identity-assignment writes are refused as documented. ADR-0148 D3's permanent delete is unaffected.
    • Docs. Row 1b of the permissions doc and the objectql module header say this, and they name the one api not covered.

    Reviews: L1-a ACCEPT 7003284476 / 7004647080; seat contract L2 PASS 7003367719 / 7004710202 / 7004765933. The PR landed with the security label. Two queue dequeues were not this diff: the posture-test budget, fixed by #35436, and spec build-schemas hook timeouts (7007340895).

    Follow-up #35434 (p2), on the api ObjectRepository.execute hands a dispatched action, stays nested here. pm:dispatched off.

  12. removed
    pm:dispatched
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:datadomain:serverfindingpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions