Skip to content

fix(lint): demand flows.FLOW.label for every named flow, the docs flow embed titles any flow by it - #36826

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-36400-embedded-flow-label-coverage
Nov 24, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-36400-embedded-flow-label-coverage

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Yibo Wang · project thread

Fixes #36400

Clause-②: no
Metadata-protocol: none

repo:objectstack#3 · os-support-ai · session_01WGufziH9MVhWYLVCiw5eXB

维护者速读

  • 用户能看到什么变化:应用作者运行翻译检查时,没有界面步骤、也没有审批步骤的流程(定时、记录触发、接口流程)现在也会被提示缺少流程名称的译文;终端用户无感,直到作者补上译文后,手册里的流程卡片标题在中文下不再是英文。
  • 为什么做:上一轮让流程图里每个步骤名都能翻译,但卡片标题(流程名)只对含界面或审批步骤的流程要求翻译,中文读者会看到英文标题压在中文步骤上。
  • 出错会怎样:只多报缺译提示、不改任何运行行为或数据;示例应用的缺译基线随之上调,可直接撤回。
  • 要你做什么:无。

What changes

Landing point: packages/lint/src/i18n-walk.ts, walkScreenFlows, as the dispatch expected. flows.FLOW_NAME.label is now demanded for every flow with a name, instead of only a flow holding a screen or approval node. The comment over the demand now names the key's three readers and says why the third draws any flow.

Why every declared flow is "drawn" (the card's rule: "a string nobody reads is not demanded"). The docs viewer's type: flow embed titles its card by translated?.flowLabel for whichever flow a page names, whatever its nodes (metadata-viewer.tsx:572). The walk already treats that embed as drawing every declared flow: since #36383 it asks every flow's drawn steps for flows.FLOW_NAME.nodes.NODE_ID.label, with no screen/approval predicate (ruling 7076440876, item 1: "A flow node gets a translatable label key under the flow's translation bundle (spec, validation and the business-view reader), so every drawn step (start, end, decision, notify, approval) can carry a label per language."). A card whose steps are demanded and whose title is not is the exact symptom the card describes. So this does not turn on a new product reading: the population is the one the nodes demand already uses. Independently, the Studio flow designer's rail names every flow of the package by the same key (StudioDesignSurface.tsx:8508, objectstack#35319), though the walk does not use the Studio as a demand basis (its own comment: "the walk asks only for what the docs embed draws").

The card's "embedded flow" premise, measured. The card reads "embedded" as an object's or an app's bundled flows. No such declaration site exists: the spec refuses both (tables below). PR #36383's acceptance note 1 used "embedded flow" for a flow drawn by the docs type: flow embed, and that is what this PR covers. The acceptance arm "a flow nobody draws is not" therefore has one real member: a flow with no name, which no bundle entry can address (pinned).

Unchanged on purpose. successMessage stays demanded only for a flow with a screen (its one reader is the screen runner); the nodes, screens, approvals, refusals, notices and records families are untouched. packages/cli/src/utils/i18n-coverage.ts changes one comment word ("Screen-flow copy" to "Flow copy, every flow's label").

Census 1: readers that draw a flow's label

Reader Where (origin/main 65ee4b7) Which flows it draws
Screen-flow runner header and completion toast ui/packages/app-shell/src/views/FlowRunner.tsx:434-445 (translateFlow(...).label); hosts pass the served label in at FlowRunsPage.tsx:408, RecordDetailView.tsx:2300, useConsoleActionRuntime.tsx:814 a run paused at a screen
Approvals door (inbox, record panel, request page) packages/plugins/plugin-approvals/src/reader-locale-labels.ts:129 (flowLabelKey), :356-358 a flow whose approval node opened a request
Docs viewer type: flow embed, card title ui/packages/components/src/renderers/basic/metadata-viewer.tsx:556 (useFlowLabelTranslations), :572 (title) any flow a docs page names, any node types
Studio flow designer: rail row and open-flow header ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx:8508 (rail), :8632 / :9965 (header), via metadata-admin/previews/flow-label-translations.tsx:43-45 and ui/packages/i18n/src/flowLabels.ts:67-77 every flow of the package (not a demand basis for the walk)

Census 2: where a flow can be declared

Site Evidence Walked?
Top-level flows packages/spec/src/stack.zod.ts:965 (flows: z.array(FlowSchema)) yes, config.flows
Composed / plugin-contributed composeStacks concatenates flows (stack.zod.ts:1677), last wins by name (:3396); each contributed flow is a top-level flow of its own stack, and the ten bundle packages run the walk on their own extract configs yes, as top-level flows of the composed or contributing config
Object-embedded does not exist: packages/spec/src/data/object.zod.ts:1887-1895 refuses workflows / workflow and points at a top-level flow n/a
App-bundled does not exist: packages/spec/src/ui/app.zod.ts:1895-1897, "flows is not an App field — flows are top-level stack metadata" n/a
Install manifest / deploy bundle system/app-install.zod.ts:52, system/deploy-bundle.zod.ts:201,229: names or serialized copies of the same top-level flows, not authoring sites n/a

Read first (by risk)

  1. packages/lint/src/i18n-walk.ts, the flows.FLOW_NAME.label block at the top of walkScreenFlows: the predicate is gone, hasScreen survives only for successMessage.
  2. scripts/i18n-coverage-baseline.json: two rows rise, nothing else moves.
  3. packages/cli/test/i18n-flow-screen-coverage.test.ts, the renamed describe "the flow label is demanded for every named flow".

Two-minute check: pnpm --filter @objectstack/cli exec vitest run --project unit test/i18n-flow-screen-coverage.test.ts test/i18n-flow-approval-coverage.test.ts (after building the cli dependency closure); expect 39 passed, including the scheduled nightly_digest asked for its label and a nameless flow asked for nothing.

Tests

Pins changed (the five that pinned the narrow predicate, rewritten to the new rule)
  • packages/cli/test/i18n-flow-screen-coverage.test.ts: the describe is now "the flow label is demanded for every named flow": a scheduled flow with no screen emits flows.nightly_digest.label seeded with its label; a flow with name absent or empty emits nothing; the coverage gate lists both flows' labels in one tree and goes quiet for the one translated. The region-table pin's http payload flow now expects its label and still no screen key.
  • packages/cli/test/i18n-flow-approval-coverage.test.ts: the scheduled flow emits only its label (no approval or screen key), and the gate asks the scheduled flow for its label alone.
Runs (head 385ed2b)
  • Before the pin edits, the 60 cli unit files matching i18n / translation / lint: Test Files 2 failed | 58 passed (60), Tests 5 failed | 652 passed (657); the five failures were exactly the narrow-predicate pins above.
  • After: the four flow family files, Test Files 4 passed (4), Tests 55 passed (55).
  • @objectstack/lint whole suite: Test Files 229 passed (229), Tests 9513 passed (9513). pnpm --filter @objectstack/lint typecheck and pnpm --filter @objectstack/cli typecheck: exit 0.
  • Ablation (lint resolves through dist/ in the cli suite, so each leg rebuilt @objectstack/lint): the old predicate put back under a marker that survives the build, ablation-dist-preflight "marker present in 2 built files", the two pin files Tests 5 failed | 34 passed (39); restored (blob == HEAD, git diff HEAD empty), rebuilt, preflight --absent green, Tests 39 passed (39). A first attempt used a comment marker the build strips, so its preflight failed and its reading was discarded.
  • node scripts/check-i18n-coverage.mjs before --update: app-showcase 425 -> 449, app-todo 130 -> 136; the new os lint findings are exactly 24 showcase flow labels (one locale each) and 3 todo flow labels (two locales each). After --update: OK. pnpm check:i18n: all ten bundle packages in sync.
  • dispatch-gates --commands at 385ed2b: 75 commands, 73 exit 0, 2 NOT MEASURED (exit 3, prerequisite refusals unrelated to this diff: check-plugin-teardown-shape.mjs --self-test needs an unshallow clone for its pinned fixture, check:dual-build-cjs-loads needs a full pnpm build; both left to CI). dispatch-gates --ran with recorded exit codes: "75 derived famil(ies) accounted for — 73 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)". Inside the sweep: check:i18n-coverage "OK (14 config(s), 585 baselined untranslated string(s), none new)", check:i18n-walk-parity "17 declared group(s), 15 walked, 2 exempted", check:nul-bytes exit 0.
  • overlap-check.mjs: merges cleanly with origin/main, no open PR shares a file.

Acceptance notes


Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01WGufziH9MVhWYLVCiw5eXB

…w embed titles any flow by it

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufziH9MVhWYLVCiw5eXB
… and the changeset

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufziH9MVhWYLVCiw5eXB
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 24, 2026
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

2 anchor(s) derived from 2 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run.

What this run could not see
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 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 — 42 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 f77d078da5f88caf4615f45775172b49310c07c9 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from cf993619cdf3f733d470683e3f89e75fd643f01f — the merge of head b77896a251cdea32aa08d83f57e399154f3a5d45 into base f77d078da5f88caf4615f45775172b49310c07c9, 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 cf993619cdf3f733d470683e3f89e75fd643f01f && git checkout cf993619cdf3f733d470683e3f89e75fd643f01f
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin f77d078da5f88caf4615f45775172b49310c07c9 b77896a251cdea32aa08d83f57e399154f3a5d45 && git checkout -B drift-repro f77d078da5f88caf4615f45775172b49310c07c9 && git merge --no-ff b77896a251cdea32aa08d83f57e399154f3a5d45

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

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

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufziwMkZG34d69p8BHb4

席位核对 — REWORK · repo:objectstack#3 · head 385ed2b · 2026-11-24T03:20Z

L1: REWORK
Head-sha: 385ed2b4289f383c2aca40539486f422b49fcd27
Card: #36400 · os-dev-report 7120437180 (area ux-D).

Checklist

  • Shape: l1-face at this head. Draft, base main, first line Fixes #36400, no closing keyword next to another card.

    • The card's premise ("object-embedded / app-bundled flows") is refuted in the PR: object.zod.ts and app.zod.ts carry no embedded flow list. The PR records this in public, so the correction is on the record.
    • Step 2 of the card (widen to every declared flow a reader draws, in the same change as the reader it relies on) is delivered against the reader that exists: the docs viewer's type: flow embed titles its card translated?.flowLabel ?? flow.label ?? …, read on main at ui/packages/components/src/renderers/basic/metadata-viewer.tsx:556-571, for any flow a page names.
    • Step 3 (re-baseline and say the rise) is delivered.

    Fixes is right.

  • Checks at this head: 68 check-runs. 57 success, 11 expected skip, 0 failed. Lint & Repo Gates and TypeScript Type Check: success. The coverage ratchet is green on the raised baseline. mergeable_state clean.

  • Governance: check-governed-merges.mjs --pr 36826: NOT governed, 138 lines.

  • Declarations: Clause-②: no and Metadata-protocol: none. No packages/spec file is in the diff and no export moves, so no contract face and no L2 is owed. The lint demand widens for authors, which is a lint finding, not an accept set; the changeset states it.

  • Rule change: walkScreenFlows pushes flows.<flow>.label for every named flow (a nameless flow is skipped earlier). The docblock is rewritten to name the three readers and to keep the walk's own rule ("a string nobody reads is not demanded"). hasScreen is still read by the toast branch below.

  • Tests:

    • The five narrow-predicate pins are flipped. The rewritten pins add a seeded-label check, a nameless-flow check, and a "goes quiet once translated" control in one tree.
    • Lint whole suite: 229 files, 9513 tests. The ablation restored the old predicate through dist and got 5 red.
  • Baseline: app-showcase 425 → 449 and app-todo 130 → 136, exactly the new findings; the changeset says the same. The other twelve configs are unchanged.

  • Changeset prose, read sentence by sentence:

    • every named flow now asked: true;
    • the two former readers: true;
    • the docs embed titles any flow by the key: true (as read above);
    • what you see after upgrading: one more i18n/missing-flow per untranslated locale per such flow, and os i18n extract scaffolds it: consistent with the walker feeding extract and the coverage check;
    • nameless flow not asked: true, pinned;
    • the ratchet numbers: match.

Findings

  • S1 (should-fix) — @objectstack/cli is touched and has no changeset entry; l1-face flags it.
    • packages/cli/src/utils/i18n-coverage.ts changes, a comment line only.
    • The package is published (files: ["dist", …]) and builds with tsc, which keeps comments, so the shipped dist/utils/i18n-coverage.js changes too.
    • More to the point, the user-visible change lands in the CLI's own commands: os lint, os i18n check and os i18n extract, which the changeset itself names.
    • l1-review-checklist: every touched package with private: false is published, so check its changeset; "⛔ 判据不是改动大小 … ⛔ 缺了不入队".
    • Fix: add '@objectstack/cli': patch to .changeset/36400-flow-label-every-flow.md. No other change. A delta read on the new head follows at once.

Must-fix: none. No nits.

Next

Push the one-line changeset fix. I re-read on the new head (delta: changeset only) and give ACCEPT if nothing else moved.

…the every-flow label demand

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufziH9MVhWYLVCiw5eXB
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufziwMkZG34d69p8BHb4

席位核对 — ACCEPT · repo:objectstack#3 · head b77896a · 2026-11-24T03:25Z

L1: ACCEPT (delta, after REWORK 7121005088 at 385ed2b)
Head-sha: b77896a251cdea32aa08d83f57e399154f3a5d45
Dev report: 7121057638.

Delta read

  • git diff 385ed2b4..b77896a2: one commit, one file, one line. .changeset/36400-flow-label-every-flow.md gains '@objectstack/cli': patch beside '@objectstack/lint': patch. Nothing else moved, so the rest of the first-round read (7121005088) stands unchanged.
  • S1: closed. The CLI is published, its src moved, and the user-visible change lands in os lint, os i18n check and os i18n extract. The changeset now names it, at patch, which fits Metadata-protocol: none. The prose already describes the CLI-facing effect, so the line needs no new text.
  • Checks at this head: at posting, 18 completed (8 success, 10 expected skip, 0 failed) and 17 still running. The previous head was 68/68 non-failing, and this delta is changeset-only. The queue gate's all-checks-green requirement still applies before landing (true-green.md), so land only once the run is green.

Findings

Must-fix: none. Should-fix: none. Nits: none new.

Landing notes

Not governed (138 lines). The area lands on this ACCEPT once CI is green; Fixes #36400 closes the card.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufziH9MVhWYLVCiw5eXB

CI red judged not this PR's · 2026-11-24T03:41Z · head b77896a · Test Core (6/10) (run 45319181038, job 138194375927).

  • The shard's tests all passed: turbo Tasks: 74 successful, 74 total at 03:40:15Z (lint 229 files, metadata-protocol 365 passed / 9 skipped, core 156, service-analytics 225, …), no FAIL / ✗ line in the log.
  • The only error line is the post-test artifact upload: ##[error]Failed to CreateArtifact: Unable to make request: ECONNRESET at 03:40:33Z, a runner network reset.
  • The delta from the previous head 385ed2b (68/68 non-failing) is one changeset frontmatter line.
    Route: one re-run of the failed job through the relay (rerun-failed.mjs) once run 45319181038 concludes; a second failure is treated as real.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufziH9MVhWYLVCiw5eXB

Landing · 2026-11-24T04:16Z · ACCEPT 7121085713 (L1-b, delta after REWORK 7121005088) at head b77896a

reading value
check-governed-merges.mjs --pr 36826 NOT governed · +84/−55
landing-k.mjs --pr 36826 OK · K = 5 < 15 · no new locale pack, no shared book moved
contract review not owed (no packages/spec path, no export moves; L1 7121005088)
checks at b77896a 57 success, 11 expected skip, 0 failed, 0 pending after one relay re-run of Test Core (6/10) (artifact-upload ECONNRESET, judgement 7121335114; attempt 2 success); mergeable clean

State: ready + auto-merge (area ux-D, not governed, ≤3000 lines). Fixes #36400: merging closes the card.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 24, 2026 04:16
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit 5c2e34c Nov 24, 2026
112 of 114 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-36400-embedded-flow-label-coverage branch November 24, 2026 04:52
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 size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

i18n coverage: demand flows.FLOW.label for every embedded flow, not only the ones the walk reaches today

2 participants