Skip to content

feat(process-step-configuration): apply spec — validator + editor (partial)#381

Merged
rubenvdlinde merged 1 commit into
developmentfrom
feat/apply-process-step-configuration
May 11, 2026
Merged

feat(process-step-configuration): apply spec — validator + editor (partial)#381
rubenvdlinde merged 1 commit into
developmentfrom
feat/apply-process-step-configuration

Conversation

@rubenvdlinde
Copy link
Copy Markdown
Contributor

Summary

Manifest-first apply of openspec change process-step-configuration.

  • Schema (T01): workflowTemplate bumped 1.0.0 → 1.1.0 with additive documentation of the per-step config sub-object ({sla, requiredFields, autoActions, escalationRule}). No new top-level register schema.
  • Validator (T02): New lib/Service/StepConfigValidator.php — pure-function, no DI, no I/O. Implements the seven rules from design.md and returns structured {path, code, message} errors (never raw exception text).
  • Editor (T07/T08): Extended existing StepConfigPanel.vue with a collapsible "Geavanceerd" panel for SLA / required fields / escalation rule. Read-only wired from WorkflowEditor.vue via new isPublished computed (template.isDraft === false).

Deferred (host services not on development yet)

  • T03 — wire validator into WorkflowDefinitionService::publish()
  • T04 / T05 — StatusTransitionService consumption (implicit requiredFields guard + step-level auto-action ordering)
  • T06 — TaskCreatorService::createForStep() dueAt + escalationAt stamping
  • T09 — BackfillBezwaarStepConfig repair step
  • T10 — flip openspec/specs/process-step-configuration/spec.md to status: implemented

These all depend on services from sibling specs workflow-definition-model (#347) and status-transition-engine (#352) that have not yet landed in this tree. The validator is ready; the wiring becomes a one-liner once those services exist.

Validation

  • php -l lib/Service/StepConfigValidator.php — pass
  • jq -e . on procest_register.json and build.json — pass
  • Smoke-tested validator: empty errors on valid config; 4 expected errors on malformed config (out_of_range, unknown_sla_unit, unknown_action_key, offset_exceeds_sla)
  • SPDX header present on validator; no getMessage() in returned errors
  • composer check:strict and i18n deferred per STRICT watchdog

Test plan

  • Open a workflow template in the WorkflowEditor; click a step; expand "Geavanceerd"; verify SLA / required-fields / escalation inputs render
  • Save a draft with SLA {value: 5, unit: businessDays} and confirm round-trip via store
  • Open a non-draft template; confirm the "Geavanceerd" inputs are disabled and the banner renders
  • Once the publish hook lands (T03), exercise REQ-PSC-4-001..004 acceptance scenarios

Manifest-first apply of openspec change `process-step-configuration`.

Schema:
- Bump workflowTemplate version 1.0.0 → 1.1.0 with additive
  documentation of the per-step `config` sub-object
  ({sla, requiredFields, autoActions, escalationRule}).
  No new top-level register schema.

Validator:
- Add pure-function StepConfigValidator (no DI, no I/O) implementing
  the seven rules from design.md. Returns structured {path, code,
  message} errors; never raw exception text.

Editor:
- Extend the existing StepConfigPanel.vue with a collapsible
  "Geavanceerd" panel for sla / requiredFields / escalationRule.
- Pass `read-only` from WorkflowEditor.vue via a new `isPublished`
  computed (template.isDraft === false), per REQ-PSC-7-002.

Deferred (host services not yet on development):
- T03 publish hook, T04/T05 status-transition-engine consumption,
  T06 task creator, T09 bezwaar backfill, T10 spec flip.
@rubenvdlinde rubenvdlinde merged commit d8a30a1 into development May 11, 2026
12 of 15 checks passed
@rubenvdlinde rubenvdlinde deleted the feat/apply-process-step-configuration branch May 11, 2026 11:44
@github-actions
Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/procest @ f0334c5

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
composer ✅ 100/100
npm ✅ 407/407
PHPUnit ⏭️
Newman ⏭️
Playwright

Spec coverage: 3% (21 tests / 673 specs)


Quality workflow — 2026-05-11 11:57 UTC

Download the full PDF report from the workflow artifacts.

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