← Priority list
Unclaimed

Finish the required full-suite check for the UrlProtocol response cleanup fix

Verify the pending bld-all-tests run on final head7478b6ffb of the open UrlProtocol PR. The minimal ordering fix is pushed, required build is green, and the unchanged regression failed3/3 before the fix and passed first attempt after it. Leave the PR open; no merging, enqueueing or publication.

Handoff document

Markdown

Finish the required full-suite check for the UrlProtocol response cleanup fix

Written 2026-10-21. RE-VERIFY: This is the S34 lane snapshot. Read https://github.com/CodexCoder21Organization/UrlProtocol/pull/697 and https://github.com/CodexCoder21Organization/UrlProtocol/actions/runs/39594810399 before acting; CI may have completed since this record was written.

Design decisions in force

The 2026-10-21 task says: "the set of resources to release is captured before any conversion step can run user code (close callbacks, toString, getters), and every captured resource is released exactly once even if user code mutates the result or throws."

It also says: "Add one failing-first public-API test for the reviewer's exact ordering (a close callback that clears the list and throws, with an unread sibling). Keep the change minimal; nothing else changes." "Do not merge, enqueue or publish." Those restrictions remain in force. Do not deploy, change timeouts, lower iteration counts, skip tests, or weaken assertions.

Mission summary

Finish verification of the small cleanup-ordering follow-up in https://github.com/CodexCoder21Organization/UrlProtocol/pull/697. Implementation, deterministic fail-first proof, passing unchanged targeted regression, self-review passes and push are complete. The required bld-build passed. The required bld-all-tests run on the exact final head was still running at the last check. The lane had a strict 60-minute time box; its implementation is complete, but a pending suite must not be called green.

The earlier broad handoff url://handoff/handoffs/hf-2026-10-14-land-the-urlresolver-extreme-condition-bug-fixes-fix-the-two-merge-queue-flakes-then-merge-the-reviewed-prs-and-finish-the-rest is already archived. It supplied historical context, but this record concerns only the small S34 follow-up and does not reopen that broad effort.

What was found and done

The prior tracker discovered resources only after encoding threw. Normal conversion reads and closes the first InputStream through reader.use. If that close callback clears the mutable result list and throws, the catch scans an empty list and misses an unread sibling. This mechanism is now demonstrated through the public RpcResponse.toJson API, rather than inferred only from source.

The new tests/testReadStageCloseCallbackCannotRemoveUnreadSiblingFromCleanup.kts returns a mutable list containing the first stream, an unread sibling, and duplicate references to both. The first close clears the result and throws an exact IOException. The test requires the same original exception/full message, one first close, zero sibling reads, one sibling close and no duplicate suppressed failure.

Fail-first source head36edc0dbc55f2256fdabfa53ada1c9d20f89ed3d had exactly the reviewed baseline RpcEncodingResources implementation. Run https://github.com/CodexCoder21Organization/UrlProtocol/actions/runs/39593555856 failed all three harness attempts with A read-stage close callback cannot remove an owned unread sibling from cleanup. Expected <1>, actual <0>. Attempts took808/790/794ms, workflow run_attempt1. The failure stack and attempt history are available in its test-attempt-history artifact and job log. Its draft https://github.com/CodexCoder21Organization/UrlProtocol/pull/769 is closed.

After that proof, only RpcEncodingResources.kt was changed: split graph discovery from release; capture the supported-container resource graph before encode(); do not claim resources during capture; on failure claim all remaining stream/jarInput identities before closing, skipping already consumed streams. Existing identity deduplication, close-failure aggregation and fatal failure propagation remain. Final implementation delta is29 added/13 removed lines. One new48-line test, no existing test edited by this follow-up. No public API, dependency, transport/outbox, encoder bytes or timeout changes. README already states the intended ownership contract and needed no change.

The unchanged regression passed first attempt in https://github.com/CodexCoder21Organization/UrlProtocol/actions/runs/39596106430 at fixed-source head dccc519219b78a7bec03dfd0ae14ded54647cce7:1/1,783ms, no attempt-history element, workflow run_attempt1. That verification tree differs from the real final tree only in the temporary exact-file test selector. Its draft https://github.com/CodexCoder21Organization/UrlProtocol/pull/770 is closed.

The real branch was rebased without conflicts onto main c64fee18d8cb94be3dd43b175366a520639f9e3f. That brought in one upstream capacity-victim test change; it is not an S34 existing-test edit. Immediately before pushing, main was fetched/rebased and the existing PR was confirmed OPEN. A --force-with-lease push and git ls-remote verified final7478b6ffb83c0c569b5aa5367ef90a26e9baac5f. Working tree, stash/local-only-commit sweep were clean.

A separate test-comprehensiveness pass checked public API use, deterministic fault ordering, aliases, full failure text and resource counts. A separate code review pass checked capture-before-conversion, nested guards sharing release identities, forwarded carrier/input aliases, deep/cyclic discovery, all-claims-before-close behavior, original failure preservation, close-failure aggregation and fatal propagation. No further findings. These were independent passes by the lane itself; no subagents were used, per the brief.

Relevant PRs / refs

Repo Branch Remote head SHA PR Contents State
UrlProtocol https://github.com/CodexCoder21Organization/UrlProtocol/tree/ext2/lane7-unencodable-response 7478b6ffb83c0c569b5aa5367ef90a26e9baac5f https://github.com/CodexCoder21Organization/UrlProtocol/pull/697 Existing larger PR plus one cleanup-ordering fix and regression OPEN, build passed, full suite pending at snapshot
UrlProtocol https://github.com/CodexCoder21Organization/UrlProtocol/tree/wip/s34-failfirst 36edc0dbc55f2256fdabfa53ada1c9d20f89ed3d https://github.com/CodexCoder21Organization/UrlProtocol/pull/769 Unfixed production source/new regression; evidence-only targeted selector Closed draft, regression fails3/3
UrlProtocol https://github.com/CodexCoder21Organization/UrlProtocol/tree/wip/s34-fixed-verification dccc519219b78a7bec03dfd0ae14ded54647cce7 https://github.com/CodexCoder21Organization/UrlProtocol/pull/770 Identical final production/test source; evidence-only targeted selector Closed draft, regression passes first attempt

Final-head required build: https://github.com/CodexCoder21Organization/UrlProtocol/actions/runs/39594810280 SUCCESS. Its log confirms scripts/build.bash --local-and-remote foundation.url.protocol.buildMaven.

Final-head required full suite: https://github.com/CodexCoder21Organization/UrlProtocol/actions/runs/39594810399. It started11:49:29 UTC; the Run Tests step started11:52:42. Full suite uses scripts/test.bash --local-and-remote --test . --log test_log_file.xml. The real PR workflow is unchanged. Read the artifact and count first attempts/retries before claiming completion.

No deployment, publication, merge, queue change or production write was performed by this lane. Only source branches, draft PRs, the real PR description and CI requests associated with pushes were written.

Next steps

  1. Reverify real PR OPEN/head7478b6ffb, both required checks and the full-suite run. Use plain build-watchman: ~/bin/coursier launch buildwatchman:build-watchman:0.0.21 -r https://kotlin.directory -- --repo CodexCoder21Organization/UrlProtocol --pr 697 --idle-timeout-minutes 120. Never use --to-merged. Watch as a tracked task and stop it before finishing.
  2. If full suite passes, download its test-attempt-history XML, report counts and any retries, verify the new regression passed, and update the real PR description with that exact final-head run. Then the S34 task is complete; leave the PR open.
  3. If a required test fails, read gh run view 39594810399 --repo CodexCoder21Organization/UrlProtocol --log-failed. Do not label a failure unrelated without showing it on main. The task's common rules permit one rerun of only a failed required job after proving an unrelated main flake; no blind requeues. Do not weaken tests or introduce a mitigation.
  4. Push any further change only after confirming the real PR is still OPEN, fetching/rebasing and appropriate verification. Any further head change needs fresh verification/review. Complete this handoff only when the required checks are green.

Reusable / operational knowledge

  • Effective main requirements were verified through gh api repos/CodexCoder21Organization/UrlProtocol/rules/branches/main: bld-build and bld-all-tests. kotlin.build App checks are informational; ignore lost-dispatch warnings and do not rerequest those suites.
  • bld-build builds only. For fail-first evidence the separate draft's bld-all-tests selector was temporarily narrowed to the exact new file. No real-PR workflow change was made. The first full-suite preparation jobs39593280162/39593280310 were cancelled to replace them with this deliberate targeted selector; they were not failed-test reruns.
  • Local kompile verification was explicitly superseded by the common brief's GitHub-runner procedure because the shared box cannot reliably execute these tests. No local builds/tests were started in this lane.
  • Build-watchman sometimes reports Java GitHub connect timeouts while gh REST succeeds. It recovered and identified the required gate. Supplement live state through gh at most once per60seconds; no suite rerequest was performed.
  • gh pr edit fails with the Projects-classic deprecation GraphQL error here. Use gh api .../pulls/<id> --method PATCH --input <JSON-file> with a fresh body read, preserving text/newlines.
  • The shared historical handoff rejects reports because it is completed/archived. Do not reopen it to overwrite the broader record for this narrow follow-up.
  • Read: task p34-697c.md, common.md, S30 findings and reproducer, repository README/build/refusal contract (no AGENTS.md), TESTING.md public-API/hermetic/TDD/extreme-condition/machine-independent sections, PHILOSOPHY.md relevant principles, and https://my.externalbrain.wasmserver.com/doc/github-builders-racing-remote-ci.md.
  • All necessary source and test artifacts are on the three remote refs above. Runner logs/XML are retained by the linked GitHub runs; lane copies and incremental findings were also written outside the disposable checkout. No build artifacts/caches need preserving.

Model usage

Recorded agent work, including concurrent agents

No model usage has been recorded for this handoff yet.

Record work with handoff-cli usage report hf-2026-10-21-finish-the-required-full-suite-check-for-the-urlprotocol-response-cleanup-fix.

No status reports yet.

Add dependency

Complete this handoff

Moves it out of every priority list and into ArchiveArea.