File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -565,9 +565,9 @@ test('canceling a superseded activation cannot remove its successor or another h
565565 assert . equal ( registry . listHumanControlHolds ( authority ) [ 0 ] ?. reason , 'successor' ) ;
566566} ) ;
567567
568- // #2509: nothing heartbeats a lease while its request works, so an admitted
569- // capture that legitimately outruns the lease TTL expired its own lease and lost
570- // the device it was still holding. In-flight work defers expiry and renews on
568+ // Nothing heartbeats a lease while its request works, so an admitted capture
569+ // that legitimately outruns the lease TTL expires its own lease and loses the
570+ // device it was still holding. In-flight work defers expiry and renews on
571571// completion, exactly as a human-control hold does.
572572test ( 'in-flight request work defers expiry and renews the lease when it finishes' , async ( ) => {
573573 let now = 0 ;
Original file line number Diff line number Diff line change @@ -509,10 +509,11 @@ test('expired leases remove owned sessions before the next command and free capa
509509 expect ( nextLease . tenantId ) . toBe ( 'tenant-b' ) ;
510510} ) ;
511511
512- // #2509: the slowest command in a cloud session killed every command after it.
513- // Nothing heartbeats a lease while its request works, so one capture that ran
514- // past the lease TTL expired its own lease, which tore the provider session down
515- // under the client that was still waiting for it.
512+ // A lease renewed only at admission lets one command slower than its inactivity TTL
513+ // expire the lease paying for the device it is using, and expiry then tears the
514+ // provider session down under the client still waiting for that same command. Found
515+ // while investigating #2509, whose cloud session ran on a ten-minute lease and so
516+ // lost its session some other way.
516517test ( 'an admitted request that outlives the lease TTL keeps its lease and session' , async ( ) => {
517518 let now = 1_000 ;
518519 const sessionStore = makeSessionStore ( 'agent-device-request-scope-' ) ;
Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ function admittedRequest(
2323 } ;
2424}
2525
26- // #2509: a capture that ran past the lease TTL expired the lease that was paying
27- // for the device, so the session died underneath the client still waiting for it.
26+ // A capture that runs past the lease TTL used to expire the lease paying for the
27+ // device, so the session died underneath the client still waiting for it.
2828test ( 'admitted work that outlives the lease TTL keeps the lease it is working on' , async ( ) => {
2929 let now = 0 ;
3030 const leaseRegistry = new LeaseRegistry ( { now : ( ) => now , defaultLeaseTtlMs : 5_000 } ) ;
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import type { DaemonRequest } from './daemon-request.ts';
99 * A lease renews when a request is admitted and never again while that request
1010 * works, so the slowest command in a session used to expire the very lease that
1111 * was paying for the device and tear the session down underneath the client still
12- * waiting for its result (#2509) . The pass defers expiry only while the work is
12+ * waiting for its result. The pass defers expiry only while the work is
1313 * still wanted, which the request-cancel registry already knows: once the client
1414 * hangs up the request protects nothing, so a handler that ignores its
1515 * cancellation cannot hold a rented device open.
You can’t perform that action at this time.
0 commit comments