cleanup: remove dead code and duplicate docs

- Remove session-ses_2f27.md (161KB raw session log)
- Remove 49 ROOT_* duplicate files across REFERENCE/
- Remove 14 duplicate files between REFERENCE/ root and history/
- Remove asr_legacy.rs (dead code, replaced by asr.rs)
- Remove src/core/worker/ (duplicate JobWorker)
- Remove src/core/layers/ (empty directory)
- Remove 4 .bak files in src/
- Remove 7 dead private methods in worker/processor.rs
- Remove backup directory from git tracking
This commit is contained in:
Warren
2026-05-04 01:31:21 +08:00
parent ee81e343ce
commit e75c4d6f07
3270 changed files with 35190 additions and 53367 deletions

View File

@@ -54,61 +54,61 @@ def test_uuid_generation():
# Test 1: Basic generation
uuid1 = compute_birth_uuid(mac, timestamp, "demo", "video.mp4")
print(f"Test 1 - Basic Generation:")
print("Test 1 - Basic Generation:")
print(f" UUID: {uuid1}")
print(f" Length: {len(uuid1)} (expected: 32)")
assert len(uuid1) == 32, "UUID length should be 32"
print(f" ✓ PASS")
print(" ✓ PASS")
print()
# Test 2: Different MAC
uuid2 = compute_birth_uuid("a1:b2:c3:d4:e5:f6", timestamp, "demo", "video.mp4")
uuid3 = compute_birth_uuid("d4:e5:f6:a1:b2:c3", timestamp, "demo", "video.mp4")
print(f"Test 2 - Different MAC:")
print("Test 2 - Different MAC:")
print(f" UUID (MAC A): {uuid2}")
print(f" UUID (MAC B): {uuid3}")
assert uuid2 != uuid3, "Different MAC should produce different UUID"
print(f" ✓ PASS (UUIDs different)")
print(" ✓ PASS (UUIDs different)")
print()
# Test 3: Different Time
uuid4 = compute_birth_uuid(mac, "2026-01-01T10:00:00Z", "demo", "video.mp4")
uuid5 = compute_birth_uuid(mac, "2026-01-01T14:00:00Z", "demo", "video.mp4")
print(f"Test 3 - Different Time:")
print("Test 3 - Different Time:")
print(f" UUID (Time 10:00): {uuid4}")
print(f" UUID (Time 14:00): {uuid5}")
assert uuid4 != uuid5, "Different time should produce different UUID"
print(f" ✓ PASS (UUIDs different)")
print(" ✓ PASS (UUIDs different)")
print()
# Test 4: Different User
uuid6 = compute_birth_uuid(mac, timestamp, "demo", "video.mp4")
uuid7 = compute_birth_uuid(mac, timestamp, "warren", "video.mp4")
print(f"Test 4 - Different User:")
print("Test 4 - Different User:")
print(f" UUID (demo): {uuid6}")
print(f" UUID (warren): {uuid7}")
assert uuid6 != uuid7, "Different user should produce different UUID"
print(f" ✓ PASS (UUIDs different)")
print(" ✓ PASS (UUIDs different)")
print()
# Test 5: Same elements = same UUID
uuid8 = compute_birth_uuid("a1:b2:c3", "2026-01-01T10:00:00Z", "demo", "video.mp4")
uuid9 = compute_birth_uuid("a1:b2:c3", "2026-01-01T10:00:00Z", "demo", "video.mp4")
print(f"Test 5 - Same Elements:")
print("Test 5 - Same Elements:")
print(f" UUID (call 1): {uuid8}")
print(f" UUID (call 2): {uuid9}")
assert uuid8 == uuid9, "Same elements should produce same UUID"
print(f" ✓ PASS (UUIDs same)")
print(" ✓ PASS (UUIDs same)")
print()
# Test 6: Real-world scenario
print(f"Test 6 - Real-world Scenario (GOPR0001.mp4):")
print("Test 6 - Real-world Scenario (GOPR0001.mp4):")
uuid_cam1 = compute_birth_uuid("a1:b2:c3:d4:e5:f6", "2026-01-01T10:00:00Z", "demo", "GOPR0001.mp4")
uuid_cam2 = compute_birth_uuid("d4:e5:f6:a1:b2:c3", "2026-01-01T10:00:00Z", "demo", "GOPR0001.mp4")
print(f" Camera A UUID: {uuid_cam1}")
print(f" Camera B UUID: {uuid_cam2}")
assert uuid_cam1 != uuid_cam2, "Same filename on different cameras should have different UUIDs"
print(f" ✓ PASS (GOPR0001.mp4 handled correctly)")
print(" ✓ PASS (GOPR0001.mp4 handled correctly)")
print()
print("=" * 60)