fix(client): isolate viewer tests from the machine-shared atlas disk cache
user://atlas_cache/ is one directory for every worktree gate run, live capture driver, and real play session, and T-1183's Tier-2/3 lookup short-circuits BEFORE test_mode's silent-no-op IPC — so a warm shared cache delivers real canvases into tests written against 'nothing ever arrives'. Caught live: a concurrent GJ380c Global capture flipped the two before-any-canvas viewer tests in another worktree's push gate. Adds disk_cache_root_override on StepCanvasViewer (threads into StepCanvasRequest's existing test-injection-only seam; production leaves it empty) and routes every direct viewer construction in the viewer + legend suites through a _make_viewer() helper pinning an isolated root. First slice of T-1193's viewer test seam; screen-built viewers still share the default root (noted on T-1193). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -150,6 +150,14 @@ var _legend_panel = null
|
||||
var _request = null # StepCanvasRequest
|
||||
var _disk_sweep_timer: Timer = null # T-1183 coarse background sweep trigger
|
||||
|
||||
## Test-injection-only (T-1193 first slice): threads into StepCanvasRequest's
|
||||
## disk_cache_root seam so tests can isolate the Tier-2/3 disk cache from the
|
||||
## machine-shared user://atlas_cache/ (one directory for every worktree gate,
|
||||
## live capture driver, and real play session — a warm shared cache delivers
|
||||
## canvases into tests written against a cold one). Set BEFORE add_child();
|
||||
## the request is constructed in _ready(). Production always leaves this "".
|
||||
var disk_cache_root_override: String = ""
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
anchor_right = 1.0
|
||||
@@ -176,7 +184,7 @@ func _ready() -> void:
|
||||
_annotation_layer.name = "AnnotationLayer"
|
||||
_canvas.add_child(_annotation_layer)
|
||||
|
||||
_request = StepCanvasRequest.new(self)
|
||||
_request = StepCanvasRequest.new(self, disk_cache_root_override)
|
||||
_request.name = "Request"
|
||||
add_child(_request)
|
||||
_request.canvas_ready.connect(_on_canvas_ready)
|
||||
|
||||
Reference in New Issue
Block a user