build(ci): gate bpmn-to-code process-api drift - #29
Merged
Conversation
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.
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
Adds a drift gate for the
bpmn-to-code-generated process API, mirroring the existing OpenAPI drift gate.The generated
*ProcessApi.ktfiles are committed toservice/app/src/main/kotlin/.../adapter/process/and regenerated on every./gradlew build(viaclasses → dependsOn("generateBpmnModels")). CI ran the build (regenerating them) but never checked the resulting diff — so editing a.bpmnwithout regenerating would keep CI green while the committed process API drifted.Change
.github/workflows/pre-merge.yml: newVerify the generated BPMN process API is in syncstep in thebackendjob, right after./gradlew build:*ProcessApi.ktso the hand-writtenHistoryCleanupConfiguration.ktin the same package is untouched.AGENTS.md: documents the drift gate alongside the BPMN quality gates.Verification
git diff --exit-codeon the generated files → exit 0.*ProcessApi.kt→ non-zero exit (gate fails). Reverted afterwards.