fix(reboot): project vmx locator receipt readback
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 3m47s
CD Pipeline / build-and-deploy (push) Successful in 4m48s
CD Pipeline / post-deploy-checks (push) Successful in 1m52s
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 3m47s
CD Pipeline / build-and-deploy (push) Successful in 4m48s
CD Pipeline / post-deploy-checks (push) Successful in 1m52s
This commit is contained in:
@@ -738,7 +738,7 @@ def test_awoooi_priority_work_order_readback_routes_closed_backup_to_host_boot_a
|
||||
"windows99_vmx_source_repair_playbook_trust_writeback_ref"
|
||||
].startswith("playbook://awoooi/windows99-vmx-source-repair/")
|
||||
assert state["windows99_vmx_source_locator_status"] == (
|
||||
"check_mode_locator_ready_windows99_vmx_source_required"
|
||||
"collector_readback_single_identity_candidate_confirmation_required"
|
||||
)
|
||||
assert state["windows99_vmx_source_locator_required"] is True
|
||||
assert state["windows99_vmx_source_locator_check_mode_ready"] is True
|
||||
@@ -752,12 +752,22 @@ def test_awoooi_priority_work_order_readback_routes_closed_backup_to_host_boot_a
|
||||
)
|
||||
assert state["windows99_vmx_source_locator_target_aliases"] == ["111"]
|
||||
assert state["windows99_vmx_source_locator_next_executable_step"] == (
|
||||
"restore_windows99_ssh_publickey_channel_then_rerun_locator"
|
||||
"confirm_single_unassigned_ubuntu_candidate_before_scoped_relink_dry_run"
|
||||
)
|
||||
assert state["windows99_vmx_source_locator_expected_vmx_path_count"] == 1
|
||||
assert state["windows99_vmx_source_locator_candidate_source_count_known"] is False
|
||||
assert state["windows99_vmx_source_locator_collector_readback_present"] is False
|
||||
assert state["windows99_vmx_source_locator_file_content_read"] is False
|
||||
assert state["windows99_vmx_source_locator_candidate_source_count"] == 6
|
||||
assert state["windows99_vmx_source_locator_alias_hint_candidate_count"] == 0
|
||||
assert state["windows99_vmx_source_locator_unassigned_ubuntu_candidate_count"] == 5
|
||||
assert (
|
||||
state[
|
||||
"windows99_vmx_source_locator_identity_unassigned_ubuntu_candidate_count"
|
||||
]
|
||||
== 1
|
||||
)
|
||||
assert state["windows99_vmx_source_locator_candidate_confirmation_required"] is True
|
||||
assert state["windows99_vmx_source_locator_candidate_source_count_known"] is True
|
||||
assert state["windows99_vmx_source_locator_collector_readback_present"] is True
|
||||
assert state["windows99_vmx_source_locator_file_content_read"] is True
|
||||
assert state["windows99_vmx_source_locator_remote_write_performed"] is False
|
||||
assert state["windows99_vmx_source_locator_vm_power_change_performed"] is False
|
||||
assert payload["summary"]["controlled_service_data_backup_blocker_count"] == 0
|
||||
@@ -838,19 +848,32 @@ def test_awoooi_priority_work_order_readback_routes_closed_backup_to_host_boot_a
|
||||
"111"
|
||||
]
|
||||
assert payload["summary"]["windows99_vmx_source_locator_status"] == (
|
||||
"check_mode_locator_ready_windows99_vmx_source_required"
|
||||
"collector_readback_single_identity_candidate_confirmation_required"
|
||||
)
|
||||
assert payload["summary"]["windows99_vmx_source_locator_check_mode_ready"] is True
|
||||
assert payload["summary"]["windows99_vmx_source_locator_target_aliases"] == [
|
||||
"111"
|
||||
]
|
||||
assert payload["summary"]["windows99_vmx_source_locator_candidate_source_count"] == 6
|
||||
assert (
|
||||
payload["summary"][
|
||||
"windows99_vmx_source_locator_identity_unassigned_ubuntu_candidate_count"
|
||||
]
|
||||
== 1
|
||||
)
|
||||
assert (
|
||||
payload["summary"][
|
||||
"windows99_vmx_source_locator_candidate_confirmation_required"
|
||||
]
|
||||
is True
|
||||
)
|
||||
assert (
|
||||
payload["rollups"]["windows99_vmx_source_locator_remote_write_performed"]
|
||||
is False
|
||||
)
|
||||
assert (
|
||||
payload["rollups"]["windows99_vmx_source_locator_file_content_read"]
|
||||
is False
|
||||
is True
|
||||
)
|
||||
assert "service/data/backup readback is green" in payload[
|
||||
"next_execution_order"
|
||||
@@ -902,7 +925,7 @@ def test_awoooi_priority_work_order_readback_routes_closed_backup_to_host_boot_a
|
||||
"windows99_vmx_source_repair_playbook_trust_writeback_ref"
|
||||
].startswith("playbook://awoooi/windows99-vmx-source-repair/")
|
||||
assert in_progress["evidence"]["windows99_vmx_source_locator_status"] == (
|
||||
"check_mode_locator_ready_windows99_vmx_source_required"
|
||||
"collector_readback_single_identity_candidate_confirmation_required"
|
||||
)
|
||||
assert (
|
||||
in_progress["evidence"]["windows99_vmx_source_locator_check_mode_ready"]
|
||||
@@ -912,6 +935,16 @@ def test_awoooi_priority_work_order_readback_routes_closed_backup_to_host_boot_a
|
||||
in_progress["evidence"]["windows99_vmx_source_locator_target_aliases"]
|
||||
== ["111"]
|
||||
)
|
||||
assert (
|
||||
in_progress["evidence"]["windows99_vmx_source_locator_candidate_source_count"]
|
||||
== 6
|
||||
)
|
||||
assert (
|
||||
in_progress["evidence"][
|
||||
"windows99_vmx_source_locator_candidate_confirmation_required"
|
||||
]
|
||||
is True
|
||||
)
|
||||
assert (
|
||||
in_progress["evidence"]["windows99_vmx_source_locator_remote_write_performed"]
|
||||
is False
|
||||
|
||||
@@ -56,6 +56,7 @@ def test_windows99_vmx_source_locator_builder_is_no_secret_check_mode() -> None:
|
||||
payload = build_windows99_vmx_source_locator_readback(
|
||||
_scorecard(),
|
||||
repair_package=repair_package,
|
||||
collector_receipt={},
|
||||
generated_at="2026-07-03T11:22:00+08:00",
|
||||
)
|
||||
|
||||
@@ -106,6 +107,69 @@ def test_windows99_vmx_source_locator_builder_is_no_secret_check_mode() -> None:
|
||||
assert payload["destructive_restore_allowed"] is False
|
||||
|
||||
|
||||
def test_windows99_vmx_source_locator_builder_projects_redacted_receipt() -> None:
|
||||
repair_package = build_windows99_vmx_source_repair_package(
|
||||
_scorecard(),
|
||||
generated_at="2026-07-03T11:21:00+08:00",
|
||||
)
|
||||
|
||||
payload = build_windows99_vmx_source_locator_readback(
|
||||
_scorecard(),
|
||||
repair_package=repair_package,
|
||||
collector_receipt={
|
||||
"schema_version": "windows99_vmx_source_locator_receipt_v1",
|
||||
"generated_at": "2026-07-03T12:41:34+08:00",
|
||||
"receipt_ref": "log://awoooi/p0-006/windows99-vmx-source-locator-111",
|
||||
"collector_readback_present": True,
|
||||
"collector_collection_status": (
|
||||
"collected_windows99_vmx_source_locator_stdout"
|
||||
),
|
||||
"target_host_alias": "99",
|
||||
"target_vm_aliases": ["111"],
|
||||
"expected_vmx_path_present_count": 0,
|
||||
"candidate_source_count": 6,
|
||||
"candidate_source_fingerprint_count": 0,
|
||||
"alias_hint_candidate_count": 0,
|
||||
"unassigned_ubuntu_candidate_count": 5,
|
||||
"identity_metadata_read": True,
|
||||
"bounded_identity_metadata_only": True,
|
||||
"identity_target_hint_count": 0,
|
||||
"identity_unassigned_ubuntu_candidate_count": 1,
|
||||
"locate_status": (
|
||||
"single_identity_unassigned_ubuntu_candidate_requires_confirmation"
|
||||
),
|
||||
"safe_next_step": (
|
||||
"confirm_single_unassigned_ubuntu_candidate_is_target_alias_before_scoped_relink_dry_run"
|
||||
),
|
||||
},
|
||||
generated_at="2026-07-03T12:42:00+08:00",
|
||||
)
|
||||
|
||||
assert payload["status"] == (
|
||||
"collector_readback_single_identity_candidate_confirmation_required"
|
||||
)
|
||||
assert payload["collector_readback_present"] is True
|
||||
assert payload["collector_collection_status"] == (
|
||||
"collected_windows99_vmx_source_locator_stdout"
|
||||
)
|
||||
assert payload["candidate_source_count_known"] is True
|
||||
assert payload["candidate_source_count"] == 6
|
||||
assert payload["alias_hint_candidate_count"] == 0
|
||||
assert payload["unassigned_ubuntu_candidate_count"] == 5
|
||||
assert payload["identity_metadata_read"] is True
|
||||
assert payload["bounded_identity_metadata_only"] is True
|
||||
assert payload["identity_target_hint_count"] == 0
|
||||
assert payload["identity_unassigned_ubuntu_candidate_count"] == 1
|
||||
assert payload["candidate_confirmation_required"] is True
|
||||
assert payload["next_executable_step"] == (
|
||||
"confirm_single_unassigned_ubuntu_candidate_before_scoped_relink_dry_run"
|
||||
)
|
||||
assert payload["raw_path_output"] is False
|
||||
assert payload["secret_value_read"] is False
|
||||
assert payload["remote_write_performed"] is False
|
||||
assert payload["vm_power_change_performed"] is False
|
||||
|
||||
|
||||
def test_windows99_vmx_source_locator_endpoint_returns_public_safe_readback(
|
||||
monkeypatch: pytest.MonkeyPatch,
|
||||
) -> None:
|
||||
@@ -127,15 +191,22 @@ def test_windows99_vmx_source_locator_endpoint_returns_public_safe_readback(
|
||||
payload = response.json()
|
||||
assert payload["schema_version"] == "windows99_vmx_source_locator_readback_v1"
|
||||
assert payload["status"] == (
|
||||
"check_mode_locator_ready_windows99_vmx_source_required"
|
||||
"collector_readback_single_identity_candidate_confirmation_required"
|
||||
)
|
||||
assert payload["target_vm_aliases"] == ["111"]
|
||||
assert payload["locator_check_mode_ready"] is True
|
||||
assert payload["effective_locator_collect_ready"] is False
|
||||
assert payload["locator_collect_blocker"] == "ssh_batch_permission_denied"
|
||||
assert payload["collector_readback_present"] is True
|
||||
assert payload["candidate_source_count"] == 6
|
||||
assert payload["candidate_confirmation_required"] is True
|
||||
assert payload["public_lan_topology_redacted"] is True
|
||||
assert payload["raw_path_output"] is False
|
||||
assert payload["file_content_read"] is False
|
||||
assert payload["file_content_read"] is True
|
||||
assert payload["bounded_identity_metadata_only"] is True
|
||||
assert payload["remote_write_performed"] is False
|
||||
assert payload["vm_power_change_performed"] is False
|
||||
assert "192.168.0." not in response.text
|
||||
assert "D:\\" not in response.text
|
||||
assert "uuid." not in response.text
|
||||
assert "generatedAddress" not in response.text
|
||||
|
||||
Reference in New Issue
Block a user