Skip to content

feat(results): direct-push auto_push to base branch#1201

Merged
christso merged 2 commits into
mainfrom
feat/1200-direct-push-results
May 1, 2026
Merged

feat(results): direct-push auto_push to base branch#1201
christso merged 2 commits into
mainfrom
feat/1200-direct-push-results

Conversation

@christso
Copy link
Copy Markdown
Collaborator

Summary

Changes auto_push: true to push results directly to the configured repo's base branch instead of creating a feature branch + draft PR.

Closes #1200

Changes

  • packages/core/src/evaluation/results-repo.ts: Added directPushResults() — clones/fetches the results repo, stages artifacts on the base branch, commits, and pushes directly. Handles non-fast-forward with pull-rebase retry (3 attempts).
  • apps/cli/src/commands/results/remote.ts: Rewrote maybeAutoExportRunArtifacts() to call directPushResults() instead of the branch+PR flow. Removed dead code (branch naming, PR body generation).
  • packages/core/src/index.ts: Export directPushResults.

Design Rationale (per AGENTS.md)

  • YAGNI: No new modes or multi-value configs. Reuses existing auto_push: true semantics.
  • Simplicity: ~74 lines added, ~95 removed. Net reduction.
  • Non-breaking for local-first: Only activates when results.export.auto_push: true is configured.
  • Breaking for PR-flow users: auto_push no longer creates PRs. This is intentional per the issue's request.

Config (unchanged shape)

results:
  export:
    repo: WiseTechGlobal/WiseTechAcademy.EvalResults
    path: runs/wisetechacademy-evals
    auto_push: true

Concurrency

Each run writes to a unique timestamped directory, so content conflicts are impossible. Non-fast-forward (concurrent pushes) is handled by git pull --rebase + retry.

Testing

  • ✅ Build passes
  • ✅ All 499 tests pass
  • ✅ Typecheck passes
  • ✅ Lint passes

Change auto_push behavior to push results directly to the configured
repo's base branch instead of creating a feature branch and draft PR.

This makes results immediately visible in Studio for shared/containerized
deployments without requiring PR merges.

The direct push handles non-fast-forward conflicts with pull --rebase
retry (up to 3 attempts), which is safe because each run writes to a
unique timestamped directory.

Closes #1200

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 30, 2026

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6522e8f
Status: ✅  Deploy successful!
Preview URL: https://f916826b.agentv.pages.dev
Branch Preview URL: https://feat-1200-direct-push-result.agentv.pages.dev

View logs

Remove branch_prefix from config example and update description to
reflect direct-push semantics. Add note about concurrent push safety.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@christso christso marked this pull request as ready for review May 1, 2026 00:34
@christso christso merged commit 4bec686 into main May 1, 2026
4 checks passed
@christso christso deleted the feat/1200-direct-push-results branch May 1, 2026 00:34
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.

Feature request: direct-push remote results and remote-first Studio sources

1 participant