Skip to content

gate-101 asks for demo rows a schema's own test forbids #765

Description

@rubenvdlinde

What happens

gate-101 demo-data-coverage requires three demo objects for every schema in a register. A schema whose rows the app seeds itself cannot satisfy it without re-creating a defect the app already fixed.

dossiq's dossiqIntegration is that shape. lib/Settings/register.d/96-integrations.json seeds its twelve rows with stable slugs (integration-brp). The demo set deliberately ships none, and tests/Unit/Settings/MockRegisterHasNoSeededCatalogueTest.php fails if anybody puts them back. Its docblock records why:

ImportHandler upserts a seed object on (register, schema, slug), so the two spellings never collapse: an instance with demo data installed carried TWO BRP rows and TWO ZGW rows.

That broke integrations-page.spec.ts twice, once on a Playwright strict-mode violation and once on a demo row claiming a connection failure nobody had measured.

So the gate and the test contradict each other. Measured on ConductionNL/dossiq PR #2569: I added the three rows the gate asked for, the test failed, and I took them out again. The gate stays red on that one schema, on the branch and on development.

The signal the gate could read

The schema already declares what it is:

"dossiqIntegration": {
  "slug": "dossiqIntegration",
  "x-openregister-catalogue": true,
  ...
}

x-openregister-catalogue: true means the rows are the app's own catalogue, seeded at install, not sample data. A schema carrying it has no business in a demo set.

Suggested fix

Skip a schema that declares x-openregister-catalogue: true, and say so in the coverage line rather than silently, so the skip is visible.

If that annotation is not the right signal, an @demo exclude <reason> marker on the schema would do, matching how gates 16, 19 and 26 already take a reason-bearing waiver. Either way the gate needs a way to be told, because right now the only ways to clear it are to ship duplicate rows or to leave it red.

Reproduction

On ConductionNL/dossiq at development:

./vendor/bin/hydra-gates --scope-to-diff --base origin/development   # with any diff touching lib/Settings
FAIL dossiq: register 'dossiq' schema 'dossiqIntegration' has 0 demo object(s), needs 3 (ADR-111 rule 1).

Adding the rows then fails MockRegisterHasNoSeededCatalogueTest::testTheDemoSetShipsNoRowForASeededCatalogue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions