Skip to content

build(ci): gate bpmn-to-code process-api drift - #29

Merged
emaarco merged 1 commit into
mainfrom
build/gate-bpmn-process-api-drift
Aug 21, 2026
Merged

build(ci): gate bpmn-to-code process-api drift#29
emaarco merged 1 commit into
mainfrom
build/gate-bpmn-process-api-drift

Conversation

@emaarco

@emaarco emaarco commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

What

Adds a drift gate for the bpmn-to-code-generated process API, mirroring the existing OpenAPI drift gate.

The generated *ProcessApi.kt files are committed to service/app/src/main/kotlin/.../adapter/process/ and regenerated on every ./gradlew build (via classes → dependsOn("generateBpmnModels")). CI ran the build (regenerating them) but never checked the resulting diff — so editing a .bpmn without regenerating would keep CI green while the committed process API drifted.

Change

  • .github/workflows/pre-merge.yml: new Verify the generated BPMN process API is in sync step in the backend job, right after ./gradlew build:
    git diff --exit-code -- 'service/app/src/main/kotlin/io/miragon/blueprint/adapter/process/*ProcessApi.kt'
    
    Pathspec scoped to *ProcessApi.kt so the hand-written HistoryCleanupConfiguration.kt in the same package is untouched.
  • AGENTS.md: documents the drift gate alongside the BPMN quality gates.

Verification

  • Clean tree: git diff --exit-code on the generated files → exit 0.
  • Injected drift into a *ProcessApi.kt → non-zero exit (gate fails). Reverted afterwards.

Add a git diff --exit-code gate on the generated *ProcessApi.kt in the
pre-merge backend job, mirroring the OpenAPI drift gate. ./gradlew build
already regenerates the files in place, so a .bpmn edit without a
regenerate now fails CI instead of silently drifting.

Document the drift gate in AGENTS.md alongside the BPMN quality gates.
@emaarco
emaarco enabled auto-merge (squash) August 21, 2026 06:45
@emaarco
emaarco merged commit b2848d9 into main Aug 21, 2026
5 checks passed
@emaarco
emaarco deleted the build/gate-bpmn-process-api-drift branch August 21, 2026 06:48
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