fieldwitness/tests
Aaron D. Lee fef552b9c1
Some checks failed
CI / lint (push) Failing after 58s
CI / typecheck (push) Failing after 32s
Fix 3 architectural bottlenecks blocking cross-domain adoption
Bottleneck 1: ImageHashes generalization
- phash and dhash now default to "" (optional), enabling attestation
  of CSV datasets, sensor logs, documents, and any non-image file
- Added ImageHashes.from_file() for arbitrary file attestation
  (SHA-256 only, no perceptual hashes)
- Added ImageHashes.is_image property to check if perceptual matching
  is meaningful
- Added content_type field to AttestationRecord ("image", "document",
  "data", "audio", "video") — backward compatible, defaults to "image"
- from_dict() now tolerates missing phash/dhash fields

Bottleneck 2: Lazy path resolution
- Converted 5 modules from eager top-level path imports to lazy
  access via `import soosef.paths as _paths`:
  config.py, deadman.py, usb_monitor.py, tamper.py, anchors.py
- Paths now resolve at use-time, not import-time, so --data-dir
  and SOOSEF_DATA_DIR overrides propagate correctly to all modules
- Enables portable mode (run entirely from USB stick)
- Updated deadman enforcement tests for new path access pattern

Bottleneck 3: Delivery acknowledgment chain records
- New CONTENT_TYPE_DELIVERY_ACK = "soosef/delivery-ack-v1"
- ChainStore.append_delivery_ack() records bundle receipt with
  sender fingerprint and record count
- import_attestation_bundle() auto-generates ack when chain store
  and private key are provided
- Enables two-way federation handshakes (art provenance, legal
  chain of custody, multi-org evidence exchange)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 21:27:15 -04:00
..
conftest.py Fix all 98 ruff lint errors across codebase 2026-04-01 18:30:01 -04:00
test_chain_security.py Fix all 98 ruff lint errors across codebase 2026-04-01 18:30:01 -04:00
test_chain.py Implement 14 power-user feature requests for field deployment 2026-04-01 19:35:36 -04:00
test_deadman_enforcement.py Fix 3 architectural bottlenecks blocking cross-domain adoption 2026-04-01 21:27:15 -04:00
test_key_rotation.py Consolidate stegasoo and verisoo into soosef monorepo 2026-04-01 19:06:14 -04:00
test_killswitch.py Fix 14 bugs and add features from power-user security audit 2026-04-01 17:06:33 -04:00
test_serialization.py Fix 14 bugs and add features from power-user security audit 2026-04-01 17:06:33 -04:00
test_stegasoo_audio.py Consolidate stegasoo and verisoo into soosef monorepo 2026-04-01 19:06:14 -04:00
test_stegasoo.py Consolidate stegasoo and verisoo into soosef monorepo 2026-04-01 19:06:14 -04:00
test_verisoo_hashing.py Consolidate stegasoo and verisoo into soosef monorepo 2026-04-01 19:06:14 -04:00