Encrypt HF token at rest, add AnalysisManager test harness, fix progress-bar stride - #38
Open
payamsash wants to merge 1 commit into
Open
Conversation
…ix progress-bar stride
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.
Summary
AnalysisSettings::hfTokenis now DPAPI-encrypted at rest on Windows builds instead of stored in plaintext insettings.json. Pre-existing plaintext values load fine and silently upgrade to encrypted on the next save. Fails closed (empty field, not garbage) if a blob is ever corrupted or restored on a different machine/account.AdminPanelDialog's Export/Import Configuration feature now detects and warns when an imported token couldn't be decrypted (it's a raw file copy, so a token encrypted on a different Windows account/machine won't carry over).AnalysisManagertest harness: a small standalone stub subprocess +QCoreApplication-backed test entry point lettests/test_analysis_manager.cppexercise real subprocess launch, stdout/stderr channel separation, env-var passthrough, exit-code mapping, and job queueing — without depending on a real Python interpreter. This immediately found and fixed a real, previously-shipped bug:AnalysisManager::stop()could crash (or leave a subprocess unmanaged) if the running process finished during the wait, due to Qt re-entrantly delivering thefinishedsignal from inside the blockingwaitForFinished()call.run_gaze_fusion.pyandrun_pose3d.pynow scale their progress-print interval to the video length (max(1, total // 200)) instead of a fixed% 100, matching the fix already applied to the other analysis scripts — short sessions now show smooth progress instead of one big jump.Test plan
mosaicandmosaic_testsbuild cleanctest -C Release: 189/189 passing (including 5 newDpapiCryptand 7 newAnalysisManagerTestcases)code-reviewpass run; 3 additional real findings fixed (export/import token-loss warning, a secondAnalysisManager::stop()re-entrancy gap, a doc-comment overclaim) — one review finding was independently re-verified and found partially incorrect, so only the confirmed part was acted onsettings.jsonshows the encrypted blob not plaintext, confirm it decrypts correctly on relaunch🤖 Generated with Claude Code