fix(windows99): project scoped relink dry run
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 1m14s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
AWOOOI Harbor 110 Local Repair / workflow-shape (push) Successful in 1s
AWOOOI Harbor 110 Local Repair / harbor-110-local-repair (push) Successful in 43s
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 1m14s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
AWOOOI Harbor 110 Local Repair / workflow-shape (push) Successful in 1s
AWOOOI Harbor 110 Local Repair / harbor-110-local-repair (push) Successful in 43s
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import os
|
||||
|
||||
os.environ.setdefault("DATABASE_URL", "postgresql+asyncpg://test:test@localhost/test")
|
||||
@@ -273,6 +274,40 @@ def test_windows99_candidate_confirmation_validator_accepts_redacted_packet() ->
|
||||
assert payload["projected_confirmation_gate"][
|
||||
"apply_allowed_by_confirmation_gate"
|
||||
] is False
|
||||
assert payload["scoped_relink_dry_run_ready"] is True
|
||||
assert payload["pre_apply_backup_plan_ready"] is True
|
||||
assert payload["post_verifier_ready"] is True
|
||||
assert payload["km_writeback_ready"] is True
|
||||
assert payload["playbook_trust_writeback_ready"] is True
|
||||
plan = payload["projected_scoped_relink_dry_run_plan"]
|
||||
assert plan["schema_version"] == "windows99_vmx_source_scoped_relink_dry_run_v1"
|
||||
assert plan["status"] == "ready_for_no_write_review"
|
||||
assert plan["ready"] is True
|
||||
assert plan["mode"] == "dry_run_no_windows_or_vm_write"
|
||||
assert plan["target_selector"]["host_alias"] == "99"
|
||||
assert plan["target_selector"]["vm_aliases"] == ["111"]
|
||||
assert plan["target_selector"]["missing_vmx_aliases"] == ["111"]
|
||||
assert plan["target_selector"]["secret_collection_allowed"] is False
|
||||
assert plan["target_selector"]["vm_power_change_allowed"] is False
|
||||
assert plan["target_selector"]["runtime_write_allowed"] is False
|
||||
assert plan["source_diff"]["candidate_identity_evidence_ref"] == (
|
||||
"console://awoooi/windows99/candidate-identity-redacted-111"
|
||||
)
|
||||
assert plan["source_diff"]["raw_path_output"] is False
|
||||
assert plan["source_diff"]["path_fingerprint_only"] is True
|
||||
assert plan["pre_apply_backup_plan"]["required"] is True
|
||||
assert plan["pre_apply_backup_plan"]["backup_ref_required"] is True
|
||||
assert plan["rollback_ref"] == (
|
||||
"rollback://awoooi/windows99-vmx-source-relink-dry-run"
|
||||
)
|
||||
assert "GET /api/v1/agents/windows99-vmx-source-locator-readback" in plan[
|
||||
"post_verifier"
|
||||
]
|
||||
assert plan["apply_allowed_by_this_plan"] is False
|
||||
assert plan["remote_write_performed"] is False
|
||||
assert plan["vm_power_change_performed"] is False
|
||||
assert plan["secret_value_read"] is False
|
||||
assert plan["request_payload_saved"] is False
|
||||
assert payload["operation_boundaries"]["request_payload_saved"] is False
|
||||
assert payload["operation_boundaries"]["remote_write_performed"] is False
|
||||
assert payload["operation_boundaries"]["vm_power_change_performed"] is False
|
||||
@@ -325,6 +360,14 @@ def test_windows99_candidate_confirmation_validator_rejects_sensitive_payload()
|
||||
assert payload["projected_confirmation_gate"][
|
||||
"can_prepare_scoped_relink_dry_run"
|
||||
] is False
|
||||
assert payload["scoped_relink_dry_run_ready"] is False
|
||||
plan = payload["projected_scoped_relink_dry_run_plan"]
|
||||
assert plan["ready"] is False
|
||||
assert plan["status"] == "blocked_candidate_confirmation_not_accepted"
|
||||
assert plan["source_diff"]["candidate_identity_evidence_ref"] == ""
|
||||
serialized = json.dumps(payload)
|
||||
assert "D:\\" not in serialized
|
||||
assert "192.168.0." not in serialized
|
||||
assert payload["operation_boundaries"]["apply_gate_opened"] is False
|
||||
|
||||
|
||||
@@ -453,5 +496,14 @@ def test_windows99_candidate_confirmation_endpoint_is_no_persist_validator(
|
||||
assert payload["operation_boundaries"]["request_payload_saved"] is False
|
||||
assert payload["operation_boundaries"]["apply_gate_opened"] is False
|
||||
assert payload["operation_boundaries"]["vm_power_change_performed"] is False
|
||||
assert payload["scoped_relink_dry_run_ready"] is True
|
||||
plan = payload["projected_scoped_relink_dry_run_plan"]
|
||||
assert plan["ready"] is True
|
||||
assert plan["mode"] == "dry_run_no_windows_or_vm_write"
|
||||
assert plan["source_diff"]["candidate_identity_evidence_ref"] == (
|
||||
"backup://awoooi/windows99/redacted-fingerprint-111"
|
||||
)
|
||||
assert plan["apply_allowed_by_this_plan"] is False
|
||||
assert plan["request_payload_saved"] is False
|
||||
assert "D:\\" not in response.text
|
||||
assert "192.168.0." not in response.text
|
||||
|
||||
Reference in New Issue
Block a user