← Priority list
Blocked

Resolve the eager-getter contract before fixing UrlResolver unused collection reads

Resolve the conflicting eager-count and unread-getter-timeout assertions before implementing the demand-aware collection fix. Two new demand reproducers fail consistently while all three original guards pass on first attempts; WIP source and complete evidence are pushed at wip/r131-red (382b64e5c0f477e582c5f17eb9edbedec16908a5). No fix, PR, CI request or publication exists.

The owner requires zero unused getter bodies and unchanged tests requiring 2200 eager bodies plus timeout from an unread getter; task step 3 requires stopping instead of changing those assertions.

Handoff document

Markdown

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

Repo Branch Verified remote head SHA PR Contents State
UrlResolver https://github.com/CodexCoder21Organization/UrlResolver/tree/wip/r131-analysis e9e80584375bb84e02476e9eef387f4ee61535be none Initial compatibility analysis and plan superseded by red evidence branch
UrlResolver https://github.com/CodexCoder21Organization/UrlResolver/tree/wip/r131-red 382b64e5c0f477e582c5f17eb9edbedec16908a5 none Two new reproducers, native XML/logs/summaries/full first stacks, findings, owner task builds; demand tests fail 3/3 attempts each; original three guards pass first attempt; no production changes

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

  1. 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.
  2. 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.
  3. 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.
  4. 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.

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-resolve-the-eager-getter-contract-before-fixing-urlresolver-unused-collection-reads.

Latest status report

1 report
Blocked codex-r131 410e9ebd 46 minutes ago

BLOCKED — 2026-10-22 01:42 UTC. I stopped at the task’s explicit step 3 gate. Fixing UrlResolver’s unused getter reads conflicts with unchanged tests requiring 2,200 getter bodies before any property read and a timeout caused by an unread getter.

Proposed design: batch each property on first demand and cache that property alone. This preserves the original goal of avoiding repeated sandbox crossings. The eager-count and unread-getter-timeout contracts need an explicit revision before implementation.

Evidence is on wip/r131-red, head 382b64e5c0f477e582c5f17eb9edbedec16908a5.

  • Red: both reproducers failed their intended assertions on first attempts and all 6 automatic attempts. Three names caused 3 unused large-field reads and 196,632 bytes.
  • Original guards: 3/3 passed on first attempts, unchanged. An earlier fixture-construction failure is recorded separately in the findings and XML.
  • Green/mutation: not run; no implementation fix. PR: none. CI: not started. Publication: none.
  • Fixed ExternalBrainWui listing counts: unavailable. Prior evidence remains 4 calls / 377 result bytes / 0 content bytes on 0.0.556 versus 7 / 12,461 / 11,799 on 0.0.1331.

The earlier resolver PR is MERGED; the ExternalBrainWui upgrade PR remains OPEN. No subagents were used. Checkout/cache cleanup is verified, and no task processes remain. No unnecessary holds; no idle landing gates. Owner constraints and the stop decision are recorded in the findings and handoff.

Remaining work starts with resolving those incompatible assertions, then implementing and validating the fix. Handoff · service record; GitHub mirror not verified.

Lesson: measure crossing cost separately from getter-body demand. Freeze fixture source before launching a runner so its first-attempt evidence matches the reviewed revision.

Add dependency

Complete this handoff

Moves it out of every priority list and into ArchiveArea.