fix(router): sync admin whitelist cache via RPC #85

Merged
zaelgohary merged 1 commit from development_fix_router_access_cli_sync into development 2026-05-04 11:00:38 +00:00
Member

Summary

The hero_router access CLI subcommands wrote ADMIN_SECRETS to disk via hero_proc but never told the running router to refresh its in-memory whitelist cache, so changes only took effect after a restart. Routing the CLI through the existing router.access.* RPCs over rpc.sock keeps the cache and on-disk state in sync.

N/A (uncovered while testing the access CLI end-to-end).

Changes

  • Routed access list/add/remove/clear through router.access.* RPC.
  • Added 4 unit tests for encode_job_name / decode_job_name / shell_suffix.

Test Results

cargo test -p hero_router --lib — 98 passed.

## Summary The `hero_router access` CLI subcommands wrote `ADMIN_SECRETS` to disk via hero_proc but never told the running router to refresh its in-memory whitelist cache, so changes only took effect after a restart. Routing the CLI through the existing `router.access.*` RPCs over `rpc.sock` keeps the cache and on-disk state in sync. ## Related Issue N/A (uncovered while testing the access CLI end-to-end). ## Changes - Routed `access list/add/remove/clear` through `router.access.*` RPC. - Added 4 unit tests for `encode_job_name` / `decode_job_name` / `shell_suffix`. ## Test Results `cargo test -p hero_router --lib` — 98 passed.
fix(router): sync admin whitelist via RPC + post-merge polish
All checks were successful
Build & Test / check (pull_request) Successful in 1m54s
6b60b39f79
- cmd_access now calls router.access.* RPC over rpc.sock so the running
  daemon refreshes its in-memory cache after CLI mutations
- service_proxy_path: revert to strip-prefix to preserve %2F-as-not-separator
- terminal.rs: drop unused JOB_PREFIX alias, table-driven shell_suffix
- terminal.rs: 4 unit tests for encode/decode_job_name + shell_suffix bijection
zaelgohary force-pushed development_fix_router_access_cli_sync from 6b60b39f79
All checks were successful
Build & Test / check (pull_request) Successful in 1m54s
to 54738558da
All checks were successful
Build & Test / check (pull_request) Successful in 1m46s
2026-05-04 10:57:43 +00:00
Compare
zaelgohary changed title from fix(router): sync admin whitelist via RPC + post-merge polish to fix(router): sync admin whitelist cache via RPC 2026-05-04 10:57:53 +00:00
zaelgohary merged commit 98613f7fa2 into development 2026-05-04 11:00:38 +00:00
zaelgohary deleted branch development_fix_router_access_cli_sync 2026-05-04 11:00:38 +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_router!85
No description provided.