[Feature] Install versioned module workflow baselines with override and reset #13

Closed
opened 2026-07-31 15:05:47 +02:00 by zemion · 2 comments
Owner

Goal

Allow every module to install versioned standard workflow definitions through Workflow Engine, while the optional Workflow editor can view, derive, override, compare, and reset them.

Current Foundation

  • Definition graph revisions are immutable and content-hashed.
  • Activation pins an exact revision for new instances.
  • Instances pin definition_revision_id.
  • Derivation already records source revision/hash, scope, actor, Policy decision, and inherited limits.

Missing Scope

  • Versioned module contribution DTO/capability or configuration-package fragment.
  • Origin module/key/version/schema/hash and compatibility requirements.
  • Idempotent reconciliation after module discovery and upgrade.
  • Immutable module baseline distinct from local effective override.
  • Upstream-update detection and three-way baseline/override/new-baseline diff.
  • Policy-controlled edit/derive/activate behavior.
  • Reset that archives the override and restores the latest permitted baseline.
  • Diagnostics for unavailable nodes/capabilities and incompatible contribution versions.

Semantic Decisions

  • Editing a module/system standard creates a derived override; it never mutates or deletes the supplied baseline.
  • A new module baseline never silently mutates active definitions or running instances.
  • View is available with definition-read permission; edit/derive remains separately governed.
  • Historical baselines, overrides, and instance pins remain addressable for audit.

Acceptance Criteria

  • A module can install the same definition repeatedly without duplicates.
  • Module upgrade adds a new baseline revision and reports local drift.
  • Users can inspect a standard definition even when they cannot edit it.
  • Authorized editing creates a traceable override.
  • Reset restores the baseline without erasing history.
  • The feature works headlessly through Engine APIs and gains visual diff/reset controls when Workflow is installed.

Parent: #12. Related: #6 and Core configuration-package contracts.

## Goal Allow every module to install versioned standard workflow definitions through Workflow Engine, while the optional Workflow editor can view, derive, override, compare, and reset them. ## Current Foundation - Definition graph revisions are immutable and content-hashed. - Activation pins an exact revision for new instances. - Instances pin `definition_revision_id`. - Derivation already records source revision/hash, scope, actor, Policy decision, and inherited limits. ## Missing Scope - Versioned module contribution DTO/capability or configuration-package fragment. - Origin module/key/version/schema/hash and compatibility requirements. - Idempotent reconciliation after module discovery and upgrade. - Immutable module baseline distinct from local effective override. - Upstream-update detection and three-way baseline/override/new-baseline diff. - Policy-controlled edit/derive/activate behavior. - Reset that archives the override and restores the latest permitted baseline. - Diagnostics for unavailable nodes/capabilities and incompatible contribution versions. ## Semantic Decisions - Editing a module/system standard creates a derived override; it never mutates or deletes the supplied baseline. - A new module baseline never silently mutates active definitions or running instances. - View is available with definition-read permission; edit/derive remains separately governed. - Historical baselines, overrides, and instance pins remain addressable for audit. ## Acceptance Criteria - A module can install the same definition repeatedly without duplicates. - Module upgrade adds a new baseline revision and reports local drift. - Users can inspect a standard definition even when they cannot edit it. - Authorized editing creates a traceable override. - Reset restores the baseline without erasing history. - The feature works headlessly through Engine APIs and gains visual diff/reset controls when Workflow is installed. Parent: #12. Related: #6 and Core configuration-package contracts.
Author
Owner

The Engine/editor split delivered the complete foundation for this issue in govoplan-workflow-engine@9bccbd6, govoplan-core@1884274, and govoplan-workflow@8fd8753.

Completed now:

  • versioned ModuleManifest.workflow_definitions contribution DTO and canonical hash
  • idempotent reconciliation with origin module/version/schema/hash provenance
  • required capability/interface diagnostics and fail-closed graph/runtime validation
  • immutable module baselines and non-destructive baseline revision updates
  • active revision preservation on upstream updates
  • traceable local derivation/override with pinned baseline revision/hash
  • correct upstream drift detection using contribution hashes
  • history-preserving reset that archives only the override
  • headless reconcile/reset/read APIs and periodic worker reconciliation
  • editor labels, immutable controls, update comparison, and reset confirmation
  • focused tests for idempotency, drift, headless execution, missing requirements, immutable baselines, and reset history

Keeping #13 open for the remaining product-grade layer:

  • graph-aware semantic three-way diff/merge decisions rather than the current fixed side-by-side canonical JSON comparison
  • configuration-package fragment adapter and rollout of real module-owned standard definitions
  • lifecycle-triggered reconciliation for workerless installations, so module install/upgrade does not require the admin reconcile command

The architecture parent #12 is closed; these remaining items no longer block the Engine/editor ownership split.

The Engine/editor split delivered the complete foundation for this issue in `govoplan-workflow-engine@9bccbd6`, `govoplan-core@1884274`, and `govoplan-workflow@8fd8753`. Completed now: - versioned `ModuleManifest.workflow_definitions` contribution DTO and canonical hash - idempotent reconciliation with origin module/version/schema/hash provenance - required capability/interface diagnostics and fail-closed graph/runtime validation - immutable module baselines and non-destructive baseline revision updates - active revision preservation on upstream updates - traceable local derivation/override with pinned baseline revision/hash - correct upstream drift detection using contribution hashes - history-preserving reset that archives only the override - headless reconcile/reset/read APIs and periodic worker reconciliation - editor labels, immutable controls, update comparison, and reset confirmation - focused tests for idempotency, drift, headless execution, missing requirements, immutable baselines, and reset history Keeping #13 open for the remaining product-grade layer: - graph-aware semantic three-way diff/merge decisions rather than the current fixed side-by-side canonical JSON comparison - configuration-package fragment adapter and rollout of real module-owned standard definitions - lifecycle-triggered reconciliation for workerless installations, so module install/upgrade does not require the admin reconcile command The architecture parent #12 is closed; these remaining items no longer block the Engine/editor ownership split.
zemion added the module/workflow-engine label 2026-07-31 17:02:08 +02:00
Author
Owner

Implemented and pushed.

Delivered:

  • versioned module workflow contribution contract and automatic idempotent reconciliation after module graph changes
  • immutable module baselines with origin/version/schema/hash provenance and diagnostics
  • upgrade drift detection plus semantic baseline/override/new-baseline comparison
  • traceable derived overrides and history-preserving reset
  • headless Workflow Engine orchestration and configuration-package capabilities
  • editor comparison/reset controls without making the editor a runtime dependency
  • schema-unavailable startup deferral followed by post-migration reconciliation

Commits: govoplan-core 6ebb299, govoplan-workflow-engine 43c1f3f, govoplan-workflow 9d987c7, govoplan-access e58dcbd.

Verification: Workflow Engine 56 tests passed; Core module-system 119 tests and lifecycle regression passed; Access 50 tests passed; Core WebUI TypeScript and structural i18n checks passed.

Implemented and pushed. Delivered: - versioned module workflow contribution contract and automatic idempotent reconciliation after module graph changes - immutable module baselines with origin/version/schema/hash provenance and diagnostics - upgrade drift detection plus semantic baseline/override/new-baseline comparison - traceable derived overrides and history-preserving reset - headless Workflow Engine orchestration and configuration-package capabilities - editor comparison/reset controls without making the editor a runtime dependency - schema-unavailable startup deferral followed by post-migration reconciliation Commits: govoplan-core `6ebb299`, govoplan-workflow-engine `43c1f3f`, govoplan-workflow `9d987c7`, govoplan-access `e58dcbd`. Verification: Workflow Engine 56 tests passed; Core module-system 119 tests and lifecycle regression passed; Access 50 tests passed; Core WebUI TypeScript and structural i18n checks passed.
zemion removed the codex/ready
status
ready
labels 2026-07-31 19:42:36 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GovOPlaN/govoplan-workflow#13