feat(controlplane): add dry-run and status/revision reporting to contract apply
Merged
JA
4mo ago+686+686+012345678901234567890123456789-62-62-01234567890123456789
Summary
Brings the WorkflowContract apply API to parity with the compliance resources by reporting the outcome of an apply (created, updated, or unchanged) together with the contract's current revision, and by supporting a dry run that validates and computes the result without persisting any change.
- Adds
dry_runto the Apply request and anApplyStatusenum pluscurrent_revisionto the Apply response, keeping the existingchangedflag for backward compatibility. - Adds change detection in the contract use case that reuses the existing data-layer rule to determine whether a revision would change, without persisting.
- Updates the Apply handler to report status and current revision and to support dry run for the create, update and unchanged cases.
This is the OSS-side change; the CLI --dry-run flag and status/revision display for contracts will be wired up in the platform repo after a release.
Linear: PFM-6429
AI disclosure
This contribution was produced with the assistance of Claude Code, disclosed via the Assisted-by: trailer on the commit.