Handoff: Resolve the eager-getter contract before fixing UrlResolver unused collection reads
Written 2026-10-22T01:40:51.652794+00:00.
RE-VERIFY: this is a write-time snapshot. Re-read the task/evidence branches, current main and issue 1412; use git ls-remote for branch SHAs and gh pr view with explicit --json state,mergedAt,headRefOid for linked PRs. No implementation fix exists here.
Design decisions in force
Owner task dated 2026-10-22: “collection results must not fetch getters the caller never reads”.
“Design a fix that satisfies BOTH the new test and every existing PR 887 / performance test unchanged”.
“Never weaken, delete, or skip any existing test or assertion, never raise a timeout or cut an iteration; if you conclude an existing assertion is wrong, stop and record why instead of changing it.”
“Never ask the user. Do NOT merge, enqueue or deploy.”
“Do NOT publish in this task unless the PR is green AND you have also verified, with the ExternalBrainWui listing count test from the evidence branch (tests/testMarkdownListingCountsCallsAndResponseBytes.kts) pointed at a locally built resolver jar, that a names-only listing makes no getContent calls.”
Full owner brief: https://github.com/CodexCoder21Organization/UrlResolver/blob/wip/r131-red/r131-evidence/p131.md . These requirements remain in force; none was silently relaxed. The explicit stop condition was reached, so the next implementation work needs a resolved acceptance contract rather than another attempt to preserve the incompatible assertions.
Mission summary
Fix https://github.com/CodexCoder21Organization/UrlResolver/issues/1412 upstream. ExternalBrainWui needs a current resolver for the caller-interruption repair in https://github.com/CodexCoder21Organization/ExternalBrainWui/pull/63. Its names-only Markdown listing regressed from 4 calls / 377 result bytes / 0 body bytes on 0.0.556 to 7 calls / 12461 result bytes / 11799 body bytes on 0.0.1331. Evidence: https://github.com/CodexCoder21Organization/ExternalBrainWui/tree/wip/r130-evidence/oldcounts . This work established regression red and a specific contract conflict, then stopped as required before implementation.
What was found and done
The per-element/per-getter crossing overhead addressed by https://github.com/CodexCoder21Organization/UrlResolver/pull/887 and constituent https://github.com/CodexCoder21Organization/UrlResolver/pull/890 is real. The tests used eager getter-body counts as a deterministic proxy for eliminating those crossings. Current main now explicitly requires 2200 getter bodies before any property is read, and an unread 10-second getter to make a collection call time out after 2 seconds. The new issue requires those unread getters not to execute. A lazy batch could preserve the performance intent, but cannot preserve those two exact earlier observations. The exact same public fixture demonstrates 0-required versus 2200-required for the same call prefix; future reads cannot change the stored count.
Committed two new tests on unchanged main c7dce77f156849735a52844202f8f19d26813688. The three-record provider test returns a cheap name and an unread 65,544-byte String field through real SJVM/RPC, without mocks or reflection. It validates all names, then fails at the exact count assertion: expected {getName=3}, actual {getName=3,getId=3}, with 196632 large bytes. The issue's original 200×11 fixture independently fails expected 0 versus actual 2200. Both fail all 3 automatic attempts; the three unchanged original guards pass first attempt, with no retry histories. A first earlier invocation had a fixture-construction error because the RPC entry point needs an instance constructor; its XML/full stack are retained separately and never counted as regression red. The corrected fixture uses an instance wrapper around the existing static list body.
PR 887 is freshly verified MERGED at 2026-07-29T08:40:58Z. ExternalBrainWui PR 63 is freshly verified OPEN, head 850a534047de6c80d77858fc72e9b962c7fd3520, mergeStateStatus CLEAN. This task created no PR, no CI run, no watcher, no requested rerun, no queue entry and no publication or deployment. The source jar built for regression proof is unmodified implementation code, not a candidate fix. There are no fixed downstream listing counts.
Relevant PRs and refs
Evidence index: https://github.com/CodexCoder21Organization/UrlResolver/tree/wip/r131-red/r131-evidence . Full reasoning and task-item audit: https://github.com/CodexCoder21Organization/UrlResolver/blob/wip/r131-red/r131-evidence/r131-findings.md . Corrected run XML: https://github.com/CodexCoder21Organization/UrlResolver/blob/wip/r131-red/r131-evidence/r131-contracts.xml . Setup-error XML: https://github.com/CodexCoder21Organization/UrlResolver/blob/wip/r131-red/r131-evidence/r131-large-red.xml .
Published/deployed but not merged: none from this effort. No publish or deploy command was issued. Build outputs/dependency caches are intentionally not pushed. Other checkout touched was a clean, read-only clone of the existing ExternalBrainWui evidence branch; it has no authored changes, stashes or unpushed work. UrlResolver worktree/stash/unpushed-commit audits were clean after push. Cleanup verified at 2026-10-22T01:41:55.047031+00:00: fresh r131 checkout, exact ~/.aibuildcaches entry and read-only evidence clone deleted after confirming no own test/compiler processes remained. All bounded runner and handoff command sessions exited; no watcher or recurring loop was started. The authoritative resume state is remote, not a local checkout.
Next steps
- Re-verify current main, the unchanged eager guards, remote SHAs and issue state. Read the full task and findings first; do not repeat the reproduction analysis.
- Resolve the acceptance conflict explicitly before implementation. The natural generic fix batches only a demanded getter over retained elements, memoizes that property, and keeps unused properties untouched. This preserves the original crossing-cost goal, but requires explicitly replacing the eager count proxy and the unread-getter timeout contract with demand-aware crossing/cost and watchdog coverage. Alternatively, a new explicit selected-fields API can coexist with eager behavior but requires consumer adoption and does not fix the current default call unchanged. No test-name/interface-name special cases or adjusted counters are a valid resolution.
- After that contract decision, implement upstream with public-API tests for concurrent demand, memoization, nulls, mixed/nested collections, errors, retirement, explicit close, reentry, release and bounded retention. Current returned-object generation leases already provide the lifecycle basis; this was not the purpose of PR 887.
- Establish new red/green/mutation evidence, run all relevant targets unchanged except explicitly approved contract updates, and run ExternalBrainWui's real listing fixture against a locally built candidate jar. Open the fix PR with the required provenance/footer, then use bounded build-watchman 0.0.21 plain --pr for required CI; do not rerun/request kotlin.build checks. No merge, enqueue or deploy. Publish only after every original publication gate is met.
To reproduce the current stop evidence: clone wip/r131-red fresh, read README (no AGENTS.md on the inspected main), fetch/rebase main before building, then run scripts/test.bash --local --test tests/testSandboxedCollectionDoesNotFetchUnusedLargeGetter.kts --test tests/testSandboxedCollectionDoesNotReadUnusedGetters.kts --test tests/testSandboxedDropletCollectionAvoidsPerGetterCrossings.kts --test tests/testSandboxedCollectionConversionHonorsMethodTimeout.kts --test tests/testSandboxedDropletCollectionMarshalsConcurrentlyWithoutValueLoss.kts --log /tmp/contracts.xml. Expect exactly 3 passing and 2 failing scenarios, with the two intended failures repeated by the runner's own automatic attempts. Do not treat a successful retry as first-attempt success.
Reusable operational knowledge
Use explicit --json fields with gh view: the installed default view requests retired projectCards and fails. ~/bin/coursier works; do not use /usr/local/bin/coursier on this host. report-challenge automatically enqueues/merges and was not invoked because the task explicitly prohibits both. Handoff health returned {"status":"OK"}. Local targeted runs had hard 720s then 600s deadlines, plus 10s termination allowance. No full local suite was run; available memory was 2811 MiB at first launch. No remote build submission was attempted. A runner snapshots sources before compilation, so commit/fix the fixture before launching; edits while compiling do not change that invocation.
Documents read: UrlResolver README, Testing Architecture, Engineering Philosophy, the full relevant PR 887 collection diff/body/comments, PR 890 body, PR 845 body/comments, issues 1412/844/853, ExternalBrainWui PR 63 and evidence README/upstream-findings/oldcounts, KotlinBuild test-selection documentation and handoff format instructions. No linked document authorizes changing the eager assertions under this owner's explicit stop rule.