Skip to content

test: cover native mutation scheduling and lost edits - #36

Merged
swerner merged 1 commit into
mainfrom
codex/native-mutation-regressions
Oct 12, 2026
Merged

swerner merged 1 commit into
mainfrom
codex/native-mutation-regressions

Conversation

@swerner

@swerner swerner commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

One assistant response can contain two edits to the same file. Add deterministic regression coverage proving that both successful edits survive Pebble's coding-agent dispatch, including profile aliases and permission middleware. A test-only scheduling override reproduces the original failure: both tools report success, but the last write loses the first edit.

Inspired by @denkhaus's lost-edit report and delayed-write regression in fabro-sh/fabro#787. The tests adapt that reproduction to Pebble's existing batch scheduling; this PR adds no production fix.

The six new tests cover same-file edits through Anthropic, Claude 5, and Kimi profiles; the negative control; different-file scheduling; overlapping apply_patch calls; ordered whole-file replacements; and Kimi append calls. They use scripted provider responses, mutable state, and paused-time delayed writes, with no paid model calls or two-reader barrier.

The assertions preserve the current scope: a mutation serializes the entire batch, including different-file calls; whole-file replacements remain last-write-wins; separate sessions and workflow stages are outside this guarantee.

Validation:

  • The new tests and existing tool_scheduling, tool_registration, and e2e suites passed on both Pebble eb3391c and Fabro's pinned Pebble e90513f: 20 tests on each revision.
  • The pinned verification used Fabro's runtime dependency versions with unchanged Pebble Rust source; only the snapshot-test dependency differed.
  • All routine verification components passed: pinned formatting, workspace Clippy, documentation tests and builds, feature checks, workflow audit, whitespace checks, and the complete Nextest suite (1,677 passed; 1 skipped). The initial sandboxed suite could not bind its fake HTTP servers; rerunning mise run test with local socket access passed.

@swerner
swerner merged commit 5212922 into main Oct 12, 2026
3 checks passed
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.

1 participant