[codex] add governed Git promotion - #12
Draft
divo12 wants to merge 2 commits into
Draft
Conversation
…tion-campaign-api # Conflicts: # src/ofw/__init__.py
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.
Stack
Depends on #11. Review against
codex/durable-heartbeat-scheduler.Problem
A Fit winner is still an isolated hypothesis. OFW needs an idempotent, reviewable Git package with explicit approval boundaries, durable audit evidence, and a real rollback artifact—without treating a commit or PR as a production deployment.
Implementation
PromotionPolicymodes: report-only, commit, pull request, and explicit deploy.ApprovalRecordfor direct deploy; rejected, missing, or wrong-fit/winner/policy approvals fail closed.PullRequestPublisherboundary plus a concrete dependency-freeghCLI adapter.git revertrollback command.PromotionJobHandlerfor scheduler workers and typed request resolution.ofw campaign status|cancel|resume STORE POLICY JOB_IDCLI that calls the same scheduler service.ofw.promote(...)as the public Python API.TDD evidence
Verification
pytest -q— 149 passedsrcandtests— cleanAny, rawdict,object,getattr,setattr, lambdas, or__import__pip-audit— no known dependency vulnerabilitiesDeliberate scope
ghCLI; no GitHub SDK dependency is added.Summary by cubic
Adds governed Git promotion for Fit winners with approval, audit, and rollback artifacts. Previously winners stopped at analysis; now a PROMOTE job can create a deterministic commit/branch, open a PR via
gh, or perform approved direct deploys, and Fit results with no winner are skipped.Review notes:
PromotionPolicymodes: none, commit, pull_request, deploy; artifacts include a content-bound report, manifest, and reverse patch; cancellation persists before side effects; commits are created in a separate deterministic worktree and only the promotion branch is pushed to an explicit remote.PullRequestPublisherboundary with aGitHubCliPublisher; PR mode never invokes deployments.ApprovalRecord; deployments use aDeploymentAdapterand emit a rollback command.StageBudgetsadds apromotionbudget; a newofwCLI supportscampaign status|cancel|resume;ofw.promote(...)exposes the API.Rollout:
StageBudgets.promotion(required).GitRemoteand ensureghis installed and authenticated; set a remote and base branch available to the repo.DeploymentAdapterand collect a matchingApprovalRecord; without both, promotions fail closed.ofwconsole script to query or control campaigns as needed.Written for commit 74a86b6. Summary will update on new commits.