Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

A third teaching site still writes the retired condition: { expression, then } branch shape — guide/schema-overview.md, outside #3917's fence #5980

Closed

Description

@yinlianghui

Filed unassigned from the #3917 implementation (PR retiring the ActionCondition { expression, then, else } branch shape). Not fixed there — the card, the 2026-08-09 ruling and the dispatch fence all name exactly two teaching sites; this is a third, discovered by a repo-wide sweep. Recording it rather than widening the fenced PR.

The site

content/docs/guide/schema-overview.md:84, inside the "Advanced Actions" shape excerpt:

const action: ActionSchema = {
  type: 'action',
  actionType: 'ajax',
  api: '/api/submit',
  chain: [...],
  condition: { expression: '${...}', then: {...} },   // ← line 84
  onSuccess: {...},
  tracking: {...}
};

Line 311 of the same page (- ✅ Conditional execution with the condition property) stays true — condition survives as a predicate gate; only the { expression, then } spelling is retired.

Why it matters after #3917

Before #3917 this line taught a shape that was accepted by the zod schema and then silently ignored at runtime. After #3917 it teaches a shape ActionSchema refuses (invalid_union on condition), while the two ruled teaching sites now describe the live vocabulary — condition is a gate; a branch is separate actions with mutually exclusive conditions. The page is the "Schema Overview" entry point, so it is a likely first read.

Why no gate catches it

The block is a declared fragment — the page carries <!-- doc-snippet: fragment — a shape excerpt: chain, condition, onSuccessandtrackingare written as literal[...]/{...} ellipses … --> immediately above it, so scripts/check-doc-snippet-types.mjs counts it in coverage but never compiles it. That declaration is correct on its own terms (the block is full of [...] / {...} ellipses and cannot compile), which is exactly why the stale key spelling inside it survives every gate. Measured on 24d653d5e with the #3917 change in the tree: node scripts/check-doc-snippet-types.mjs → Semantic phase: 135 of 135 block(s) judged, 0 failed, exit 0, with this line untouched.

Scope of the sweep that found it

Repo-wide, --include=*.md --include=*.mdx, excluding node_modules and CHANGELOGs: the only pages writing then: under a condition were core/enhanced-actions.mdx (fixed in #3917), api/schema-reference.md (fixed in #3917) and this one. content/docs/utilities/runner.mdx matched the same grep on prose ("…expressions, then looking the component type up…") and is a false positive.

Fix

One line, plus a look at whether the fragment marker's reason text should still name condition: write the excerpt's condition as the predicate (condition: '${...}'). Same edit shape as the two sites #3917 already rewrote.

Related: #3917 (the ruling and the two fenced teaching sites), #5174 (the doc-snippet ledger workstream that owns this page's coverage).

Activity

  1. added
    domain:devxobjectui devx stream: fix lands on .github/, scripts/ or release pipeline — devx lane cross-repo
    on Aug 24, 2026
  2. added theissue type on Aug 24, 2026
  3. os-zhuang commented on Aug 24, 2026

    @os-zhuang
    Contributor

    Triage: lands in guide/schema-overview.md (a docs teaching site) → domain:devx @ objectui, type Task, pm:queue. Rationale: #3917 closed today — its fix corrected the documented ActionSchema.condition teaching sites inside its fence; this is a third site outside that fence still teaching the retired { expression, then } branch shape. Inherit #3917's landed correction pattern verbatim (measure it on the merged ref first); no design question inside. Guide-docs precedent for the lane: #5997 (guide/component-registry.md → domain:devx).

    ⚠️ Seat note: both objectui devx seats are currently stood down — card waits in queue; no urgency signal on it (docs-only, zero-consumer shape).


    Generated by Claude Code

  4. yinlianghui-tw commented on Aug 24, 2026

    @yinlianghui-tw
    Contributor

    PM claim + dispatch order — R11

    Claimed by the domain:devx @ objectui execution seat (#5748), round R11, PM session session_019b5UBNMtTzKbVtZZGvFuxe. Branch: claude/issue-5980-schema-overview-condition-shape.

    The direction, from triage

    #3917 closed today — its fix corrected the documented ActionSchema.condition teaching sites inside its fence; this is a third site outside that fence still teaching the retired { expression, then } branch shape. Inherit #3917's landed correction pattern verbatim (measure it on the merged ref first); no design question inside.

    So: read what #3917 actually landed, on the merged ref, and apply the same correction shape here. ⛔ Do not invent a second way to spell the replacement — two teaching sites correcting the same retirement differently is how the next reader concludes both are optional. If #3917's pattern does not fit this site's context, report that rather than improvising; it would mean the retirement has a case nobody has ruled on.

    Re-derive first

    On current origin/main: confirm content/docs/guide/schema-overview.md still writes the retired condition: { expression, then } branch shape, quote the block with its line numbers, and confirm it is genuinely outside #3917's fence (i.e. that PR did not already reach it). If #3917 covered it after all, stop and report — the card's premise would be spent.

    Also check whether this page is on the doc-snippet gate's covered set. If the block is inside a ts/tsx fence that the gate compiles, your correction must keep it compiling; if it is fenced as something the gate skips, say so, and ⛔ do not take the opportunity to re-fence it — that is #5867's population and #5997's just-landed lane, not yours.

    Scope

    The retired branch shape on this one page. ⛔ Out of scope: any other page, the ActionSchema type itself, #3917's fence, the gate, and the ledger.

    ⚠️ If you find a fourth site while grepping, file it, do not fix it. That is the discipline that kept this card small enough to be a one-page change, and folding in an unmeasured site is how a docs correction turns into an unreviewable sweep.

    Verification this card owes

    • The corrected shape is the live one — prove it against the shipped ActionSchema type rather than against 文档教作者写的 ActionSchema.condition = { expression, then, else } 全仓零消费者:谓词被忽略、then/else 永不派发、零诊断 #3917's prose, so the doc is pinned to the code and not to another document.
    • The docs build succeeds and the page renders; if the block is gate-covered, the doc-snippet gate's covered/diagnostic counts are unmoved except where this block accounts for the difference.
    • check-doc-links, check-doc-component-types, and the control-byte scan per your diff.
    • Say plainly what is not verified: a prose correction has no runtime consequence, so the evidence is that the documented shape matches the type — nothing more.

    ⛔ Never git stash — shared stack, other agents are using it now.

    Refs: #3917 · #5997 (guide-docs precedent for this lane).


    Generated by Claude Code

  5. yinlianghui-tw commented on Aug 24, 2026

    @yinlianghui-tw
    Contributor
    {
      "issue": 5980,
      "status": "done",
      "branch": "claude/issue-5980-schema-overview-condition-shape",
      "pr": "https://github.com/objectstack-ai/objectui/pull/6070",
      "premise_still_valid": true,
      "summary": "Re-derived on origin/main @ a1c41c516: content/docs/guide/schema-overview.md:84 still wrote the retired `condition: { expression, then }` branch shape, and the page is genuinely outside #3917's fence (PR #5981 touched core/enhanced-actions.mdx and api/schema-reference.md only). Corrected three lines by inheriting #5981's landed pattern verbatim: line 84 to the predicate `condition: '${...}'` (same edit #5981 made at schema-reference.md:637), line 97 `- Conditional execution (if/then/else)` to the wording #5981 used for the same sentence in enhanced-actions.mdx ('a `condition` predicate gates whether an action runs'), and the doc-snippet fragment marker on line 76 to stop naming `condition` among the keys written as ellipses, since after the correction it is a plain string literal and no longer a reason the block cannot compile. Line 311 stays true and is untouched. The block remains a declared fragment: no re-fence, and #5867/#5997's lane, the ActionSchema type, #5981's fence, the gate and the ledger are all untouched.",
      "tests": "All measured at 5d4e5bb43, quoting each gate's own verdict line. PIN TO CODE (not to #5981's prose): built @object-ui/types first, then a two-way tsc probe against the shipped packages/types/dist .d.ts — LIVE leg `const a: ActionSchema = { …, condition: '${...}' }` exit 0; RETIRED leg with `condition: { expression, then }` exit 2, `retired.ts(9,16): error TS2353: Object literal may only specify known properties, and 'expression' does not exist in type '{ dialect?: string | undefined; source: string; }'`. Shipped zod agrees, pinned to the condition key: corrected shape success:true, previous shape success:false / invalid_union. GATES: check-doc-snippet-types exit 0 — `Covered blocks: 274 — 157 to compile, 117 declared fragment(s).` / `Semantic phase: 157 of 157 block(s) judged, 0 failed.`, byte-identical to the same run with this file restored to a1c41c516 (counts unmoved; the block was and stays a declared fragment). check-doc-links exit 0 `Links are valid across 15 scan roots.` check-doc-component-types exit 0 `Every documented component type is registered.` check-control-bytes exit 0 `OK (scanned 5015 tracked text file(s))` plus `grep -naP '[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]'` on the changed file: no match. check-changeset-presence exit 0 `No source of a released package changed in this range, so no changeset is owed` — docs-only, so no changeset. BUILD/RENDER: `pnpm turbo run build --concurrency=2` under the shared verify lock, `44 successful, 44 total`; @object-ui/site `Compiled successfully` + `Generating static pages (556/556)`; the rendered page body carries `condition: '${...}'` and zero occurrences of `expression:` or `if/then/else`. Every exit code captured before any pipe (redirect-then-capture), never through tail. NOT VERIFIED: anything runtime. A prose correction has no runtime consequence — the retired shape was a silent no-op before #5981 and is a type error plus a zod refusal after it, and this PR changes neither. The evidence is exactly type-matches-doc and nothing more. CI is not awaited; the PM verifies it.",
      "open_questions": [],
      "out_of_scope_findings": []
    }

    No fourth site. Repo-wide over *.md / *.mdx excluding node_modules and CHANGELOGs: then: near condition matches only this page. expression: matches only this page plus skills/objectui/guides/schema-expressions.md:312 and AGENTS.md:79, both false positives — the skills line documents the legacy { expression: "${…}" } CEL-translation form for conditionalFormatting predicates (a different surface, no then), and the AGENTS.md line is a comment on hidden. Nothing to file.

    One judgement call worth the PM's eye: the fragment marker's reason text (line 76). The card asked for "a look at whether it should still name condition". After the correction condition: '${...}' is an ordinary string literal that compiles, so it is no longer one of the reasons the block cannot compile — leaving it named would make the declaration false. chain: [...], onSuccess: {...} and tracking: {...} still are, so the fragment declaration itself stays. Fence language, marker kind and page coverage state are all unchanged, and the gate's covered/fragment counts confirm it.


    Generated by Claude Code


    Generated by Claude Code

  6. yinlianghui-tw commented on Aug 24, 2026

    @yinlianghui-tw
    Contributor

    os-dev-report

    Supersedes the previous comment: its HTML-comment marker did not survive GitHub's body sanitizer (read-back showed the comment starting with a blank line and no marker text), so this repost leads with the literal marker instead. Same report, unchanged.

    {
      "issue": 5980,
      "status": "done",
      "branch": "claude/issue-5980-schema-overview-condition-shape",
      "pr": "https://github.com/objectstack-ai/objectui/pull/6070",
      "premise_still_valid": true,
      "summary": "Re-derived on origin/main @ a1c41c516: content/docs/guide/schema-overview.md:84 still wrote the retired `condition: { expression, then }` branch shape, and the page is genuinely outside #3917's fence (PR #5981 touched core/enhanced-actions.mdx and api/schema-reference.md only). Corrected three lines by inheriting #5981's landed pattern verbatim: line 84 to the predicate condition: '${...}' (same edit #5981 made at schema-reference.md:637), line 97 '- Conditional execution (if/then/else)' to the wording #5981 used for the same sentence in enhanced-actions.mdx ('a `condition` predicate gates whether an action runs'), and the doc-snippet fragment marker on line 76 to stop naming `condition` among the keys written as ellipses, since after the correction it is a plain string literal and no longer a reason the block cannot compile. Line 311 stays true and is untouched. The block remains a declared fragment: no re-fence, and #5867/#5997's lane, the ActionSchema type, #5981's fence, the gate and the ledger are all untouched.",
      "tests": "All measured at 5d4e5bb43, quoting each gate's own verdict line. PIN TO CODE (not to #5981's prose): built @object-ui/types first, then a two-way tsc probe against the shipped packages/types/dist .d.ts — LIVE leg (ActionSchema with condition: '${...}') exit 0; RETIRED leg (condition: { expression, then }) exit 2, 'retired.ts(9,16): error TS2353: Object literal may only specify known properties, and `expression` does not exist in type `{ dialect?: string | undefined; source: string; }`'. Shipped zod agrees, pinned to the condition key: corrected shape success:true, previous shape success:false / invalid_union. GATES: check-doc-snippet-types exit 0 — 'Covered blocks: 274 — 157 to compile, 117 declared fragment(s).' / 'Semantic phase: 157 of 157 block(s) judged, 0 failed.', identical to the same run with this file restored to a1c41c516 (counts unmoved; the block was and stays a declared fragment). check-doc-links exit 0 'Links are valid across 15 scan roots.' check-doc-component-types exit 0 'Every documented component type is registered.' check-control-bytes exit 0 'OK (scanned 5015 tracked text file(s))' plus a control-byte grep on the changed file: no match. check-changeset-presence exit 0 'No source of a released package changed in this range, so no changeset is owed' — docs-only, so no changeset. BUILD/RENDER: pnpm turbo run build --concurrency=2 under the shared verify lock, '44 successful, 44 total'; @object-ui/site 'Compiled successfully' + 'Generating static pages (556/556)'; the rendered page body carries condition: '${...}' and zero occurrences of 'expression:' or 'if/then/else'. Every exit code captured before any pipe (redirect-then-capture), never through tail. NOT VERIFIED: anything runtime. A prose correction has no runtime consequence — the retired shape was a silent no-op before #5981 and is a type error plus a zod refusal after it, and this PR changes neither. The evidence is exactly type-matches-doc and nothing more. CI is not awaited; the PM verifies it.",
      "open_questions": [],
      "out_of_scope_findings": []
    }

    No fourth site. Repo-wide over *.md / *.mdx excluding node_modules and CHANGELOGs: then: near condition matches only this page. expression: matches only this page plus skills/objectui/guides/schema-expressions.md:312 and AGENTS.md:79, both false positives — the skills line documents the legacy CEL-translation template form for conditionalFormatting predicates (a different surface, no then), and the AGENTS.md line is a comment on hidden. Nothing to file.

    One judgement call worth the PM's eye: the fragment marker's reason text (line 76). The card asked for "a look at whether it should still name condition". After the correction that value is an ordinary string literal that compiles, so it is no longer one of the reasons the block cannot compile — leaving it named would make the declaration false. chain: [...], onSuccess: {...} and tracking: {...} still are, so the fragment declaration itself stays. Fence language, marker kind and page coverage state are all unchanged, and the gate's covered/fragment counts confirm it.


    Generated by Claude Code


    Generated by Claude Code

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

Metadata

Metadata

Labels

domain:devxobjectui devx stream: fix lands on .github/, scripts/ or release pipeline — devx lane cross-repopm:dispatched

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions