Harden TimePrism project showcase - #2
Draft
Air000000 wants to merge 107 commits into
Draft
Conversation
Fold the approved compact Idle attribution behavior and explicit usage provenance into the hardening branch after Windows CI #137 passed with 52 Rust tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
Hardens the public TimePrism repository without another broad architecture rewrite, adds explicit first-run tracking consent / persisted pause semantics, and closes the Idle attribution data-quality gap exposed during installer smoke.
Implemented
src-tauri/Cargo.toml;学习/休息and repairs only the two known mojibake values on existing databases, preserving user-customized names;useTrackingState+ the App runtime gate own start/stop decisions, while the sampler only performs periodic foreground sampling;学 / 休counters remain classification-based;LEARN / REST / IGNORErule;Decide laterdemoted to a secondary text action in both the inline prompt and Focus Guard queue;app_usage_logs:FOREGROUNDfor observed foreground sampling andIDLE_CONFIRMEDfor user-confirmed idle correction; foreground coalescing now preserves this evidence boundary;sourcecolumn is first added, and later startup does not rescan/reclassify already-migrated history;cargo check --all-targets, andcargo test;--bundles nsis msias two targets rather than one invalid token;docs/SMOKE_TESTS.mdanddocs/RELEASE_CHECKLIST.md.Verification
Current hardening branch HEAD:
19320df14c3e36b977f3abc6e87715303bb722deWindows CI
Run #138: https://github.com/Air000000/timeprism/actions/runs/34607323895
Passed on the current PR HEAD:
pnpm install --frozen-lockfilepnpm run typecheckpnpm run build:checkcargo check --all-targetscargo testRust result: 52 passed, 0 failed. Coverage now includes fresh/legacy DB lifecycle, tracking onboarding and pause/resume, Idle candidate integrity, privacy boundaries, app-attributed Idle behavior, provenance migration/idempotency, and foreground-vs-user-confirmed coalescing boundaries.
Known pre-existing warnings remain for unused
ForegroundSnapshotin a foreground test import and unusedManagerinlib.rs; this PR does not claim a warning-free build.Windows installer packaging
Run #83: https://github.com/Air000000/timeprism/actions/runs/34607323926
Passed on the current PR HEAD:
Generated artifact:
TimePrism-0.1.0-windows-installers-pull_request1026604850715,949,243bytessha256:67f1afff827199184e35b84cd5f6e307741134800778ba94cc94fde35fcc13c5nsis/TimePrism_0.1.0_x64-setup.exe, 7,450,023 bytes, SHA-256e9a1959c2f5505dbc632604c2e7dce9df4d180e5eb2b42e8deb373591c604821msi/TimePrism_0.1.0_x64_en-US.msi, 8,794,112 bytes, SHA-25606297438a6469f9c8cbae8cc05832151ca058b49a19607db9e6cf1cbd288dca5Automated evidence proves that this PR tree compiles, passes the Rust suite, and produces both Windows installer formats. It does not substitute for real desktop interaction testing.
Remaining manual gates
This PR intentionally remains Draft until the claims that require a real Windows product surface are evidenced rather than inferred:
S-050): use a clean/sandboxed app-data directory; verify no pre-init SQLite error, no capture before onboarding, disclosure copy, immediate post-consent capture, classification-based pet counters, persisted Pause/Resume, paused pet mood, and existing close/background/pet/quit behavior.Continue <App>attributes the interval only after explicit confirmation, generic Learn/Break/Away fallback remains available, andDecide lateris secondary rather than a fourth primary choice.S-060): launch the same candidate against a backed-up pre-tracking-state database; verify existing data survives, onboarding does not reappear, legacy tracking starts enabled, provenance migration preserves history, and a later explicit pause persists across restart.v<version>tag, inspect the draft Release assets/notes, and publish it.The app is currently unsigned, so Windows SmartScreen may report an unknown publisher; README/checklist state this explicitly.