Conversation
…#363) 6 lint fixtures and the nuke-before-connect test, all failing
…on createCore (#363) 7 failing -> 0 failing
…daemon Kills the mutants the move left alive: 47 -> equivalent logger spreads only
…delete paths 16 mutants alive -> 5 equivalent logger spreads
createLeasing returns corePorts instead of calling core.connect; daemon/main.ts connects them. Doctor moves into createCore, expiring leases through the leaseExpirer port. Adds a daemon test for the startup order, fixes stale comments and docs, drops NoCapacityError from the gateway allow-list. 1 failing (order swap survives) -> 0 failing
…rer port (#363) Kills the mutants the push reported on the doctor wiring.
…, so core passes none (#363)
… test to what it proves (#363)
Contributor
Author
Review notesNot blocking, not verified. Each is one reviewer's claim.
Written by an agent. |
This was referenced Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #363
Status
Implement: done (3 fix runs) Review: round 3, 1 open Mutate: 10 alive (equivalent) Hardware: n/a Gate: parked
Done when
src/core/, andsrc/core/lease-engine.tsis gone.pnpm lintpasses.grep -rn "leasing/" src/corefinds only the three test imports the spec itself asks for (nuke.test.ts,doctor.test.ts,reaper.test.ts), see Assumptions.startup-converger.test.tsloses its "timers" step (it moved tolease-startup.test.ts), and one lint fixture swapsWaitQueueforLeaseRecord(the gateway may no longer takeWaitQueuefrom core).pnpm checkpasses (CI).Assumptions
src/leasing/**(importNames) — not added. ADR 0017's module has not landed, and todayAcquisitionPlanner(victim selection) andLeaseReleaseCoordinator(WarmPoolCoordinator) import the warm pool's names from core's index, so the ban would fail lint. The spec's matching fixture is conditional on the same landing.grep -rn "leasing/" src/core— read as production files. The spec also hasnuke.test.ts,doctor.test.tsandreaper.test.tsbuild real leasing throughleasing/testing.js, which that grep would find.leaseExpirer, beside the third:Doctoris built bycreateCore, and expires a lapsed lease through leasing.queueHeadDemand—core.connecttakes it beside nuke's maintenance and the availability kick. The warm pool (core) reads the queue head's spec to decide whether a device stays warm, and the queue is leasing's.DaemonServerandDispatchertakedeviceModes: DeviceModeReaderbesidecapacity: CapacityReader.servesDefaultModeis leasing's, the capacity figures are core's, and no single object implements both any more.leasing.announceQueueDepth(), which the daemon calls after core'sconverge, so the order ofcapacity.changedthenqueue.changedat start is unchanged.QueueTimeoutErrorand the request book's three errors:FleetLeaseCoordinatorthrows or maps them.LeaseProgressmoves to core'sdomain.ts:DeviceProvisioner(core) reports it and the gateway uses it.LeaseReleaseReason(all three reasons) stays inlease-release-coordinator.ts, andlease-ports.tsderivesClientReleaseReasonfrom it, so it is defined once.Mutation testing
pnpm mutateleaves 10 of 247 mutants alive, all equivalent:...(options.logger === undefined ? {} : { logger: options.logger })atsrc/core/create-core.ts:187,197,209,234andsrc/leasing/create-leasing.ts:182,190. Thefalsemutant passes{ logger: undefined }instead of{}, and every callee readsoptions.logger?.child(...) ?? new NoopLogger(), so nothing observable differs. At:234(Doctor) the{},trueand!==mutants also survive for the same reason: Doctor treats an absent logger as no logger.prerequisiteChecks ?? []atsrc/core/create-core.ts:235:src/core/doctor.ts:478applies the same default, and a junk element matches no platform, so Doctor does nothing with it.Review
Spec review: 8 blocking, 6 fixed, 5 notes. Code review: 3 blocking, 3 fixed, 6 notes.
Mutate: 247 mutants, 10 alive.
Rejected:
startup-converger.test.tsdrops the timer-restore assertions with nothing in their place — they moved tolease-startup.test.ts, which asserts every run restores timers, andlease-lifecycle.test.ts:215proves a persisted lease's timer is restored after restart.Open after round 3 (parked): nothing proves leasing's startup finishes before
core.converge()starts — running both withPromise.allinsrc/daemon/main.ts:376-382keepsmain.test.tsgreen.Written by an agent.