Verify the final stream cleanup head and close the remaining evidence draft
Written 2026-10-21 15:38 UTC. RE-VERIFY: query each linked PR head/state and runner result before acting. This is a snapshot. The assigned fix round has a two-hour time box ending around 15:40 UTC; code and focused reviews are complete, final full-runner verification is pending. Local watchers were stopped and verified absent; the clean checkout, generated probe source/jars, and any matching checkout cache were removed at 15:36 UTC. GitHub jobs continue independently.
Design decisions in force
Assigned 2026-10-21: "R1. Close finishes within the existing bounded waits even if a write on the shared connection is stalled"; "R2. No thread that is writing part of a frame on the shared connection is ever interrupted by stream cleanup — upload pushes AND output pulls/any other writer"; "R3. Everything the PR already guarantees still holds (echo of an in-flight upload completes or fails clearly; re-entrant close releases exactly once; source-read waits still woken)." No new or raised timeout, no merges/enqueue, no publication/deployment, no weakened/disabled/deleted tests, no reflection/mocks. Finish at a green bld-build, not merge. No subagents are permitted by the common brief.
Mission summary
The original user requested extreme-condition end-to-end tests that fail before bugs are fixed. This round addresses review findings in https://github.com/CodexCoder21Organization/UrlResolver/pull/1371, originally at 6235af9bfc0b04a88d12237ea144dd73e30496cc. Earlier completed work is recorded at https://www.handoff.wasmserver.com/handoffs/hf-2026-10-21-verify-and-fix-closing-an-in-flight-echo-upload-without-losing-the-shared-connection . This checkpoint covers the later review findings and the additional related failure exposed by this round's full runner.
What was found and done
- Close sent unfinished upload releases synchronously before bounded joins. A full custom controller output held the shared write lane, so release could never acquire it and close never reached a bound. The fix gives release an uninterrupted daemon sender, waits within the existing five-second worker allowance, reports expired/unstarted releases, and reports later sender failures. A genuine 1024-byte bounded-pipe regression holds the upload frame unfinished through cleanup. A balanced public idle hold controls unrelated idle retirement; request timeouts stay at 1000 ms.
- Output pull workers were interrupted after their joins even while writing a partial __stream_pull frame. Those interrupts are removed. The TCP regression pauses after byte one, holds that frame through close, checks zero interruptions/original controller retention, then delivers all bytes and a health RPC using the same connection.
- The first full fixed runner passed 2298/2298 final results but recorded a failed first attempt in unchanged testRpcStreamServerHandlerErrorDoesNotDeadlock. This was NOT called unrelated: both current and preceding main artifacts were clean. The original evidence artifact also failed that test all three attempts. A delayed push can reach the service after its handler failed and removed the target; the sender waits for registration, and close unnecessarily spends its upload join on that RPC sender after release returned. A new deterministic public-API test forces exactly this ordering and failed 3/3. The final change joins only workers still stopping source reads, under their readLock; active RPC senders finish/fail through their sender without cleanup waiting or interruption.
- Final source was compiled against published real resolver dependencies and passed 22/22 focused checks: late-push 7/7, original R1/R2 each 3/3, all six original/neighbor cases, and the unchanged handler-error test 3/3. Separate code and test review passes are complete. All original tests remain byte-identical. No timeout/iteration/assertion changes.
Relevant PRs / refs
| Branch |
Remote head |
PR |
State |
| https://github.com/CodexCoder21Organization/UrlResolver/tree/fix/s19-upload-frame-cancellation |
21a3ae5b13a2a5a4190d6e4349cc280b889d4b82 |
https://github.com/CodexCoder21Organization/UrlResolver/pull/1371 |
OPEN, final code pushed with explicit lease; full runner https://github.com/CodexCoder21Organization/UrlResolver/actions/runs/39624401576 active |
| https://github.com/CodexCoder21Organization/UrlResolver/tree/wip/s42-failfirst |
55a999f0a1384746e2f6f87a29be42c4e3ac2277 |
https://github.com/CodexCoder21Organization/UrlResolver/pull/1374 |
CLOSED evidence draft; requested R1/R2 and existing handler-error test fail 3/3 each |
| https://github.com/CodexCoder21Organization/UrlResolver/tree/wip/s42-late-push-failfirst |
9fed92ed28ffa1d8445b955eb18855e1ca5ed723 |
https://github.com/CodexCoder21Organization/UrlResolver/pull/1379 |
OPEN draft, intermediate fixed source plus new late-push test only; full runner https://github.com/CodexCoder21Organization/UrlResolver/actions/runs/39623566787 active |
| https://github.com/CodexCoder21Organization/UrlResolver/tree/wip/s42-review-evidence-20261021 |
d82f28c944907cc2f52cd878c0f8c251ce973f63 |
no PR |
Evidence archive only; source matches final head, plus findings and baseline/focused logs; do not merge |
No source is merged/enqueued by this round. No production deploy, server restart or Maven publication was performed. No local-only code, uncommitted changes or stashes remain.
Evidence
- Original R1/R2 failure runner: https://github.com/CodexCoder21Organization/UrlResolver/actions/runs/39613269155/job/119267478762 . Artifact https://github.com/CodexCoder21Organization/UrlResolver/actions/runs/39613269155/artifacts/12356172635 has 2298 tests, 2295 final passes and 3 failures; each requested regression and the unchanged handler-error case fails all 3 attempts with the intended assertion.
- Intermediate head beca9d63b730484c79f55c8b41d222f07922e5dd required check passed at https://github.com/CodexCoder21Organization/UrlResolver/actions/runs/39613911072/job/119269704845 . Artifact https://github.com/CodexCoder21Organization/UrlResolver/actions/runs/39613911072/artifacts/12355521850 has 2298 final passes; all five original/new stream tests passed first attempt, but handler-error failed once then passed. This is historical validation, NOT the final head's required result.
- Earlier R3 fail-first artifact https://github.com/CodexCoder21Organization/UrlResolver/actions/runs/39570691835/artifacts/12334699955 was independently checked: original upload-frame and reentrant-close tests each failed 3/3; source-read cancellation already passed and is a preserved behavior.
- Main artifacts checked: https://github.com/CodexCoder21Organization/UrlResolver/actions/runs/39598742185/artifacts/12348329319 (2293 first-attempt passes) and https://github.com/CodexCoder21Organization/UrlResolver/actions/runs/39592579931/artifacts/12346435262 (2290 first-attempt passes).
Next steps
- Re-verify current state first, especially exact final head and effective branch rules. Claim this handoff and clear the time-box blocked reason when resuming. Only bld-build is required; both kotlin.build App checks are informational under the current common brief.
- Watch final https://github.com/CodexCoder21Organization/UrlResolver/pull/1371 with plain build-watchman 0.0.21. Do not merge/enqueue. Inspect the final attempt artifact: the new late-push case and unchanged handler-error case must be first-attempt clean, as must the original stream regressions. Record full suite counts and any failed-attempt history honestly.
- Collect the late-push draft runner at https://github.com/CodexCoder21Organization/UrlResolver/pull/1379 . Expected failure is testClosingReleasedUploadDoesNotWaitForLatePush at the cleanup wait assertion, not setup/compile. Record it and close the draft with no merge.
- Update the real PR validation body with the final passing runner link and the second evidence result. Complete/report/archive this handoff when the assigned fix round is fully verified. If still running at time box, release the claim and leave this checkpoint current.
- Previous local watchers and checkout/probe outputs are already removed; no matching checkout cache remained. Any continuation should create a fresh checkout if needed and own its own plain watcher. No further code change or extra verification batch is planned unless the final runner exposes a real problem.
Reusable / operational knowledge
- Common instructions explicitly require GitHub-runner verification because this box cannot reliably run kompile. Required workflows build and test with --local-and-remote. Supplementary probes compile exact manager/report sources and test bodies against published resolver 0.0.1328 plus real dependencies; they are not a rebuilt full module. The final full runner remains mandatory.
- Old gh pr edit fails on deprecated projectCards GraphQL. Write a JSON body file and PATCH repos/CodexCoder21Organization/UrlResolver/pulls/1371 through gh api. Closing the first draft used PATCH state=closed. No challenge CLI was invoked because it automatically enqueues/merges, forbidden here.
- gh run view --log-failed sometimes returns empty output for completed jobs. Raw job-log API and attempt artifacts work. Download with gh api repos/CodexCoder21Organization/UrlResolver/actions/artifacts/<id>/zip. XML root has test nodes with name/success/time and attempt-history nodes containing attempt nodes; inspect failed attempts, not just final aggregate.
- Watcher GitHub connect timeouts recovered on later reads; direct gh CLI also succeeded. No required job was rerun. Superseded tests-only draft revisions were cancelled before the final evidence head ran; neither a required failed job nor a merge queue was rerun.
- Working directory: /tmp/claude-1000/-code/15741e5f-c64b-403b-8e66-397a9b1d44d9/scratchpad/workspace/s42-root/workspace/UrlResolver . Findings: /tmp/claude-1000/-code/15741e5f-c64b-403b-8e66-397a9b1d44d9/scratchpad/cx/out/s42-findings.md . Build jars, caches and classpath files are transient outputs and intentionally excluded from source branches.
Durable supporting evidence and the XML reader are preserved at https://github.com/CodexCoder21Organization/UrlResolver/tree/wip/s42-review-evidence-20261021/handoffs/artifacts/s42 . Full raw XML remains in the linked Actions artifacts; transient compiler jars/classes/caches are intentionally omitted. Final runner job: https://github.com/CodexCoder21Organization/UrlResolver/actions/runs/39624401576/job/119305900593 .
Final brief audit: R1 and R2 are implemented with original runner fail-first evidence and intermediate full-run passing evidence. R3 original scenarios are preserved, and the related late-push case is fixed with 3/3 focused baseline failures and 7/7 focused fixed passes, plus the unchanged handler-error test passing 3/3. Final head has 22/22 focused passes and completed separate reviews. Required bld-build on the final head and the late-push draft runner are STILL RUNNING, so the assigned fix round is not yet fully verified. No existing tests were edited; no merge/enqueue/publication/deployment occurred.