Repository navigation
test(dogfood): re-point the runAs and anonymous-guest flow pins to flow start admission's record rule - #29451
Merged
Merged
Conversation
…ow start admission's record rule A start input the definition reads as a record id is judged as the caller, for every runAs, before the run exists (#29365). The runAs proofs now hand the flows rows that rule admits (a note the member may read but not write; a row the definition fixes by a literal), and the refusal is pinned as 404 RECORD_NOT_FOUND with no run recorded and nothing disclosed. Claude-Session: https://claude.ai/code/session_01ADHkmSoKQWHgd1oZe8j7Pu Co-authored-by: Claude <noreply@anthropic.com>
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
Contributor
Author
|
domain:server#5 · os-steve · session_01ADHkmQKwKFCp1m6Pb6Q8c1 维护者速读
席位意见:四例都属于规则有意改变的预期,测量结果与本席判断一致。提权证明改用调用者可读的输入后保留,拒收断言的是完整拒收。 席位核对ACCEPT ·
|
This was referenced Nov 2, 2026
fix(types)!: DashboardComponentSchema refuses a duplicate globalFilters key, as the spec does
#29507
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Steve · project thread
Fixes #29426
维护者速读
packages/qa/dogfood/test/fixtures/flow-runas-fixture.ts(新增只读策略与"定义自选行"的读流程)、packages/qa/dogfood/test/flow-runas.dogfood.test.ts(拒收断言与读写提权证明)、packages/qa/dogfood/test/declarative-endpoint-anonymous-guest.dogfood.test.ts。cd packages/qa/dogfood && pnpm exec vitest run test/flow-runas.dogfood.test.ts test/declarative-endpoint-anonymous-guest.dogfood.test.ts,预期 17/17 通过。What changes
The rule these pins now follow: a start input the definition reads as a record id is judged as the caller, for every runAs, before the run exists (#29365). Four dogfood cases asserted the behaviour that rule deliberately replaced. They are re-pointed, and the proofs they carried are kept with inputs the rule admits.
flow-runas-fixture.ts(shared withflow-runas-schedule.dogfood.test.ts, which is unaffected):runas_note_shared_read) makes an admin note whosestatusissharedreadable to the member. No write policy admits it, so the member still cannot write it.runas_system_read_sealed,runas_user_read_sealedandrunas_system_read_sealed_via_parent. Their definition fixes the row with a literalnamefilter and takes no start input.viaParentgains an option to hand no input.flow-runas.dogfood.test.ts:runAs: 'system'child writes it. TherunAs: 'user'run fails on its node with400 FLOW_FAILED. Because the member can read the row, the node's refusal is now the record layer's access refusal:update_record(runas_note) failedwithdetails.innerRefusal.codePERMISSION_DENIED. It used to be the read door's not-found.runAs: 'system'child (through the user-mode parent'ssubflow) or to therunAs: 'user'flow gets this full answer:404 RECORD_NOT_FOUNDin the ADR-0112 envelope;data, and no field of the note in the body (the id in the message is the caller's own input);declarative-endpoint-anonymous-guest.dogfood.test.ts:runAs: 'user'refusal answers, as before.404 RECORD_NOT_FOUNDbefore the run exists. The executor is never called, the seeded row's name is not in the body, every engine call the door's load made carries the guest context (principalKind: 'guest',isSystem: false), and the driver is never reached.Forced test edits (each one named):
memberTriggerExpectingAccessRefusal's message assertion (not-found → access refusal plusinnerRefusal.code); the rows the four elevation and de-elevation legs use; the guest flow pin's start params ({ noteId }→{}).Tests
All on head
b237bdc7b(origin/mainf95d0dbadmerged in), with the dogfood closure rebuilt (turbo run build --filter='./packages/**', 78/78), underscripts/pm/os-verify-lock.sh:cd packages/qa/dogfood && pnpm exec vitest run test/flow-runas.dogfood.test.ts test/declarative-endpoint-anonymous-guest.dogfood.test.tsgives 17/17 passed. On maind93acbbebefore this change it gave 4 failed and 8 passed.runAs(grep -l "/automation/\|runAs" packages/qa/dogfood/test/*.test.ts, 42 files, includingflow-runas-schedule, which shares the fixture) gives Test Files 42/42, Tests 428/428 passed.pnpm --filter @objectstack/dogfood typecheckexits 0. Root eslint--no-inline-configon the three files exits 0.Ablations (one per negative pin family; each leg mutated through scripts/ablation-replace.mjs, rebuilt, proved in dist/ by scripts/ablation-dist-preflight.mjs, restored and proved absent)
refuseUnreadableFlowStartRecordsreturns at once,@objectstack/runtime): 3 failed | 14 passed. Red: both member refusal cases and the guest refusal case. Restored:git diff HEADempty, marker absent from dist.resolveRunDataContexttreatsrunAs: 'user'assystem,@objectstack/service-automation): 2 failed | 15 passed. Red: the user-mode write leg (no longer400 FLOW_FAILED) and the user-mode sealed read (returned the row). Restored the same way.Acceptance notes
subflow, and the guest is judged like any other caller.skip-changeset: the diff only touchespackages/qa/dogfood/test/**(private package, publishes nothing).Clause-②:/Metadata-protocol:lines, so none are written here.Verification
--ranreconciliation, are in the os-dev-report on main red: Dogfood Regression Gate fails on main since #29365 (dfbe34d8) — flow-runas and declarative-endpoint-anonymous-guest dogfood files #29426.mainonly. These files are proven by the local runs above, and the firstmainpush after merge confirms them.Generated by Claude Code