refactor: comprehensive code review and cleanup #43

Merged
mahmoud merged 2 commits from development_cleanup into development 2026-03-21 00:51:43 +00:00
Owner

P0 fixes:

  • Use constant-time comparison (subtle::ConstantTimeEq) for VM secrets
  • Fix unwrap() panic in delete_vm error path (rpc.rs:2033)
  • Remove stale crates/hero_cloud_server/ directory

P1 fixes:

  • Replace /root hardcoding in HERO_PROC_SOCKET_DEFAULT with $HOME resolution
  • Extract default VM image to constants (DEFAULT_IMAGE + DEFAULT_IMAGE_ENV)
  • Extract registry URL to constants (REGISTRY_URL_ENV + REGISTRY_URL_DEFAULT)
  • Convert all 125 JS var declarations to const/let in dashboard.js
  • Move all static inline styles to CSS classes in templates
  • Fix HypervisorDriver::create_vm to accept disk_gb parameter

P2 fixes:

  • Add SSH key methods to docs/api.md
  • Fix deploy_vm params in api.md, testing.md, explorer_spec.md (add ssh_keys)
  • Fix job_logs param name: hero_proc_job_id → proc_job_id
  • Update security docs to reflect constant-time secret comparison
  • Add CSS utility classes for replaced inline styles
P0 fixes: - Use constant-time comparison (subtle::ConstantTimeEq) for VM secrets - Fix unwrap() panic in delete_vm error path (rpc.rs:2033) - Remove stale crates/hero_cloud_server/ directory P1 fixes: - Replace /root hardcoding in HERO_PROC_SOCKET_DEFAULT with $HOME resolution - Extract default VM image to constants (DEFAULT_IMAGE + DEFAULT_IMAGE_ENV) - Extract registry URL to constants (REGISTRY_URL_ENV + REGISTRY_URL_DEFAULT) - Convert all 125 JS var declarations to const/let in dashboard.js - Move all static inline styles to CSS classes in templates - Fix HypervisorDriver::create_vm to accept disk_gb parameter P2 fixes: - Add SSH key methods to docs/api.md - Fix deploy_vm params in api.md, testing.md, explorer_spec.md (add ssh_keys) - Fix job_logs param name: hero_proc_job_id → proc_job_id - Update security docs to reflect constant-time secret comparison - Add CSS utility classes for replaced inline styles
refactor: comprehensive code review and cleanup
All checks were successful
Test / test (push) Successful in 1m41s
Test / test (pull_request) Successful in 1m45s
a1076cd90a
P0 fixes:
- Use constant-time comparison (subtle::ConstantTimeEq) for VM secrets
- Fix unwrap() panic in delete_vm error path (rpc.rs:2033)
- Remove stale crates/hero_cloud_server/ directory

P1 fixes:
- Replace /root hardcoding in HERO_PROC_SOCKET_DEFAULT with $HOME resolution
- Extract default VM image to constants (DEFAULT_IMAGE + DEFAULT_IMAGE_ENV)
- Extract registry URL to constants (REGISTRY_URL_ENV + REGISTRY_URL_DEFAULT)
- Convert all 125 JS var declarations to const/let in dashboard.js
- Move all static inline styles to CSS classes in templates
- Fix HypervisorDriver::create_vm to accept disk_gb parameter

P2 fixes:
- Add SSH key methods to docs/api.md
- Fix deploy_vm params in api.md, testing.md, explorer_spec.md (add ssh_keys)
- Fix job_logs param name: hero_proc_job_id → proc_job_id
- Update security docs to reflect constant-time secret comparison
- Add CSS utility classes for replaced inline styles
Merge branch 'development' into development_cleanup
All checks were successful
Test / test (push) Successful in 2m45s
Test / test (pull_request) Successful in 2m46s
a2f652b5b6
mahmoud merged commit b96d904e27 into development 2026-03-21 00:51:43 +00:00
mahmoud deleted branch development_cleanup 2026-03-21 00:51:47 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_compute!43
No description provided.