Skip to content

feat: add explicit offline local scan history - #9

Merged
1jovansimon merged 1 commit into
mainfrom
task077b-local-scan-history
Oct 20, 2026
Merged

1jovansimon merged 1 commit into
mainfrom
task077b-local-scan-history

Conversation

@1jovansimon

Copy link
Copy Markdown
Contributor

Explicit local history

Developers can explicitly initialize a private history directory and save manually initiated scans with both --history-dir and --project-id. Plain scans and HTML-only scans still create no history. Saved schema-1 UUID records preserve privacy-filtered evidence, original Scanner/catalog metadata and uncertainty without changing detection, catalog or existing terminal/JSON behavior.

Adds newest-saved-first history cards matching the approved Scanner dashboard, explicit historical HTML reopening without rescanning, and CLI-only deletion/pruning. Deletion previews by default and requires --apply; combined age/keep-last policies use AND. No comparison, monitoring, Cloud sync, AI repair, authentication, billing or paid Cloud capability is included.

Security and boundaries

  • Immutable exclusive writes; private directory/file permissions; bounded reads, records and storage.
  • Strict schema/UUID/JSON validation, including duplicate keys; fail-closed traversal, symlink/hardlink, corrupt-record and identity checks.
  • Escaped, privacy-filtered HTML with restrictive hashed-CSS CSP and new destinations only; no automatic browser opening or persistent index.
  • Existing MIT license and attribution, dependencies/lockfile, scanner/catalog logic, Phase A output safety and CI are unchanged.
  • Local snapshots are not authenticated or current compatibility evidence. Stable private directories are required: portable filesystem APIs cannot eliminate concurrent ancestor races; interrupted writes/locks may need manual inspection. Unlink is not secure erasure.

Verification

Local Node 24/macOS: lint, typecheck, all 429 tests across 15 files, build, benchmark, package verification, self-contained archive creation and isolated empty-cache offline installation passed. Installed CLI checks include history init/two saves/list/reopen/delete preview/apply/prune preview, privacy, CSP, no-overwrite, blocked parent dependencies/network transports and unchanged synthetic targets.

Synthetic benchmark: 12 repositories, 14 TP / 0 FP / 2 unsupported FN; not a real-world accuracy guarantee. Founder approved desktop/mobile history design. Automated browser rendering was unavailable locally.

Based directly on public main 50813af697f04f3b375b1307cc38974bbee75e0b, containing merged Phase A PR #8. Only the 16 reviewed Scanner files are included; no private infrastructure or local records/previews/build artifacts. Ubuntu/macOS CI must pass before founder review. Do not merge automatically; no npm publication or release is authorized.

@1jovansimon
1jovansimon merged commit 08560ab into main Oct 20, 2026
4 checks passed
@1jovansimon
1jovansimon deleted the task077b-local-scan-history branch October 20, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants