Skip to content

test(app): stabilize offset observer test - #38044

Merged
rekram1-node merged 1 commit into
v2from
offset-test-flake
Jul 21, 2026
Merged

test(app): stabilize offset observer test#38044
rekram1-node merged 1 commit into
v2from
offset-test-flake

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

Summary

  • assert the reconnect behavior before unrelated DOM churn
  • preserve coverage that unrelated mutations and equal offsets do not emit callbacks
  • avoid Happy DOM weak observer callback collection making the positive assertion timing-dependent

Checks

  • bun test --preload ./happydom.ts ./src/pages/session/timeline/observe-element-offset.test.ts
  • repeated isolated test: 0 failures in 1,000 runs (previous order: 10 failures in 500 runs)
  • bun typecheck
  • bun test ./e2e/performance/unit (43 pass)

Requested by: @rekram1-node (Aiden Cline via Slack)

Run the reconnect assertion before unrelated DOM churn so Happy DOM cannot lose the observer callback under GC pressure.

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
@rekram1-node
rekram1-node merged commit fd97d78 into v2 Jul 21, 2026
10 checks passed
@rekram1-node
rekram1-node deleted the offset-test-flake branch July 21, 2026 05:26
github-actions Bot pushed a commit to ReStranger/opencode that referenced this pull request Jul 21, 2026
* upstream/v2:
  test(app): stabilize offset observer test (anomalyco#38044)
  feat(codemode): support bounded async iteration (anomalyco#38040)
  fix(core): normalize CRLF patch lines (anomalyco#38038)
  fix(core): accept padded patch markers (anomalyco#38036)
  fix(core): compose successive patch updates (anomalyco#38034)
  feat(codemode): support labeled control flow (anomalyco#38035)
  fix(core): improve patch errors (anomalyco#38016)
  fix(server): allow authenticated CORS preflight (anomalyco#38026)
github-actions Bot pushed a commit to ReStranger/opencode that referenced this pull request Jul 21, 2026
* upstream/v2: (23 commits)
  refactor(codemode): simplify model-facing wording (anomalyco#38042)
  fix(core): enforce patch EOF anchors (anomalyco#38039)
  fix(tui): prevent autocomplete search flicker (anomalyco#38128)
  refactor(core): break plugin host cycle (anomalyco#38120)
  refactor: extract shared util package (anomalyco#37828)
  fix: preserve runtime option defaults (anomalyco#38118)
  refactor(tui): simplify mini footer status line (anomalyco#38112)
  mini: settle on wait and durable pending (anomalyco#37984)
  test(app): stabilize offset observer test (anomalyco#38044)
  feat(codemode): support bounded async iteration (anomalyco#38040)
  fix(core): normalize CRLF patch lines (anomalyco#38038)
  fix(core): accept padded patch markers (anomalyco#38036)
  fix(core): compose successive patch updates (anomalyco#38034)
  feat(codemode): support labeled control flow (anomalyco#38035)
  fix(core): improve patch errors (anomalyco#38016)
  fix(server): allow authenticated CORS preflight (anomalyco#38026)
  feat(codemode): support JSON callbacks (anomalyco#38006)
  fix: remove legacy sdk from ci builds
  removed packages/opencode
  fix(server): preserve v1 auth compatibility
  ...
github-actions Bot pushed a commit to ReStranger/opencode that referenced this pull request Jul 21, 2026
* upstream/v2: (24 commits)
  feat(cli): port ACP to V2 (anomalyco#37907)
  refactor(codemode): simplify model-facing wording (anomalyco#38042)
  fix(core): enforce patch EOF anchors (anomalyco#38039)
  fix(tui): prevent autocomplete search flicker (anomalyco#38128)
  refactor(core): break plugin host cycle (anomalyco#38120)
  refactor: extract shared util package (anomalyco#37828)
  fix: preserve runtime option defaults (anomalyco#38118)
  refactor(tui): simplify mini footer status line (anomalyco#38112)
  mini: settle on wait and durable pending (anomalyco#37984)
  test(app): stabilize offset observer test (anomalyco#38044)
  feat(codemode): support bounded async iteration (anomalyco#38040)
  fix(core): normalize CRLF patch lines (anomalyco#38038)
  fix(core): accept padded patch markers (anomalyco#38036)
  fix(core): compose successive patch updates (anomalyco#38034)
  feat(codemode): support labeled control flow (anomalyco#38035)
  fix(core): improve patch errors (anomalyco#38016)
  fix(server): allow authenticated CORS preflight (anomalyco#38026)
  feat(codemode): support JSON callbacks (anomalyco#38006)
  fix: remove legacy sdk from ci builds
  removed packages/opencode
  ...
github-actions Bot pushed a commit to ReStranger/opencode that referenced this pull request Jul 21, 2026
* upstream/v2: (24 commits)
  feat(cli): port ACP to V2 (anomalyco#37907)
  refactor(codemode): simplify model-facing wording (anomalyco#38042)
  fix(core): enforce patch EOF anchors (anomalyco#38039)
  fix(tui): prevent autocomplete search flicker (anomalyco#38128)
  refactor(core): break plugin host cycle (anomalyco#38120)
  refactor: extract shared util package (anomalyco#37828)
  fix: preserve runtime option defaults (anomalyco#38118)
  refactor(tui): simplify mini footer status line (anomalyco#38112)
  mini: settle on wait and durable pending (anomalyco#37984)
  test(app): stabilize offset observer test (anomalyco#38044)
  feat(codemode): support bounded async iteration (anomalyco#38040)
  fix(core): normalize CRLF patch lines (anomalyco#38038)
  fix(core): accept padded patch markers (anomalyco#38036)
  fix(core): compose successive patch updates (anomalyco#38034)
  feat(codemode): support labeled control flow (anomalyco#38035)
  fix(core): improve patch errors (anomalyco#38016)
  fix(server): allow authenticated CORS preflight (anomalyco#38026)
  feat(codemode): support JSON callbacks (anomalyco#38006)
  fix: remove legacy sdk from ci builds
  removed packages/opencode
  ...
github-actions Bot pushed a commit to ReStranger/opencode that referenced this pull request Jul 21, 2026
* upstream/v2: (26 commits)
  fix(core): refresh model catalog every five minutes (anomalyco#38142)
  feat(util): configure package publishing (anomalyco#38129)
  feat(cli): port ACP to V2 (anomalyco#37907)
  refactor(codemode): simplify model-facing wording (anomalyco#38042)
  fix(core): enforce patch EOF anchors (anomalyco#38039)
  fix(tui): prevent autocomplete search flicker (anomalyco#38128)
  refactor(core): break plugin host cycle (anomalyco#38120)
  refactor: extract shared util package (anomalyco#37828)
  fix: preserve runtime option defaults (anomalyco#38118)
  refactor(tui): simplify mini footer status line (anomalyco#38112)
  mini: settle on wait and durable pending (anomalyco#37984)
  test(app): stabilize offset observer test (anomalyco#38044)
  feat(codemode): support bounded async iteration (anomalyco#38040)
  fix(core): normalize CRLF patch lines (anomalyco#38038)
  fix(core): accept padded patch markers (anomalyco#38036)
  fix(core): compose successive patch updates (anomalyco#38034)
  feat(codemode): support labeled control flow (anomalyco#38035)
  fix(core): improve patch errors (anomalyco#38016)
  fix(server): allow authenticated CORS preflight (anomalyco#38026)
  feat(codemode): support JSON callbacks (anomalyco#38006)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants