Skip to content

Commit 121bdd3

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-tmgp4d
2 parents 27b663c + 4d56914 commit 121bdd3

2 files changed

Lines changed: 52 additions & 3 deletions

File tree

‎docs/qa/platform-checklist/areas/studio-authoring.json‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3664,7 +3664,7 @@
36643664
"title": "App and menu-entry keys reach the running app: branding, areas and context selectors render; an entry's viewName, recordId / recordMode, filters, badge, requiresObject and visible each change what the entry does or who sees it; hidden takes an app off the switcher and nothing else — and Studio's menu-entry inspector edits them",
36653665
"since": "v18",
36663666
"status": "active",
3667-
"revision": 7,
3667+
"revision": 8,
36683668
"priority": "P2",
36693669
"surface": "mixed",
36703670
"personas": [
@@ -3684,7 +3684,7 @@
36843684
},
36853685
"steps": [
36863686
"write the app through PUT /api/v1/meta/app/APP?mode=draft&package=PKG: branding { primaryColor, accentColor, logo } (a runner-environment note: give logo a same-origin URL such as /_console/vite.svg, which the console build ships from ui/apps/console/public; an external logo URL is blocked by the runner container's egress proxy and never renders), two areas each holding some entries, a contextSelector, and menu entries: an object entry with viewName (the second list view), one with recordId + recordMode 'edit', one with filters, one with badge + badgeVariant, one with requiresObject naming an object that does not exist, and one with a visible predicate false for the member (e.g. 'org_owner' in current_user.positions: the seeded admin holds org_owner, not org_admin, because an organization's owner membership maps to org_owner alone, packages/spec/src/identity/eval-user.zod.ts, so an 'org_admin' predicate is false for both personas and proves nothing). Make this app the package's FIRST app (steps[4]); publish",
3687-
"as admin and as the member (each in its own context, identity proved with GET /api/v1/auth/get-session), open the app (a fresh organization first shows the 'Set the default currency' prompt over the page; dismiss it with 'Not now', RUNNER environment facts) and read the chrome colours and logo, the areas switcher, the context selector, and click each entry",
3687+
"as admin and as the member (each in its own context, identity proved with GET /api/v1/auth/get-session), open the app (no dialog opens over it: a fresh organization's first-run checklist is a non-modal card on Home only, RUNNER environment facts) and read the chrome colours and logo, the areas switcher, the context selector, and click each entry",
36883688
"GET /api/v1/meta/app?id=APP as each persona and list the entries each receives",
36893689
"set hidden: true on a second app of the package (through the API) and publish; as the member read the App Switcher, the Home launcher, the avatar menu and GET /api/v1/meta/app?id=SECOND; open its URL directly",
36903690
"open the app in /_console/studio/PKG/interfaces, select each entry and read its inspector. Studio's Interfaces pillar opens only the package's FIRST app (the first app the package lists, else its first app draft) and draws only that app's top-level `navigation`: an entry that lives only inside `areas` has no rail row (ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx, the Interfaces pillar's app load). So the app steps[0] writes must be the package's first, and its top-level navigation must hold at least one entry carrying each key acceptance[5] names; the area entries' runtime effect is read in acceptance[0]–[3], not here"
@@ -3784,6 +3784,12 @@
37843784
"date": "2026-11-04",
37853785
"change": "steps[1] and acceptance[5].verify corrected from QA run #29893 (W5-STUDIO, at 589049b0): a fresh organization's first visit shows the default-currency prompt, and the Studio View picker writes the qualified OBJECT.KEY view name, not the bare key steps[0] writes. Read at base f68b47ca",
37863786
"ref": "#29906"
3787+
},
3788+
{
3789+
"revision": 8,
3790+
"date": "2026-11-06",
3791+
"change": "steps[1] no longer tells the runner to dismiss the 'Set the default currency' prompt: PR #30868 (#30206) retired that boot-time dialog for a non-modal first-run checklist card on Home, which does not cover the app (RUNNER environment facts). No clause changed. Read at base 0e882086",
3792+
"ref": "#30876"
37873793
}
37883794
]
37893795
},

‎packages/formula/src/expression-refusal-codes.test.ts‎

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* red at the type check, and a code nobody pinned goes red here.
2121
*/
2222

23+
import { inspect } from 'node:util';
2324
import { describe, expect, it } from 'vitest';
2425
import { celEngine, collectCelRootIdentifiers, type CelRootIdentifiersResult } from './cel-engine';
2526
import { templateEngine } from './template-engine';
@@ -855,6 +856,40 @@ function expectLocatorsRead(said: { code: string; params: unknown; source: strin
855856
}
856857
}
857858

859+
/**
860+
* A refusal's identity in the sweep: the whole refusal, which is its `code`,
861+
* `params`, `message` and `source` (`refusal()` in `validate.ts` builds exactly
862+
* those four). `inspect` and not `JSON.stringify`, because JSON writes an
863+
* `undefined` param as absent and `NaN` as `null`, and two refusals that differ
864+
* only there must still be judged apart.
865+
*/
866+
function refusalKey(said: ExprValidationError): string {
867+
return inspect(said, { depth: Infinity, breakLength: Infinity, maxArrayLength: Infinity, maxStringLength: Infinity });
868+
}
869+
870+
/**
871+
* The validateExpression sweep's budget. The case is synchronous: 5,760
872+
* validateExpression calls (3 roles x 128 inputs x 15 schemas), most of the
873+
* time in building a typed CEL environment for each call. Its work is the
874+
* sweep's breadth, which is the claim, so the breadth stays; only re-judging
875+
* duplicate refusals was cut (see the case). Readings of the case, in ms:
876+
*
877+
* - CI, `main` push run 42192379976, job `Test Core (4/8)` (127808107135), a
878+
* contended shard: 5034, `Test timed out in 5000ms.` A synchronous body
879+
* runs to its end before vitest judges it, so 5034 is the whole run.
880+
* The six other `Test Core` jobs sampled from the same three days: 429
881+
* to 3065.
882+
* - Local, 4 vCPU, this file alone: 757 to 830 before the cut, 534 to 645
883+
* after it. Pinned to one CPU shared with two busy loops: 2542 to 3063
884+
* before, 1961 to 2137 after.
885+
*
886+
* The rule follows `packages/cli/test/hook-timeout-override-refusal.test.ts`:
887+
* 3x the slowest reading, rounded up to the next second. 3 x 5034 = 15102, so
888+
* the budget is 16000. If the sweep's inputs or schemas grow, re-measure and
889+
* re-size.
890+
*/
891+
const VALIDATE_SWEEP_BUDGET_MS = 16_000;
892+
858893
describe('expression refusal codes — the closed set', () => {
859894
it('has a pin for every code, and no pin for a code outside the set', () => {
860895
expect(Object.keys(PINS).sort()).toEqual([...EXPRESSION_REFUSAL_CODES].sort());
@@ -869,13 +904,21 @@ describe('expression refusal codes — the closed set', () => {
869904

870905
it('every refusal validateExpression reports on the sweep carries a code from its set, with params the message interpolates', () => {
871906
const provoked = new Set<string>();
907+
const judged = new Set<string>();
872908
let refusals = 0;
873909
for (const role of ['predicate', 'value', 'template'] as const) {
874910
for (const input of SWEEP_INPUTS) {
875911
for (const schema of SWEEP_SCHEMAS) {
876912
const r = validateExpression(role, input, schema);
877913
for (const said of [...r.errors, ...r.warnings]) {
878914
refusals++;
915+
// At 98f640d581 the sweep's 3,865 refusals are 199 distinct
916+
// ones, and every assertion below reads only the refusal itself
917+
// — so one that equals a refusal already judged gets that verdict
918+
// again, and is judged once.
919+
const key = refusalKey(said);
920+
if (judged.has(key)) continue;
921+
judged.add(key);
879922
expect(VALIDATE_CODES.has(said.code), `${said.code} from ${JSON.stringify(input)}`).toBe(true);
880923
expect(typeof said.params).toBe('object');
881924
expect(said.params).not.toBeNull();
@@ -890,7 +933,7 @@ describe('expression refusal codes — the closed set', () => {
890933
// producer owns, so a code whose arm stopped being reachable shows up too.
891934
expect(refusals).toBeGreaterThan(100);
892935
expect([...provoked].sort()).toEqual([...VALIDATE_CODES].sort());
893-
});
936+
}, VALIDATE_SWEEP_BUDGET_MS);
894937

895938
it('every refusal collectCelRootIdentifiers reports on the sweep carries a code from its set', () => {
896939
const provoked = new Set<string>();

0 commit comments

Comments
 (0)