Skip to content

packages/cli and packages/lint have no declared input radius for examples/**, so their four live-importing tests still never run on an examples-only PR #8946

Description

@os-project-manager

What was measured

While building the live-import inventory (#8754, PR #8945), the coupling population split cleanly into three tiers by what CI can actually see. Measured on origin/main @ 7b3c0335dac0f9c01d2c536f12208cde53692305:

tiercountmechanism
invisible4no declared dependency, no declared input glob
inputs-declared2$TURBO_ROOT$/examples/app-showcase/** on the package's #test task
graph-visible63imported by workspace package name, dependency declared

packages/qa/dogfood sits in the covered tiers because it does both: its package.json declares @objectstack/example-showcase and @objectstack/example-crm as workspace:*, andCROSS_PACKAGE_TEST_INPUTS['@objectstack/dogfood'] carries an examples/app-showcase/** glob that turbo.json mirrors onto @objectstack/dogfood#test.

packages/cli and packages/lint do neither. Their four test files reach the showcase app by test-only relative import across a workspace boundary no package dependency declares:

packages/cli/test/i18n-section-coverage.test.ts
packages/cli/test/i18n-tab-coverage.test.ts
packages/lint/src/validate-translatable-sections.test.ts
packages/lint/src/validate-translation-references.test.ts

Why this is worth a separate card

The inventory now makes the coupling discoverable — a dev editing the app can run pnpm examples:live-imports and see exactly which assertions read the file they are touching. That was the whole of #8754's scope, deliberately.

What the inventory does not do is make CI run those tests. Both scoping layers still judge them by where they live, so an examples-only PR still cannot fail on them, and the first signal is still a red Test Core in the shared merge queue — which stalls every lane, not just the one that made the edit (queue build 31825946401 is the signature; it caught #8231's remainder twice in one round).

The mechanism to close it already exists and is already used by a sibling package. CROSS_PACKAGE_TEST_INPUTS in scripts/check-cross-package-test-inputs.mjs drives both layers from one declaration: --union-into adds the package to the affected shard when the diff touches a declared glob, and --verify requires turbo.json to hash the same globs so the task cache moves with them.

Suggested next step (not prescribed here)

Add an input radius for @objectstack/cli and @objectstack/lint naming the example-app paths their tests actually read, and mirror it onto the matching #test tasks in turbo.json. The inventory's reverse index already reports the exact paths, so the radius can be kept narrow rather than examples/**:

examples/app-showcase/src/data/objects/contact.object.ts
examples/app-showcase/src/data/objects/semantic-zoo.object.ts
examples/app-showcase/src/system/translations/index.ts
examples/app-showcase/src/ui/pages/task-triage.page.ts
examples/app-showcase/src/ui/views/contact.view.ts

Two things worth deciding rather than assuming, which is why this is filed rather than done:

  • Radius vs. cost. A declaration puts packages/cli and packages/lint tests on every PR touching those app files. That is the trade the affected-subset optimisation exists to avoid paying blindly, and the narrow-glob option above is the mitigation.
  • Overlap with the decoupling fork. Whether these four should keep asserting over the live app at all is a separate, still-open call (the fork The lint rule that flags nameless sections is regression-pinned against example-app metadata staying broken — fixing the last 3 forces its fixtures onto synthetic data #8515 already had to make once, package-by-package: synthetic fixtures vs. frozen snapshots vs. a lint-time guard). A declared input radius is orthogonal — it makes the current coupling honest to CI without deciding that question — but if the fork is resolved toward decoupling, part of this work becomes unnecessary. Sequencing is a triage call.

Backlinks

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions