Record original-alignment implementation and traceability checkpoint
Capture current source, content data, tests, asset licenses, and original-specification traceability. Original implementation remains incomplete. The accepted matching UI generation passed 154 suites and 12,253 checks, with eight rendered staff-contract screens reviewed. Latest native Windows and full-original acceptance remain outstanding.
This commit is contained in:
@@ -99,6 +99,7 @@ func _run() -> void:
|
||||
_test_callback_reentry_tamper_and_quarantine_recovery()
|
||||
_test_strict_snapshot_round_trip_and_atomic_rejection()
|
||||
_test_configuration_and_stale_dependency_boundaries()
|
||||
_test_validation_cache_detects_changes()
|
||||
if _failures == 0:
|
||||
print("PASS: %d checks" % _checks)
|
||||
else:
|
||||
@@ -459,6 +460,39 @@ func _test_configuration_and_stale_dependency_boundaries() -> void:
|
||||
_expect(not collision_projector.configure(collision_adapter, collision_source, collision_path), "configuration rejects an untracked managed-ID namespace collision")
|
||||
|
||||
|
||||
func _test_validation_cache_detects_changes() -> void:
|
||||
var start := Vector3i(0, 0, PathType.FRONT)
|
||||
var middle := Vector3i(1, 0, PathType.FRONT)
|
||||
var goal := Vector3i(2, 0, PathType.FRONT)
|
||||
var context := _context([start, goal])
|
||||
var instance := _instance(GUEST_CORRIDOR, &"facility_cache", middle, 10, &"construction_cache")
|
||||
_expect(context.projector.project_facility(&"project_cache", GUEST_CORRIDOR, instance).is_success(), "cache fixture projects corridor")
|
||||
_expect(context.projector.validate_invariants()[&"ok"], "initial complete validation succeeds")
|
||||
_expect(context.projector.validate_invariants()[&"ok"], "unchanged validation succeeds")
|
||||
var before: Dictionary = context.projector.create_snapshot()
|
||||
var exported: Dictionary = context.projector.create_snapshot()
|
||||
exported[&"projections"][0][&"cells"].clear()
|
||||
_expect(context.projector.validate_invariants()[&"ok"] and context.projector.create_snapshot() == before, "exported containers cannot alter validation cache or live state")
|
||||
var records: Dictionary = context.projector.get("_projections")
|
||||
var fingerprint: String = records[&"facility_cache"][&"record_fingerprint"]
|
||||
records[&"facility_cache"][&"record_fingerprint"] = "invalid"
|
||||
_expect(not context.projector.validate_invariants()[&"ok"], "warm cache detects changed projection content at unchanged revision")
|
||||
records[&"facility_cache"][&"record_fingerprint"] = fingerprint
|
||||
_expect(context.projector.validate_invariants()[&"ok"], "repaired owned state validates")
|
||||
var requests: Dictionary = context.projector.get("_processed_requests")
|
||||
var request_fingerprint: String = requests[&"project_cache"][&"fingerprint"]
|
||||
requests[&"project_cache"][&"fingerprint"] = "invalid"
|
||||
_expect(not context.projector.validate_invariants()[&"ok"], "warm cache detects changed request history")
|
||||
requests[&"project_cache"][&"fingerprint"] = request_fingerprint
|
||||
var path_snapshot: Dictionary = context.path.create_snapshot()
|
||||
_expect(context.path.rebuild_graph([start, goal]), "inject live path change without projector mutation")
|
||||
_expect(not context.projector.validate_invariants()[&"ok"], "unchanged owned snapshot still validates live dependencies")
|
||||
_expect(context.path.rebuild_graph([start, middle, goal]) and context.path.restore_snapshot(path_snapshot), "restore valid live graph and traffic snapshot")
|
||||
_expect(context.projector.validate_invariants()[&"ok"], "repaired dependencies validate against warm cache")
|
||||
_expect(context.projector.unproject_facility(&"unproject_cache", &"facility_cache").is_success(), "new history after cache warm can unproject")
|
||||
_expect(context.projector.validate_invariants()[&"ok"], "new history receives full validation")
|
||||
|
||||
|
||||
func _context(base_cells: Array, custom_path: Variant = null) -> Dictionary:
|
||||
var source := SpatialType.new()
|
||||
var path: PathService = custom_path if custom_path != null else PathType.new()
|
||||
|
||||
Reference in New Issue
Block a user