Repository navigation
test(client): assert a declined foreign payload is not a commit - #138
Merged
Merged
Conversation
TESTING.md §3.25 asks for all four shapes that reach payload-transferred with nothing to apply. The test covered three; the declined foreign payload was missing, so dropping `not foreign` from `applied` still passed the suite, because the foreign tests assert only the basis. Add it, priming the reader with a skill commit so the payload is recognisably foreign, and assert the committed set is unchanged rather than empty. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
andrewklatzke
approved these changes
Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow-up to #129, and the Python half of the review comment on launchdarkly/js-ai-sdk#104.
TESTING.md §3.25 says to assert all four shapes that reach
payload-transferredwith nothing to apply: anoneintent, an unrecognisedintentCode, a lone transfer with no intent, and a declined foreign payload.test_a_transfer_that_applied_nothing_is_not_a_commitcovered three. The foreign case was missing.Why it matters: if
not foreignis dropped fromappliedand the oldbasisguard is put back, the full suite still passes, because the foreign-payload tests check only the basis,payloads_ignoredand the held set. The outcome would reportcommitted=True, which resetsconnection_failuresand lets a poll keep the etag for content it never applied.Change:
payloads_transferredwent up by one, instead of checking for an empty store and a count of 1.Verified:
make lint,format-check,typecheckandtestall pass (2200 passed).The matching JS change is pushed to launchdarkly/js-ai-sdk#104.
🤖 Generated with Claude Code
Note
Overview
Extends
test_a_transfer_that_applied_nothing_is_not_a_commitso it matches TESTING.md §3.25: the loop now covers all four ways a transfer can finish with nothing applied, including a declined foreign payload (env-flagsafter a real skill commit).Each scenario can run an optional
priorevent sequence (needed so “foreign” only applies once the skill payload is known). Assertions were generalized tocommitted/up_to_date/basisunchanged, held objects unchanged vs a snapshot, andpayloads_transferredincrements by one—so a regression that wrongly setscommitted=Trueon ignored transfers would fail even when basis-only tests still pass.Reviewed by Cursor Bugbot for commit 4f672f6. Bugbot is set up for automated code reviews on this repo. Configure here.