Remove the recorded pre-run push outcome while preserving the push - #723
Merged
Conversation
The manifest builder's best-effort pre-run push converted every result into a PreRunPushOutcome that was serialized into GitContext, expanded into five OpenAPI union arms, and generated into API clients — but no production path ever read it; every field read was a test. Delete the concept while preserving the behavior: - Drop the PreRunPushOutcome enum and GitContext.push_outcome from fabro-types; GitContext keeps origin_url, branch, optional sha, and dirty, which remain real execution inputs and provenance. - Rename the manifest outcome builder to push_manifest_branch_best_effort, a side-effect-only helper with the same decision rules: skip without an origin, skip on configured-repository mismatch, skip when the branch is already synced, otherwise push noninteractively and discard the result without failing manifest creation or logging raw Git stderr. - Prove the push through repository state instead of the deleted enum: a branch ahead of a local bare origin is pushed during manifest build, a mismatched configured repository is not, and a failing remote helper still cannot fail manifest creation. - Remove push_outcome from GitContext in OpenAPI, delete the five-arm union schemas, and drop the fabro-api type replacement and re-export. - Keep one regression proving historical run.created events with a nested push_outcome still deserialize through ordinary unknown-field tolerance and reserialize to the reduced shape. No migration or event rewrite. Old JSON carrying the removed field stays readable. Newly generated clients omit a field older servers required, so new-client-to-old-server compatibility is intentionally not promised for this pre-1.0 contract. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Regenerates the Axios client from the reduced OpenAPI spec and removes the six stale pre-run-push-outcome model files the generator leaves behind, along with their barrel and generator-manifest entries. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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 this removes
PreRunPushOutcomeandGitContext.push_outcomewere write-only freight: the manifest builder performed a useful best-effort push before a run and then serialized a report of what happened, but no production path ever read that report — every.push_outcomeread in the workspace was a test. The type expanded into a public five-variant enum, five OpenAPI union arms, six generated TypeScript models, and constructor/fixture noise across the workspace.This PR deletes the recorded outcome everywhere: canonical Rust (
fabro-types), the manifest builder, OpenAPI (GitContext.push_outcomeplus thePreRunPushOutcomeunion and its five arm schemas), thefabro-apitype replacement and re-export, the generated TypeScript client models, and all fixtures/tests that constructed or asserted it. There is deliberately no replacement status type, flag, or message.What this preserves
build_git_contextstill runs the best-effort push on the same path, now via a side-effect-only helper (push_manifest_branch_best_effort) with identical decision rules: no origin → skip; configured repository differs from the normalized origin → skip; branch already synced → skip; git probe errors still fall back to attempting the push; a needed push still uses remoteorigin, the detected branch, andGIT_TERMINAL_PROMPT=0.GitContextkeepsorigin_url,branch, optionalsha, anddirtyin canonical Rust, OpenAPI, events, manifests, and generated clients.Test approach
Push behavior is now proven through observable repository state instead of the deleted enum: a local branch ahead of a temporary bare origin is pushed during manifest build (remote ref equals local HEAD afterward); a mismatched configured repository is not pushed (remote ref stays absent); a failing remote helper is invoked with prompting disabled while manifest creation still succeeds.
Compatibility
run.createdevents carrying a nestedpush_outcomeremain readable through ordinary serde unknown-field tolerance, pinned by one regression test at the event boundary. No migration, event rewrite, or compatibility enum.GitContextwas present, so new-client-to-old-server compatibility is intentionally not promised for this pre-1.0 contract.Deliberately out of scope
fabro-typescrate-root export list)🤖 Generated with Claude Code