GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(bridge,adapters): a turn that did not finish is not completed by lidge-jun · Pull Request #1995 · lidge-jun/opencodex

fix(bridge,adapters): a turn that did not finish is not completed #1995

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
lidge-jun merged 40 commits into dev from cursor-call
Aug 18, 2026

Uh oh!

There was an error while loading. Please reload this page.

Merged

fix(bridge,adapters): a turn that did not finish is not completed #1995

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
d637eea
fix(bridge): a buffered turn with no adapter terminal is not completed
lidge-jun Aug 17, 2026
d23661d
fix(bridge): never install compaction history from a terminal-less turn
lidge-jun Aug 17, 2026
1b475b9
fix(bridge,google): close two more routes that install truncated comp…
lidge-jun Aug 18, 2026
64321f7
fix(bridge): recognize truncation regardless of adapter stop-reason v…
lidge-jun Aug 18, 2026
7e86ac2
fix(bridge): keep compaction suppression and terminal status in agree…
lidge-jun Aug 18, 2026
932e204
fix(bridge,command-code): treat pause_turn as unfinished and error as…
lidge-jun Aug 18, 2026
26a8270
docs(devlog): record what shipped for 050 and the adapter-side follow…
lidge-jun Aug 18, 2026
214b4ad
fix(anthropic,command-code): an upstream error stop reason fails the …
lidge-jun Aug 18, 2026
1bc055c
fix(anthropic): the EOF terminal path must fail an error stop reason too
lidge-jun Aug 18, 2026
1dab771
docs(devlog): record the final state of 050 after eight review rounds
lidge-jun Aug 18, 2026
4a9a96e
docs(devlog): final campaign status across all five phases
lidge-jun Aug 18, 2026
5a3cd64
docs(devlog): plan the cursor-call integration onto the current dev head
lidge-jun Aug 18, 2026
7d8c2ea
docs(devlog): absorb audit r1 FAIL — six findings, all verified, all …
lidge-jun Aug 18, 2026
fe015d4
docs(devlog): correct the 020 capability claim — the encoder shipped,…
lidge-jun Aug 18, 2026
39e04a8
docs(devlog),refactor: absorb audit r2 NEAR-PASS — three corrections
lidge-jun Aug 18, 2026
2d68a3e
docs(devlog): absorb audit r3 FAIL — five workflow findings, and rest…
lidge-jun Aug 18, 2026
7116ed9
docs(devlog): absorb audit r4 FAIL — four execution-procedure findings
lidge-jun Aug 18, 2026
f246c53
docs(devlog): absorb audit r5 FAIL — build the stack forward instead …
lidge-jun Aug 18, 2026
7627534
docs(devlog): absorb audit r6 FAIL — the stack was mine to get wrong,…
lidge-jun Aug 18, 2026
1a84d1d
docs(devlog): absorb audit r7 NEAR-PASS — the stack holds, and the pu…
lidge-jun Aug 18, 2026
b4a02fc
docs(devlog): record r7 PASS and r8 NEAR-PASS, and close the last pro…
lidge-jun Aug 18, 2026
af00213
docs(devlog): number the r7/r8 audit record per LEXICO-SPLIT-01
lidge-jun Aug 18, 2026
417c81f
docs(devlog): absorb audit r8 — the verification handoff pushed the w…
lidge-jun Aug 18, 2026
8779470
docs(devlog): rename 00A to 009b so review-round accepts it as a plan…
lidge-jun Aug 18, 2026
6a53467
docs(devlog): use three-digit numbering for the r7/r8 audit records
lidge-jun Aug 18, 2026
0916523
docs(devlog): absorb audit r10 — bind the verified tree to the merged…
lidge-jun Aug 18, 2026
2700f0c
docs(devlog): name MERGED_DEV so WP6 gates what WP5 produced
lidge-jun Aug 18, 2026
df5784e
docs(devlog): absorb audit r13 — turn the SHA bindings into commands …
lidge-jun Aug 18, 2026
0110129
docs(devlog): absorb audit r12 — bind the gate evidence to the tree i…
lidge-jun Aug 18, 2026
006bff1
docs(devlog): renumber the r12 record to 017 (016 was taken by r13)
lidge-jun Aug 18, 2026
e03015f
docs(devlog): remove the duplicate MERGED_DEV block and finish the pr…
lidge-jun Aug 18, 2026
bae83f2
docs(devlog): absorb audit r14 — three defects found by running the p…
lidge-jun Aug 18, 2026
34805a2
docs(devlog): absorb audit r14 — run the plan instead of reading it
lidge-jun Aug 18, 2026
3d4211d
docs(devlog): fold the second r14 pass into one 018 record
lidge-jun Aug 18, 2026
b8c6c00
docs(devlog): make the integration plan a program instead of a promise
lidge-jun Aug 18, 2026
41bd738
fix(devlog): the state file must not accumulate duplicate keys
lidge-jun Aug 18, 2026
d642d9b
fix(devlog): resolve the repo root from git, not by counting ..
lidge-jun Aug 18, 2026
e0dcf4b
fix(devlog): ten defects in the driver, three of them fatal
lidge-jun Aug 18, 2026
9e679a2
fix(devlog): the validator that was meant to harden the driver had br…
lidge-jun Aug 18, 2026
ff4b0bb
fix(devlog): a durable key is a claim its proofs passed, so it is wri…
lidge-jun Aug 18, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Next Next commit
docs(devlog): plan the cursor-call integration onto the current dev head
The campaign shipped against f64c063. dev has moved 104 commits since, and two
of our 18 files were touched there too. A per-file sweep found exactly one
SEMANTIC collision and one textual one; the other 16 paths have zero dev commits.

live-transport.ts is the semantic one: dev fixed the SAME clean-EOF defect in the
opposite shape (a fail-closed error EVENT via finalizeTurnEvents, with CodeRabbit
explicitly rejecting a throw) while our 54f68da raises a typed transport error.
An independent read-only investigation traced both shapes through the streaming
and buffered Responses paths, including our own phase-050 bridge changes, and
dev's shape survives: the error sets both errorEvent and sawTerminal, so
buildResponseJSON already returns failed with no adapter_eof and no compaction
history. What our branch still contributes there is emittedTerminal, which
f145fd5 depends on, plus one extra guard so EOF finalization cannot append a
second terminal after a mapper error.

google.ts is textual: dev's six commits are request-side identity work, so the
buffered finishReason hunk applies unchanged at :946 instead of :939.

Docs only. No code moved in this commit.
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@lidge-jun
lidge-jun committed Aug 18, 2026
commit 5a3cd644653644eec4634c063f17214f90affeff

There are no files selected for viewing

104 changes: 104 additions & 0 deletions 104 devlog/_plan/260818_cursor_call_integration/000_plan.md
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# 000 — Integrate cursor-call onto dev and reach release-ready state

## Objective

Land the 31-commit `cursor-call` tool-call hardening campaign on the current `dev`
head, then carry it to a release-ready state. The campaign shipped against
`f64c0639` (merge-base); `dev` has moved 104 commits since, and two of the files
we changed were changed there too — one of them for the SAME defect, in the
opposite shape.

This unit is the integration record, not a re-decode. The decode unit is
`devlog/_plan/260817_cursor_toolcall_decode/`.

## Evidence base

| Fact | Command |
|------|---------|
| merge-base = `f64c06391` | `git merge-base origin/dev cursor-call-prerebase-260818` |
| ours = 31 commits, snapshot `cursor-call-prerebase-260818` = `fe2237038` | `git rev-list --count origin/dev..cursor-call` |
| dev head = `87f7f970b`, 104 commits ahead of merge-base | `git rev-list --count cursor-call..origin/dev` |
| our 31 commits touch 18 files | `git diff --name-only <base> cursor-call-prerebase-260818` |
| only 2 of those 18 were touched on dev | per-file `git log --oneline <base>..origin/dev -- <file>` |

## Collision inventory (all 18 files)

`COUNT` is dev commits touching that path since the merge-base.

| File | dev commits | Collision |
|------|-------------|-----------|
| `src/adapters/cursor/live-transport.ts` | 3 (`6a64db19d`, `08eb65d1f`, `1824a0148`) | **SEMANTIC** — same defect, opposite shape |
| `src/adapters/google.ts` | 6 (`aca3c0241`, `0be660a2e`, `f6c88febf`, `812255d3a`, `d62cc4029`, `343e5d7a3`) | **TEXTUAL** — identity/rename work, our hunk drifted 939 → 946 |
| `src/adapters/anthropic.ts` | 0 | none |
| `src/adapters/command-code.ts` | 0 | none |
| `src/adapters/cursor/cursor-errors.ts` | 0 | none |
| `src/adapters/cursor/native-exec.ts` | 0 | none |
| `src/adapters/cursor/protobuf-request.ts` | 0 | none |
| `src/adapters/cursor/request-builder.ts` | 0 | none |
| `src/bridge.ts` | 0 | none |
| `src/responses/truncated-stop-reason.ts` | 0 (absent on dev — we add it) | none |
| `tests/anthropic-error-stop-reason.test.ts` | 0 | none |
| `tests/bridge-nonstreaming-terminal.test.ts` | 0 | none |
| `tests/command-code-error-finish.test.ts` | 0 | none |
| `tests/cursor-cancel-provenance.test.ts` | 0 | none |
| `tests/cursor-eof-terminal.test.ts` | 0 | none (but see 010: its EXPECTATION changes) |
| `tests/cursor-request-builder.test.ts` | 0 | none |
| `tests/cursor-tool-result-image.test.ts` | 0 | none |
| `tests/google-buffered-stop-reason.test.ts` | 0 | none |
| `devlog/_plan/260817_cursor_toolcall_decode/*` | 0 | none |

An INDIRECT-breakage sweep found nothing: `AdapterEvent.done.stopReason?: string`
still exists (`src/types.ts:367-371`), no symbol our bridge patch references was
renamed, and `src/bridge.ts` / `src/responses/truncated-stop-reason.ts` have zero
dev commits.

## Loop-spec

- Loop archetype: verifier-defined (typecheck + full suite on lidge decide done).
- Write scope: the 18 files above plus this unit. No version bump, no npm publish,
no `main` promotion, no gui/ source changes.
- Tool/credential scope: local git, `ssh lidge` for verification, `gh`/GitHub app
for PRs and the admin merge. Push to `origin/cursor-call` is pre-approved
(`--no-verify`); force-push is inherent to the requested rebase and the
snapshot branch `cursor-call-prerebase-260818` is the recovery path.
- Bounds: no stated token budget. Wall-clock is dominated by the lidge full suite
(~470s at 12800 tests). CI is explicitly NOT checked (user waived).

## Work-phase map (one phase = one full PABCD cycle)

| WP | Doc | Slice | Depends on |
|----|-----|-------|------------|
| wp1-integration-roadmap | this unit | conflict inventory + roadmap (docs-only) | — |
| wp2-rebase | `010` | rebase with evidence-based conflict resolution | wp1 |
| wp3-remote-verify | `020` | typecheck + full suite on `ssh lidge` at the pushed SHA | wp2 |
| wp4-stacked-prs | `030` | stacked PRs targeting `dev` with the repo template | wp3 |
| wp5-merge | `040` | admin merge onto `dev` + ancestry proof | wp4 |
| wp6-release-gates | `050` | release gates on `dev` + go/no-go note | wp5 |

## Accept criteria (mirrored into the goalplan)

- `c1-roadmap-unit` — this unit exists with research + diff-level decade docs.
- `c2-conflict-inventory` — the table above, produced by the named commands.
- `c3-rebase-clean` — rebase lands, no conflict markers, dev head is an ancestor.
- `c4-resolution-audited` — every resolution passes an adversarial audit round.
- `c5-remote-green` — typecheck clean + full suite green on lidge at the SHA.
- `c6-prs-open` — stacked PRs against `dev`, template filled.
- `c7-merged-on-dev` — `git merge-base --is-ancestor` proves it, not an API reply.
- `c8-release-gates` — privacy:scan, typecheck, full suite green on merged `dev`.
- `c9-go-no-go` — a written note on whether to cut a version.

## Out of scope (carried follow-ups, NOT this unit)

These were recorded in the decode unit and stay open:

1. Kiro `completionMode: "disabled"` drops `stopReason` (`kiro.ts:1315`, `:1485`).
2. Google ordinary mode still forwards only `MAX_TOKENS` + five safety values;
`MALFORMED_RESPONSE`, `UNEXPECTED_TOOL_CALL`, `IMAGE_SAFETY`, `LANGUAGE`
become reasonless `done` (dev `google.ts:786-795`).
3. User-message images still placeholdered in `request-builder.ts`.
4. Phase 030 (xai apply_patch) remains a measurement cycle — NOT REPRODUCED.
New information: dev landed `bc229433a` + `8a4040384`, which stop the code-mode
guidance from forbidding a separately-advertised top-level `apply_patch`. That
is the same affordance surface 030 suspected, fixed independently. Re-probing
belongs to a later work-phase only if the user supplies a failing case.

187 changes: 187 additions & 0 deletions 187 devlog/_plan/260818_cursor_call_integration/010_phase1.md
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
# 010 — WP2: rebase cursor-call onto dev with evidence-based conflict resolution

Two conflicts. Both were investigated by an independent read-only agent before any
rebase step ran; the verdicts below are the resolution contract.

## Conflict 1 — `src/adapters/cursor/live-transport.ts` (SEMANTIC)

### The collision

Our `54f68daf5` and dev's `6a64db19d`+`08eb65d1f`+`1824a0148` fix the SAME defect:
a framed Cursor stream that ends at the HTTP/2 layer with no turn terminal while a
client tool call is still open used to settle as success, so the deferred tool call
vanished.

| | Ours (`54f68daf5`) | dev (`6a64db19d`..`1824a0148`) |
|---|---|---|
| Mechanism | `settler.settleFail(new CursorStreamTruncatedError(...))` | `for (const e of finalizeTurnEvents(state)) push(e)` then `settleFinish()` |
| Wire result | thrown transport failure | one `{type:"error"}` adapter event naming the open call |
| Extra state | `emittedTerminal` (per-run flag set in `push()`) | `sawAssistantText` |

### VERDICT — dev's error-event shape survives

Reasons, in order of weight:

1. `finalizeTurnEvents` (`src/adapters/cursor/protobuf-events.ts:1361`) is the
established adapter contract for this exact condition and already returns a
fail-closed `error` event. dev `1824a0148` records that CodeRabbit asked for a
throw here and it was **rejected on the merits**: throwing replaces a
domain-specific truncation message with a generic transport failure.
2. Our phase-050 bridge work does the right thing with dev's shape. The error sets
both `errorEvent` and `sawTerminal`, so `buildResponseJSON` returns
`status: "failed"`, attaches no `adapter_eof`, and suppresses compaction
history. Streaming maps it to `response.failed`. No double-report.
3. `settleFinish()` only ends transport iteration; the queued error stays the sole
adapter terminal.

### What must survive from OUR commit

`emittedTerminal` is NOT optional: `f145fd513` (unexpected server-side CANCEL
provenance) reads it to avoid flipping an already-completed buffered turn to
failed. Keep all three sites:

```ts
private emittedTerminal = false;
```

```ts
const push = (message: CursorServerMessage) => {
const bytes = new TextEncoder().encode(JSON.stringify(message)).byteLength;
this.reserveTransportBytes(bytes);
if (message.type === "done" || message.type === "error") this.emittedTerminal = true;
queue.push({ message, bytes });
wake();
};
```

```ts
this.framesReceived = 0;
this.emittedTerminal = false;
this.sawAssistantText = false;
```

### The merged end-handler block (MODIFY)

Take dev's block and add one guard — `|| this.emittedTerminal` — so EOF
finalization cannot append a second terminal after a mapper error already failed
the turn:

```ts
if (state.terminated || this.expectedClose || this.emittedTerminal) {
releaseBacklogLease();
settler.settleFinish();
return;
}
// Open tools fail closed as a domain-specific truncation event. Throwing here would
// replace that event with a generic transport failure at the Cursor adapter boundary.
if (state.openToolCalls.size > 0) {
for (const event of finalizeTurnEvents(state)) push(event);
releaseBacklogLease();
settler.settleFinish();
return;
}
if (this.framesReceived > 0 && this.sawAssistantText) {
for (const event of finalizeTurnEvents(state)) push(event);
releaseBacklogLease();
settler.settleFinish();
return;
}
releaseBacklogLease();
settler.settleFinish();
```

Also drop `CursorStreamTruncatedError` from the `live-transport.ts` import, since
this path no longer throws it.

### `CursorStreamTruncatedError` itself (`src/adapters/cursor/cursor-errors.ts`)

Keep the class. It is exported, it documents the condition, and removing it from
the same commit that rewrites the transport would widen the diff for no verified
gain. If the C-phase check shows it is unreferenced anywhere, note it as a
follow-up rather than deleting it inside this rebase.

### TESTS — our expectation changes

`tests/cursor-eof-terminal.test.ts` case *"EOF with an open tool call fails instead
of finishing silently"* asserts a THROWN error. Under the surviving shape that
assertion is wrong on the merits: the requirement is "do not finish silently," and
an explicit error event satisfies it more precisely than a thrown transport
failure. Rewrite that case to:

```ts
expect(failure).toBeUndefined();
expect(messages.some(m => m.type === "tool_call_end")).toBe(false);
expect(messages.some(m => m.type === "done")).toBe(false);
expect(messages.at(-1)).toMatchObject({
type: "error",
message: expect.stringContaining("call_open_1"),
});
```

The other three cases in that file pass unchanged. All 33 cases in dev's
`tests/cursor-hardening.test.ts` pass, including *"open tool call plus clean
Connect EOF emits a truncation error, not a thrown failure"* — which is dev's
regression test for exactly this decision.

**The overlap is real and must be named in the commit message:** our 010 phase is
superseded by dev's independent fix. What our branch still contributes on this
file is `emittedTerminal` and the extra terminal guard.

## Conflict 2 — `src/adapters/google.ts` (TEXTUAL)

Our `f73f09c9e` adds buffered `finishReason` forwarding. dev's six commits are all
request-side identity/rename work and never touch the response-parsing block, so
the intent applies unchanged — only the line numbers drifted.

- `parseResponse` now starts at dev `google.ts:812` (candidate read at `:894`).
- Insertion point moved from former `:939` to current `:946`.

MODIFY, at dev's current `:946`:

```diff
const usage = json.usageMetadata as Record<string, number> | undefined;
+ // Mirror the streaming path: a buffered turn cut off by the token limit or a content filter
+ // must carry its stop reason, or the bridge sees a clean `done` and reports the truncated
+ // turn as completed — and, on a compaction turn, installs the half-written summary as
+ // replacement history (#422).
+ const finishReason = candidates?.[0]?.finishReason as string | undefined;
+ const stopReason = finishReason === "MAX_TOKENS"
+ ? "max_tokens"
+ : ["SAFETY", "RECITATION", "BLOCKLIST", "PROHIBITED_CONTENT", "SPII"].includes(finishReason ?? "")
+ ? "content_filter"
+ : undefined;
events.push({
type: "done",
usage: usageFromGemini(usage),
+ ...(stopReason ? { stopReason } : {}),
});
return finish(events);
```

## Procedure

1. `git rebase origin/dev` on `cursor-call` (snapshot `cursor-call-prerebase-260818`
already exists at `fe2237038`).
2. At the `54f68daf5` conflict: resolve to dev's block plus `emittedTerminal` and
the extra guard; drop the unused import; rewrite the one test expectation.
Amend the commit message to record the supersession.
3. At any `google.ts` conflict: apply the hunk at dev's current location.
4. Every later commit should apply cleanly (zero dev commits on those paths). If
one does not, STOP and investigate rather than resolving mechanically.
5. Adversarial audit round on the resolved diff before pushing.

## Verification (C)

Local, focused (fast signal only):

```
bun test tests/cursor-eof-terminal.test.ts tests/cursor-hardening.test.ts \
tests/cursor-cancel-provenance.test.ts tests/cursor-tool-result-image.test.ts
bun x tsc --noEmit
rg -n '^<<<<<<<|^>>>>>>>|^=======$' src tests
git merge-base --is-ancestor origin/dev cursor-call # exit 0
```

Authoritative verification is WP3 on `ssh lidge`. Expected: typecheck exit 0; the
focused cursor files green; no conflict markers; dev head an ancestor.

56 changes: 56 additions & 0 deletions 56 devlog/_plan/260818_cursor_call_integration/020_phase2.md
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# 020 — WP3: full remote verification on ssh lidge

## Why remote, and why the FULL suite

The campaign touches `src/bridge.ts`, `src/adapters/google.ts`,
`src/adapters/anthropic.ts`, `src/adapters/command-code.ts` — shared runtime, not a
scoped adapter change. Repository policy (`AGENTS.md` §Commands) requires
`bun run typecheck` and `bun run test` before a non-trivial PR is review-ready.

The user's standing contract: the authoritative suite runs on `ssh lidge`, never
the local workstation.

Remote checkout: `/home/lidgeai/Developer/opencodex` (bun 1.3.14), currently
parked at the pre-rebase campaign SHA `1651002c59`.

`--isolate` is required: the flat suite bleeds environment between files without it
(known-good practice for this checkout).

## Procedure (MODIFY: none — verification only)

```
ssh lidge 'cd ~/Developer/opencodex && git fetch origin cursor-call && git checkout -f <SHA> && git log --oneline -1'
ssh lidge 'cd ~/Developer/opencodex && bun install --frozen-lockfile'
ssh lidge 'cd ~/Developer/opencodex && bun x tsc --noEmit'
ssh lidge 'cd ~/Developer/opencodex && bun test --isolate tests'
```

Run the suite as a managed background session (it takes ~8 minutes) and poll,
rather than blocking a turn.

## Expected evidence

- `bun x tsc --noEmit` → exit 0, no output.
- `bun test --isolate tests` → 0 fail. Pre-campaign baseline on the old base was
12761 pass / 826 files; the post-050 campaign SHA was 12800 pass / 830 files.
Post-rebase the count rises again because dev added 104 commits of tests; the
bar is **0 fail**, not a specific pass count.

## Known flake (do NOT treat as a regression without isolation)

`tests/request-pacing.test.ts` and `tests/codex-auth-api.test.ts` have failed under
parallel load and passed in isolation on BOTH the pre- and post-campaign SHAs. If
either fails, re-run that file alone before calling it a regression.

## Repair discipline

LOOP-REPAIR-01: read the failure delta, repair only that delta, re-verify. Two
consecutive failed repairs of the same failure → root-cause mode, not another
patch. Three → back to P with a changed plan.

## Verification (C)

The C gate for this work-phase is the remote output itself: typecheck exit 0 and a
`0 fail` line from `bun test --isolate tests`, both quoted with the SHA they ran
against.

47 changes: 47 additions & 0 deletions 47 devlog/_plan/260818_cursor_call_integration/030_phase3.md
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 030 — WP4: stacked PRs targeting dev

## Policy constraints (`AGENTS.md`)

- `dev` is the only integration target. Never open a feature PR against `main`.
- `.github/PULL_REQUEST_TEMPLATE.md` has three required sections: **Summary**,
**Verification**, **Checklist**. `enforce-target` rejects empty, thin, or
malformed descriptions.
- Stacked child PRs that target another OPEN PR's head branch are an intentional
workflow; `enforce-target` skips the wrong-base gate for them. Retarget children
to `dev` after the parent lands.
- CI status is NOT checked (user waived).

## Stack shape

The campaign is one dependency chain, and the branch is one linear history. The
honest stack boundary is by SUBSYSTEM, because that is what a reviewer can review
independently:

| PR | Head branch | Base | Content |
|----|-------------|------|---------|
| 1 | `cursor-call-adapter` | `dev` | Cursor adapter: image tool results, cancel provenance, `emittedTerminal` (`878b067e8`..`c9681d043` + the resolved `54f68daf5`) |
| 2 | `cursor-call-bridge` | `cursor-call-adapter` | Bridge terminal/compaction work (`aa800ae65`..`1651002c5`) + `src/responses/truncated-stop-reason.ts` |
| 3 | `cursor-call` | `cursor-call-bridge` | devlog units (both decode and integration) |

Splitting is only worth doing if the split points are clean commit boundaries in
the rebased history. If the rebase produced interleaved docs/code commits, prefer
ONE PR from `cursor-call` → `dev` over a fake stack: an unreviewable split is
worse than a single honest PR. Decide from the actual topology at WP4's P.

## Description content per PR

- **Summary** — the defect, the wire behavior before/after, and for PR 1 an
explicit note that dev independently fixed the clean-EOF defect and our
contribution on that file narrowed to `emittedTerminal` + the extra guard.
- **Verification** — the exact lidge commands from `020` with their output and the
SHA. No remembered passes.
- **Checklist** — all three boxes, honestly.
- No `Closes #`: no issue is being closed by this branch.

## Verification (C)

```
gh pr list --state open --json number,baseRefName,headRefName,title
gh pr view <n> --json body # confirm all three template sections present
```

Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.