Skip to content

Commit 67c1714

Browse files
committed
test(ui/scripts): retarget or retire every reader of the deleted CI guide page
Claude-Session: https://claude.ai/code/session_01QSeKYoVqdPtw3tbJG1vCDH Co-authored-by: Claude <noreply@anthropic.com>
1 parent 1e7064e commit 67c1714

33 files changed

Lines changed: 126 additions & 633 deletions

‎CONTRIBUTING.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,14 @@ vitest 调用被拒绝:从包目录跑 vitest 会静默跑错测试集 (objectui
267267

268268
Its "repository root" is `ui/`. The guard is `ui/scripts/vitest-invocation-guard.mjs`.
269269

270+
### UI CI
271+
272+
GitHub runs only the workflows in the repository root's
273+
[`.github/workflows/`](./.github/workflows/), so a `ui/` change is checked by the same
274+
`ci.yml` as the rest of the repository: its `Lint UI`, `Type Check UI`, `Test UI` and
275+
`Build & E2E UI` jobs run when a pull request changes `ui/`. Read those jobs for what each one
276+
runs; `ui/` keeps no CI guide of its own.
277+
270278
### UI examples
271279

272280
No directory under `ui/examples/` is a dev server: `hello-world` is a snippet to paste into

‎ui/e2e/live/ci/backend.env‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
# OBJECTSTACK_VERSION — the published @objectstack/* npm version the backend
55
# runs on. Until objectui moved into the objectstack repository it had to
66
# match the @objectstack/spec version this repo's pnpm-lock.yaml resolved,
7-
# and ci-cd-pipeline-doc.test.ts required the two equal (objectui#7689).
7+
# and objectui's CI-guide pin test (deleted by objectstack#26058) required the two equal
8+
# (objectui#7689).
89
# Since the import (objectstack#25803) the console builds against the
910
# workspace's own @objectstack/spec, a lockfile link with no version, so
1011
# that comparison is retired and this value is the published backend the

‎ui/e2e/live/saved-view-filter.spec.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { test, expect } from '@playwright/test';
88
* only the server can answer the question the issue asked: does it accept a
99
* rule array in `$filter`? It does not. Measured against the published backend
1010
* backend this lane pins — `OBJECTSTACK_VERSION` in `e2e/live/ci/backend.env`,
11-
* held to the lockfile by `scripts/__tests__/ci-cd-pipeline-doc.test.ts`
12-
* (objectui#7689), with the showcase-app commit derived from it at boot from
11+
* once held to the lockfile by objectui's CI-guide pin test (objectui#7689; deleted by
12+
* objectstack#26058), with the showcase-app commit derived from it at boot from
1313
* the matching `@objectstack/cli` release tag (objectui#7964). That pin has
1414
* moved since this measurement was first taken, which is why it is named by
1515
* FILE and not by value: a version literal written here goes stale behind the

‎ui/packages/auth/src/__tests__/reserved-auth-features.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
*
4646
* ## Why the consumer sweep is a blunt string match
4747
*
48-
* It follows the `scripts/__tests__/ci-cd-pipeline-doc.test.ts` pattern (#4170):
48+
* It follows the pattern objectui's CI-guide pin test set (#4170; deleted by objectstack#26058):
4949
* read the real files, compare them, pin the inverse direction too. A type-aware
5050
* "is this identifier read anywhere" analysis would be more precise and much more
5151
* fragile, and it would still miss the reachable path that has no static reference

‎ui/scripts/__tests__/check-control-bytes.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ describe('wiring — the gate is actually reachable and actually runs', () => {
505505
// a markdown-only change anywhere under `ui/`.
506506
expect(withoutComments(triggerBlock(ci))).not.toMatch(/^\s+paths(-ignore)?:/m);
507507
const globs = uiFilterGlobs(ci);
508-
const missed = ['README.md', 'content/docs/guide/ci-cd-pipeline.md', 'packages/core/README.md']
508+
const missed = ['README.md', 'content/docs/guide/deployment.md', 'packages/core/README.md']
509509
.map(repoPath)
510510
.filter((file) => !globs.some((glob) => globMatches(glob, file)));
511511
expect(missed, 'a markdown-only change under ui/ would skip Lint UI').toEqual([]);

‎ui/scripts/__tests__/check-doc-example-shared-reader.test.ts‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -490,12 +490,6 @@ describe('check-doc-example-shared-reader — this repository', () => {
490490
jobBlock(rootCi(), UI_JOBS.typeCheck),
491491
'the gate must run in CI, next to the other source-parsing gates',
492492
).toContain(`run: ${uiRun('check:doc-example-readers')}`);
493-
494-
// The page that inventories the gates is pinned by command (objectui#3653), so
495-
// this would fail there too — asserted here as well because a reader looking
496-
// for this gate looks at this file first.
497-
const page = fs.readFileSync(path.join(repoRoot, 'content/docs/guide/ci-cd-pipeline.md'), 'utf8');
498-
expect(page).toContain('check:doc-example-readers');
499493
});
500494
});
501495

‎ui/scripts/__tests__/check-doc-example-types.test.ts‎

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -546,31 +546,9 @@ describe('wiring — the gate is reachable by name, and documented by command',
546546
// case at the bottom keeps its `package.json` half and drops the workflow
547547
// half for the same reason.
548548

549-
/**
550-
* objectui#3653's discipline, applied by hand here: the page that inventories
551-
* this repository's gates must name the command a contributor can be stopped
552-
* by. `doc-snippet-types.yml` carries no `commandParity` unit in
553-
* `ci-cd-pipeline-doc.test.ts` — verified when this landed — so this stands in
554-
* for one rather than relying on a pin that does not cover the section.
555-
*/
556-
it('is documented on the page that inventories the gates, by command', () => {
557-
const page = fs.readFileSync(
558-
path.join(repoRoot, 'content/docs/guide/ci-cd-pipeline.md'),
559-
'utf8',
560-
);
561-
expect(page, 'a contributor stopped by this gate must be able to find it').toContain(
562-
'pnpm check:doc-examples',
563-
);
564-
expect(page).toContain(GATE);
565-
// The by-command row, asserted as the whole row rather than by a regex that
566-
// could drift onto the prose mentions elsewhere in the same section.
567-
const row = page
568-
.split('\n')
569-
.filter((line) => line.startsWith('|') && line.includes('`pnpm check:doc-examples`'));
570-
expect(row, 'exactly one by-command table row must name this gate').toHaveLength(1);
571-
expect(row[0], 'the page must say the gate BLOCKS, not merely that it exists').toContain('**Yes**');
572-
expect(row[0]).toContain(GATE);
573-
});
549+
// `is documented on the page that inventories the gates, by command` retired
550+
// with objectstack#26944, which deleted that page (objectui's CI guide, which
551+
// described workflows that run nowhere under the monorepo).
574552

575553
it('the root package.json alias invokes the gate', () => {
576554
const pkg = JSON.parse(fs.readFileSync(path.join(repoRoot, 'package.json'), 'utf8')) as {

‎ui/scripts/__tests__/check-doc-expression-carriage.test.ts‎

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -856,28 +856,15 @@ describe('check-doc-expression-carriage: the real tree, and the posture', () =>
856856
});
857857
});
858858

859-
describe('check-doc-expression-carriage: the wiring', () => {
860-
// `is actually run by ci.yml` retired with objectstack#25712. The census ran,
861-
// report-only, in objectui ci.yml's `docs` job (`Build Docs`), and that file
862-
// runs nowhere under the monorepo. The job is row 7 `Build Docs
863-
// (@object-ui/site)` of the objectstack#25697 workflow roster, "kept,
864-
// follow-up port": no root job runs the census until that port lands, and
865-
// the port brings this pin back against its job (`helpers/root-ci.ts`).
866-
867-
it('is named on the page that documents what CI runs', () => {
868-
const page = fs.readFileSync(path.join(ROOT, 'content/docs/guide/ci-cd-pipeline.md'), 'utf8');
869-
expect(page).toContain(GATE);
870-
// objectui#3653 pins the pairing by command; this asserts the page also says
871-
// the posture, because a row that reads like a guardrail when the step blocks
872-
// nothing is the objectui#3451 mistake.
873-
const row = page.split('\n').find((line) => line.startsWith('|') && line.includes(GATE));
874-
expect(row, 'the docs job row must name the gate').toBeDefined();
875-
expect(row!.toLowerCase()).toContain('report-only');
876-
// objectui#7878: the row named `content/docs/**` while the walk had widened.
877-
// A row that understates a gate's reach is the same defect one level up from
878-
// objectui#3451 — a page describing a guardrail that is not the one that runs.
879-
expect(row!).toContain(DOCS_ROOT);
880-
expect(row!).toContain(`${APP_DOCS.dir}/`);
881-
for (const name of ROOT_PAGES) expect(row!).toContain(name);
882-
});
883-
});
859+
// The wiring.
860+
//
861+
// `is actually run by ci.yml` retired with objectstack#25712. The census ran,
862+
// report-only, in objectui ci.yml's `docs` job (`Build Docs`), and that file
863+
// runs nowhere under the monorepo. The job is row 7 `Build Docs
864+
// (@object-ui/site)` of the objectstack#25697 workflow roster, "kept,
865+
// follow-up port": no root job runs the census until that port lands, and
866+
// the port brings this pin back against its job (`helpers/root-ci.ts`).
867+
//
868+
// `is named on the page that documents what CI runs` retired with
869+
// objectstack#26944, which deleted that page: it described objectui's
870+
// workflows, and the census runs in none of the root ones yet.

‎ui/scripts/__tests__/check-doc-fence-languages.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ describe('check-doc-fence-languages is wired, not merely present', () => {
519519
// The root job runs on the `filter` job's `ui` globs, so those globs are the
520520
// path filter that matters, and a docs-only change under `ui/` must match.
521521
const globs = uiFilterGlobs(rootCi());
522-
const missed = ['content/docs/guide/ci-cd-pipeline.md', 'packages/core/README.md']
522+
const missed = ['content/docs/guide/deployment.md', 'packages/core/README.md']
523523
.map(repoPath)
524524
.filter((file) => !globs.some((glob) => globMatches(glob, file)));
525525
expect(missed, 'a docs-only change under ui/ would skip Lint UI').toEqual([]);

‎ui/scripts/__tests__/check-doc-json-fences.test.ts‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -536,11 +536,10 @@ describe('wiring — the gate is reachable by name, and documented', () => {
536536
// into the root `Lint UI` job and brings these pins back against that job, by
537537
// path.
538538

539-
it('has a root script and is documented on the page that inventories the gates', () => {
539+
// Its page half (`pnpm check:doc-json` named on the page that inventoried the
540+
// gates) retired with objectstack#26944, which deleted that page.
541+
it('has a root script', () => {
540542
const manifest = JSON.parse(fs.readFileSync(path.join(repoRoot, 'package.json'), 'utf8'));
541543
expect(manifest.scripts['check:doc-json']).toBe(`node ${GATE}`);
542-
const page = fs.readFileSync(path.join(repoRoot, 'content/docs/guide/ci-cd-pipeline.md'), 'utf8');
543-
expect(page).toContain('pnpm check:doc-json');
544-
expect(page).toContain(GATE);
545544
});
546545
});

0 commit comments

Comments
 (0)