Skip to content

Commit 0b64ff3

Browse files
claude[bot]claude
andauthored
feat(scripts): hold every section landing index to its meta.json, and top up the two drifted ones (#11259)
* feat(scripts): hold every section landing index block to its meta.json (#10738) Adds check-section-landing-index.mjs. A section's meta.json is the routing source fumadocs builds the sidebar from; the landing page's "## What's in this module" block is hand-kept beside it and nothing read the two against each other, so it drifted in both directions one edit at a time with every gate green (#9604 runtime-services, #10339 permissions, #10737 ai). The heading is the opt-in, not the rendering shape: 8 sections declare it, 4 as bullet lists and 4 as Card grids, and the gate reads both identically. 26 landing pages that declare no index block are not held. Committed before the docs fixes so the red is reproducible at this commit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SPBxLsqQGCVL5z5UXvgipH * fix(docs): top up the ui and data-modeling landing indexes, wire the gate into lint.yml (#10738) content/docs/ui/index.mdx omitted react-pages, actions, reports and translations, and listed views before pages. The react-pages omission is the residual half of the P0 #10638 symptom: the deploy fix restored the page and the sidebar, but the hand-kept grid never got its row, so objectstack.ai/docs/ui still does not show React Pages. content/docs/data-modeling/index.mdx omitted field-type-decision-tree and validation-rules — a second real drift, found by the gate, outside the population the card had measured. permissions/index.mdx's drift note said nothing checks the two against each other; that is no longer true, so it now names the gate. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SPBxLsqQGCVL5z5UXvgipH --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6a4e929 commit 0b64ff3

5 files changed

Lines changed: 667 additions & 2 deletions

File tree

.github/workflows/lint.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,57 @@ jobs:
11061106
- name: Runtime-services indexes enumerate the chapter's real pages
11071107
run: pnpm check:runtime-services-index
11081108

1109+
# #10738 generalises the gate above to every section landing page. The same
1110+
# defect shape kept recurring one directory over: a section's meta.json is
1111+
# what fumadocs builds the sidebar and route order from, the landing page's
1112+
# "## What's in this module" block is the reader's map of the same set, and
1113+
# nothing read the two against each other — #9604 (runtime-services, sms),
1114+
# #10339 (permissions named 14 of 21), #10737 (ai omitted connect-mcp, its
1115+
# meta.json's FIRST content page, linked nowhere else on the page). Three
1116+
# instances, three humans noticing, three cards.
1117+
#
1118+
# The heading is the opt-in, NOT the rendering shape. #10738 had set the
1119+
# `Cards`-grid sections aside as "a different object" and then had to
1120+
# correct itself when api/index.mdx turned out to carry both shapes. Shape
1121+
# is simply the wrong discriminator: writing the heading is the author
1122+
# declaring "this block is the index of this module". Eight sections
1123+
# declare it — four bullet lists (ai, api, permissions, plugins), four
1124+
# `Card` grids (automation, data-modeling, kernel, ui) — and the gate reads
1125+
# both spellings identically. The other 26 landing pages under content/docs
1126+
# are untouched and cannot be caught by accident; they would have to write
1127+
# the heading first. That is what keeps the deliberately curated ones
1128+
# curated: protocol/objectui is a "For Implementers" reading list mixing in
1129+
# /docs/references/ links, and getting-started's "Next Steps" points OUT of
1130+
# its module on purpose.
1131+
#
1132+
# Hrefs and their order only. Link text, glosses, bolding and `Card`
1133+
# descriptions are the page's business — meta.json stores SLUGS ONLY, so a
1134+
# generated block would have to synthesize link text from frontmatter, and
1135+
# that regresses a row that exists today (permissions/access-recipes.mdx is
1136+
# titled "Who can see data / automation / interface" and would render as
1137+
# that instead of the curated "Access Recipes"). Check them, don't generate
1138+
# them — the #9604 precedent, re-measured.
1139+
#
1140+
# Invoked as `node scripts/…` rather than through a `pnpm check:*` alias,
1141+
# same as the other direct steps in this lane: that alias is a line in root
1142+
# package.json, inside the @changesets/cli v3 fence (#9465), and the direct
1143+
# form loses no discovery — dispatch-gates.mjs derives gate families from
1144+
# either spelling. Precedent: PR #10698.
1145+
#
1146+
# Runs its own --self-test first, and that leg is load-bearing: this gate
1147+
# computes its own population, so a block parser that stopped matching
1148+
# would print a confident green over a tree it never read (#4690's family).
1149+
# The self-test drives the real judge()/run() path and pins all seven
1150+
# refusals alongside the positive cases, so "refuses unconditionally"
1151+
# cannot satisfy it. It lives in this job with the other docs guards: the
1152+
# edit that breaks it is a docs edit, so a packages/** paths filter would
1153+
# blind it to its own failure mode. Reads ~34 meta.json + index.mdx pairs,
1154+
# no spawns, no build; ~0.1s.
1155+
- name: Section landing indexes enumerate their meta.json pages
1156+
run: |
1157+
node scripts/check-section-landing-index.mjs --self-test
1158+
node scripts/check-section-landing-index.mjs
1159+
11091160
# #3723 ADR anchors: code an accepted ADR governs must keep naming it.
11101161
# That incident reversed three accepted ADRs with a patch-level changeset,
11111162
# and the mechanism was simply that the edited file never mentioned them —

content/docs/data-modeling/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,11 @@ That one definition is enough to get a persisted table, CRUD + query endpoints,
4949
<Card href="/docs/data-modeling/objects" title="Objects" description="Object metadata: definition, options, and API operations" />
5050
<Card href="/docs/data-modeling/fields" title="Fields" description="Field metadata and configuration" />
5151
<Card href="/docs/data-modeling/field-types" title="Field Types" description="Gallery of every field type with examples" />
52+
<Card href="/docs/data-modeling/field-type-decision-tree" title="Field Type Decision Tree" description="Choosing the right field type: flowchart, quick-reference table, and use cases" />
5253
<Card href="/docs/data-modeling/relationships" title="Relationships & Lookups" description="Lookup, master-detail, and cross-object modeling" />
5354
<Card href="/docs/data-modeling/object-extensions" title="Object Extensions" description="Add fields, validations, and indexes to an object another package owns" />
5455
<Card href="/docs/data-modeling/validation" title="Validation" description="Validation metadata and CEL rule authoring" />
56+
<Card href="/docs/data-modeling/validation-rules" title="Validation Rules" description="Per-type default validation, required properties, and constraints" />
5557
<Card href="/docs/data-modeling/formulas" title="Expressions (CEL)" description="Formula fields and computed logic" />
5658
<Card href="/docs/data-modeling/queries" title="Queries" description="Query syntax quick reference" />
5759
<Card href="/docs/data-modeling/indexing" title="Database Indexing" description="Index configuration and performance" />

content/docs/permissions/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ alike — is [Declaring Capabilities](/docs/permissions/capabilities).
6262

6363
{/* Source of truth for this module's page set AND its order is meta.json in this directory — routing and the sidebar are built from it, and the list below mirrors it exactly, minus this page. */}
6464
{/* The list is hand-kept on purpose: meta.json stores slugs only, so the link text and the glosses below exist nowhere else, and a generated list would lose them. */}
65-
{/* Drift note: nothing checks the two against each other in either direction, so a page added to or removed from meta.json leaves this list silently stale — edit both in the same change. */}
65+
{/* Checked since #10738: `node scripts/check-section-landing-index.mjs` holds this list's set AND order to meta.json in both directions, for every landing page carrying this heading. Link text and the glosses stay hand-written — the gate reads hrefs only. */}
6666

6767
- [Administrator Guide](/docs/permissions/administrator-guide) — the task-first manual for customer system administrators
6868
- [Authentication](/docs/permissions/authentication)

content/docs/ui/index.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@ export const CrmApp = App.create({
4040

4141
<Cards>
4242
<Card href="/docs/ui/apps" title="Apps" description="App metadata: navigation, branding, entry points" />
43-
<Card href="/docs/ui/views" title="Views" description="Grid, kanban, calendar, gantt, map, and more" />
4443
<Card href="/docs/ui/pages" title="Pages" description="Page metadata and layout composition" />
44+
<Card href="/docs/ui/react-pages" title="React Pages" description="Author a page body as real React, or as JSX that is parsed and never executed" />
45+
<Card href="/docs/ui/views" title="Views" description="Grid, kanban, calendar, gantt, map, and more" />
46+
<Card href="/docs/ui/actions" title="Actions" description="Declarative buttons with server-side behavior, bound to lists and records" />
4547
<Card href="/docs/ui/dashboards" title="Dashboards" description="Dashboard metadata, charts, and datasets" />
48+
<Card href="/docs/ui/reports" title="Reports" description="Analytics reports as metadata: report shapes, dataset binding, drill-through" />
49+
<Card href="/docs/ui/translations" title="Translations" description="Labels and UI text as metadata, one bundle per locale" />
4650
<Card href="/docs/ui/forms" title="Forms" description="Public and internal form patterns" />
4751
<Card href="/docs/ui/doc-pages" title="Doc Pages" description="Ship package documentation rendered in the console" />
4852
<Card href="/docs/ui/setup-app" title="Setup App" description="The built-in administration UI" />

0 commit comments

Comments
 (0)