Skip to content

feat(platform): Refine gitworkspace contract with Skipped, cancellation and a failure helper - #768

Merged
behinddwalls merged 1 commit into
mainfrom
manjari/gitworkspace-contract
Oct 2, 2026
Merged

behinddwalls merged 1 commit into
mainfrom
manjari/gitworkspace-contract

Conversation

@manjari25

Copy link
Copy Markdown
Contributor

Why?

The OSS merger is being moved onto Workspace and will run batched command sequences. That needs an explicit skipped marker, unique aliases per batch, a shared way to produce classifiable errors, and cancellation that actually stops git.

What?

  • Adds Output.Skipped (replacing the ambiguous -1 exit code) and documents the rest of the contract: unique aliases per batch, Args[0] is the git subcommand, and cancelling the For context ends the workspace.
  • Adds CommandFailure(ctx, cmd, out), which builds a classifier-recognised error from a non-zero Output.
  • Updates local to set Skipped and kill git when the For context is cancelled.

Test Plan

  • bazel test //platform/extension/gitworkspace/...
  • make check-gazelle check-tidy lint
  • Nothing consumes gitworkspace yet, so there's no behavior change

Issue

@manjari25
manjari25 requested review from a team, behinddwalls and sbalabanov as code owners October 2, 2026 19:13
@behinddwalls
behinddwalls merged commit 5240af6 into main Oct 2, 2026
16 checks passed
@behinddwalls
behinddwalls deployed to stack-rebase October 2, 2026 19:37 — with GitHub Actions Active
@behinddwalls
behinddwalls deleted the manjari/gitworkspace-contract branch October 2, 2026 19:37

This branch was successfully deployed

1 active deployment
stack-rebase — e6049a48 Deployed Oct 2, 2026 by behinddwalls via Rebase Stack #554
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants