Skip to content

refactor(vth): the VTH procedure is a case definition package, and its seeders are deleted - #3791

Merged
rubenvdlinde merged 17 commits into
developmentfrom
refactor/r1-package-vth
Oct 12, 2026
Merged

rubenvdlinde merged 17 commits into
developmentfrom
refactor/r1-package-vth

Conversation

@rubenvdlinde

@rubenvdlinde rubenvdlinde commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Status, 12 October

Ready. #3778 is on development, so this merges on its own.

  • Holds development with merge train 3 (train: land 18 ready PRs (12 Oct, c) #3809). The checklist routes keep development's new controllers; the two VTH template routes stay deleted.
  • composer check:strict passed once on 8e89c99: all checks, PHPUnit 8,325 tests. After it: one prettier fix on tests/vitest/caseTypeListColumns.spec.js and the tightened debt baseline.
  • vitest: the whole suite, 295 files and 3,346 tests, exit 0.
  • Gate 119: eleven procedure-named files are gone, .procedure-code-baseline.json goes from 206 to 195.
  • .debt-baseline.json: psalm.inlineSuppressions 266 to 259.
  • openspec/specs/beta-alignment/spec.md now names the vth package instead of lib/Settings/vth-templates/.
  • CI, read once on this head: "Install packages on a clean instance" is green and format is green. Red in CI and not from this pull request: check:debt-ratchet on eslint.inlineDisables (15 against a baseline of 14, the same on development) and the Quality Report that sums the jobs.
  • The journey runs in the live pass and nightly, not on this pull request (decision 214).
  • refactor(dossiq): the subsidie case type ships as an on-request package #3768 holds this branch, with the shared sweep tests already resolved. Land this one first or in the same train.

Where a line below disagrees with this section, this section is the current one.

What

The VTH procedure is now the case definition package lib/Settings/packages/vth/. The VTH seeders are deleted. Stacked on #3778 (which is on #3654). Merge those first.

  • The package installs on every install and upgrade. It holds six case types, 34 statuses, 20 roles, 26 fields, 17 document types, four published flows and three inspection checklists for toezichtzaak bouw. All ids are fixed.
  • A case type names itself by identifier, equal to the slug the seeder used. Term definitions and the publish step find it under the same key.
  • Handhavingszaak names the regulier flow as its default, because it has two routes.
  • On an instance where the seeders ran, the installer adopts their rows: a case type by title (feat(dossiq): the package installer adopts a case type without an identifier by its title #3778), a status, role, field, document type, flow or checklist by name inside its adopted case type.
  • The three checklists come from refactor lane R3's seed file, unchanged apart from fixed ids.

Deleted

  • Repair/VthSeedDataRepairStep, Repair/SeedVthWorkflowTemplates, all of Repair/Vth/ (seven classes), lib/Settings/vth_seed_data.json, lib/Settings/seed/vth-workflow-templates/, their unit tests, their info.xml steps and the phpstan entry.
  • Service/VTHTemplateService, Controller/VTHTemplateController and the routes /api/vth/templates and /api/vth/templates/{slug}/activate. They repeat the generic TemplateLibraryService for files named vth-*. No screen, journey or collection calls them.

Sweeps

  • New PackageFlowStatusReferencesTest: in every package, a flow names only statuses of its own case type. It replaces ShippedVthTemplateStatusesTest.
  • New test helper ShippedPackageCaseTypes reads package case types in the nested seed shape. CaseFlowDeclarationTest, PublishSeededCaseTypesTest, SeededCaseTypeCategoriesTest and ShippedDeadlineDefinitionCoverageTest read the package through it.
  • SeedPayloadSchemaConformanceTest walks every package's case-type.json and seed/ files.
  • ShippedActionVocabularyTest reads actions inside a flow's JSON strings and exempts no type. The package stores createSubCase, the form the seeder already wrote for spawnCase.
  • Two vitest files read x-index from the package.

Each package gets a collection and a journey

  • Newman: tests/integration/packages/vth.postman_collection.json, 56 reads.
  • Playwright: tests/e2e/packages/vth.spec.ts. Neither ran locally. The PR stays a draft until the journey is green in CI (decision 185).

Decisions made here

  • The VTH template library is content, not a capability. The generic capability exists twice already: TemplateLibraryService and the package installer. So the VTH service and controller are deleted and nothing new is built.
  • lib/Settings/templates/vth-*.json stay, because the generic template library lists them. lib/Settings/vth-templates/*.json (six flow drafts) stay too. No code reads them. Whether they become draft flows in the package is a content question for Ruben.
  • The catalogue entries klacht-toezicht and bezwaar are not in the package. No shipped case type had those slugs, so the seeder skipped them on every install.

Known effects

  • An adopted case type keeps an empty identifier. Adoption does not rewrite a row.
  • A checklist that the old seeder wrote without a case type (its case type was missing at the time) is not recognised, so that instance gets a second copy.
  • Unverified until CI's Newman runs: whether OpenRegister accepts handhavingszaak's workflowDefinition reference before the flow row exists. The case type is written first.

Will conflict

Verified

  • Unit tests, by directory: Repair 384, Flow 86, Architecture 100, CaseDefinition 28 and AppInfo 85 pass.
  • Settings: 303 tests, one failure, inherited. ManifestColumnBindingTest fails on development too: the Organisations page asks kvkCompany for openCases (feat(design): contact and organisation pages on the shared relation-page shape #3762).
  • Not run: composer check:strict, the two vitest files, the journey and the Newman collection. CI not read.

Round 7: the six flow drafts ship as draft flows (decision 208)

  • The six files in lib/Settings/vth-templates/ are now draft flows of the package (flows/concept-*.json), and the directory is gone. A draft is stored with lifecycleStatus: draft. No case follows it until an administrator publishes it.
  • Each draft names statuses by id. Its checklist guards name the items they wait for, and its notifications use the notify action, so the guard and action sweeps hold a draft to what they ask of a published flow.
  • Routes: sloopmelding, toezichtzaak bouw, toezichtzaak milieu and handhavingszaak get version 2 of their existing route. Omgevingsvergunning gets regulier and uitgebreid beside standaard. It also gains the field inhoudelijkeToets, which the regulier draft guards on.
  • MigrateWorkflowDefinitions no longer counts a draft as a flow the case type has. Sloopmelding and toezichtzaak milieu ship only a draft, and without this a clean install would have given them no basis flow. Red first: r7-backfill-red.log.
  • New sweep PackageDraftFlowsTest hands every package's flows to the real WorkflowDefinitionService: a draft is never among the flows a case can follow, never answers for its route, never is a case type's default. Control: a draft marked active fails it (r7-drafts-sweep-control.log).
  • The Newman collection reads each draft back as a draft, and asks for each of the five case types which flow a case follows: a published one, never the draft. The journey does the same.

What an administrator must still do before publishing a draft:

  • The uitgebreide draft puts three steps on the one status Besluitvorming. Give them their own statuses first.
  • A notification on a step is stored and not sent. Only a notification on a transition is sent.
  • Publishing a version 2 draft replaces the published flow on that route. Publishing regulier or uitgebreid adds a route to omgevingsvergunning.
  • The flow editor shows one draft per case type. Omgevingsvergunning now has two.

A draft an administrator changed or published is kept on upgrade: the installer never overwrites a row the instance holds.

Verified this round: Settings 313, Repair 396, Architecture 100 tests exit 0; phpcs and phpmd on MigrateWorkflowDefinitions clean. Not run: composer check:strict, vitest, the journey. openspec/specs/beta-alignment/spec.md still names lib/Settings/vth-templates/ in one scenario; that line is stale and not changed here.

@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/dossiq @ b9e3c8c

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ❌
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ❌
stylelint ✅
build ✅
check-manifest ✅
check-vue3-compile ✅
test-l10n ✅
format ❌
check-schema-l10n ✅
check-l10n-js ✅
check-debt-ratchet ❌
check-types-e2e ✅
composer ✅ ✅ 109/109
npm ✅ ✅ 659/659
app:check-code ⏭️
info.xml ✅
REUSE ❌
lockfile sync ✅
PHPUnit 🚨 NO VERDICT — enabled but never ran
Newman ⏭️
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development.
Hydra gates ⏭️

Quality workflow — 2026-10-12 07:17 UTC

Download the full PDF report from the workflow artifacts.

…ckage-vth

# Conflicts:
#	appinfo/info.xml
#	tests/Unit/Repair/Vth/VthCaseTypeChildSeederTest.php
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/dossiq @ 3b7aace

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ❌
stylelint ✅
build ✅
check-manifest ✅
check-vue3-compile ✅
test-l10n ✅
format ❌
check-schema-l10n ✅
check-l10n-js ✅
check-debt-ratchet ❌
check-types-e2e ✅
composer ✅ ✅ 109/109
npm ✅ ✅ 659/659
app:check-code ⏭️
info.xml ✅
REUSE ❌
lockfile sync ✅
PHPUnit 🚨 NO VERDICT — enabled but never ran
Newman ⏭️
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development.
Hydra gates ⏭️

Quality workflow — 2026-10-12 07:52 UTC

Download the full PDF report from the workflow artifacts.

…ision 208)

The drafts in lib/Settings/vth-templates/ become draft flows of the vth
package, and the directory goes. No case follows a draft until an
administrator publishes it. The workflow backfill no longer counts a
draft as a flow a case type has, so a case type that ships only a draft
keeps its basis flow. Unverified: the Settings, Repair and Architecture
suites are queued.
…e a draft (decision 208)

Verified: Settings 313, Repair 396 and Architecture 100 tests exit 0
with the drafts in. The backfill's draft check is written without a new
branch, so the repair step stays under the phpmd complexity limit.
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/dossiq @ 50f59ef

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-manifest ✅
check-vue3-compile ✅
test-l10n ✅
format ❌
check-schema-l10n ✅
check-l10n-js ✅
check-debt-ratchet ❌
check-types-e2e ✅
composer ✅ ✅ 109/109
npm ✅ ✅ 659/659
app:check-code ⏭️
info.xml ✅
REUSE ❌
lockfile sync ✅
PHPUnit 🚨 NO VERDICT — enabled but never ran
Newman ⏭️
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development.
Hydra gates ⏭️

Quality workflow — 2026-10-12 08:26 UTC

Download the full PDF report from the workflow artifacts.

@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/dossiq @ 18eb478

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-manifest ✅
check-vue3-compile ✅
test-l10n ✅
format ❌
check-schema-l10n ✅
check-l10n-js ✅
check-debt-ratchet ❌
check-types-e2e ✅
composer ✅ ✅ 109/109
npm ✅ ✅ 659/659
app:check-code ⏭️
info.xml ✅
REUSE ❌
lockfile sync ✅
PHPUnit 🚨 NO VERDICT — enabled but never ran
Newman ⏭️
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development.
Hydra gates ⏭️

Quality workflow — 2026-10-12 10:43 UTC

Download the full PDF report from the workflow artifacts.

@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/dossiq @ d690471

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-manifest ✅
check-vue3-compile ✅
test-l10n ✅
format ✅
check-schema-l10n ✅
check-l10n-js ✅
check-debt-ratchet ❌
check-types-e2e ✅
composer ✅ ✅ 109/109
npm ✅ ✅ 659/659
app:check-code ⏭️
info.xml ✅
REUSE ❌
lockfile sync ✅
PHPUnit 🚨 NO VERDICT — enabled but never ran
Newman ⏭️
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development.
Hydra gates ⏭️

Quality workflow — 2026-10-12 14:03 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde
rubenvdlinde merged commit 50d6d61 into development Oct 12, 2026
49 of 51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant