4444
4545 await signedRequest ( "/internal/adaptive-hot-review/observation" , "POST" , observation , 202 ) ;
4646 await signedRequest ( "/internal/adaptive-hot-review/observation" , "POST" , observation , 202 ) ;
47+ const allocatorSnapshot = await signedJson (
48+ "/internal/adaptive-hot-review/control-plane" ,
49+ "POST" ,
50+ {
51+ policyVersion : "adaptive-hot-v1" ,
52+ lane : "hot_intake" ,
53+ targetRepositories : [ "example/alpha" ] ,
54+ } ,
55+ 200 ,
56+ ) ;
57+ assert . equal ( allocatorSnapshot . adaptive_hot_review . observations . length , 1 ) ;
58+ assert . equal ( allocatorSnapshot . adaptive_hot_review . observations [ 0 ] . targetRepo , "example/alpha" ) ;
4759
4860 const planned = decisionRecord ( { observedAt, status : "planned" } ) ;
4961 const dispatched = decisionRecord ( { observedAt, status : "dispatched" } ) ;
@@ -64,16 +76,12 @@ try {
6476 202 ,
6577 ) ;
6678 assert . equal ( reserved . reservation_id , reservationId ) ;
67- const blockedDirectWrite = await fetchSigned (
68- "/internal/state/cursors/hot-intake" ,
69- "PUT" ,
70- { next_cursor : 99 , expected_revision : 0 } ,
71- ) ;
79+ const blockedDirectWrite = await fetchSigned ( "/internal/state/cursors/hot-intake" , "PUT" , {
80+ next_cursor : 99 ,
81+ expected_revision : 0 ,
82+ } ) ;
7283 assert . equal ( blockedDirectWrite . status , 409 ) ;
73- assert . equal (
74- ( await blockedDirectWrite . json ( ) ) . error ,
75- "adaptive_hot_cursor_reservation_active" ,
76- ) ;
84+ assert . equal ( ( await blockedDirectWrite . json ( ) ) . error , "adaptive_hot_cursor_reservation_active" ) ;
7785 await assertCursors ( cursorUpdates , 0 , 0 ) ;
7886
7987 await stopWorker ( worker ) ;
@@ -186,7 +194,10 @@ try {
186194 assert . equal ( recoveredSummary . adaptive_cursor_persisted , true ) ;
187195 assert . equal ( recoveredSummary . adaptive_probe_cursor_persisted , true ) ;
188196 const commandCursors = await readCursors ( cursorUpdates ) ;
189- assert . equal ( commandCursors . every ( ( cursor ) => cursor . revision === 2 ) , true ) ;
197+ assert . equal (
198+ commandCursors . every ( ( cursor ) => cursor . revision === 2 ) ,
199+ true ,
200+ ) ;
190201
191202 const shadowCommitFault = await runTargetFanoutCommand ( {
192203 ghPath : ghProof . path ,
@@ -298,6 +309,8 @@ try {
298309 durable_object : "persisted SQLite ExactReviewQueue" ,
299310 restarts : 2 ,
300311 invalid_signature_status : unsigned . status ,
312+ authenticated_allocator_observations :
313+ allocatorSnapshot . adaptive_hot_review . observations . length ,
301314 loopback_tls_proxy : true ,
302315 } ,
303316 telemetry : {
@@ -369,6 +382,7 @@ try {
369382 "" ,
370383 `- Exact head: ${ actualHead } .` ,
371384 `- Auth boundary: unsigned observation returned HTTP ${ unsigned . status } .` ,
385+ "- Allocator boundary: a signed current-policy hot-lane view returned the eligible repository independently of the bounded public projection." ,
372386 "- Telemetry: duplicate observation and decision receipts collapsed to one durable record each across a restart." ,
373387 "- Cursor fencing: reservation left all three cursors at revision 0 until the post-restart commit." ,
374388 `- Direct-write fencing: a covered cursor write during the reservation returned HTTP ${ blockedDirectWrite . status } .` ,
@@ -389,15 +403,22 @@ try {
389403
390404 console . log ( `exact head: ${ actualHead } ` ) ;
391405 console . log ( `auth boundary: HTTP ${ unsigned . status } ` ) ;
406+ console . log ( "allocator view: signed current-policy hot lane returned 1 observation" ) ;
392407 console . log ( "telemetry persistence: 1 observation, 1 dispatched decision after restart" ) ;
393408 console . log ( "cursor fencing: unchanged before commit; 3 cursors advanced atomically" ) ;
394409 console . log ( "commit retry after second restart: identical durable receipt" ) ;
395410 console . log ( `committed reservation identity reuse: HTTP ${ reusedReservation . status } ` ) ;
396411 console . log ( `direct write during reservation: HTTP ${ blockedDirectWrite . status } ` ) ;
397412 console . log ( "dispatch failure recovery: aborted unchanged; replacement reservation acquired" ) ;
398- console . log ( "actual target-fanout: injected zero-dispatch failure aborted; recovery dispatched 2 and committed" ) ;
399- console . log ( "shadow commit failure: legacy cursor advanced; next cycle selected the next repository" ) ;
400- console . log ( "kill switch rollback: malformed inactive controls bypassed; legacy dispatch persisted" ) ;
413+ console . log (
414+ "actual target-fanout: injected zero-dispatch failure aborted; recovery dispatched 2 and committed" ,
415+ ) ;
416+ console . log (
417+ "shadow commit failure: legacy cursor advanced; next cycle selected the next repository" ,
418+ ) ;
419+ console . log (
420+ "kill switch rollback: malformed inactive controls bypassed; legacy dispatch persisted" ,
421+ ) ;
401422 console . log ( "public snapshot: bounded and sanitized" ) ;
402423 console . log ( "RESULT: PASS" ) ;
403424} finally {
@@ -549,7 +570,12 @@ async function publicSnapshot() {
549570 return response . json ( ) ;
550571}
551572
552- function assertAdaptiveSnapshot ( snapshot , observationCount , decisionCount , latestStatus = "dispatched" ) {
573+ function assertAdaptiveSnapshot (
574+ snapshot ,
575+ observationCount ,
576+ decisionCount ,
577+ latestStatus = "dispatched" ,
578+ ) {
553579 assert . equal ( snapshot . adaptive_hot_review . observations . length , observationCount ) ;
554580 assert . equal ( snapshot . adaptive_hot_review . observations [ 0 ] . targetRepo , "example/alpha" ) ;
555581 assert . equal ( snapshot . adaptive_hot_review . recentDecisions . length , decisionCount ) ;
0 commit comments