fix(threads-style): TEXT containers finish processing immediately - #54
Merged
Conversation
Real Threads only makes clients poll container status for video/image uploads; text posts are finished at creation (omnipost's production client creates and publishes back-to-back with no poll). The simulator was enforcing a 3s processing window on TEXT too, so real-world clients 400'd on threads_publish. Found by dogfooding: omnipost's threads adapter driven end-to-end against stunt. The poll endpoint + derive-on-read machinery stay for the simulate_fail branch; the Go test now pins the instant-finish contract and the back-to-back publish.
The test clock offsets from real time at activation, so every object's created stamp is t0 + real elapsed. Under CI load a second boundary can cross between clock creation and object creation, making t0-anchored exact assertions flaky (off-by-one arrival_date on the payout lifecycle test). Anchor the payout + capability advances to the objects' own created stamps — the asserted relations (arrival = created+4d, in_transit at +10s, paid at +60s, capabilities active after +1d) are identical, the timing is not.
deblasis
added a commit
that referenced
this pull request
Aug 16, 2026
Real Threads only makes clients poll container status for video/image uploads; text posts are finished at creation (production clients create and publish back-to-back with no poll). The simulator was enforcing a 3s processing window on TEXT too, so real-world clients 400'd on threads_publish. Found by dogfooding: a production threads client driven end-to-end against stunt. The poll endpoint + derive-on-read machinery stay for the simulate_fail branch; the Go test now pins the instant-finish contract and the back-to-back publish. Clock-advance assertions in the stripe Connect tests are anchored to the objects' own created stamps: the test clock offsets from real time at activation, so under CI load a second boundary can cross and make t0-anchored exact assertions flake (off-by-one arrival_date).
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.
Found by dogfooding: a production threads client creates a TEXT container and publishes back-to-back (no status poll) — correct against real Threads, where only video/image uploads need polling. The simulator's blanket 3s processing window rejected that flow with the not-finished-processing 400.
_done_at = now(instant finish);simulate_fail+ the status-poll endpoint keep the derive-on-read machinerycreatedstamps (CI second-boundary off-by-one race)