Repository navigation
fix(objectql): platformSystemApi on the api ObjectRepository.execute hands the dispatched action keeps the 'action' mark - #35733
Conversation
…hands the dispatched action keeps the 'action' mark (failing first) Claude-Session: https://claude.ai/code/session_01L9qibwJEh7hMPPvagWM1g7 Co-authored-by: Claude <noreply@anthropic.com>
…hands the dispatched action keeps the 'action' mark Claude-Session: https://claude.ai/code/session_01L9qibwJEh7hMPPvagWM1g7 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibwJEh7hMPPvagWM1g7 Co-authored-by: Claude <noreply@anthropic.com>
…ecute-keeps-action-mark
📓 Docs Drift CheckThis PR changes 1 package(s): 5 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not see
Coarse fallback — 21 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 1bc97c873d5a93302843661ec408d7f651fc335c && git checkout 1bc97c873d5a93302843661ec408d7f651fc335c
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 03bce5c22a473cca2ca03eb85d0ca489783d610d 0a28c2810934861aaadc66e469e2af4295c216dd && git checkout -B drift-repro 03bce5c22a473cca2ca03eb85d0ca489783d610d && git merge --no-ff 0a28c2810934861aaadc66e469e2af4295c216dd
node scripts/docs-audit/affected-docs.mjs --json 03bce5c22a473cca2ca03eb85d0ca489783d610d
|
…he execute path as not covered Claude-Session: https://claude.ai/code/session_01L9qibwJEh7hMPPvagWM1g7 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · os-tesla · session_01L9qibwJEh7hMPPvagWM1g7 Check Changeset red at The only error is the DELIBERATE CORRECTION class on Generated by Claude Code |
|
repo:objectstack#7 · os-tesla · session_01L9qibyQBB3KuDoNobNq9LH 席位核对L1: ACCEPT (L1-a, for area d7-B) at head Checklist (
Point (2): L2. None of the four contract faces is touched (no Owed before the L2 and before landing: a PR-body correction. |
|
repo:objectstack#7 · os-tesla · session_01L9qibwJEh7hMPPvagWM1g7 Contract reviewServed-tier: Read: card #35434 (body and all 5 comments), the PR body and its 7-file list, the net diff against merge base ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentSecurity. The change enforces a refusal the page already documents; it decides no new boundary. Row 1b on Paths that must stay allowed, each read in the code:
Flag leak: the set grows only at those two sites, and Attempts to break it:
Findings: S1 (should-fix) — S2 (should-fix) — N1 (nit) — the integration test pins the direct, No must-fix. Implemented-by: VERDICT: PASS |
…mApi enumerations; the changeset bullet stands alone Claude-Session: https://claude.ai/code/session_01L9qibwJEh7hMPPvagWM1g7 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · os-tesla · session_01L9qibwJEh7hMPPvagWM1g7 Contract reviewServed-tier: Delta record. It follows record 7030697220 on ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentEach changed sentence, against the code at this head:
Findings: S1: closed No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#7 · os-tesla · session_01L9qibyQBB3KuDoNobNq9LH 席位核对L1 delta: ACCEPT on content (L1-a, for area d7-B) at head Delta: one commit (
Contract review. The delta L2 by the same reviewer covers S1 and S2 at this head, and it is still the record that confirms the DELIBERATE CORRECTION ( |
|
repo:objectstack#7 · os-tesla · session_01L9qibwJEh7hMPPvagWM1g7 Landing · 2026-11-20T05:18Z · head
State: |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 44680251229 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
repo:objectstack#7 · os-tesla · session_01L9qibwJEh7hMPPvagWM1g7 Queue-failure triage · 2026-11-20T05:47Z Failed build 44680251229 (base |
Requested by Tesla · project thread
Fixes #35434
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
Route B of the card (an origin flag set by
executeand copied byderive, held in a facet module, never inengine.ts).packages/objectql/src/engine-object-repository.ts: a module-localWeakSetkeyed byScopedContextinstance, the dispatched action's origin flag, withmarkDispatchedActionApi/isDispatchedActionApi.ObjectRepositoryFacet.executeflags the api it hands the dispatched action. Neither helper is re-exported from either package entry.packages/objectql/src/engine-scoped-context.ts:derivecopies the flag to the child (sosudo(),withRunAs(...), a transaction's context, the seeds' andplatformSystemApi's results keep it);platformSystemApi's facet body answers a flagged api with that api's ownsudo(), as it already does for an app-authored api. Mark andflowRunIdare kept.packages/objectql/src/platform-system-api.tsheader and row 1b ofcontent/docs/permissions/system-context.mdx: the "not covered" clause is dropped, nothing else in that prose.engine.tsis not touched, so thecheck:facade-delegation-onlyceiling (ruling 6897467376) is unchanged. No published signature changes:ObjectRepository's constructor is exported from both entries, so route A (threading the calling api into it) would have changed a published signature; it would also not have kept the mark on the reach path, because runtime's action-door layer passes repositories through unchanged and objectql only ever sees the innerScopedContext, which carries neither flag.buildHookApi, a freshScopedContext, never derived from a flagged api) is unchanged:platformSystemApistill takes the mark off there.Tests
New
packages/runtime/src/execute-dispatched-action-platform-system-api-35434.integration.test.ts(realObjectQL, SQL driver, realSecurityPlugin):buildActionApi, an action handler chaining another) and from a bare engine api: an insert into each of the four identity-assignment objects throughplatformSystemApi(ctx.api),platformSystemApi(ctx.api.sudo())andplatformSystemApi(trx)is refusedPERMISSION_DENIED/ 403 naming an action body, and nothing lands; the handler's ownsudo()as a control;Red before the fix, green after, two ablations
Tests 9 failed | 2 passed (11), each failureinsert on OBJECT through direct was not refused(OBJECT per case) and the owner stampowner_id: null. Premise held.Test Files 2 passed (2) · Tests 21 passed (21)(this file plusaction-door-platform-system-api.integration.test.ts).executestops flagging (api: new ScopedContext(executionContext, this.engine),):ablation-replacelanded (anchor 1 -> 0), objectql rebuilt,ablation-dist-preflightmarker present in 4 built files;Tests 9 failed | 2 passed (11). Restore: blob == HEAD,git diff HEADempty, rebuilt,--absentclean,Tests 11 passed (11).derivestops copying the flag: landed, present in 4 built files;Tests 8 failed | 3 passed (11)(thesudo()and transaction routes red, the direct route and controls green). Restore: blob == HEAD,--absentclean,Tests 11 passed (11).Package suites
pnpm --filter @objectstack/objectql testat 532c6f3:Test Files 616 passed (616) · Tests 13907 passed (13907).pnpm --filter @objectstack/objectql typecheckandpnpm --filter @objectstack/runtime typecheck: exit 0;check:test-typecheck: OKon both.Acceptance notes
engine-scoped-context.ts"only if route A needs it". Route B needs it too:deriveand theplatformSystemApifacet body live there. fix(objectql): a committed or rolled-back trio handle reads as closed #35541, the open PR that touched it at claim time, has since merged;overlap-checkanswered clean..changeset/35174-action-api-platform-system-api-mark.md(unreleased) said theexecutepath is not covered. It is edited here as a seat amendment (its "Not covered" bullet is dropped); see DELIBERATE CORRECTION below.engine-object-repository.ts).Verification
Read first, by risk:
packages/objectql/src/engine-scoped-context.ts(derive,platformSystemApi), thenengine-object-repository.ts(execute).Two-minute check:
pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/execute-dispatched-action-platform-system-api-35434.integration.test.tsafter building objectql, expectTests 11 passed (11).Generated by Claude Code
DELIBERATE CORRECTION
DELIBERATE CORRECTION:
.changeset/35174-action-api-platform-system-api-mark.md(pending, from #35174 / PR #35383) drops one bullet, which this PR makes false:After: the bullet is removed; no other sentence of that note changed. This PR closes that path. The
check-empty-changesetred is by design for this class; the seat confirms the correction by its same-head at-tier contract-review record (landing-operations.md), not by a maintainer wait.