Skip to content

fix(threads-style): TEXT containers finish processing immediately - #54

Merged
deblasis merged 3 commits into
mainfrom
fix/threads-text-containers
Aug 16, 2026
Merged

fix(threads-style): TEXT containers finish processing immediately#54
deblasis merged 3 commits into
mainfrom
fix/threads-text-containers

Conversation

@deblasis

@deblasis deblasis commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

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.

  • TEXT containers: _done_at = now (instant finish); simulate_fail + the status-poll endpoint keep the derive-on-read machinery
  • Go test updated to pin the instant-finish contract + back-to-back publish (and finds its media among multiple published posts)
  • Stripe Connect clock-advance assertions anchored to the objects' own created stamps (CI second-boundary off-by-one race)
  • Verified end-to-end against a real client suite: threads publish → metrics → ingest green, six-platform fan-out 21/21 across three consecutive runs

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
deblasis merged commit 24f1d78 into main Aug 16, 2026
1 check passed
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).
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