Repository navigation
feat(scenarios): score the seven capability tags the mid-tier cards declare and the closed tag table left unscored - #31098
Conversation
Claude-Session: https://claude.ai/code/session_012MmDsRzowAnXEmogPGSEKA Co-authored-by: Claude <noreply@anthropic.com>
…id-tier cards' tags Claude-Session: https://claude.ai/code/session_012MmDsRzowAnXEmogPGSEKA Co-authored-by: Claude <noreply@anthropic.com>
… vitest Claude-Session: https://claude.ai/code/session_012MmDsRzowAnXEmogPGSEKA Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 15 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 9 release-owned page(s) also name something this change touched. These are read-only:
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): 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 16d393e652a5af7c7005966a893c62420d9d03e2 && git checkout 16d393e652a5af7c7005966a893c62420d9d03e2
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 9c1edbcd20417a91f44162978518da27f61931c0 142d4d7b854ad4164531a9411825285e066c1d13 && git checkout -B drift-repro 9c1edbcd20417a91f44162978518da27f61931c0 && git merge --no-ff 142d4d7b854ad4164531a9411825285e066c1d13
node scripts/docs-audit/affected-docs.mjs --json 9c1edbcd20417a91f44162978518da27f61931c0
|
|
domain:devx#3 · os-lizheng · session_012MmDsRzowAnXEmogPGSEKA 席位核对 — ACCEPT · domain:devx#3 ·
|
|
domain:devx#3 · os-lizheng · session_012MmDsRzowAnXEmogPGSEKA CI red at A patch round has gone to the original dev on the same claim and branch: one |
…reference targets Claude-Session: https://claude.ai/code/session_012MmDsRzowAnXEmogPGSEKA Co-authored-by: Claude <noreply@anthropic.com>
|
domain:devx#3 · os-lizheng · session_012MmDsRzowAnXEmogPGSEKA 席位核对 — ACCEPT · domain:devx#3 ·
|
Fixes #30984
Clause-②: no
Metadata-protocol: none
维护者速读
unscored。@objectstack/scenarios的评分,不发布;新增声明依赖@objectstack/formula(本就在 full 评分入口的依赖闭包内);回滚即 revert 本 PR。packages/qa/scenarios/src/score/scenario-tags.ts(7 行新规则,风险最高的是rowSecurityGap与approvalSequence)、src/score/scenario-expressions.ts(「能编译」一律问平台自己的校验器)、test/score/scenario-tags.test.ts。pnpm --filter @objectstack/scenarios test,预期 23 个文件全绿;其中the library一组证明六张中阶卡上这 7 个标签都被评分(空 build 上为fail,不是unscored)。What changes
Seven rows join
CAPABILITY_TAG_CHECKS, one per tag the mid-tier cards declare and the closed table left unscored. Each row reads the built artifact through the platform's own schemas and helpers, and each carries the table's discrimination test: the rich build passes it, and one defect per stated reason fails exactly that tag. No area prefix is matched anywhere.records-forms.formula-fieldcomputed-field-exists; per computed fieldformula:OBJECT.FIELD->compilesvalidateExpression('value', …)atrecordscope over the object's declared and injected columns (resolveInjectedSystemColumns) and declared field types,traversalHydrationon: the validatoros buildruns on a formularecords-forms.validation-rulevalidation:OBJECT.RULE->compiles(condition, a conditional rule'swhen, nestedthen/otherwiserules);validation-rule-binds-expected-object(an active,severity: 'error'rule on an object the card names)validateExpression('predicate', …), same hintapprovals.multi-step-approvalmulti-step-approval-binds-expected-object: a flow bound to a card-named object the build carries, where a second Approval node follows the first on itsapprovebranchAPPROVAL_NODE_TYPE,APPROVAL_BRANCH_LABELS; the walk mirrors the engine'straverseNext(approve-labelled out-edges, or every out-edge when none is labelled; neverfault)approvals.dynamic-approver-routingapprover:FLOW.NODE[i]->routes;dynamic-approver-binds-expected-objectAPPROVER_VALUE_BINDINGSsourcestrigger-field/auto/expressionare record-routed; afield(or amanager's subject: itsvaluefield, elseowner_id, as plugin-approvals resolves it) must hold a user (referenceTargetOf, injected columns viainjectedSystemColumnDefs); anexpressionmust parse overAPPROVER_EXPRESSION_ROOTS(collectCelRootIdentifiers)access-security.row-level-securityrow-level-security:OBJECT->enforced, for every persona that scopes iteffectiveSharingModel);controlled_by_parentonly when its master (controlledByParentMasterOf) is itself kept so for that persona; or a read policy on the persona's set. Every applicable read policy must lower to a filter (isSupportedRlsExpression)dashboards.reportreport:NAME->resolves(its dataset exists and declares every selected measure and dimension; a joined report per block);report-binds-expected-object(a report's datasetobjectis card-named)ReportSchemadataset/values/rows/columns/blocks,DatasetSchemaobject/measures/dimensions(ADR-0021)ai.agent-actionsgradeAgentActionsruns forrun.agentActions(exists,ai.exposed,ai.requiresConfirmationwhereconfirm)Where measurement sharpened the card's suggested checks (the suggestions were not rulings):
expressionon a non-formulafield is computed and stored "so asummarycan roll the column up"; aformulafield is virtual. The mid-tier cards sum computed line amounts in roll-ups, so a faithful build writes the stored kind, and atype: 'formula'-only check would fail it.record.FIELDcolumn existence and the one-hop traversal rule. The build's further site rules over the same source (null guards, type soundness under the site's fault outcome, a hop into a field the target lacks,label()over an optionless field) are not re-run;scenario-expressions.tsnames that gap in its header.severity: 'error'rule; a rule with no predicate (state machine, format, JSON schema) counts toward the binding and has nothing to compile.access-security.rls-both-sides) is an OWD-private object, so a private route is RLS in this platform's vocabulary. What the row adds over row-scope is enforcement: a read policy whoseusingdoes not lower matches no row (the spec's ownusingdescription), and a scoped detail whose master the persona reads in full keeps nothing to it. Both are pinned as cases where row-scope passes and this row fails.manager. plugin-approvals resolves it from the record (record[value] ?? record.owner_id), so it is read off the request; every directory or catalog binding (user, position, team, department, queue, membership tier) is the same slate for every request and does not count.reportitem. A report binds a dataset, never an object, so the binding is judged through the dataset'sobject. A dashboard widget is the sibling tagdashboards.widget-measures.Outside the claim's named surface, each the minimum the change needs:
packages/qa/scenarios/package.jsonandpnpm-lock.yaml(+3 lines):@objectstack/formuladeclared, because the expression verdicts are its functions. It was already in the./score/fullruntime graph (objectql and plugin-sharing depend on it); the narrow./scoreentry does not reach it (test/build/narrow-score-graph.test.tsstays green).packages/qa/scenarios/vitest.config.ts: one anchored alias so the tests judge the formula source in this checkout (pnpm check:test-source-aliaswent red without it).packages/qa/scenarios/README.md: the closed-table section lists the seven rows (a different hunk from the tier lines feat(scenarios): a scenario card carries a tier (control | starter | delivery); starter and delivery cards meet the gallery floor #31091 landed).No changeset:
@objectstack/scenariosisprivate: trueand nothing in this diff ships from a released package, so the PR carriesskip-changeset.Tests
test/score/scenario-tags.test.ts:formulafield, a script validation rule, a two-step approval (afieldapprover over auserfield, then a position), a dataset dimension and a report.passes every row of the tablenow covers all 16 rows at score 1.TAG_DEGRADATIONSadds 19 one-defect cases for the seven rows;ALSO_FAILSnames the five defects that break a second row by construction (the approval flow's three binding defects take the steps and the routed approver along; a public scoped object fails both row tags).formulafield with no expression fails; a conditional rule's nested predicate is judged; a state machine binds with nothing to compile; a decision between steps is followed, an unlabelled approve edge is walked as the engine walks it, alternative branches are not steps;managerwith and without avalue,expressionovercurrentpasses and overrecordor unparseable fails, seven fixed approver kinds count nothing; RLS fails where row-scope passes (a non-lowering policy, on a public and a private object; a scoped detail whose master is read in full); a joined report draws per block; a report with no dataset fails; the agent-actions tag carries exactly the agent-action checks.the library: loadsdocs/qa/scenarios/through the loader; each of the seven has a row and is declared by a card; on every card that declares one, an empty build grades itfail, neverunscored.Package suite and typecheck at 37d8ec1
Ablations (one per tested behaviour, via scripts/ablation-replace.mjs; tests import src, so no build leg)
rowSecurityGap: the non-lowering policy refusal disabledgit diff HEADemptyapprovalSequence: the approve-label filter dropped (every out-edge walked)recordExpressionRefusal: the column list removed from the hintapproverRouteRefusal: the holds-a-user test forced truemanagerover a non-user fieldThe first attempt at the second mutation was refused by the tool (the replacement text already occurred inside the anchor, so the count could not prove the write); it ran nothing and was redone with a distinct replacement.
Acceptance notes
ai.agent-actionscounts the agent-action checks under the tag as well, asdashboards.widget-measuresalready counts the measure checksexpectruns; a card carrying the tag weighs a missing action twice in the Build total.dashboards.reportask for "a report of …" whileexpect.dashboardsnames that report as a dashboard the build prompt never names, andleave_balancestags the same wordingdashboards.widget-measures.os buildwrote cannot carry one that does not (rls-predicate-unenforceablerefuses it).Verification
All at head
37d8ec1c(origin/mainb6315733merged, #31091 included; whole tree rebuilt first: turbo 119/119, 73 cached).node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands: 62 commands derived; all 62 run, each exit code captured before any pipe: 62 exit 0.--ranwith the recorded codes: "62 derived, 62 run, 0 NOT-MEASURED, 0 UNRUN" (a derived zero).pnpm check:test-source-aliaswas red on the first run (@objectstack/formularesolved todist/in the tests); fixed by the alias invitest.config.ts, green at this head.pnpm check:dual-build-cjs-loadsanswered PREREQUISITE NOT MET before the whole-tree build; at this head: 116 require entry points across 71 packages load.!in the title, Clause-② no).The 62 derived commands, each with its exit code
Generated by Claude Code