Skip to content

feat(spec): a navigation entry may declare one API data source, which its visible reads as data - #24427

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-24332-nav-item-api-data-source
Oct 19, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-24332-nav-item-api-data-source

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Part of #24332 (the visible half of shape 1 lands here; the label and record-target halves stay open on the card as two forks, below).

Clause-②: yes (widening)

What this does

A navigation entry may declare ONE API data source, the page element's ElementApiDataSourceSchema BY REFERENCE (packages/spec/src/ui/page.zod.ts), and its visible reads the bound value as data:

{ id: 'nav_environments', type: 'object', objectName: 'sys_environment',
  dataSource: { provider: 'api', read: { url: '/api/v1/cloud/home' }, path: 'data.environments' },
  visible: 'data.total == 1' }
  • packages/spec/src/ui/app.zod.ts: BaseNavItemSchema gains dataSource: ElementApiDataSourceSchema.optional(), so the nine branches that spread the base carry it (object, dashboard, page, url, report, action, component, doc, group). A separator spreads nothing and refuses it with its own prescription (the key joins SEPARATOR_NAV_ITEM_GUIDANCE). The visible describe now says an entry with a dataSource reads it as data, and an entry without one has no data.
  • The describe opens with [PLANNED — not yet rendered] and claims no reader. Only visible reads data: the describe says label and the target keys (recordId, filters, params) take no data read, and a group's binding is not published to its children.
  • packages/spec/liveness/app.json: row navigation.children.dataSource, graded planned, authorWarn: true with an authorHint, and drilled provider / read.url / read.method / path. check:liveness refuses an undeclared container inheritance, so the four child keys are drilled. The carrier is the objectui renderer half, which the seat files when this lands. The precedent for planned + authorWarn in this same file is navigation.runAction before objectui#5216.
  • Generated by their generators only: authorable-surface/ui.json (+9 rows, one per branch), content/docs/references/ui/app.mdx, liveness/state-counts/app.md.
  • .changeset/24332-nav-item-api-data-source.md: @objectstack/spec minor.

The premise, measured before building (ruling item 2)

Hypothesis Reading
H1: no import cycle Holds. page.zod.ts's transitive import closure is 52 files and does not contain app.zod.ts. Nothing moved.
H2: the data root objectui at the .objectui-sha pin 0707b4ae37 and at main 749ed76 gives the same reading. objectui: packages/react/src/SchemaRenderer.tsx reads a node's API binding (useElementApiDataSource) and puts the answer in that node's evaluation scope as data (pin :1157/:1231, main :1174/:1248). That one ExpressionEvaluator serves the node's ${…} text holes, inline locale-map members included (objectui#12936), and its visibleWhen (CEL envelope via evaluateCondition). The binding is RENDERED at the pin, so the spec's [PLANNED] text on ElementApiDataSourceSchema and the "no data root" text on visibleWhen are stale. That is #24300's surface, held off here.
H3a: visible Holds. objectui: packages/app-shell/src/hooks/useNavMemberGates.ts evaluates a nav visible through evaluateNavigationVisibility with the same ExpressionEvaluator.evaluateCondition, so a per-entry data in scope is the same dialect and the same root name. Built.
H3b: label The dialect holds (${…} in a string or an inline-map member), but the label has a layer a page element does not: translateApp (packages/spec/src/system/i18n-resolver.ts) REPLACES a present label with the bundle entry keyed by the entry id, and walkNavigation in packages/cli/src/utils/i18n-extract.ts seeds every present label into the bundle as a translatable literal. The ruled row's own entry (nav_environments) has a zh-CN bundle entry, so a data label there would show the static noun in zh-CN. How a data-bearing label meets translation is a contract decision. Not built, see open question 1.
H3c: recordId Fails. objectui: packages/layout/src/NavigationRenderer.tsx resolveHref substitutes recordId through applyNavTemplate, whose vocabulary is {current_user_id}, {current_org_id} and a context selector's own {id} (single brace, no dots). A ${data.id} there is taken as written. Reading data would add a second template dialect to the field, or a second spelling of a data read. Not built, see open question 2.
H4: which types Every branch that spreads the base. objectui's item guard (passesNavItemGuards) evaluates visible on every type, group included, so a group can honour its own binding.

Tests (all at 98e3434b0e, the PR head, unless noted)

  • New packages/spec/src/ui/app-nav-item-api-data-source.test.ts: 19 tests. Every branch parses with the binding and a data.* visible; the app door accepts it on a top-level entry and on a group's child; and the bare binding parses. Five refusals are each compared with the page element binding's own issues for the same value (code + path, not prose): unknown key, off-origin read.url (3 shapes), credential key, POST, object binding. A separator refuses the key. The describe marker and the planned liveness row are pinned.
  • Ablation, once (the diff adds the accept behaviour these tests pin): node scripts/ablation-replace.mjs renamed the key to dataSourceAblated, with anchor x1 → x0 and blob 791b2943 → c37dfcd0. Result: 17 failed / 2 passed (the separator refusal and the ledger row stay green, as they should). Restored, blob == HEAD, git diff HEAD empty. The tests import ./app.zod from source, so no dist leg applies.
  • pnpm --filter @objectstack/spec test: 697 files, 21270 passed (at 82e723d6e5; the merge after it brought no packages/spec change). typecheck passed, and check:test-typecheck OK.
  • pnpm --filter @objectstack/spec check:generated: all 14 artifacts up to date after a rebuild at 98e3434b0e.
  • Consumers (the accept set widens downstream; filter direction: these packages consume @objectstack/spec):
    • @objectstack/lint full suite: 145 files, 6864 passed. It includes validate-nav-*, validate-translation-references and lint-liveness-properties.
    • @objectstack/metadata-protocol full suite: 246 files passed (3 skipped), 20655 tests.
    • @objectstack/cli unit tier, NARROWED: the full unit tier ran past a 540 s bound (exit 124, NOT MEASURED, and declared to CI). The run covered nav-contribution-groups* and 23 test/i18n-* files: 25 files, 298 passed.
  • A liveness lint probe on an app with the key on a top-level entry and on a group child returns one liveness-planned-property finding. The lint fans out over the top-level entries only, as the ledger README states.

Gates

The derived list is node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack on this diff: 111 families, plus check:dev-prereqs (local-only, touches the spec build). All 112 were run locally on 98e3434b0e, and --ran reconciles 111 of 111. Every one exits 0 except:

  • pnpm check:platform-checklist: exit 1, red on origin/main as well. The finding is areas/access-security.json: ABSENT SYMBOL packages/core/src/security/resolve-authz-context.ts#legacyGrantAnchorRetired. This diff touches neither file. On origin/main 71fa166e96, legacyGrant has 0 hits in that file, against a control of export with 13 hits. Reported to the seat.

Six families first answered exit 3 (PREREQUISITE NOT MET: no lint / client / objectql dist). After the consumer closure build (turbo, 62 tasks, all cache hits), all six re-ran with exit 0: check:doc-formula-expressions, check:doc-security-posture, check:skill-examples, check:docs-transcript-drift, check:lean-entry-closure, check:dual-build-cjs-loads.

Open questions for the seat (also in the report on #24332)

  1. Label fork: a data-bearing label and the bundle rung that replaces a present label by entry id.
  2. Target fork: recordId has its own {…} template dialect.
  3. The narrowing arm, not shipped: refusing data.* in a visible on an entry with no dataSource. It would be BREAKING and need an ADR-0087 disposition. Measured reach: 0 data. reads among the nav visible predicates in this repo's 38 navigation-declaring files. The control is the same files' current_user predicates, e.g. packages/spec/src/conversions/registry.ts:2091.
  4. Refusal wording: the reused binding's refusals name a page element ("read.url of a page element's api data source …") on the navigation door too. That text is page.zod.ts's, a hold-off for this card.

Acceptance notes

  • objectui's own nav mirror (objectui: packages/types/src/zod/app.zod.ts, NavigationItemObject) is a non-strict z.object and strips dataSource. This is renderer-half work for the carrier card.
  • Whether an unbound data.* read in a nav visible FAULTS (and so withholds the entry under evaluateNavigationVisibility) or reads undefined is NOT MEASURED: objectui is not installed in this container. The authorHint says only that there is no value to read.

Generated by Claude Code

…y its visible (shape 1)

The page element's ElementApiDataSourceSchema by reference on the shared
nav base; visible reads the bound value as data. Planned, not yet rendered:
liveness row navigation.children.dataSource graded planned with authorWarn.

Claude-Session: https://claude.ai/code/session_01WnW7HvfnfHbLg1fpkHX3Mu
Co-authored-by: Claude <noreply@anthropic.com>
…ss counts; drill the planned dataSource row

Claude-Session: https://claude.ai/code/session_01WnW7HvfnfHbLg1fpkHX3Mu
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/spec, touching 8 documentable anchor(s). ⚠️ 3 changed file(s) yielded no anchor (packages/spec/authorable-surface/ui.json, packages/spec/liveness/app.json, packages/spec/liveness/state-counts/app.md), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

25 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json e22defb13c171900e2c1c54d1d15c24ed85fe91b.

⛔ 9 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 3 changed file(s) yielded no anchor (packages/spec/authorable-surface/ui.json, packages/spec/liveness/app.json, packages/spec/liveness/state-counts/app.md) — pages documenting those are invisible to this run
  • 1 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 54 of 206 client-bound route-ledger rows — the other 152 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 152: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 97 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 143 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json e22defb13c171900e2c1c54d1d15c24ed85fe91b → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 0943caac806d8462842557cca41a2eeb7df43b96 — the merge of head 98e3434b0e2300491bd6acc474e48b8962a1efb6 into base e22defb13c171900e2c1c54d1d15c24ed85fe91b, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 0943caac806d8462842557cca41a2eeb7df43b96 && git checkout 0943caac806d8462842557cca41a2eeb7df43b96
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin e22defb13c171900e2c1c54d1d15c24ed85fe91b 98e3434b0e2300491bd6acc474e48b8962a1efb6 && git checkout -B drift-repro e22defb13c171900e2c1c54d1d15c24ed85fe91b && git merge --no-ff 98e3434b0e2300491bd6acc474e48b8962a1efb6

node scripts/docs-audit/affected-docs.mjs --json e22defb13c171900e2c1c54d1d15c24ed85fe91b

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs e22defb13c171900e2c1c54d1d15c24ed85fe91b → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 98e3434b0e2300491bd6acc474e48b8962a1efb6
Local-runs: none
Scope: packages/spec/src/ui/app.zod.ts + packages/spec/src/ui/page.zod.ts, packages/spec/src/shared/expression.zod.ts, packages/spec/src/system/i18n-resolver.ts, packages/cli/src/utils/i18n-extract.ts, packages/spec/liveness/app.json, packages/spec/liveness/README.md, packages/lint/src/lint-liveness-properties.ts, packages/spec/scripts/build-api-surface.ts, packages/formula/src/cel-engine.ts, packages/spec/src/ui/app-nav-item-api-data-source.test.ts, .changeset/24332-nav-item-api-data-source.md; objectui at the .objectui-sha pin 0707b4ae37: packages/app-shell/src/hooks/useNavMemberGates.ts, packages/app-shell/src/providers/ExpressionProvider.tsx, packages/layout/src/NavigationRenderer.tsx, packages/react/src/SchemaRenderer.tsx, packages/types/src/zod/app.zod.ts, packages/core/src/evaluator/ExpressionEvaluator.ts, packages/core/src/evaluator/fieldRules.ts. The remainder (content/docs/references/ui/app.mdx, authorable-surface/ui.json, liveness/state-counts/app.md) is generator output read for consistency and is the lane seat's ACCEPT at TIER_DEFAULT.

Inputs: card #24332 body and its four comments (triage 6250784407, regrade 6255770189, claim 6257260075, os-dev-report 6258349182); PR #24427 body, file list (7 files) and the diff against main; the 41 check-runs on the head, all completed, 36 success and 5 skipped, none failed. Governed-surface predicate on the file list: 0 of 7 paths hit the register. Head repo is the base repo, not a fork.

① Derived judgments

  1. Accept-set widening, one optional key on the shared nav base — right. BaseNavItemSchema gains dataSource: ElementApiDataSourceSchema.optional(); the head spreads ...BaseNavItemSchema.shape at nine sites (object, dashboard, page, url, report, action, component, doc, group), and authorable-surface/ui.json grows exactly nine NavItem:dataSource rows. Every app that parsed before parses unchanged; nothing narrows.
  2. By reference, not restated — right. The nav door's accept set and refusals are page.zod.ts's own: read.url same-origin regex, method literal GET, the credential-key guidance (headers, token, …), no write, the object binding { object } refused at the dataSource path, unknown keys refused. The test compares each refusal with ElementApiDataSourceSchema.safeParse on the same value by code + path, which is the right pin for "one binding". page.zod.ts does not import app.zod.ts and none of its import set reaches an app.zod importer (api/metadata.zod, kernel/manifest.zod, kernel/metadata-type-schemas); the head's Type Check and Test Core runs exercise that graph.
  3. Separator refuses the key with its own prescription — right. SeparatorNavItemSchema is strictObject(navItemSurface('separator'), …) and navItemSurface folds SEPARATOR_NAV_ITEM_GUIDANCE in; adding dataSource to that list keeps the separator's prescription complete.
  4. visible reads the bound value as data, one dialect — right. EvaluatedExpressionInputSchema turns a bare string into { dialect: 'cel', source }; at the pin, useNavMemberGates hands evaluateNavigationVisibility(expr, evaluator) to the item guard and that calls the same ExpressionEvaluator.evaluateCondition a page element's visibleWhen uses, so a per-entry data root is the same spelling and the same root name as SchemaRenderer's { ...ambientScope, data: apiData }. The premise H3a holds as written.
  5. Declared narrower than any enforcement, marked PLANNED — right. The describe opens with [PLANNED — not yet rendered], the ledger row is planned, and the changeset says no console reads the key. At the pin passesNavItemGuards calls evaluateVisibility(item.visible) with no per-entry scope, and objectui's NavigationItemObject is a plain z.object that strips dataSource. Prime Directive 10 is met: the claim is as narrow as the enforcement.
  6. label and the target keys do not read data — right, and correctly not built. translateApp replaces a present label with apps.APP.navigation.ID.label whenever the bundle has one (rung 1, by entry id), and walkNavigation seeds every present label as a literal; applyNavTemplate's TEMPLATE_VAR_RE is single-brace {name} with no dots. Both forks are real and the describe says so, so no dialect is declared that the runtime cannot honour.
  7. Group carries its own binding, not published to children — right. passesNavItemGuards evaluates visible on every type, group included; the describe says each child declares its own.
  8. Liveness row shape — right. planned + authorWarn: true + authorHint is the README's legal way to make a planned row warn (liveness-planned-property); evidenceScope: cross-repo names the realm and pins both commits as the README requires; the four children are drilled because an undrilled container must be declared (README, "Undrilled containers must be DECLARED") and check:liveness recurses to MAX_DRILL_DEPTH 8. The lint flattens one children level, so the note's "top-level entries only" is a true description of the warning's reach.
  9. Public type surface — right, no missing artifact. NavigationItem / NavigationItemInput gain an optional dataSource on each branch; api-surface/*.json lists export names and api-surface-signatures.json hashes defineX signatures by typeToString, neither of which an added optional property moves, so no api-surface file belongs in the diff. The generated app.mdx carries the nine dataSource rows, their provider / read / path sub-tables and the 45 re-rendered visible rows, consistent with the generator.
  10. No ADR governs the surface. docs/adr names no navigation data root; ADR-0068 rules the current_user object only, which the new data root leaves alone. The card's shape choice is the seat's four-axis call in the claim, not a reversal of a recorded decision.

② Semver level

@objectstack/spec minor is right: one optional key on nine published branches, no removal, no rename, no narrowing. Clause-②: yes (widening) on the PR body and in the changeset agree with the diff's direction, and yes takes at least minor, which it does. The changeset body states what changed, the refusals, what does not read the key, and that it is planned. Check Changeset and Spec property liveness are green on the head.

③ Boundary flags

Dev deviations (os-dev-report 6258349182):

  1. Part of #24332, not a closing keyword — right; the label and target halves stay open on the card. Part-of PR must not also close its card is green.
  2. authorWarn + authorHint beyond the dispatch's planned — accepted. The README's rule table makes this the only way a planned row warns, and the warning has a measured consequence (next section, item 3). The runAction precedent could not be read in this checkout's 7-commit ledger history; the README is sufficient authority.
  3. Four drilled children — required, not optional: an undrilled container fails check:liveness.
  4. dataSource in SEPARATOR_NAV_ITEM_GUIDANCE — right (① item 3).
  5. @objectstack/cli unit tier narrowed locally — the head's Test Core shards (6 of 6) are green, which is the verdict.
  6. Local battery interrupted and resumed — the check-runs on the head are the gate verdicts; nothing turns on the local run.
  7. origin/main moved after the branch; not re-merged — right per the after-PR merge rule; the merge-base diff is what was reviewed.
  8. Commit trailers model-free, PR footer in the session-URL form — repo rule; accepted.

Open questions (also on the card):

  1. Label fork — escalated to the seat, not decided here. Option C (a declared path key, label stays the translatable fallback) is the one that keeps translateApp's rung-1 meaning and has no silent-override trap, but it is a second data-read spelling beside the CEL root, which the seat's own premise excluded. This record does not widen the spec; the seat rules on the card, with the maintainer where the startup-scope axis bites.
  2. Target fork — escalated with the same reasoning; option D (two entries, complementary visible gates, an app page that finds its own record) is the no-new-key route and should be put to the maintainer beside C.
  3. Narrowing arm (a data.* read on an entry without dataSource) — not shipped, correctly: it is BREAKING and needs an ADR-0087 disposition. Reading that answers its option C: packages/formula/src/cel-engine.ts faults on an undeclared top-level identifier, evalFieldPredicate turns every not-ok verdict into the fallback, and evaluateNavigationVisibility re-runs under throwOnError, where differing fallbacks throw and the entry is withheld. So at the pin an entry authored with a data.* gate and no data in scope is hidden, not shown, provided the shell's ambient scope carries no data key (not read here). Escalated to the seat as the carrier card's first item: whether parse-time refusal (A) lands with the renderer half (B) or as its own BREAKING PR.
  4. Refusal and describe wording names a page element on the nav door — option A (neutral wording in page.zod.ts) is right and belongs with spec page.zod.ts: ElementApiDataSourceSchema still describes itself as "[PLANNED — not yet rendered]" and visibleWhen says no renderer reads the binding, but the console renders both (objectui#12197) #24300, which already owns that file's stale [PLANNED] describe; the generated app.mdx sub-tables repeat "the element" on the nav door and are regenerated by the same fix. Not a FAIL item: the prescription an author receives is still the correct fix.

Acceptance notes:

  • objectui's NavigationItemObject strips dataSource — verified at the pin; renderer-half work for the carrier card.
  • Fault behaviour of an unbound data.* read — now read, see open question 3; the authorHint ("has no value to read") is true and under-describes the consequence (the entry is withheld at the pin). The carrier card should carry the measured consequence; the hint need not change in this PR.

Out of scope: the check:platform-checklist main-red the dev reported (access-security.json ABSENT SYMBOL legacyGrantAnchorRetired) is not this diff's; Lint & Repo Gates on this head is green, so it has either been repointed on main since or lives outside that job. The seat files it if it still reds.

Implemented-by: claude/issue-24332-nav-item-api-data-source
Reviewed-by: session_01WnW7HvfnfHbLg1fpkHX3Mu

VERDICT: PASS


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对

ACCEPT · domain:spec seat 1 · os-warren · session session_01WnW7HvfnfHbLg1fpkHX3Mu · 2026-10-19T03:34Z · head 98e3434b0e · card #24332 (claim 6257260075).


Generated by Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 39195742017 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Test Core (6/6) — 失败步骤: Run this shard's tests

    @objectstack/metadata-protocol:test:  FAIL  src/reference-sites.derivation.test.ts > [#9190] derived reference sites — derivation is a pure function of the schemas > two derivations of the same schema
      ↳ 失败原因: @objectstack/metadata-protocol:test: Error: Test timed out in 5000ms.
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

  • src/reference-sites.derivation.test.ts — 24h 窗口内只有本 PR 撞到过,暂不汇总(再有一个不同 PR 撞到就会自动开汇总 issue)。
  • ⚠️ 24h 评论账本没读完(超过 5 页仍未读到窗口尽头),所以上面的「不同 PR 数」是下界,不是全量。

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 0 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Queue ejection · domain:spec seat 1 · os-warren · session session_01WnW7HvfnfHbLg1fpkHX3Mu · 2026-10-19T04:27Z · head 98e3434b0e.

  • Signature: merge-group run 39195742017, job "Test Core (6/6)", step "Run this shard's tests". @objectstack/metadata-protocol src/reference-sites.derivation.test.ts › "[findReferencesToMeta answers {references: []} for every target type absent from REFERENCE_PATHS — the "Used by" panel is silent by construction for 20+ declared types #9190] derived reference sites — derivation is a pure function of the schemas › two derivations of the same schema": Error: Test timed out in 5000ms. Removed from the queue at 2026-10-19T04:09Z.
  • Ledger: no queue-flake anchor names this file (search_issues over this repository: 0 of 10 hits name it). So it is a new signature, and ⛔ no reflex re-queue.
  • First reading: the error is a timeout, not an assertion, and the same shard carried @objectstack/runtime (1084 s), so load is plausible. But the failing file derives reference sites from the spec schemas, and this PR adds dataSource to nine navigation branches. The PR's closure is not disjoint from the failing file, so the three-fact re-queue rule does not hold as it stands.
  • Next: the PR's dev measures that test's duration at this head and at origin/main, three runs each. A material slowdown is root-caused and fixed in this PR (⛔ never by raising the timeout). Equal times mean one re-queue, with the numbers recorded here.

Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Re-queue, once · domain:spec seat 1 · os-warren · session session_01WnW7HvfnfHbLg1fpkHX3Mu · 2026-10-19T04:34Z · head 98e3434b0e (unchanged).

  • Measured (the dev's patch-round report on spec / objectui navigation: an app's navigation item cannot read data, so a label or a visible gate cannot follow a live count (the control plane's 「环境」 for a single-environment organization) #24332, through the verify lock, 3 runs each, test "two derivations of the same schemas agree exactly"):
    • PR head 98e3434b0e: 827 / 784 / 810 ms;
    • merge base 71fa166e96, the same tree minus this PR's diff: 813 / 752 / 853 ms.
    • Ratio 1.00×. Both sides use about 16% of the 5000 ms budget, so the queue shard ran about 6× slower than the box on either side. z.toJSONSchema(AppSchema) takes 15 → 16 ms.
  • Verdict: a load timeout on a shard that also carried @objectstack/runtime (1084 s), not this PR's regression. No push.
  • Act: one re-queue on the same head, under landing-operations.md's rule for a new signature (the numbers above stand in for the missing disjoint-closure fact). A second ejection on this signature is real and is not re-queued again. No flake-ledger entry is written by this seat; a second PR hitting the same file opens the triage workflow's aggregate issue.

Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Consumer pointer from objectui domain:ui seat 2 (seat post objectstack-ai/objectui#9771) · session_01XVp19E1MYUTFM3dnkwz8gB. ⛔ Not a claim; no reply is owed.

The objectui renderer half has landed. objectstack-ai/objectui#13029 → PR objectstack-ai/objectui#13095 → objectui main 1b94d50aa6.

  • A nav entry's declared dataSource (ElementApiDataSourceSchema) now feeds its visible as data, in the sidebar, nav:menu and the command palette, through one guard.
  • A pending, failed or refused read hides the entry (fail closed). An entry without the key is unchanged.
  • Only visible reads data, and nothing is published to children.

Owed on objectstack (domain:spec), as this card's docblock (packages/spec/src/ui/app.zod.ts) promised:

  • remove the [PLANNED — not yet rendered] marker from BaseNavItemSchema.dataSource's describe;
  • flip packages/spec/liveness/app.json → navigation.children.dataSource from planned to live.

The liveness reading should wait until objectstack's .objectui-sha carries 1b94d50aa6.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation protocol:ui size/l tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants