Conversation
Size Report
Startup median (7 runs, lower is better):
|
|
Reviewed at e5f4096. This is already the smaller design: two ~200-line copies become one shared module and two ~20-line adapters, for -37 net production lines, and the extraction matches both providers by code comparison. One question: could the Limrun adapter use Compatibility & Provenance fails in the daemon wire-compat gate on files the #2112 base stack touches ( Next: #2112 lands, then this retargets to |
|
Answering the review at e5f4096 and the CI status.
CI —
I checked the two ways to green it now and both mean doing #2112's own rebase (merge Net: everything else is green on this head (Lint, Typecheck & Package, Repo Guards, Coverage, Integration, all Smoke, Bundle). This matches the plan in your note — retarget to The two follow-ups ( |
|
Thanks, that answers the question. Compatibility & Provenance still fails on wire files from the #2112 base, which this diff does not touch. Next: #2112 lands, then this retargets to |
e5f4096 to
f1d48c2
Compare
|
Rebased onto Supersedes my previous comment on the CI question: rather than document What the port changed relative to the old stack base, beyond dropping Doublespeed:
The Locally green: typecheck, |
f1d48c2 to
6322069
Compare
|
Reviewed at 6322069. The move matches main: rollback, tail overlap, finish memoization and disposal in the new The retarget changes the size question from the first review. That review called this the smaller design because two poller copies became one. With the Doublespeed commit gone and #2112 still open, main has only the Limrun poller. So this PR now adds a public capture-kit subpath, a provider-neutral reader type and a second copy of the abort-settle logic, for about +60 production lines, and removes no duplication. Would it be smaller to keep the poller in provider-limrun and extract it in the PR that adds Doublespeed, when the second consumer shows what is really shared? If you prefer to land the extraction first, can Not blocking: the Limrun test keeps its own copies of the poller-host and deferred-sleep fixtures, and the title at app-log-poller.test.ts#L66 names a poller signal the reader no longer gets. Checks were still running when I reviewed, and none had failed. There are no conflicts. Next: an answer to the one-consumer question. |
Refs #2616
Extracts the bounded app-log poller into
@agent-device/capture-kit/app-log-pollingand makes Limrun its first consumer. Deduplicates acquisition rollback, the poll state machine, the bounded read with its own settle-on-timeout, mark filtering, KMP tail-overlap de-duplication, finish memoization, disposal, andcleanup-pendingsemantics.Repurposed. This PR previously based on the #2112 Doublespeed stack to convert both providers at once. That base predates the released
v0.21.xwire ledger, soCompatibility & Provenancecould never go green here (its "removing wire surface a released peer still sends … an ack cannot cover it" group is exactly the behind-a-release case). Doublespeed is not merged, so this now lands onmainalone and Doublespeed's 30-line adoption follows #2112.Scope
packages/capture-kit/src/app-log-polling.ts— the shared poller, published as the./app-log-pollingsubpath.packages/provider-limrun/src/app-log-poller.ts— 182 lines become a 32-line adapter. Provider identity stays where it belongs:backendForReaderand the cleanup wording are adapter-local.packages/provider-limrun/src/request-cancellation.ts—awaitLimrunOperationlosesexport; this poller was its only external caller, and it is still used by the request-operation drain in the same module.Two deliberate narrowing decisions
capture-kit/src/index.tsfalls under ADR-0019's merge-base NO-GROWTH rule, so an eager façade export would grow a locked closure. The subpath matches the existing./ios-snapshot-acquisitionconvention, and all 668eager-closure-budgetscases pass with no pin edit.AppLogPollerReader.readLogstakes nosignal.main's Limrun reader is uncancelable and is currently called without one, so the shared contract forwards nothing and stays honest. TheAbortControlleris internal: it drivesclock.sleepand settles the bounded read on timeout, which is what makes teardown safe against a hung provider read. Widening the reader contract belongs with the first provider that can actually honour it.The already-aborted path keeps the abandoned read's rejection handled, preserving
awaitLimrunOperation's behaviour rather than the leakier shape this branch had on the old base.Checks
check:affected --runpasses. Locally: typecheck,check:layering(new subpath declared in thepackage-boundariesenumeration),pnpm gate fallow --base <main>→ no issues in 8 changed files,lint, 18 app-log/request-cancellation tests, 668 eager-closure cases, anddaemon-wire-compat→ 178 declarations, 0 changed, 0 removed, 0 added againstv0.21.6.Follow-up
Doublespeed converts on top of #2112; #2616 stays open until both providers read one implementation.