fix: consume wire format mismatch and tls server crash skip#8
Merged
vieiralucas merged 1 commit intomainfrom Mar 26, 2026
Merged
fix: consume wire format mismatch and tls server crash skip#8vieiralucas merged 1 commit intomainfrom
vieiralucas merged 1 commit intomainfrom
Conversation
remove the spurious queue field from the fibp consume push decoder. the server (fila-core encode_consume_push) sends: msg_id, fairness_key, attempt_count, headers, payload — there is no queue field. the go client was incorrectly reading a queue field between fairness_key and attempt_count, causing all bytes from attempt_count onward to be misinterpreted. this made all consume-based integration tests fail with "timeout waiting for messages". also update buildconsumeframe in consume_test.go to match the actual server wire format. for tls tests: replace waitforfibpwithtls with waitforfibpwithtlsorskip, which checks via signal(0) whether the server process exited before becoming ready. this allows the tls tests to skip gracefully when the server binary panics on tls initialisation (e.g. missing rustls CryptoProvider) rather than waiting 10 seconds and then failing.
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.
Summary
Bug: consume wire format mismatch —
decodeConsumeMessagewas reading aqueuefield betweenfairness_keyandattempt_countthat the server never sends. The server'sencode_consume_pushformat ismsg_id | fairness_key | attempt_count | headers | payload(noqueuefield). This caused all consume-based integration tests to silently misparse frames and time out waiting for messages. UpdatedbuildConsumeFrameinconsume_test.goto match the actual wire format.Bug: TLS tests hung for 10s on server panic — When the
dev-latestfila-server binary panics on TLS initialisation (missing rustls CryptoProvider), the readiness loop kept retrying until the 10-second timeout, then failed. ReplacedwaitForFIBPWithTLSwithwaitForFIBPWithTLSOrSkip, which polls process liveness viasignal(0)on each iteration and skips the test immediately if the server exited — avoiding the 10-second hang.Test plan
go test -run "TestDecode|TestEncodeDecodeEnqueue|TestDecodeError" ./...go build ./...andgo vet ./...cleanTestEnqueueManyExplicit(previously failed with "timeout waiting for messages, received 0/3")TestTLSConnectionas SKIP (not FAIL) when server binary lacks TLS supportSummary by cubic
Fixes consume frame decoding to match the server wire format and makes TLS tests skip immediately if the server exits, preventing 10s timeouts. Restores correct parsing of pushed messages and removes hangs in CI.
Written for commit 3a5baf5. Summary will update on new commits.