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): absorb audit r14 — three defects found by running the p…
…lan, not reading it

r14 executed every shell fragment in the unit against a scratch zsh with real SHAs,
simulating only the mutating commands. Three High findings.

The gates in 020 were bare local commands sitting under a section that had just
pinned a lidge worktree. Copied into a shell they run wherever the operator happens
to be, so the phase could report green for a tree that is not VERIFIED_TIP — the exact
failure r10 and r12 were about. They are now a loop that runs each gate over ssh
inside the worktree and re-asserts HEAD first.

The per-layer block could not run at all: it referenced $PR1_HEAD before 030 assigns
it, and it contained a literal <that layer's files from the table>, which is a zsh
parse error rather than an instruction. It now runs after 030 step 4, spells the test
lists out as variables, and wraps the work in a run_layer function that pins, asserts,
installs, typechecks and tests.

The third is the sixth artifact-chain gap. 040 asserted whether dev moved and whether
each PR head moved, but never whether the PR still points at dev. A retarget to main,
or to a parent branch that has since merged, passes both checks and gh pr merge would
merge into that base. The pre-merge check is now three assertions together: base is
dev, head equals the recorded SHA, live dev equals EXPECTED_DEV.

r14 also ran the focused Cursor tests itself: 71 pass, 0 fail, typecheck exit 0. And
it confirmed the stack partition at its anchor: 17 + 3 + 31 = 51, no duplicate
subjects, no merges.
  • Loading branch information

Uh oh!

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

@lidge-jun
lidge-jun committed Aug 18, 2026
commit bae83f2d6244d51b652a226146f5a8c679818b55

There are no files selected for viewing

76 changes: 76 additions & 0 deletions 76 devlog/_plan/260818_cursor_call_integration/018_audit_r14.md
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# 018 — Audit round r14: three defects found by RUNNING the plan

`r14` did what `r13` started: it executed every shell fragment in the unit against a
scratch zsh with real SHAs substituted, simulating only the mutating commands. Three
High findings, all closed.

## F1 — the authoritative gates were not bound to the pinned worktree

`020` created `/tmp/ocx-cc-<sha>` on lidge, asserted its HEAD, and then listed the
gates as bare local commands:

bun x tsc --noEmit
bun run privacy:scan
...

Copied into a shell, those run against whatever directory the operator is in. The
phase could report green for a tree that is not `VERIFIED_TIP` — which is the whole
thing `r10` and `r12` were about.

**Closed.** The gates are now a loop that runs each one over ssh inside the worktree
and re-asserts the SHA first:

ssh lidge "cd $CC_WT && test \"\$(git rev-parse HEAD)\" = \"$VERIFIED_TIP\" && $GATE"

## F2 — the per-layer fragment could not run

Two separate breakages in one block:

1. It used `$PR1_HEAD` and `$PR2_HEAD`, which `030` does not assign until step 4,
while `020` ordered this section after step 3. A zsh probe with unset-variable
checking fails outright.
2. `bun test <that layer's files from the table>` is a zsh parse error
(`unmatched '`), not an instruction. A placeholder inside a code block is a bug.

**Closed.** The section now runs after `030` step 4, spells out `PR1_TESTS` and
`PR2_TESTS` as real variables, and wraps the per-layer work in a `run_layer` function
that pins, asserts, installs, typechecks, and runs that layer's files.

## F3 — the sixth artifact-chain gap: no PR BASE assertion

`040` asserted the live `dev` SHA (has `dev` moved?) and each `headRefOid` (has the
PR head moved?). Neither answers "is this PR still pointing at `dev`". A retarget to
`main`, or to a parent branch that has since merged, passes both — and
`gh pr merge` would merge into that base. `030` printed the bases for inspection,
which is not a gate.

**Closed.** The pre-merge check for every layer is now three assertions together:
`baseRefName == dev`, `headRefOid == EXPECTED_HEAD`, live `dev == EXPECTED_DEV`.

## The artifact-chain sweep r14 ran

| Boundary | Artifact | Binding | Result |
|---|---|---|---|
| WP2 → WP2b | rebased `cursor-call`, `VERIFIED_BASE` | push + remote/local equality | PASS |
| WP2b → WP3 | WP2b's remote tip | `VERIFIED_TIP` from live remote, local equality, worktree HEAD assertion | PASS |
| WP3 → WP4 | gate evidence | branch tips bound to `VERIFIED_TIP` | **FAIL → fixed (F1, F2)** |
| WP4 → WP5 | PR heads + base topology | head + live-`dev` checks | **FAIL → fixed (F3)** |
| WP5 → WP6 | PR3 merge OID as `MERGED_DEV` | worktree at `MERGED_DEV` + HEAD equality | PASS |
| WP6 → note | gate outputs | note requires command, output, SHA, fresh refs | PASS |

## What r14 confirmed

- Stack at the audited tip: unique subjects, zero merges, ancestry intact,
`17 + 3 + 31 = 51`.
- Both `010` conflict resolutions still coherent against the live `dev`.
- `015`'s failure-specific usage choice, re-export, and no-cycle property.
- `040`'s governance position claims an owner-authorized exception, not compliance.
- It also ran the focused Cursor tests: **71 pass, 0 fail**, and typecheck exit 0.

## Tally

Fourteen rounds, 38 findings, every one verified and absorbed. Six of them are the
artifact-chain class (`r7`, `r8`, `r10`, `r12`, `r13`, `r14`) and four were the
stack-split cluster (`r3`-`r6`). The lesson `r13` and `r14` add: a plan that is only
READ will keep hiding fragments that cannot RUN.

72 changes: 46 additions & 26 deletions 72 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
Expand Up @@ -64,13 +64,24 @@ live `dev` head legitimately differs from the original.

## Gates

```
bun x tsc --noEmit
bun run privacy:scan
bun run audit:high
bun test --isolate tests
bun run build:gui # see r3 F4 — publish runs this unconditionally
```
Every gate runs INSIDE the pinned worktree, over ssh, with the SHA re-asserted first
(audit `r14`). Written as bare local commands they would execute against whatever
directory the operator happens to be in, and could pass for a tree that is not
`VERIFIED_TIP`:

CC_WT="/tmp/ocx-cc-${VERIFIED_TIP:0:9}"
for GATE in \
"bun x tsc --noEmit" \
"bun run privacy:scan" \
"bun run audit:high" \
"bun run build:gui" \
"bun test --isolate tests"
do
ssh lidge "cd $CC_WT && test \"\$(git rev-parse HEAD)\" = \"$VERIFIED_TIP\" && $GATE"
done

`build:gui` precedes the suite only because it is the shorter of the two long gates;
order is not load-bearing. Run the suite as a managed background session and poll.

`audit:high` and `privacy:scan` are in `scripts/release.ts:374,380`.
`build:gui` is here because `prepublishOnly` (`package.json:49`) runs it on every
Expand Down Expand Up @@ -155,25 +166,34 @@ PR1's tests at `VERIFIED_TIP` proves nothing about PR1, because that tree alread
contains PR2's and PR3's code — a PR1 test could pass only because of something a
reviewer of PR1 will never see.

The layer branches do not exist until `030` step 2, so this half of WP3 runs AFTER
that step and before the PRs are opened. Order inside the work-phase, not a new
work-phase:

1. `020` first half: gates at `VERIFIED_TIP` (full suite, typecheck, privacy:scan,
audit:high, build:gui) — this is the stack-tip evidence PR3 cites.
2. `030` steps 0-3: bind to `VERIFIED_TIP`, cut `cursor-call-wire` and
`cursor-call-cancel`, prove the partition.
3. `020` this half: one dedicated worktree per layer, pinned to that layer's head:

for LAYER_SHA in "$PR1_HEAD" "$PR2_HEAD"; do
ssh lidge "cd ~/Developer/opencodex && git fetch origin && git worktree add /tmp/ocx-L-${LAYER_SHA:0:9} $LAYER_SHA"
ssh lidge "cd /tmp/ocx-L-${LAYER_SHA:0:9} && test \"\$(git rev-parse HEAD)\" = \"$LAYER_SHA\" && bun install --frozen-lockfile"
ssh lidge "cd /tmp/ocx-L-${LAYER_SHA:0:9} && bun x tsc --noEmit"
ssh lidge "cd /tmp/ocx-L-${LAYER_SHA:0:9} && bun test <that layer's files from the table>"
done

`PR3_HEAD` is `VERIFIED_TIP`, already covered by step 1 — do not re-run it.
4. `030` step 4: push the branches and open the PRs, each citing ITS OWN run.
The layer branches do not exist until `030` step 2, and their head variables are not
assigned until `030` step 4 (audit `r14`: an earlier draft of this section used
`$PR1_HEAD` before that assignment). So this half of WP3 runs AFTER `030` step 4:

1. `020` first half: the gate loop above at `VERIFIED_TIP` — the stack-tip evidence
PR3 cites.
2. `030` steps 0-4: bind to `VERIFIED_TIP`, cut `cursor-call-wire` and
`cursor-call-cancel`, prove the partition, and assign `PR1_HEAD`/`PR2_HEAD`.
3. `020` this half: one worktree per layer, pinned to that layer's head. The test
file list is spelled out per layer rather than left as a placeholder — a literal
`<that layer's files>` is a zsh parse error, not an instruction:

PR1_TESTS="tests/cursor-eof-terminal.test.ts tests/cursor-hardening.test.ts tests/cursor-tool-result-image.test.ts tests/cursor-request-builder.test.ts"
PR2_TESTS="tests/cursor-cancel-provenance.test.ts tests/cursor-hardening.test.ts"

run_layer() {
local SHA="$1" TESTS="$2" WT="/tmp/ocx-L-${1:0:9}"
ssh lidge "cd ~/Developer/opencodex && git fetch origin && git worktree add $WT $SHA"
ssh lidge "cd $WT && test \"\$(git rev-parse HEAD)\" = \"$SHA\" && bun install --frozen-lockfile"
ssh lidge "cd $WT && bun x tsc --noEmit"
ssh lidge "cd $WT && bun test $TESTS"
}

run_layer "$PR1_HEAD" "$PR1_TESTS"
run_layer "$PR2_HEAD" "$PR2_TESTS"

`PR3_HEAD` equals `VERIFIED_TIP` and step 1 already covered it — do not re-run.
4. `030` step 6: push the branches and open the PRs, each citing ITS OWN run.

Every layer's evidence therefore names a SHA equal to that PR's head, which is the
same SHA `040` asserts with `gh pr view --json headRefOid` before merging. Remove the
Expand Down
22 changes: 22 additions & 0 deletions 22 devlog/_plan/260818_cursor_call_integration/040_phase4.md
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,28 @@ recorded:
`test`, not a printed value: a comparison the operator has to eyeball is not a gate
(audit `r13`). Repeat with `$PR2_HEAD` and `$PR3_HEAD` for the other two layers.

### And assert the PR's live BASE (audit `r14`)

The two checks above cover "has `dev` moved" and "has the PR head moved". Neither
covers "is this PR still pointing at `dev`". A retarget — to `main`, or to a parent
branch that has since merged — passes both, and `gh pr merge` would then merge into
whatever base the PR now names. `030` prints the bases for inspection, which is not a
gate.

So the pre-merge check for EVERY layer is all three at once:

PR_BASE=$(gh pr view $PRN --json baseRefName --jq .baseRefName)
PR_HEAD=$(gh pr view $PRN --json headRefOid --jq .headRefOid)
test "$PR_BASE" = "dev"
test "$PR_HEAD" = "$EXPECTED_HEAD"
test "$(git ls-remote origin refs/heads/dev | cut -f1)" = "$EXPECTED_DEV"
gh pr merge $PRN --merge --admin

`dev` is the only acceptable base for all three layers at merge time: PR1 targets it
from the start, and PR2/PR3 are retargeted to it as their parents land
(`AGENTS.md:218-225`). A base of `main` would be a policy violation, and a base still
naming a merged parent branch would produce an empty or wrong diff.

PR3's expected head is `VERIFIED_TIP` — the exact SHA `020` ran the full suite
against. If any head differs, stop: either re-verify that tree through `020` or
reset the branch to the recorded SHA. Never merge a head no gate has seen.
Expand Down
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 01402809 — 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.