[PR #4122] [CLOSED] test(kuna): wait for cold concurrent publication beyond the poll default #6073

Closed
opened 2026-10-31 01:11:39 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4122
Author: @dollarsmoney
Created: 10/15/2026
Status: ❌ Closed

Base: main ← Head: test/kuna-concurrency-cold-publication


📝 Commits (1)

  • 1943303 test(kuna): wait for cold concurrent publication beyond the poll default

📊 Changes

1 file changed (+5 additions, -1 deletions)

View changed files

📝 tests/boundary/providers/kuna/kunaProjectConcurrency.test.ts (+5 -1)

📄 Description

Summary

tests/boundary/providers/kuna/kunaProjectConcurrency.test.ts › "preserves concurrent results and reclaims capacity" fails on every macOS run for whichever pin case runs first. It waits for both project directories with expect.poll's implicit 1 s deadline, but on a fresh worker the first two concurrent fake-Kuna builds publish after about 1.1 s. The cache itself behaves correctly: given time, both cases pass. No linked issue; I found this in a full local suite run on macOS.

Problem and expected behavior

Smallest trigger, on unmodified main (fe7bcc3fb, macOS arm64):

npm run test:focused -- tests/boundary/providers/kuna/kunaProjectConcurrency.test.ts
× preserves concurrent results and reclaims capacity (pin: true)   Tests 1 failed | 6 passed (7)   (3/3 runs)

Running each case on its own with -t makes whichever runs first fail (pin: true 2/2, pin: false 2/2). So the failure is the fresh worker's first build, not pinning. Measured with a temporary local probe (not committed): both directories appear after 1,075–1,077 ms cold and 508–561 ms warm, while the poll gives up at 1,000 ms.

Expected: the test waits for the publication it gates on and then exercises concurrent eviction, without depending on Vitest's implicit poll deadline.

Change and scope

Give that one expect.poll an explicit timeout: 10_000, with a comment stating the measured cold-start reason. 10_000 is already used by other expect.poll calls in the suite and stays within the 30 s test timeout. Test-only change; no product code, contract or fixture behavior changes. The other Kuna polls each wait for a single build and pass with the default.

Contribution scope: not applicable (ordinary test fix within existing boundaries).

Contract and boundary impact

  • Semantic owner and earliest changed stage: test harness only.
  • Contribution scope fit and linked maintainer decision: not applicable.
  • CLI and MCP/tool-catalog contract: none.
  • Provider, bridge, target-format, or platform compatibility: none; the test now passes on macOS arm64.
  • Evidence, artifact, provenance, or reconstruction contract: none.
  • Target selection, authority, upstream behavior, and cleanup details: not applicable.
  • Generated metadata, package, or installation impact: none.

Expected effects: test-only change; no new target interaction (the existing test already launches the fake Kuna fixture).

Evidence and regression coverage

  • Tests added or updated: kunaProjectConcurrency.test.ts (explicit publication-wait bound).
  • Base reproduction: on fe7bcc3fb without the change, 3/3 runs fail pin: true with expected [] to have a length of 2 but got +0 … Matcher did not succeed in time.
  • Remaining proof gaps: not run on Linux or Windows locally. Linux CI already passes this test; the test is skipped on Windows.

Validation performed

macOS 15 (Darwin 24.3.0, arm64), Node 26.9.0:

  • npm run test:focused -- tests/boundary/providers/kuna/kunaProjectConcurrency.test.ts ×5 — 7 passed each run
  • npx vitest run --project boundary <file> -t "pin: true" ×2 and -t "pin: false" ×2, each case running cold first — all passed (1,207–1,267 ms)
  • Same focused command on base fe7bcc3fb ×3 — 1 failed / 6 passed each run
  • npm run test:focused -- tests/boundary/providers/kuna/*.test.ts (20 files) — 189 passed
  • npm run check:fast — typecheck and lint passed

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: macOS arm64 only; fake Kuna fixture.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: none (test wait bound only).

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/4122 **Author:** [@dollarsmoney](https://github.com/dollarsmoney) **Created:** 10/15/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `test/kuna-concurrency-cold-publication` --- ### 📝 Commits (1) - [`1943303`](https://github.com/morluto/rea/commit/194330338b206845ee3d372e547659897073c30f) test(kuna): wait for cold concurrent publication beyond the poll default ### 📊 Changes **1 file changed** (+5 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tests/boundary/providers/kuna/kunaProjectConcurrency.test.ts` (+5 -1) </details> ### 📄 Description ## Summary `tests/boundary/providers/kuna/kunaProjectConcurrency.test.ts` › "preserves concurrent results and reclaims capacity" fails on every macOS run for whichever `pin` case runs first. It waits for both project directories with `expect.poll`'s implicit 1 s deadline, but on a fresh worker the first two concurrent fake-Kuna builds publish after about 1.1 s. The cache itself behaves correctly: given time, both cases pass. No linked issue; I found this in a full local suite run on macOS. ## Problem and expected behavior Smallest trigger, on unmodified `main` (`fe7bcc3fb`, macOS arm64): ```text npm run test:focused -- tests/boundary/providers/kuna/kunaProjectConcurrency.test.ts × preserves concurrent results and reclaims capacity (pin: true) Tests 1 failed | 6 passed (7) (3/3 runs) ``` Running each case on its own with `-t` makes whichever runs first fail (`pin: true` 2/2, `pin: false` 2/2). So the failure is the fresh worker's first build, not pinning. Measured with a temporary local probe (not committed): both directories appear after **1,075–1,077 ms** cold and **508–561 ms** warm, while the poll gives up at 1,000 ms. Expected: the test waits for the publication it gates on and then exercises concurrent eviction, without depending on Vitest's implicit poll deadline. ## Change and scope Give that one `expect.poll` an explicit `timeout: 10_000`, with a comment stating the measured cold-start reason. `10_000` is already used by other `expect.poll` calls in the suite and stays within the 30 s test timeout. Test-only change; no product code, contract or fixture behavior changes. The other Kuna polls each wait for a single build and pass with the default. Contribution scope: not applicable (ordinary test fix within existing boundaries). ## Contract and boundary impact - Semantic owner and earliest changed stage: test harness only. - Contribution scope fit and linked maintainer decision: not applicable. - CLI and MCP/tool-catalog contract: none. - Provider, bridge, target-format, or platform compatibility: none; the test now passes on macOS arm64. - Evidence, artifact, provenance, or reconstruction contract: none. - Target selection, authority, upstream behavior, and cleanup details: not applicable. - Generated metadata, package, or installation impact: none. Expected effects: test-only change; no new target interaction (the existing test already launches the fake Kuna fixture). ## Evidence and regression coverage - Tests added or updated: `kunaProjectConcurrency.test.ts` (explicit publication-wait bound). - Base reproduction: on `fe7bcc3fb` without the change, 3/3 runs fail `pin: true` with `expected [] to have a length of 2 but got +0 … Matcher did not succeed in time`. - Remaining proof gaps: not run on Linux or Windows locally. Linux CI already passes this test; the test is skipped on Windows. ## Validation performed macOS 15 (Darwin 24.3.0, arm64), Node 26.9.0: - `npm run test:focused -- tests/boundary/providers/kuna/kunaProjectConcurrency.test.ts` ×5 — 7 passed each run - `npx vitest run --project boundary <file> -t "pin: true"` ×2 and `-t "pin: false"` ×2, each case running cold first — all passed (1,207–1,267 ms) - Same focused command on base `fe7bcc3fb` ×3 — 1 failed / 6 passed each run - `npm run test:focused -- tests/boundary/providers/kuna/*.test.ts` (20 files) — 189 passed - `npm run check:fast` — typecheck and lint passed ## Compatibility, safety, and release - Breaking changes or migration steps: none. - Real Hopper/Ghidra, browser, or OS coverage: macOS arm64 only; fake Kuna fixture. - Package or release metadata impact: none. - Security, privacy, process, or containment review: none (test wait bound only). ## Author readiness Human owner: - [ ] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [ ] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [ ] I declare this PR ready for initial maintainer review. ## Before merge - [ ] This PR addresses a concrete problem or an agreed enhancement. - [ ] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [ ] The PR has one focused outcome and the title follows `type(scope): outcome`. - [ ] Related issue is linked, or the reason for not linking one is stated above. - [ ] Tests cover changed observable behavior and meaningful failure paths. - [ ] Owning docs, contracts, and generated metadata are updated where needed. - [ ] User-visible CLI/MCP changes include representative output. - [ ] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:11:39 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#6073
No description provided.