docs(spec): a forms register — form, journey and journeyRun - #2504
Merged
Conversation
Spec only. Adds a `forms` register with three schemas, the API that drives a run, named formats, and a retention job. Programme context: hydra ADR-085. WHY. tilburg-woo-ui implements citizen and supplier intake as ~13,640 lines of hand-written React across seven wizards, each re-implementing step state, per-index validation, progress display and submission. None is resumable — closing the tab loses everything. The declarative half already exists here and in nc-vue: manifest v2 carries config.steps[], visibleWhen and a closed fieldValidation, and CnFormPage renders them. What is missing is the primitive that spans MORE THAN ONE FORM: multiple objects, branching between forms, lookup-and-prefill, a review step, and somewhere to keep a half-finished submission. NAMING. `journey`, not `flow`. OpenRegister already owns `flow` for the automation engine (ADR-065, ~40 change specs, FlowController, flow runs, a visual canvas). A journey is a UI-facing sequence; it may trigger a flow, and it is not one. WHAT THE SPEC PINS - A form's config is validated by the SAME validateManifestV2() path an app manifest is — not a subset schema maintained alongside it. If the two can drift, they will. - Branching reuses $defs.visibleWhen verbatim. A second condition grammar is the most likely way this design rots, so it is forbidden and gated. - Nothing is written until a step declares writes[]. This preserves the property the React wizards have by accident — an abandoned registration leaves no half-built organisation — while adding the resumability they lack. - A resume token is a bearer credential for someone's half-filled form: it must not act as an existence oracle, so a token/run mismatch and an unknown run return identical responses. - Retention ships WITH the schema. A journeyRun holds names, addresses, e-mail and uploads before any of it is a record. The purge reports its row count, because a job that deletes nothing must be distinguishable from one that never ran — this instance's audit purge had never executed while looking exactly like a purge with nothing to do. - Named formats (email, website, nl-phone) replace the per-app validator forks, pinned against the cases tilburg's form-validations.js handles today including its explicit rejections.
Contributor
Quality Report — ConductionNL/openregister @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-specs | ✅ | ||||
| test-l10n | ✅ | ||||
| format | ✅ | ||||
| composer | ✅ | ✅ 175/175 | |||
| npm | ✅ | ✅ 528/528 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| PHPUnit | ✅ | ||||
| Newman | ✅ | ||||
| Playwright | ✅ | ||||
| Hydra gates | ❌ |
Quality workflow — 2026-08-15 08:11 UTC
Download the full PDF report from the workflow artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Spec only. Adds a
formsregister withform,journeyandjourneyRun, the API that drives a run, named formats, and a retention job.Programme context: hydra#581 (ADR-085).
Why
tilburg-woo-uiimplements citizen and supplier intake as ~13,640 lines of hand-written React across seven wizards, each re-implementing step state, per-index validation, progress display and submission. None is resumable — closing the tab loses everything.The declarative half already exists, here and in nc-vue: manifest v2 carries
config.steps[],visibleWhenand a closedfieldValidation, andCnFormPagerenders them. What is missing is the primitive that spans more than one form: multiple objects, branching between forms, lookup-and-prefill, a review step, and somewhere to keep a half-finished submission.Naming
journey, notflow. OpenRegister already ownsflowfor the automation engine — ADR-065, ~40 change specs,FlowController, flow runs, a visual canvas. A journey is a UI-facing sequence; it may trigger a flow, and it is not one.What the spec pins
validateManifestV2()path an app manifest is — not a subset schema maintained alongside it. If the two can drift, they will. The test feeds one fixture through both paths and compares the error objects.$defs.visibleWhenverbatim. A second condition grammar is the single most likely way this design rots, so it is forbidden and gated.writes[]. This preserves the property the React wizards have by accident — an abandoned registration leaves no half-built organisation — while adding the resumability they lack.journeyRunholds names, addresses, e-mail, phone numbers and uploads before any of it is a record. The purge reports its row count, because a job that deletes nothing must be distinguishable from one that never ran — this instance's audit retention purge had never executed while looking exactly like a purge with nothing to do.email,website,nl-phone) replace the per-app validator forks, pinned against the cases tilburg'sform-validations.jshandles today including its explicit rejections (www.nl,http://.nl, hyphen-only labels,06/+31phone handling).Depends on / feeds
Rendered by
nextcloud-vue/journey-runtime(#665); authored byopenbuild/journey-designer(#207).🤖 Generated with Claude Code