Skip to content

Commit 26fb5ba

Browse files
committed
tooling(ui-wiring): spell objectui invocations so root-scoped gates do not misread them (objectstack#25697)
This repo's workflow gates key `scripts/<x>` and `pnpm <alias>` against the repository root and do not read `working-directory`. Under `working-directory: ui`, objectui's `node scripts/check-entry-guard.mjs` was credited to objectstack's file of the same name, and `scripts/check-lint-coverage.mjs`, which only objectui has, read as a missing script (check-self-test-wired --self-test went red on it). Every objectui command in the ui jobs is now `pnpm --dir ui run <its alias>` or `pnpm --dir ui exec ...`. Test UI drops objectui's per-file timings reporter and its upload: both feed the dataset refresh workflow, which is in the governance-workflow audit, and the sequencer reads the committed dataset meanwhile. check-llms-txt opens every manifest under the workspace globs, so the ui roots are declared as `ui/**/package.json` beside the others. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RSDL3SFtJaKzcymvCD8RsU
1 parent 011136c commit 26fb5ba

2 files changed

Lines changed: 61 additions & 90 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 57 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -3294,10 +3294,18 @@ jobs:
32943294
# step; the seven names match the `ui_consumers` filter).
32953295
# - objectui's per-job "Decide whether this change needs a full run" step is
32963296
# replaced by the `filter` job's `ui` / `ui_consumers` outputs.
3297-
# - commands that are objectui ROOT scripts run with `working-directory: ui`,
3298-
# because they assume cwd = the objectui root; turbo runs from this repo's
3299-
# root with directory filters, because `ui/package.json`'s own `lint` /
3300-
# `type-check` scripts are `turbo run <task>` and would recurse.
3297+
# - objectui's own commands are spelled `pnpm --dir ui run <its alias>`
3298+
# (or `pnpm --dir ui exec ...`), so they run with cwd = the objectui root,
3299+
# which they assume. ⛔ Not `node scripts/<x>` or `pnpm run <x>` under
3300+
# `working-directory: ui`: this repo's workflow gates (check-self-test-
3301+
# wired, dispatch-gates' derivation and others) key `scripts/<x>` and
3302+
# `pnpm <alias>` against THIS repo's root and do not read
3303+
# `working-directory`, so objectui's `scripts/check-entry-guard.mjs`
3304+
# would be credited to objectstack's file of the same name, and a name
3305+
# only objectui has would read as a missing script;
3306+
# - turbo runs from this repo's root with directory filters, because
3307+
# `ui/package.json`'s own `lint` / `type-check` scripts are
3308+
# `turbo run <task>` and would recurse.
33013309
# - objectui's root-only turbo tasks `//#lint:root` and `//#type-check:e2e`
33023310
# are steps here (turbo.json carries no dependsOn on a package that does
33033311
# not exist yet; turbo refuses the whole run over one).
@@ -3361,8 +3369,7 @@ jobs:
33613369
# structural mistake: turbo skips a package with no `type-check` script,
33623370
# so without it a package that lacks one reads as passing.
33633371
- name: Verify type-check coverage
3364-
working-directory: ui
3365-
run: node scripts/check-type-check-coverage.mjs
3372+
run: pnpm --dir ui run type-check:coverage
33663373

33673374
- name: Install dependencies
33683375
run: pnpm install --frozen-lockfile
@@ -3382,86 +3389,66 @@ jobs:
33823389
--filter=@objectstack/types...
33833390
33843391
- name: Verify every imported package is declared by the package that ships it
3385-
working-directory: ui
3386-
run: pnpm run check:phantom-deps
3392+
run: pnpm --dir ui run check:phantom-deps
33873393

33883394
- name: Verify no package imports itself by name
3389-
working-directory: ui
3390-
run: pnpm run check:self-import
3395+
run: pnpm --dir ui run check:self-import
33913396

33923397
- name: Verify no covered package ships a source file nothing reaches
3393-
working-directory: ui
3394-
run: pnpm run check:unreferenced-sources
3398+
run: pnpm --dir ui run check:unreferenced-sources
33953399

33963400
- name: Verify no doc comment prescribes a spelling a shared reader owns
3397-
working-directory: ui
3398-
run: pnpm run check:doc-example-readers
3401+
run: pnpm --dir ui run check:doc-example-readers
33993402

34003403
- name: Verify every handler key a registered renderer reads is declared by its arm
3401-
working-directory: ui
3402-
run: pnpm run check:handler-key-reads
3404+
run: pnpm --dir ui run check:handler-key-reads
34033405

34043406
- name: Verify every object-metadata write door applies the write guard
3405-
working-directory: ui
3406-
run: pnpm run check:metadata-write-doors
3407+
run: pnpm --dir ui run check:metadata-write-doors
34073408

34083409
- name: Verify published build tsconfigs exclude tooling directories
3409-
working-directory: ui
3410-
run: pnpm run check:published-tsconfig-exclude
3410+
run: pnpm --dir ui run check:published-tsconfig-exclude
34113411

34123412
- name: Verify every sideEffects array names exactly its registering modules
3413-
working-directory: ui
3414-
run: pnpm run check:side-effects-array
3413+
run: pnpm --dir ui run check:side-effects-array
34153414

34163415
- name: Verify every ElementDataSourceGate wrapper reaches the declaration seam
3417-
working-directory: ui
3418-
run: pnpm run check:element-data-source-declaration
3416+
run: pnpm --dir ui run check:element-data-source-declaration
34193417

34203418
- name: Verify published ESM packages emit resolvable relative specifiers
3421-
working-directory: ui
3422-
run: pnpm run check:esm-specifiers
3419+
run: pnpm --dir ui run check:esm-specifiers
34233420

34243421
- name: Verify spec-named symbols are derived, not hand-written
3425-
working-directory: ui
3426-
run: pnpm run check:spec-symbols
3422+
run: pnpm --dir ui run check:spec-symbols
34273423

34283424
- name: Verify action renderers forward every key the runtime reads
3429-
working-directory: ui
3430-
run: pnpm run check:action-forward-parity
3425+
run: pnpm --dir ui run check:action-forward-parity
34313426

34323427
- name: Verify designer field payloads declare only keys FieldSchema accepts
3433-
working-directory: ui
3434-
run: pnpm run check:designer-field-key-parity
3428+
run: pnpm --dir ui run check:designer-field-key-parity
34353429

34363430
- name: Verify authored icon names are live lucide icons keys
3437-
working-directory: ui
3438-
run: pnpm run check:icon-record-names
3431+
run: pnpm --dir ui run check:icon-record-names
34393432

34403433
- name: Verify t() call-site keys exist in the en locale pack
3441-
working-directory: ui
3442-
run: pnpm run check:i18n-keys
3434+
run: pnpm --dir ui run check:i18n-keys
34433435

34443436
- name: Verify changed en strings were followed by the nine translations
3445-
working-directory: ui
3446-
run: pnpm run check:i18n-drift
3437+
run: pnpm --dir ui run check:i18n-drift
34473438

34483439
- name: Verify the metadata-admin designer string tables stay paired
3449-
working-directory: ui
3450-
run: pnpm run check:i18n-designer-parity
3440+
run: pnpm --dir ui run check:i18n-designer-parity
34513441

34523442
- name: Type-check the ui scripts
3453-
working-directory: ui
3454-
run: pnpm run type-check:scripts
3443+
run: pnpm --dir ui run type-check:scripts
34553444

34563445
- name: Type-check the ui root Vitest config
3457-
working-directory: ui
3458-
run: pnpm run type-check:vitest-config
3446+
run: pnpm --dir ui run type-check:vitest-config
34593447

34603448
# objectui's `//#type-check:e2e` root task, which its turbo.json made a
34613449
# dependency of every `type-check`; here it is this step.
34623450
- name: Type-check the ui e2e suite
3463-
working-directory: ui
3464-
run: pnpm run type-check:e2e
3451+
run: pnpm --dir ui run type-check:e2e
34653452

34663453
# A pull_request or merge_group run type-checks the ui packages turbo
34673454
# reports changed since the base, plus their dependents — a change to
@@ -3501,8 +3488,7 @@ jobs:
35013488
fi
35023489
35033490
- name: Type-check ui repo-root vitest setup files
3504-
working-directory: ui
3505-
run: pnpm run type-check:vitest-setup
3491+
run: pnpm --dir ui run type-check:vitest-setup
35063492

35073493
- name: Save Turbo cache (main only)
35083494
if: always() && github.event_name == 'push'
@@ -3605,23 +3591,13 @@ jobs:
36053591
--filter=@objectstack/sdui-parser... \
36063592
--filter=@objectstack/types...
36073593
3594+
# objectui's full-battery runs also pass its per-file timings reporter
3595+
# and upload the result for the weekly dataset refresh. Both belong to
3596+
# that refresh workflow, which is in the governance-workflow audit
3597+
# (sub-issue 4 of the epic); until it is ported the committed dataset
3598+
# is what the sequencer reads.
36083599
- name: Run the ui tests (shard ${{ matrix.shard }}/16)
3609-
working-directory: ui
3610-
env:
3611-
OBJECTUI_TEST_TIMINGS_OUT: ${{ runner.temp }}/test-file-timings/shard-${{ matrix.shard }}.json
3612-
run: pnpm test --shard=${{ matrix.shard }}/16 --reporter=default --reporter=github-actions --reporter=./scripts/test-file-timings.mjs
3613-
3614-
# The per-file timings the shard dataset is regenerated from. Only main's
3615-
# runs feed it, as in objectui; the refresh workflow itself is part of the
3616-
# governance-workflow audit (sub-issue 4 of the epic).
3617-
- name: Upload this shard's per-file timings
3618-
if: "!cancelled() && (github.event_name == 'push' || github.event_name == 'schedule')"
3619-
uses: actions/upload-artifact@v7
3620-
with:
3621-
name: ui-test-file-timings-${{ matrix.shard }}
3622-
path: ${{ runner.temp }}/test-file-timings/
3623-
retention-days: 7
3624-
if-no-files-found: warn
3600+
run: pnpm --dir ui run test --shard=${{ matrix.shard }}/16 --reporter=default --reporter=github-actions
36253601

36263602
- name: Save Turbo cache (main only)
36273603
if: always() && github.event_name == 'push' && matrix.shard == 1
@@ -3676,20 +3652,17 @@ jobs:
36763652
${{ runner.os }}-turbo-build-core-
36773653
36783654
- name: Verify ui lint coverage
3679-
working-directory: ui
3680-
run: node scripts/check-lint-coverage.mjs
3655+
run: pnpm --dir ui run lint:coverage
36813656

36823657
- name: Verify every ui scripts entry guard goes through one predicate
3683-
working-directory: ui
36843658
run: |
3685-
node scripts/check-entry-guard.mjs --self-test
3686-
node scripts/check-entry-guard.mjs
3659+
pnpm --dir ui run check:entry-guard --self-test
3660+
pnpm --dir ui run check:entry-guard
36873661
36883662
- name: Verify the ui shell holds the bash 3.2 floor
3689-
working-directory: ui
36903663
run: |
3691-
node scripts/check-bash32-floor.mjs --self-test
3692-
node scripts/check-bash32-floor.mjs
3664+
pnpm --dir ui run check:bash32-floor --self-test
3665+
pnpm --dir ui run check:bash32-floor
36933666
36943667
- name: Install dependencies
36953668
run: pnpm install --frozen-lockfile
@@ -3708,8 +3681,7 @@ jobs:
37083681
# objectui's `//#lint:root` root task, which its turbo.json made a
37093682
# dependency of every `lint`; here it is this step.
37103683
- name: Lint the ui repo-root files
3711-
working-directory: ui
3712-
run: pnpm run lint:root
3684+
run: pnpm --dir ui run lint:root
37133685

37143686
- name: Lint the ui packages
37153687
env:
@@ -3721,19 +3693,16 @@ jobs:
37213693
--filter='./ui/examples/*'
37223694
37233695
- name: Check every vi.mock override matches the declared export shape
3724-
working-directory: ui
3725-
run: node scripts/check-vi-mock-override-shape.mjs
3696+
run: pnpm --dir ui run check:vi-mock-override-shape
37263697

37273698
- name: Verify no ui test resolves a repository path from the process cwd
3728-
working-directory: ui
3729-
run: node scripts/check-test-path-roots.mjs
3699+
run: pnpm --dir ui run check:test-path-roots
37303700

37313701
- name: Build the ui CLI the self-check runs
37323702
run: pnpm exec turbo run build --concurrency=4 --filter='./ui/packages/cli...'
37333703

37343704
- name: Verify the ui CLI's own check command passes on the ui tree
3735-
working-directory: ui
3736-
run: pnpm run check
3705+
run: pnpm --dir ui run check
37373706

37383707
- name: Save Turbo cache (main only)
37393708
if: always() && github.event_name == 'push'
@@ -3806,10 +3775,9 @@ jobs:
38063775
--filter=@objectstack/types...
38073776
38083777
- name: Build the Console for E2E
3809-
working-directory: ui/apps/console
38103778
env:
38113779
VITE_BASE_PATH: /console/
3812-
run: pnpm exec vite build
3780+
run: pnpm --dir ui/apps/console exec vite build
38133781

38143782
- name: Verify the Console build artifact
38153783
run: |
@@ -3821,10 +3789,9 @@ jobs:
38213789
38223790
- name: Get the Playwright version
38233791
id: playwright-version
3824-
working-directory: ui
38253792
run: |
38263793
set -eo pipefail
3827-
if ! version=$(pnpm list @playwright/test --depth=0 --json | jq -r '.[0].devDependencies["@playwright/test"].version'); then
3794+
if ! version=$(pnpm --dir ui list @playwright/test --depth=0 --json | jq -r '.[0].devDependencies["@playwright/test"].version'); then
38283795
echo "::error::Reading the @playwright/test version failed (pnpm list --json | jq). Refusing to write a Playwright browser cache key from it."
38293796
exit 1
38303797
fi
@@ -3843,16 +3810,16 @@ jobs:
38433810

38443811
- name: Install Playwright browsers
38453812
if: steps.playwright-cache.outputs.cache-hit != 'true'
3846-
working-directory: ui
3847-
run: pnpm exec playwright install chromium
3813+
run: pnpm --dir ui exec playwright install chromium
38483814

3815+
# Run from inside ui/scripts: the script is cwd-agnostic apart from its
3816+
# `pnpm exec playwright`, which resolves ui/package.json upwards.
38493817
- name: Ensure Chromium can launch
3850-
working-directory: ui
3851-
run: bash scripts/ensure-chromium-ready.sh
3818+
working-directory: ui/scripts
3819+
run: bash ensure-chromium-ready.sh
38523820

38533821
- name: Run the ui E2E tests
3854-
working-directory: ui
3855-
run: pnpm run test:e2e --project=chromium
3822+
run: pnpm --dir ui run test:e2e --project=chromium
38563823

38573824
- name: Upload failure artefacts
38583825
if: ${{ !cancelled() && failure() }}

‎packages/spec/scripts/check-llms-txt.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,10 @@ export const DECLARED_WATCH_HINTS = [
227227
'packages/**/package.json',
228228
'apps/*/package.json',
229229
'examples/*/package.json',
230+
// The objectui tree's workspace roots (`ui`, `ui/packages/*`, `ui/apps/*`,
231+
// `ui/examples/*`, objectstack#25677). This gate opens every manifest under
232+
// them once the tree is imported; until then the globs match nothing.
233+
'ui/**/package.json',
230234
];
231235

232236
/** A domain directory with no `*.zod.ts` under it is not a schema domain. */

0 commit comments

Comments
 (0)