Skip to content

CI: wait for the Fetch API to show a round's edits before syncing - #256

Merged
5PK merged 1 commit into
mainfrom
fix/perm-test-fetch-catch-up
Nov 2, 2026
Merged

5PK merged 1 commit into
mainfrom
fix/perm-test-fetch-catch-up

Conversation

@5PK

@5PK 5PK commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Harness-only fix (ci/permutation/) for the live sync test that gates the publish. No CLI code changes.

The v1.3.0-beta.0 tag run (run 41522379139) failed one check, so nothing was published. Round 3 edited the same item on both sides, then synced a few seconds later, before A's edit had reached A's Fetch API feed, which the CLI pulls from. The CLI saw only B's edit, correctly reported it as a target-only conflict, and the --overwrite resolve step copied A's previous value onto B. Once A's edit arrived, the no-op preflight wanted another update.

The fix: before each round's edits, the harness snapshots every content item's version on both instances (Management API). After the edits, it waits until the Fetch API sync feed lists each changed item at its new version (up to 5 minutes) before syncing. The feed is a log of changes rather than a full listing, so only the changed items are compared.

Tested: a replay of the failed run (same seed 537418444, beta tier, fresh dev instances) passed every check in all 5 rounds. Round 3 waited 11s for the target's feed.

After this merges, v1.3.0-beta.0 gets re-pointed at the new main commit to re-run the gated publish. Nothing was published from the first tag.

🤖 Generated with Claude Code

The v1.3.0-beta.0 tag run failed one check: round 3 edited the same item
on both sides, then synced seconds later, before A's edit had reached A's
Fetch API feed (which the CLI pulls). The CLI saw only B's edit, rightly
reported it as a target-only conflict, and the --overwrite resolve copied
A's previous value onto B; once A's edit arrived, the no-op preflight
wanted another update.

Before each round's edits the harness now snapshots every content item's
version on both instances (Management API), and after them waits until
the Fetch API sync feed lists each changed item at its new version (up to
5 minutes) before syncing. The feed is a log of changes, not a full
listing, so only the changed items are compared. A replay of the failed
run (same seed, beta tier) passed every check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@5PK
5PK merged commit f77c2e4 into main Nov 2, 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