Skip to content

Test that selfie push skips a record too large for the cloud - #125

Open
selfie-bot wants to merge 1 commit into
mainfrom
test/push-skips-large-record
Open

selfie-bot wants to merge 1 commit into
mainfrom
test/push-skips-large-record

Conversation

@selfie-bot

@selfie-bot selfie-bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Adds a test for a rule docs/specs/sync.md states but nothing exercised: selfie push skips a kept record larger than SYNC_LIMITS.derivedBytes, and leaves it out of the diffs count. Test only, no code change.

cli/test/sync-routes.test.ts and cli/test/ui-batch.test.ts cover the server refusing an oversized record (413, derived-too-large), and nothing covered the client-side skip at cli/src/sync.ts. Without that skip, a pair whose record is too large would make the whole push exit 2 at its last step, after the batch, decisions and images had already gone.

The test plants a kept record that is still readable but past the limit (unknown fields are ignored by readRecord), then pushes. It expects exit 0, diffs: 0, and nothing kept in the cloud. With the skip removed it fails: the push exits 2. The full sync.test.ts passes (58 tests).

…keep

sync.md has push skip a record past SYNC_LIMITS.derivedBytes and leave it out
of diffs. Only the server's refusal was tested; without the client's skip, a
large pair's 413 fails the whole push at its last step.

This branch has not been deployed

No deployments
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