feat(controlplane): add dry-run and status/revision reporting to contract apply#3220
Conversation
AI Session Analysis
|
| Status | Attribution | File | Lines |
|---|---|---|---|
| created | ai | app/controlplane/internal/service/workflowcontract_integration_test.go |
+197 / -0 |
| modified | ai | app/controlplane/internal/service/workflowcontract.go |
+46 / -3 |
| modified | ai | app/controlplane/pkg/biz/workflowcontract_integration_test.go |
+41 / -1 |
| modified | ai | app/controlplane/pkg/biz/workflowcontract.go |
+36 / -0 |
| modified | ai | app/controlplane/api/controlplane/v1/workflow_contract.proto |
+21 / -1 |
Policies (4)
| Status | Policy | Material | Messages |
|---|---|---|---|
| ✅ Passed | ai-config-ai-agents-allowed |
ai-coding-session-5b6444 |
- |
| ✅ Passed | ai-config-no-dangerous-commands |
ai-coding-session-5b6444 |
- |
| ✅ Passed | ai-config-no-secrets |
ai-coding-session-5b6444 |
- |
| ✅ Passed | ai-config-mcp-servers-allowed |
ai-coding-session-5b6444 |
- |
Powered by Chainloop and Chainloop Trace
…ract apply Bring the WorkflowContract Apply API to parity with the compliance resources: report created/updated/unchanged status along with the current revision, and support a dry run that validates and computes the outcome without persisting any change. - proto: add dry_run to the Apply request; add an ApplyStatus enum and current_revision to the Apply response, keeping the existing changed bool for backward compatibility - biz: add RevisionWouldChange, reusing the data-layer change-detection rule to determine whether a revision would change without persisting - service: report status and current_revision and support dry run for the create, update and unchanged cases Assisted-by: Claude Code Signed-off-by: Javier Rodriguez <javier@chainloop.dev> Chainloop-Trace-Sessions: 5b64444b-4b32-4948-a7ff-82aba22b407d
Summary
Brings the WorkflowContract
applyAPI to parity with the compliance resources by reporting the outcome of an apply (created,updated, orunchanged) together with the contract's current revision, and by supporting a dry run that validates and computes the result without persisting any change.dry_runto the Apply request and anApplyStatusenum pluscurrent_revisionto the Apply response, keeping the existingchangedflag for backward compatibility.This is the OSS-side change; the CLI
--dry-runflag 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.