Implement missing Command and Update type safety in main#115
Implement missing Command and Update type safety in main#115
Conversation
Jordan231111
left a comment
There was a problem hiding this comment.
Thanks for the implementation work here. I ran a full review with local verification (cargo test, command smoke tests) and this PR is close, but it does not yet meet linked issue #103 acceptance criteria.
Blocking findings:
- Missing
Hashcommand inmain.rs
- Issue #103 acceptance requires 10 commands including
Hash. src/main.rsdefines commands throughRemoveFilebut does not include aHashvariant (around lines 32-99).- Runtime confirmation:
cargo run -- --helpdoes not listhash, andcargo run -- hash --helpreturnserror: unrecognized subcommand 'hash'. - This also fails the acceptance item: “Existing functionality (Hash command) still works”.
schedule-updateshandler output is not aligned with command purpose
src/cli/update.rshandle_schedule_command()currently prints"Database updated successfully!"(line ~33), which is misleading for a scheduling-instructions command.- The linked issue defines
ScheduleUpdatesas printing OS-specific scheduling instructions.
Validation run on this branch:
cargo test✅ (passes; warnings only)cargo clippy --all-targets✅ (passes; warnings only)- New command stubs run (
schedule-updates,quarantine-file,list-quarantined,restore,remove-file,remove --force) ✅ hashcommand check ❌ (unrecognized subcommand)
Please address the blockers and I’ll re-review promptly.
|
See my inline review comments on the diff for specific file/line references covering:
All items above now have inline comments pinned to the exact file and line. |
Jordan231111
left a comment
There was a problem hiding this comment.
Inline comments below pin each issue to the exact file/line. These cover the items from my follow-up comment, now with precise locations.
Scope check vs Issue #103:
- PR is generally in scope for #103 (adding command variants, PathBuf migration, ExitCode return) ✅
src/database/updater.rschanges are out of scope for #103 — see inline comment- Missing
Hashcommand variant remains the primary blocker from my earlier review
The CHANGES_REQUESTED status from my first review still applies.
Co-authored-by: Jordan Ye <[email protected]>
Removing changes to updater that are not relevant to the issue this branch is solving
Description
Added command stubs for all command listed in the documentation. Created corresponding function stubs in the cli code files
as well. Note because all tests involving CLI are currently ignored and all the functions created are just stubs that always return ok no new tests were added for these functions. Changed all references to paths in commands that used String to PathBuf adding in the value hinting to the command structure. Pulled my hash implementation from the onboarding project in order to implement all commands
Related Issue
Fixes #103
Type of Change
How to Test
Will show all new command stubs
Will show the new variable --force
Checklist
cargo fmt+cargo clippy)cargo test)