Skip to content

Commit 0e6a779

Browse files
committed
ci(ui-merge): run objectui's nineteen Repo Gates in the root Lint UI job
The gates of ui/.github/workflows/repo-gates.yml stopped running when the tree moved under ui/, because GitHub reads only the root workflows. They judge the shipped docs, skill guides, READMEs and documented component types. Port them into lint-ui in the nested workflow's order: install-free gates before the install, built-type gates after one filtered build. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015MoCPtpv6AtTo899tF8Ktq
1 parent c475b45 commit 0e6a779

1 file changed

Lines changed: 173 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3436,7 +3436,93 @@ jobs:
34363436
pnpm --dir ui run check:bash32-floor --self-test
34373437
pnpm --dir ui run check:bash32-floor
34383438
3439+
# ── objectui's Repo Gates (objectstack#25880) ────────────────────────
3440+
# The nineteen gates of `ui/.github/workflows/repo-gates.yml`, which
3441+
# GitHub stopped running when the tree moved under `ui/` (it reads only
3442+
# this repository's `.github/workflows/`). They judge what objectui ships
3443+
# — `ui/content/docs/**`, `ui/skills/**`, the package READMEs and the
3444+
# documented component types — so the change most likely to trip them is
3445+
# a docs-only or skills-only PR, which the `filter` job's `ui` globs
3446+
# already include.
3447+
#
3448+
# Ported as that workflow ran them, in its order: the install-free gates
3449+
# here, before the install; the gates that read built `dist/*.d.ts` after
3450+
# this job's last build, below. Every step keeps its `<check> — <step>`
3451+
# name, and every one runs `if: !cancelled()` (or on the install / build
3452+
# it needs), so one red gate never hides another of these; each script's
3453+
# header is the authority on what it checks. Dropped in the port: the
3454+
# `.objectstack-pin` restore / build / save (the merged tree builds
3455+
# `@objectstack/*` from the workspace, see the header above
3456+
# `type-check-ui`) and the turbo-cache report / prune bookkeeping (this
3457+
# job's own restore and save serve the build below).
3458+
- name: Control Byte Scan — Scan tracked text files for raw control bytes
3459+
if: ${{ !cancelled() }}
3460+
run: pnpm --dir ui run check:control-bytes
3461+
3462+
- name: Action Ref Convention — Check action reference spelling against the declared convention
3463+
if: ${{ !cancelled() }}
3464+
run: pnpm --dir ui run check:action-ref-convention
3465+
3466+
# Self-test first: a scan whose recogniser is broken reports a clean tree.
3467+
- name: Pre-Install Import Graph Check — Check the pre-install gates' import graphs
3468+
if: ${{ !cancelled() }}
3469+
run: |
3470+
pnpm --dir ui run check:pre-install-import-graph --self-test
3471+
pnpm --dir ui run check:pre-install-import-graph
3472+
3473+
- name: Shell Escape Residue Scan — Check for machine-produced shell-escape residue in fenced examples
3474+
if: ${{ !cancelled() }}
3475+
run: pnpm --dir ui run check:shell-escape-residue
3476+
3477+
- name: Inert vi.mock Specifier Check — Check every relative vi.mock specifier resolves
3478+
if: ${{ !cancelled() }}
3479+
run: pnpm --dir ui run check:vi-mock-specifiers
3480+
3481+
- name: Inert vi.mock Specifier Check — Check every covered vi.mock factory inherits the real export surface
3482+
if: ${{ !cancelled() }}
3483+
run: pnpm --dir ui run check:vi-mock-inherit
3484+
3485+
- name: Internal Docs Link Check — Check internal docs links
3486+
if: ${{ !cancelled() }}
3487+
run: pnpm --dir ui run docs:check-links
3488+
3489+
- name: Doc Fence Language Check — Check that no fence spelling hides a TypeScript block
3490+
if: ${{ !cancelled() }}
3491+
run: |
3492+
pnpm --dir ui run check:doc-fences --self-test
3493+
pnpm --dir ui run check:doc-fences
3494+
3495+
- name: Doc Example Id Check — Check documented example ids against the catalog registry
3496+
if: ${{ !cancelled() }}
3497+
run: pnpm --dir ui run check:doc-example-ids
3498+
3499+
- name: Doc Component Type Check — Check documented component types against the registry
3500+
if: ${{ !cancelled() }}
3501+
run: pnpm --dir ui run check:doc-types
3502+
3503+
- name: Doc Component Type Check — Check prompt-taught component keys render
3504+
if: ${{ !cancelled() }}
3505+
run: pnpm --dir ui run check:prompt-keys
3506+
3507+
- name: Skill Guide Path Check — Check paths stated in the skill guides
3508+
if: ${{ !cancelled() }}
3509+
run: pnpm --dir ui run check:skills-paths
3510+
3511+
- name: Skill Eval Token Check — Self-test the oracle and the whole-token rule, both directions
3512+
if: ${{ !cancelled() }}
3513+
run: pnpm --dir ui run check:skill-eval-tokens --self-test
3514+
3515+
- name: Skill Eval Token Check — Check every eval must_contain token against the guides
3516+
if: ${{ !cancelled() }}
3517+
run: pnpm --dir ui run check:skill-eval-tokens
3518+
3519+
- name: Docs Route Eager Closure Check — Weigh the docs route eager closure
3520+
if: ${{ !cancelled() }}
3521+
run: pnpm --dir ui run check:docs-route-closure
3522+
34393523
- name: Install dependencies
3524+
id: install
3525+
if: ${{ !cancelled() }}
34403526
run: pnpm install --frozen-lockfile
34413527

34423528
- name: Build the @objectstack packages objectui consumes
@@ -3476,6 +3562,93 @@ jobs:
34763562
- name: Verify the ui CLI's own check command passes on the ui tree
34773563
run: pnpm --dir ui run check
34783564

3565+
# ── objectui's Repo Gates that read the built type surface ───────────
3566+
# Gated on the install alone, so a red lint step above hides none of
3567+
# them. The two derive steps capture the gate's status before writing
3568+
# the output: a command substitution inside `echo` reports `echo`'s
3569+
# status, and a failed derivation would read as an empty filter.
3570+
- name: Skill Example Check — Derive the packages the marked examples import
3571+
id: ui-skill-filter
3572+
if: ${{ !cancelled() && steps.install.outcome == 'success' }}
3573+
run: |
3574+
status=0
3575+
args="$(pnpm --dir ui run --silent check:skill-examples --build-filter)" || status=$?
3576+
if [ "$status" -ne 0 ]; then
3577+
echo "::error::Could not derive the build filter: \`check:skill-examples --build-filter\` exited $status. Refusing to continue — carrying on would build every package instead of the ones the marked examples import." >&2
3578+
exit "$status"
3579+
fi
3580+
case "$args" in
3581+
*--filter=*) ;;
3582+
*)
3583+
echo "::error::The derived build filter names no package (got: '$args'). Refusing to continue." >&2
3584+
exit 1
3585+
;;
3586+
esac
3587+
echo "args=$args" >> "$GITHUB_OUTPUT"
3588+
3589+
- name: Doc Snippet Type Check — Derive the packages the covered snippets import
3590+
id: ui-snippet-filter
3591+
if: ${{ !cancelled() && steps.install.outcome == 'success' }}
3592+
run: |
3593+
status=0
3594+
args="$(pnpm --dir ui run --silent check:doc-snippets --build-filter)" || status=$?
3595+
if [ "$status" -ne 0 ]; then
3596+
echo "::error::Could not derive the build filter: \`check:doc-snippets --build-filter\` exited $status. Refusing to continue — carrying on would build every package instead of the ones the covered snippets import." >&2
3597+
exit "$status"
3598+
fi
3599+
case "$args" in
3600+
*--filter=*) ;;
3601+
*)
3602+
echo "::error::The derived build filter names no package (got: '$args'). Refusing to continue." >&2
3603+
exit 1
3604+
;;
3605+
esac
3606+
echo "args=$args" >> "$GITHUB_OUTPUT"
3607+
3608+
# One build for the gates below: every package under `ui/packages/` (the
3609+
# README export check reads each one's declared type entry) in union with
3610+
# the two derived closures. The derived filters are lists of `--filter=`
3611+
# words and stay unquoted so they word-split. ⛔ Never an unfiltered
3612+
# `turbo run build`.
3613+
- name: Build every ui package the gates below read
3614+
id: ui-gate-build
3615+
if: ${{ !cancelled() && steps.install.outcome == 'success' }}
3616+
env:
3617+
SKILL_FILTER: ${{ steps.ui-skill-filter.outputs.args }}
3618+
SNIPPET_FILTER: ${{ steps.ui-snippet-filter.outputs.args }}
3619+
run: pnpm exec turbo run build --concurrency=4 --filter='./ui/packages/*' $SKILL_FILTER $SNIPPET_FILTER
3620+
3621+
- name: Skill Example Check — Self-test the marker convention, both directions
3622+
if: ${{ !cancelled() && steps.ui-gate-build.outcome == 'success' }}
3623+
run: pnpm --dir ui run check:skill-examples --self-test
3624+
3625+
- name: Skill Example Check — Check the marked skill examples against the built types
3626+
if: ${{ !cancelled() && steps.ui-gate-build.outcome == 'success' }}
3627+
run: pnpm --dir ui run check:skill-examples
3628+
3629+
# Report-only: exits 0 whatever it finds, non-zero only when the
3630+
# instrument is broken. Before the blocking gate, so its census is read
3631+
# on exactly the runs where the corpus moved.
3632+
- name: Doc Snippet Type Check — Census the code emitted from template literals (report-only)
3633+
if: ${{ !cancelled() && steps.ui-gate-build.outcome == 'success' }}
3634+
run: pnpm --dir ui run check:doc-snippets --emit-census
3635+
3636+
- name: Doc Snippet Type Check — Compile documentation snippets against the built types
3637+
if: ${{ !cancelled() && steps.ui-gate-build.outcome == 'success' }}
3638+
run: pnpm --dir ui run check:doc-snippets
3639+
3640+
- name: Doc Snippet Type Check — Compile JSDoc `@example` blocks against the built types
3641+
if: ${{ !cancelled() && steps.ui-gate-build.outcome == 'success' }}
3642+
run: pnpm --dir ui run check:doc-examples
3643+
3644+
- name: Doc Snippet Type Check — Judge JSON doc fences through the strict authoring face
3645+
if: ${{ !cancelled() && steps.ui-gate-build.outcome == 'success' }}
3646+
run: pnpm --dir ui run check:doc-json
3647+
3648+
- name: README Export Check — Check every README self-import against the real export surface
3649+
if: ${{ !cancelled() && steps.ui-gate-build.outcome == 'success' }}
3650+
run: pnpm --dir ui run check:readme-exports
3651+
34793652
- name: Save Turbo cache (main only)
34803653
if: always() && github.event_name == 'push'
34813654
uses: actions/cache/save@v6

0 commit comments

Comments
 (0)