Skip to content

feat(v2.1): unify Go CLI + Python HUD, SHA-256 hosts journal, and IPv6 sinkholing - #1

Merged
aloneangel45 merged 6 commits into
mainfrom
feat/unified-v2.1-hardening
Nov 10, 2026
Merged

aloneangel45 merged 6 commits into
mainfrom
feat/unified-v2.1-hardening

Conversation

@aloneangel45

Copy link
Copy Markdown
Owner

Summary

Comprehensive v2.1.0 architectural unification, crash-recovery hardening, and dual-stack network/process enforcement across the Go native CLI and Python desktop HUD.

Key Engineering Changes

  • Unified Go + Python Core (focusflow_core): Synchronized state directory (FOCUSFLOW_HOME / %APPDATA%\FocusFlow), config.json, sessions.json, hosts.focusflow.journal.json, and # --- BEGIN FOCUSFLOW MANAGED BLOCK --- markers across both Go CLI and Python Catppuccin Mocha HUD (with automatic cleanup of legacy markers). Retired unmaintained duplicate Rust prototype and legacy V1 script.
  • Crash-Safe SHA-256 Hosts Journal & Orphan Auto-Recovery: Strips existing managed blocks prior to baseline SHA-256 backup (eliminating contaminated .bak lock-in), writes a write-ahead rollback journal, preserves Windows NTFS DACLs via ReplaceFileW with sharing-violation retries, and automatically recovers orphaned hosts blocks on startup after crashes/reboots.
  • Dual-Stack IPv4 + IPv6 Sinkholing & RFC-1123 Sanitization: Blocks both 0.0.0.0 and :: records (closing IPv6 AAAA bypasses), expands DoH sinkhole endpoints, preserves platform CRLF/LF line endings, and rejects malformed/injected hostnames and protected local entries.
  • Hardened Win32/POSIX Supervisor & Privilege UX: Zero-dependency Python ctypes CreateToolhelp32Snapshot Win32 supervisor, critical OS/self process denylist (csrss.exe, lsass.exe, svchost.exe, explorer.exe, etc.), Linux /proc zero-ps fast path + 15-byte TASK_COMM_LEN /proc/<pid>/exe resolution, --elevate CLI flag, and [ELEVATE ADMIN] HUD control.
  • Real Telemetry, HUD & CLI Upgrades: Replaced synthetic analytics seeds with live sessions.json streak/completion metrics, monotonic deadline timer (time.monotonic()), PER_MONITOR_AWARE_V2 DPI scaling, non-pasteable 16-char Friction Challenge (enforced on window close in strict mode), and new doctor, recover, export, and --json CLI capabilities.
  • CI/Release & Hermetic Test Matrix: Fixed darwin-amd64 release artifact packaging, added windows/arm64 builds, enforced zero-emoji minimal systems formatting, and added 97 hermetic tests (20 Go tests + 77 Python pytest tests).

Verification

  • go vet ./... & go test -v ./... (20/20 passing across all 5 Go packages)
  • python -m pytest -v (77/77 passing across journal, sanitization, Go/Python interop, Win32 supervisor, and HUD suites)

@aloneangel45
aloneangel45 merged commit 6bdd4a4 into main Nov 10, 2026
28 checks passed
@aloneangel45
aloneangel45 deleted the feat/unified-v2.1-hardening branch November 10, 2026 17:23
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.

1 participant