fix(proc): serve new RPC over multi-domain single-socket contract (SSE path + cleanup tests) #153
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_proc!153
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_proc_multidomain_verify"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
proc: serve new RPC over the multi-domain single-socket contract (server only)
Closes the verification + fixes tracked in #152. Scope is server RPC + multi-domain correctness only — admin crates (
hero_proc_admin*),hero_router, and CI/release workflows are untouched. Ground truth was derived from a live build + infocheck + on-socket contract probe + full integration run on the latestdevelopmentofhero_procandhero_skills, against hero_libdevelopment(rebuilt green after the lock float to60867649).What this fixes
1. SSE served at the wrong path (the one real contract gap).
web.rsmounted the job-log SSE handler at the top-level/eventsroute only. The canonical multi-domain contract — and the generated logs spec'sx-sseextension (endpoint=/eventsresolving per domain) — isGET /api/logs/events?job_sid=<sid>, whichhero_router(PR #120/#121) now forwards verbatim and multiplexes fromx-sse. The handler is now mounted at/api/logs/events, with/eventskept as a back-compat alias. The 3 SSE integration tests + the 2 UC SSE tests go from fail→pass, and/api/logs/events?job_sid=…dispatches end-to-end through the router with no router change.2. Cleanup tests were self-defeating / racy (test bug, not server).
clean_test_data_removes_everythingdeleted the scheduled actions viaschedule_deletebeforeclean_by_tag.schedule_deleteremoves the action without its logs, so the subsequent tag sweep never saw those actions and their log entries stayed queryable forever — surfacing aslog entries still queryable after cleanup: [sched-… (logs.count=N)]. The server-side delete is correct (verified in isolation: a directlogs.delete(src)drops the count to 0 and it stays 0). The test now usesschedule_disableto stop the engine firing while leaving the actions in place, drains in-flight scheduled jobs to a terminal phase, and lets the async log flush settle, soclean_by_tagremoves each action together with its logs.clean_test_data_is_idempotentis now self-contained (drains first, then asserts a second clean deletes 0) with protected-service checks conditional on pre-cleanup presence. No assertions were weakened. (Related background: #126, #141.)3. Hygiene.
disabled = trueonhero_proc_test/service.toml(it's a test runner, not a deployable service)./schema/(*.oschemasuperseded bycrates/hero_proc_server/oschema/, which theopenrpc_server!/openrpc_client!macros read viaspec = "oschema"; the top-level copies were unreferenced).developmentafter953e752(remove trackedCargo.lock+ gitignore it); the earlier lock-bump commit was dropped. WithCargo.lockuntracked, hero_lib now resolves fresh frombranch = "development"(currently60867649).Live multi-domain contract probe on
hero_proc/rpc.sockGET /api/domains.jsonGET /api/{domain}/openrpc.json×4POST /api/{domain}/rpcGET /api/logs/events?job_sid=…Verification
cargo check --workspace✅ ·cargo clippy --workspace --all-targets -- -D warnings✅ (0 warnings)lab build --install✅ (server + admin + cli; admin_dx* skipped, disabled)--basic --functional --extended: 282 passed / 0 failed, run twice to confirm no flakiness (the cleanup test was previously timing-flaky).Downstream (listed, not modified)
hero_routerdevelopmentis already aligned (PR #1208dcffe5forward verbatim; PR #121d1dfe88derive SSE fromx-sse). Once hero_proc serves/api/logs/events, SSE works end-to-end through the router with no router change. No other in-scope raw-RPC consumers are broken by the current wire.84465cf5b7toa6a55df71afix(proc): serve new RPC over multi-domain single-socket contract (SSE path + cleanup tests)to WIP fix(proc): serve new RPC over multi-domain single-socket contract (SSE path + cleanup tests)WIP fix(proc): serve new RPC over multi-domain single-socket contract (SSE path + cleanup tests)to WIP: fix(proc): serve new RPC over multi-domain single-socket contract (SSE path + cleanup tests)7003a898catoa6a55df71aWIP: fix(proc): serve new RPC over multi-domain single-socket contract (SSE path + cleanup tests)to fix(proc): serve new RPC over multi-domain single-socket contract (SSE path + cleanup tests)