← ArchiveArea
Completed

Bound build-watchman log-body reads so required-check observation keeps running

Reproduce and fix the build-watchman 0.0.21 main-thread wait in readBuildLogContentDigest after HTTP headers arrive but the body does not finish. A full thread dump and the bounded observation workaround are pushed on the UrlProtocol s85 evidence branch; no tool source fix or test exists yet. Open a reviewed green PR; no merge, enqueue, publish or deployment is authorized.

Handoff document

Markdown

Bound build-watchman log-body reads so required-check observation keeps running

Written: 2026-10-22 08:27 UTC.

RE-VERIFY: this is a snapshot. Check current build-watchman source/release before fixing; the affected live buildtest run may have ended. Source: https://github.com/CodexCoder21Organization/build-watchman. Read its README and AGENTS, plus https://github.com/CodexCoder21Organization/DocumentationRepository/blob/main/architecture/TESTING.md and https://github.com/CodexCoder21Organization/DocumentationRepository/blob/main/PHILOSOPHY.md.

Design decisions in force

The source task explicitly forbids merging, enqueuing, publishing and deployment. This record grants no additional authority. Reproduce through a public API against a real local HTTP server before changing implementation. Do not increase existing timeouts, hide an I/O failure, weaken tests or add a consumer-side product workaround.

Mission summary

Make the watcher finish an assessment when an HTTP server sends response headers and then never finishes its build-log body. The current InputStream body read can keep the main watch thread parked, so even a non-required check prevents observation of required GitHub results and the watcher's own idle limit. Diagnose and fix this in build-watchman, with a failing-first public-API reproducer, then open a reviewed green PR without merging.

What was found and done

During lane s85's UrlProtocol verification, build-watchman 0.0.21 / library 0.0.11 last wrote at 08:12:44 UTC. At 08:21:44 its main thread was still parked in HttpResponseInputStream.read through readBuildLogContentDigest(BuildLogContent.kt:40), fetchBuildLogContentSnapshot and assessForwardProgress. The full thread dump is preserved remotely. The read concerned an INFORMATIONAL kotlin.build check (buildtest run 77068db5), while required bld-all-tests was still active and bld-build green by independent GraphQL reads. An outer process bound prevented an endless process; the built-in idle limit was not being reached inside that blocked read.

The stuck owned process was stopped and its exit 130 verified. A bounded plain --once assessment with --buildtest-api http://127.0.0.1:1 returned promptly, kept the real required GitHub gate and explicitly reported optional buildtest observation unavailable. Plain mode was restarted with that override under a separate hard process bound. This is a monitoring workaround only; no UrlProtocol production code changed. Shared REST quota was also exhausted; GraphQL remained available.

No source fix or failing-first test has been written. The precise body-read stack is observed; an isolated deterministic reproducer remains the first step. Do not claim the underlying buildtest runner was stuck merely because the log stream did not finish.

Relevant PRs and refs

Repository Ref Remote head / state Purpose
UrlProtocol https://github.com/CodexCoder21Organization/UrlProtocol/tree/wip/s85-evidence 7b654d2f5, pushed and ls-remote verified Investigation record: handoff-evidence/s85/watchman-challenge.md and complete watchman-thread-dump.txt
build-watchman https://github.com/CodexCoder21Organization/build-watchman observed main 9da1fdc4690ca0b642766cc4f11ab9d868d04f3f Owning source, no local clone or changes yet
UrlProtocol https://github.com/CodexCoder21Organization/UrlProtocol/pull/834 OPEN at 11f11d28c39c7ee15272682875f1b662e40107ca The unrelated PR being watched; no need to change its product code

Nothing is deployed or published from this tool investigation. No tool-source branch or PR exists yet. The UrlProtocol evidence branch is not for merging.

Next steps

  1. Re-verify the release and source; read the repository and linked testing guidance. Clone fresh under workspace/.
  2. Start a real local HTTP server that sends headers and a prefix, then holds its body open. Drive the public watcher path that reads that body. Confirm the current code fails to return within its existing contract budget reliably, without artificial CPU load or reflection.
  3. Bound body consumption and close its stream at expiry. Also ensure optional progress probing cannot prevent a required-check verdict or the idle deadline. Preserve and report the original I/O error.
  4. Cover partial body, never-ending body, normal completion, error/close, interruption, required checks completing while an optional body is held, and cleanup of the reader/server.
  5. Run focused tests, independent test and code review passes, then full checks and open a PR. No merge, enqueue, release or deployment authorized.

Operational knowledge

The normal report-challenge CLI was not used because it automatically enqueues/merges, contrary to this lane's explicit prohibition. This central record preserves the issue without a GitHub merge. The parent effort remains separate: https://www.handoff.wasmserver.com/handoffs/hf-2026-10-22-finish-urlprotocol-0-0-1431-consumer-verification-and-ci-failure-attribution. The workaround means this tool issue is not a dependency of the UrlProtocol test correction.

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-22-bound-build-watchman-log-body-reads-so-required-check-observation-keeps-running.

No status reports yet.

Completed Oct 22, 2026 · 23:33 UTC This handoff is read-only in ArchiveArea.