Skip to content

Commit 1f3c4be

Browse files
committed
test: align human UX AVD contract with stable v3 cache
1 parent 22a95ba commit 1f3c4be

1 file changed

Lines changed: 19 additions & 7 deletions

File tree

tests/native_human_ux_policy_lock_test.py

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,25 @@
8484
assert entries["reader-run-cancellation-churn"]["status"] == "operational-guard"
8585
assert "freeze the head until evidence is collected" in entries["reader-run-cancellation-churn"]["resolution"]
8686

87-
# AVD snapshot generation is part of the persistent harness contract. Old static
88-
# avd-v1 snapshots must never be eligible after client/harness changes.
87+
# The clean AVD snapshot is an emulator/system-image artifact, not a Nuvio client
88+
# artifact. Canonical route-reader caches therefore remain stable across audited
89+
# Nuvio HEAD changes, while each run still checks out the exact current client
90+
# revision separately. ADB must be ready before any cold/warm emulator boot.
8991
assert "avd-v1-" not in ANDROID_WORKFLOW
90-
assert ANDROID_WORKFLOW.count("key: avd-v2-") == 3
91-
assert ANDROID_WORKFLOW.count("${{ needs.resolve.outputs.runtime_fingerprint }}") >= 4
92-
assert ANDROID_WORKFLOW.count("${{ needs.resolve.outputs.tv_sha }}") >= 3
93-
assert ANDROID_WORKFLOW.count("${{ needs.resolve.outputs.mobile_sha }}") >= 2
92+
canonical_cache_lines = [
93+
line.strip()
94+
for line in ANDROID_WORKFLOW.splitlines()
95+
if line.strip().startswith("key: avd-v3-")
96+
]
97+
assert len(canonical_cache_lines) == 3, canonical_cache_lines
98+
assert sum("tv-api31-android-tv-x86-tv_1080p" in line for line in canonical_cache_lines) == 2
99+
assert sum("mobile-api35-google_apis-x86_64-pixel_2" in line for line in canonical_cache_lines) == 1
100+
for line in canonical_cache_lines:
101+
assert "runtime_fingerprint" not in line, line
102+
assert "tv_sha" not in line, line
103+
assert "mobile_sha" not in line, line
104+
assert ANDROID_WORKFLOW.count("Prime Android adb server") >= 3
105+
assert "prime_android_lab_adb.sh" in ANDROID_WORKFLOW
94106
assert "restore-keys:" not in ANDROID_WORKFLOW
95107

96108
human_path = POLICY["human_ux_acceptance_path"]
@@ -121,4 +133,4 @@
121133
assert change_control["persistent_profiles_are_source_of_truth"] is True
122134
assert change_control["job_blocker_memory_is_source_of_truth"] is True
123135
assert change_control["default_on_ambiguity"] == "fail-closed"
124-
print("native human UX harness + persistent profile/blocker memory tests passed")
136+
print("native human UX harness + persistent profile/blocker memory tests passed")

0 commit comments

Comments
 (0)