Skip to content

chore(cymbal): add shimforge to simplify tests - #2

Draft
tanglearncode wants to merge 314 commits into
masterfrom
chore/cymbal-shimforge-capture-test
Draft

tanglearncode wants to merge 314 commits into
masterfrom
chore/cymbal-shimforge-capture-test

Conversation

@tanglearncode

@tanglearncode tanglearncode commented Sep 16, 2026

Copy link
Copy Markdown
Owner

This is a demo PR. Cymbal's test waits on a live HTTP mock for up to five seconds. On a busy CI runner, this could make tests flakey.

  • Replace the HTTP mock and its wait loop with a shimforge mock of common_posthog::capture_exception, so the test checks the handoff directly instead of waiting for it to show up over HTTP.
  • Check the handoff itself: HTTP 500, exactly one capture call, the right error (UnhandledError::SqlxError(PoolClosed)), and the right request_id, batch_event_count, and team_count properties.

@tanglearncode
tanglearncode marked this pull request as draft September 16, 2026 05:52
releaser-posthog-cli Bot and others added 29 commits September 16, 2026 09:55
Co-authored-by: releaser-posthog-cli[bot] <290815855+releaser-posthog-cli[bot]@users.noreply.github.com>
…#100112)

Co-authored-by: posthog[bot] <206114724+posthog[bot]@users.noreply.github.com>
Co-authored-by: mariusandra <53387+mariusandra@users.noreply.github.com>
…stHog#100741)

Co-authored-by: posthog[bot] <206114724+posthog[bot]@users.noreply.github.com>
Co-authored-by: Paul D'Ambra <paul@posthog.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: pauldambra <984817+pauldambra@users.noreply.github.com>
PostHog#101128)

Co-authored-by: tests-posthog[bot] <250237707+tests-posthog[bot]@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…og#101087)

Co-authored-by: posthog[bot] <206114724+posthog[bot]@users.noreply.github.com>
Co-authored-by: Tue Haulund <tue@posthog.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…PostHog#101441)

Co-authored-by: posthog[bot] <206114724+posthog[bot]@users.noreply.github.com>
…st cap (PostHog#101289)

Co-authored-by: posthog[bot] <206114724+posthog[bot]@users.noreply.github.com>
Co-authored-by: Tue Haulund <tue@posthog.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…Hog#101423)

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…92325)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: andrewm4894 <2178292+andrewm4894@users.noreply.github.com>
Co-authored-by: Alex V <alexander.veryaysky@gmail.com>
Co-authored-by: tests-posthog[bot] <250237707+tests-posthog[bot]@users.noreply.github.com>
Co-authored-by: posthog[bot] <206114724+posthog[bot]@users.noreply.github.com>
…ry row (PostHog#101498)

Co-authored-by: posthog[bot] <206114724+posthog[bot]@users.noreply.github.com>
Co-authored-by: Andrew Maguire <andrewm4894@gmail.com>
posthog Bot and others added 22 commits September 16, 2026 22:17
…pers (PostHog#99725)

Co-authored-by: posthog[bot] <206114724+posthog[bot]@users.noreply.github.com>
Co-authored-by: posthog[bot] <206114724+posthog[bot]@users.noreply.github.com>
…og#101041)

Co-authored-by: posthog[bot] <206114724+posthog[bot]@users.noreply.github.com>
Co-authored-by: cvolzer3 <15130376+cvolzer3@users.noreply.github.com>
…uests (PostHog#101920)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: posthog[bot] <206114724+posthog[bot]@users.noreply.github.com>
Co-authored-by: posthog[bot] <206114724+posthog[bot]@users.noreply.github.com>
Co-authored-by: posthog[bot] <206114724+posthog[bot]@users.noreply.github.com>
…Hog#90564)

Co-authored-by: posthog[bot] <206114724+posthog[bot]@users.noreply.github.com>
Co-authored-by: Lucas Ricoy <2034367+lricoy@users.noreply.github.com>
…ption tests (PostHog#99734)

Co-authored-by: posthog[bot] <206114724+posthog[bot]@users.noreply.github.com>
…og#95403)

Co-authored-by: posthog[bot] <206114724+posthog[bot]@users.noreply.github.com>
Co-authored-by: posthog[bot] <206114724+posthog[bot]@users.noreply.github.com>
Co-authored-by: jordanm-posthog <245956587+jordanm-posthog@users.noreply.github.com>
Co-authored-by: tests-posthog[bot] <250237707+tests-posthog[bot]@users.noreply.github.com>
Co-authored-by: posthog[bot] <206114724+posthog[bot]@users.noreply.github.com>
PostHog#91120)

Co-authored-by: tests-posthog[bot] <250237707+tests-posthog[bot]@users.noreply.github.com>
…tHog#101921)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…7304)

Co-authored-by: tests-posthog[bot] <250237707+tests-posthog[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: posthog[bot] <206114724+posthog[bot]@users.noreply.github.com>
…1285)

Co-authored-by: posthog[bot] <206114724+posthog[bot]@users.noreply.github.com>
@tanglearncode
tanglearncode force-pushed the chore/cymbal-shimforge-capture-test branch 2 times, most recently from 44feb67 to c1952c2 Compare September 17, 2026 04:01
@tanglearncode tanglearncode changed the title chore(cymbal): isolate exception capture test with shimforge chore(cymbal): add shimforge to simplify tests Sep 17, 2026
@tanglearncode
tanglearncode force-pushed the chore/cymbal-shimforge-capture-test branch from c1952c2 to eeec30c Compare September 17, 2026 04:05
Replace the telemetry HTTP mock and its flush-and-poll loop with a
thread-local shimforge mock of common_posthog::capture_exception. The
test asserts the handoff directly - HTTP 500, exactly one capture,
UnhandledError::SqlxError(PoolClosed), and the request_id,
batch_event_count and team_count properties - instead of polling an HTTP
mock for up to five seconds.

Add shimforge 0.1.3 as a pinned dev-dependency with its lock entries.
@tanglearncode
tanglearncode force-pushed the chore/cymbal-shimforge-capture-test branch from eeec30c to a46dcc2 Compare September 17, 2026 04:07
@github-actions

Copy link
Copy Markdown

🤖 CI report

Docs preview — preview build failed to start

The docs preview build could not be triggered. View the workflow logs for details.

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.