Skip to content

perf(orch): collapse frontier set to two data calls (#249) - #250

Open
Sehaan-1 wants to merge 2 commits into
ericlitman:mainfrom
Sehaan-1:perf/249-collapse-frontier-set
Open

Sehaan-1 wants to merge 2 commits into
ericlitman:mainfrom
Sehaan-1:perf/249-collapse-frontier-set

Conversation

@Sehaan-1

Copy link
Copy Markdown

Closes #249

What changed

Collapse \orch frontier set\ from 3N + 2 subprocesses down to a flat 4 subprocesses:

  • Replaced per-branch forge queries (--head\ down-walk and --base\ up-walk) with a single repo-wide PR query (\pr list --state all [--limit 300] --json ...) indexed into in-memory \�yHead\ and \openByBase\ lookup maps.
  • Replaced per-branch \git rev-parse \ calls with one batched \git rev-parse ... \ parsed in argument order.
  • Preserved byte-identical \ rontier.json\ output, generation numbering, \lowestUnmerged\ semantics, pin validation, locking, and all \UserError\ messages.
  • Updated fake forge in \orch.test.ts\ to single-command match with call counter, asserting exactly 1 forge call per \ rontier.set.
  • Added 7 behavior tests covering multi-PR head branches, non-linear stacks, base-chain loops (both walk directions), invalid forge rows, batched SHA ref failures, trunk short-circuit, and forge argv contracts.

Verification

  • Bun tests, strict typecheck, static invariants, and plugin validation pass.
  • The exact candidate is installed in every affected harness.
  • The changed behavior passes from each real user surface.
  • The \live-gate\ status on the final head links the evidence comment (installed version, surface, action, observed result).

Mergify does not queue a pull request without \live-gate\ on its exact head. Do not merge, tag, release, or roll out without it.

@mergify

mergify Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Merge Protections

🟠 1 of 2 protections blocking · waiting on 🤖 CI

Protection Waiting on
🟠 Queue ready pull requests 🤖 CI
🟢 🚦 Auto-queue —

🟠 Queue ready pull requests

Waiting for

  • check-success=live-gate
  • check-success=verify
Waiting checks: live-gate, verify.

Automatically queue non-draft pull requests targeting main after verify and live-gate pass on the head and every review thread is resolved.

  • check-success=live-gate
  • check-success=verify
  • #review-threads-unresolved = 0
  • -draft

Show 1 satisfied protection

🟢 🚦 Auto-queue

When all merge protections are satisfied and these conditions match, this pull request will be queued automatically.

  • -files~=^\.github/
  • base = main

@greptile-apps

greptile-apps Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

RetriggerView in Greptile

[Medium impact] The change affects frontier setup in the orchestrator workflow.

Fix the repository-wide PR limit before merging so older stacks remain discoverable.

Findings

  1. P1 Older stack PRs disappear ▶

Summary

Replaces per-branch forge queries with one repository-wide query and batches Git SHA lookups.

  • Frontier setup makes two data calls for a non-trunk stack.

Reviews (1) · Last reviewed commit: "perf(orch): collapse frontier set to two..." · Reviewed by Greptile

Comment thread plugins/pstack/skills/poteto-mode/scripts/orch/store.ts
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.

perf(orch): collapse frontier set to two data calls (3N+2 to 4 subprocesses)

1 participant