Skip to content

Commit 4efbf25

Browse files
committed
fix
1 parent e668a68 commit 4efbf25

3 files changed

Lines changed: 22 additions & 5 deletions

File tree

hyperbrowser/models/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,10 @@
248248
SandboxListResponse,
249249
SandboxImageListResponse,
250250
SandboxImageSummary,
251-
SandboxImageListResponse,
252251
SandboxSnapshotStatus,
253252
SandboxSnapshotListResponse,
254253
SandboxSnapshotSummary,
255254
SandboxSnapshotListParams,
256-
SandboxSnapshotListResponse,
257255
SandboxMemorySnapshotParams,
258256
SandboxMemorySnapshotResult,
259257
SandboxExposeParams,
@@ -500,12 +498,10 @@
500498
"SandboxListResponse",
501499
"SandboxImageListResponse",
502500
"SandboxImageSummary",
503-
"SandboxImageListResponse",
504501
"SandboxSnapshotStatus",
505502
"SandboxSnapshotListResponse",
506503
"SandboxSnapshotSummary",
507504
"SandboxSnapshotListParams",
508-
"SandboxSnapshotListResponse",
509505
"SandboxMemorySnapshotParams",
510506
"SandboxMemorySnapshotResult",
511507
"SandboxExposeParams",

hyperbrowser/models/sandbox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ class SandboxSnapshotSummary(SandboxBaseModel):
202202
image_name: str = Field(alias="imageName")
203203
image_id: str = Field(alias="imageId")
204204
status: SandboxSnapshotStatus
205-
compatibility_tag: Optional[str] = Field(alias="compatibilityTag")
205+
compatibility_tag: Optional[str] = Field(default=None, alias="compatibilityTag")
206206
metadata: Dict[str, object]
207207
uploaded: bool
208208
created_at: datetime = Field(alias="createdAt")

tests/test_sandbox_wire_contract.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
SandboxPresignFileParams,
3232
SandboxProcessListParams,
3333
SandboxProcessWaitParams,
34+
SandboxSnapshotSummary,
3435
SandboxTerminalCreateParams,
3536
SandboxTerminalKillParams,
3637
SandboxTerminalWaitParams,
@@ -140,6 +141,20 @@
140141
]
141142
}
142143

144+
SNAPSHOT_PAYLOAD_WITHOUT_COMPATIBILITY_TAG = {
145+
"id": "snap_omitted",
146+
"snapshotName": "snapshot-omitted",
147+
"namespace": "team_1",
148+
"imageNamespace": "team_1",
149+
"imageName": "node",
150+
"imageId": "img_123",
151+
"status": "created",
152+
"metadata": {},
153+
"uploaded": True,
154+
"createdAt": "2026-03-12T00:00:00Z",
155+
"updatedAt": "2026-03-12T00:00:01Z",
156+
}
157+
143158
PROCESS_RESULT_PAYLOAD = {
144159
"result": {
145160
"id": "proc_1",
@@ -554,6 +569,12 @@ def test_sync_sandbox_control_manager_uses_expected_wire_keys():
554569
}
555570

556571

572+
def test_snapshot_summary_allows_missing_compatibility_tag():
573+
snapshot = SandboxSnapshotSummary(**SNAPSHOT_PAYLOAD_WITHOUT_COMPATIBILITY_TAG)
574+
575+
assert snapshot.compatibility_tag is None
576+
577+
557578
def test_sync_sandbox_runtime_apis_use_expected_wire_keys():
558579
transport = RecordingTransport()
559580

0 commit comments

Comments
 (0)