|
50 | 50 | - name: ESLint |
51 | 51 | run: pnpm lint |
52 | 52 |
|
| 53 | + # Raw NUL guard (#3127): one literal U+0000 byte makes grep/ripgrep treat |
| 54 | + # the whole file as binary and silently return ZERO matches — the file drops |
| 55 | + # out of code search and out of every grep-based lint, with no error saying |
| 56 | + # so. Nothing else catches it: git sniffs only the first 8000 bytes to decide |
| 57 | + # binary-ness, and protocol.ts carried its NUL at offset 147230, so it kept |
| 58 | + # diffing as ordinary text through review. That blind spot let six files |
| 59 | + # accumulate the same defect. Authors must write the unicode escape instead. |
| 60 | + - name: Raw NUL byte guard |
| 61 | + run: pnpm check:nul-bytes |
| 62 | + |
53 | 63 | # Docs/skills authoring guard (#2035 / ADR-0059): TS code blocks in |
54 | 64 | # Markdown/MDX are not type-checked or ESLinted, so skills/ and |
55 | 65 | # content/docs/ can drift back to teaching the bare `: Page = {}` literal |
@@ -119,24 +129,38 @@ jobs: |
119 | 129 | - name: Type check (@objectstack/spec) |
120 | 130 | run: pnpm --filter @objectstack/spec exec tsc --noEmit |
121 | 131 |
|
122 | | - # Generated-skill gate: skills/*/references/_index.md and the objectstack-ui |
123 | | - # react-blocks contract are generated from packages/spec/src and committed. |
124 | | - # Nothing regenerated them in CI, so they drifted — and unlike the reference |
125 | | - # docs these ship to third parties via `npx skills add objectstack-ai/framework`, |
126 | | - # so the drift is served straight to consumers' agents. |
| 132 | + # Generated-docs gate: content/docs/references/** is generated from the spec |
| 133 | + # by `gen:schema && gen:docs` and committed. Nothing regenerated it in CI, so |
| 134 | + # it drifted silently — #3076 added RowCrudActionOverride to the spec and the |
| 135 | + # public reference docs never learned the type existed. Regenerates and fails |
| 136 | + # on any difference. |
| 137 | + # |
| 138 | + # Deliberately lives in this job, not in ci.yml's "Build Docs": that job is |
| 139 | + # gated on a `docs` paths-filter that does not include packages/spec/**, so it |
| 140 | + # skips exactly the spec-only PRs that cause this drift (#3076 was one). This |
| 141 | + # job has no paths filter and is a required status check, so the gate cannot go |
| 142 | + # dormant. It reads src/ + json-schema/ via tsx and needs no build, so it runs |
| 143 | + # before the workspace build and fails in ~2s. |
| 144 | + - name: Check generated reference docs are in sync with the spec |
| 145 | + run: pnpm --filter @objectstack/spec check:docs |
| 146 | + |
| 147 | + # Same class, same reasoning, different surface: skills/*/references/_index.md |
| 148 | + # and the objectstack-ui react-blocks contract are generated from |
| 149 | + # packages/spec/src and committed, and nothing regenerated them either. These |
| 150 | + # ship to third parties via `npx skills add objectstack-ai/framework`, so the |
| 151 | + # drift is served straight to consumers' agents — 6 of 113 schema pointers named |
| 152 | + # files the spec had already deleted or renamed. |
127 | 153 | # |
128 | | - # Deliberately here rather than in ci.yml's `check-generated` job: that job is |
129 | | - # paths-filtered on skills/** and the build-skill-docs.ts script, NOT on |
130 | | - # packages/spec/src/**, so it skips exactly the spec-only PRs that cause this |
131 | | - # drift — and it is not a required check either, so it could be merged past |
132 | | - # even when it does run. This job has no paths filter and IS required |
133 | | - # ("TypeScript Type Check"), so the gate can neither go dormant nor be bypassed. |
| 154 | + # Not in ci.yml's `check-generated` job for the reason above: its `generated` |
| 155 | + # filter lists specific spec paths (migrations/, conversions/, protocol-version) |
| 156 | + # but no schema dirs, so a PR touching src/data/** or src/ui/** — exactly what |
| 157 | + # drives these two artifacts — never triggers it. It is not required, either. |
134 | 158 | # |
135 | | - # Both read packages/spec/src directly via tsx and need no build (verified with |
136 | | - # every workspace dist/ removed), so they run before the workspace build and |
137 | | - # fail in seconds. `check:skill-refs` also fails on a SKILL_MAP entry pointing |
138 | | - # at a file the spec no longer has — the silent skip that let the map keep |
139 | | - # naming data/dataset.zod.ts for a year after #1620 renamed it to data/seed.zod.ts. |
| 159 | + # Both read packages/spec/src via tsx and need no build (verified with every |
| 160 | + # workspace dist/ removed), so they run before the workspace build. check:skill-refs |
| 161 | + # additionally fails on a SKILL_MAP entry naming a file the spec no longer has: |
| 162 | + # that silent skip is what let the map keep pointing at data/dataset.zod.ts for a |
| 163 | + # year after #1620 renamed it to data/seed.zod.ts. |
140 | 164 | - name: Check generated skill references are in sync with the spec |
141 | 165 | run: pnpm --filter @objectstack/spec check:skill-refs |
142 | 166 |
|
|
0 commit comments