Skip to content

Commit f3ed46b

Browse files
docs(miner): point harness-submission-trigger at @loopover/engine buildOpenPrSpec (#6921)
The builder moved out of root src/mcp with #5131/#5132; attempt-runner already calls it. Keep prepareOpenPrSubmission as the gate-to-payload bridge (documented non-call). Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 2e2f588 commit f3ed46b

2 files changed

Lines changed: 17 additions & 17 deletions

File tree

packages/loopover-miner/lib/harness-submission-trigger.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export function countConsecutiveGateBlocks(eventLedger: HarnessSubmissionEventLe
4545

4646
export function evaluateAndRecordHarnessSubmissionTrigger(candidate: HarnessSubmissionCandidateInput, deps: HarnessSubmissionDeps): HarnessSubmissionResult;
4747

48-
/** The exact input shape buildOpenPrSpec (root src/mcp/local-write-tools.ts) expects. */
48+
/** The exact input shape buildOpenPrSpec (`@loopover/engine`) expects. */
4949
export type OpenPrInput = {
5050
repoFullName: string;
5151
base: string;

packages/loopover-miner/lib/harness-submission-trigger.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@ import { evaluateHarnessSubmissionTrigger } from "@loopover/engine";
77
// event -- regardless of outcome, so a paused-pending-human-review session leaves a full trail of why.
88
//
99
// NOT WIRED INTO ANY AUTOMATIC SCHEDULE: per this issue's own "manual owner sign-off on the wiring before this
10-
// ships to any default-on profile" deliverable. `prepareOpenPrSubmission` below is the call site up to the
11-
// cross-package boundary: on `allow: true` it shapes the exact input `buildOpenPrSpec` (root
12-
// `src/mcp/local-write-tools.ts`) needs -- but does not, and cannot, call that function itself, since the spec
13-
// builder lives in the private root `src/` tree, unreachable from this package (same cross-package-boundary
14-
// reason self-review-adapter.ts's slop injection exists). A real root-side/MCP call site (e.g. the existing
15-
// `loopover_open_pr` tool, src/mcp/server.ts) takes `openPrInput` from a `ready: true` result and passes it
16-
// to `buildOpenPrSpec` (or the equivalent tool call) to actually produce the runnable local-write spec. The
17-
// CLI/driver entrypoint that instantiates a real `CodingAgentDriver` and calls `runIterateLoop` end to end with
18-
// live credentials does not exist yet in this package -- that is separate, larger scope from this decision-to-
19-
// payload bridge.
10+
// ships to any default-on profile" deliverable. `prepareOpenPrSubmission` below is the gate→payload bridge:
11+
// on `allow: true` it shapes the exact input `buildOpenPrSpec` (`@loopover/engine`,
12+
// `packages/loopover-engine/src/miner/local-write-tools.ts`, re-exported from the engine public barrel) expects
13+
// as `openPrInput`. It deliberately does NOT call `buildOpenPrSpec` itself -- that stays the caller's job so
14+
// this module stays a decision-to-payload bridge. The in-package caller is `attempt-runner.js`, which imports
15+
// `buildOpenPrSpec` from `@loopover/engine` and runs it after a `ready: true` result (the pre-#5131/#5132
16+
// "unreachable from root `src/mcp/`" boundary no longer applies, but the layering still does: gate evaluate →
17+
// shape openPrInput here → build the runnable local-write spec in the driver). Equivalent MCP call sites
18+
// (e.g. `loopover_open_pr`) can likewise take `openPrInput` from a `ready: true` result.
2019
//
2120
// SESSION-SCOPED, NOT PER-REPO: the circuit breaker's own "pauses the run entirely" wording means the tally is
2221
// counted across EVERY repo's decisions this session, not scoped to one repo -- distinct from #2338's loop-
@@ -90,12 +89,13 @@ export function evaluateAndRecordHarnessSubmissionTrigger(candidate, deps) {
9089

9190
/**
9291
* Bridge one completed handoff through the submission gate to a submission-READY payload -- the exact input
93-
* shape `buildOpenPrSpec` expects (repoFullName/base/head/title/body/draft). On `allow: true` returns
94-
* `{ ready: true, decision, event, openPrInput }`; otherwise `{ ready: false, decision, event }` -- the block
95-
* reasons are on `decision.reasons` and already on the ledger via the wrapped call either way. Does NOT call
96-
* `buildOpenPrSpec` itself (see this module's own doc comment for why it cannot) -- a real root-side/MCP call
97-
* site takes `openPrInput` from a `ready: true` result and passes it to that function or the equivalent
98-
* `loopover_open_pr` MCP tool.
92+
* shape `buildOpenPrSpec` (`@loopover/engine`) expects (repoFullName/base/head/title/body/draft). On `allow:
93+
* true` returns `{ ready: true, decision, event, openPrInput }`; otherwise `{ ready: false, decision, event }`
94+
* -- the block reasons are on `decision.reasons` and already on the ledger via the wrapped call either way.
95+
* Does NOT call `buildOpenPrSpec` itself: this stays a gate→payload bridge; `attempt-runner.js` (and MCP
96+
* `loopover_open_pr` equivalents) take `openPrInput` from a `ready: true` result and call
97+
* `buildOpenPrSpec`. The cross-package "unreachable from root src/" reason no longer applies (#5131/#5132
98+
* moved the builder into `@loopover/engine`), but the deliberate non-call layering is still necessary.
9999
*
100100
* Fails closed (throws) on a malformed candidate, mirroring evaluateAndRecordHarnessSubmissionTrigger's own
101101
* validation -- a missing PR title/base is a caller bug that must never silently degrade into a garbage spec.

0 commit comments

Comments
 (0)