Canonical screenshot evidence records and replay-safe visual metadata persistence #30

Closed
opened 2026-09-02 17:24:35 +00:00 by nsaspy · 1 comment
Owner

Outcome

Add the database-owned persistence boundary for #140/#141 so visual-recon results become typed, replay-safe operation evidence instead of ad-hoc screenshot files or a second GoWitness-style database.

Owning RAGE lane

Hackmode Auto-RAGE database / execution-graph / KB worker.

Fence

Do not spawn browsers, schedule screenshot jobs, implement Hackpert reasoning, or write StarIntel directly. Prefer source/hackmode-database/** and minimal package/ASDF wiring only.

Dependencies

  • #140 visual recon epic
  • #141 typed browser job/result contract
  • existing replay-safe execution graph/Tek9 authority

Typed record

Persist stable operation/run/job identity plus URL asset identity, requested/final URL, screenshot evidence reference + digest, capture timestamp, title, HTTP/result status where available, viewport/profile/browser provenance, timing, body/DOM digest when retained, technology hints as bounded metadata/evidence, capture-session/exchange references where available, and failure classification for inspectable failed captures.

The binary screenshot should use the repository's canonical evidence/reference lifecycle; do not stuff image bytes into normal KB graph fields.

Replay/idempotency

  • deterministic record ID for the same logical screenshot observation;
  • identical replay is idempotent;
  • same ID/different content fails closed through existing replay-conflict semantics;
  • operation/run scope validated on read/write;
  • typed singular/plural reads for consumers without raw Tek9 leakage.

RED-first tests

Round-trip typed record, missing evidence ref, cross-operation mismatch, deterministic replay, divergent replay conflict, stable ordering, correlation to canonical HTTP exchange/capture evidence, and no duplicate logical visual observation on replay.

Acceptance proof

Persist deterministic visual fixture results twice and prove one logical record; attempt a conflicting same-ID screenshot digest and prove fail-closed behavior; read the evidence back only through typed Hackmode interfaces.

## Outcome Add the database-owned persistence boundary for #140/#141 so visual-recon results become typed, replay-safe operation evidence instead of ad-hoc screenshot files or a second GoWitness-style database. ## Owning RAGE lane Hackmode Auto-RAGE database / execution-graph / KB worker. ## Fence Do not spawn browsers, schedule screenshot jobs, implement Hackpert reasoning, or write StarIntel directly. Prefer `source/hackmode-database/**` and minimal package/ASDF wiring only. ## Dependencies - #140 visual recon epic - #141 typed browser job/result contract - existing replay-safe execution graph/Tek9 authority ## Typed record Persist stable operation/run/job identity plus URL asset identity, requested/final URL, screenshot evidence reference + digest, capture timestamp, title, HTTP/result status where available, viewport/profile/browser provenance, timing, body/DOM digest when retained, technology hints as bounded metadata/evidence, capture-session/exchange references where available, and failure classification for inspectable failed captures. The binary screenshot should use the repository's canonical evidence/reference lifecycle; do not stuff image bytes into normal KB graph fields. ## Replay/idempotency - deterministic record ID for the same logical screenshot observation; - identical replay is idempotent; - same ID/different content fails closed through existing replay-conflict semantics; - operation/run scope validated on read/write; - typed singular/plural reads for consumers without raw Tek9 leakage. ## RED-first tests Round-trip typed record, missing evidence ref, cross-operation mismatch, deterministic replay, divergent replay conflict, stable ordering, correlation to canonical HTTP exchange/capture evidence, and no duplicate logical visual observation on replay. ## Acceptance proof Persist deterministic visual fixture results twice and prove one logical record; attempt a conflicting same-ID screenshot digest and prove fail-closed behavior; read the evidence back only through typed Hackmode interfaces.
Author
Owner

Database-owned acceptance is now complete on master via #145 and #156.

Final proof added by #156:

  • caller-declared operation/run write scope is validated before Tek9 mutation;
  • cross-operation and cross-run writes fail with typed validation errors;
  • multiple visual-evidence records return in deterministic record-ID order;
  • existing replay idempotency, divergent replay conflict, screenshot evidence reference/digest, and capture/exchange correlation remain covered.

Merged commit: e9eb6286413d0875c49dcb5616d9e6277c797ade.

Provider/browser consumption remains tracked by #140/#141; no browser execution authority was added to the database layer.

Database-owned acceptance is now complete on `master` via #145 and #156. Final proof added by #156: - caller-declared operation/run write scope is validated before Tek9 mutation; - cross-operation and cross-run writes fail with typed validation errors; - multiple visual-evidence records return in deterministic record-ID order; - existing replay idempotency, divergent replay conflict, screenshot evidence reference/digest, and capture/exchange correlation remain covered. Merged commit: `e9eb6286413d0875c49dcb5616d9e6277c797ade`. Provider/browser consumption remains tracked by #140/#141; no browser execution authority was added to the database layer.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/hackmode#30
No description provided.