feat: add deterministic promotion gate - #36
Closed
divo12 wants to merge 3 commits into
Closed
Conversation
Owner
Author
|
Closing this premature PR. PR2 has not yet published the confirmed immutable EvaluatedRunReceipt contract, so PR3 gate implementation is intentionally paused and will be recreated only after that receipt is available. |
Owner
Author
|
Obsolete observation-based PR; current receipt-based implementation is tracked in #37. |
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.
Summary
decide_promotion(policy, accepted_run, candidate_run)over PR1 policy and PR2 candidate receiptsScope
This PR performs no Git, Harbor, Langfuse, filesystem, MCP, clock, randomness, or runtime I/O. It targets
stack/v2-02-candidateonly and is stacked on PR #35.Verification
uv run ruff check src tests plugins/openflywheel/scripts/mcp_server.pyuv run mypy src tests plugins/openflywheel/scripts/mcp_server.pyuv run pytest --cov=ofw --cov-report=term-missing --cov-fail-under=90 -q: 308 passed, 2 skipped, 95.22%uvx --from radon radon cc -s -a ...: all gate production functions CC <= 5Known interface boundary
Current PR2 receipts do not carry verifier scores, cost, or latency. Configured cost/latency limits therefore fail closed as missing evidence; accepting measured metrics requires the subsequent PR2 contract update.
Summary by cubic
Adds a pure, deterministic promotion gate that decides whether a candidate run can be promoted over the accepted run, replacing the provisional gate. It validates experiment and candidate identity, exact task ordering, receipt uniqueness, and outcome verdicts, then returns an immutable decision with canonical JSON and a SHA-256 decision ID. Any unsupported, error, abstain, unverified, or incomplete outcome fails closed as inconclusive.
Known boundary
Written for commit fe3c124. Summary will update on new commits.
Blocked on PR2 EvaluatedRunReceipt; current observation interface will be replaced