logs broken for a user #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
each job executed for a user (as in hero_proc)
we should be able to retrieve here and see
now weird pattern
check with mcp browser
use /hero_service_test skill
use addr http://[4f8:306f:d514:7dbd:b27c:28aa:d12d:bdb6]:9989/hero_codescalers_server/ui#/logs?user=driver
to test on
Test Results
Run date: 2026-04-22
Summary
Details
All crates compiled successfully. Two crates with lib tests were discovered:
hero_codescalers_sdk: 0 tests (ok)nu_exec: 0 tests (ok)No test failures. Build completed in 1.65s.
Implementation Summary
Six bugs were identified and fixed across the server RPC dispatcher and the UI JavaScript.
Bugs Fixed
Bug 1 —
logs.getreturned wrong field namesThe server emitted
timestamp_ms/service/stream/contentbut the UI expectedts/level/source/message. Every log row rendered blank. Fixed by remapping field names in the server response and mappingstreamvalues to log levels (stderr->error,stdout->info).Bug 2 —
userparameter silently dropped fromlogs.get#/logs?user=drivershowed the same global log as#/logsbecause the UI never forwardeduserto the server, and the server did not accept it. Fixed by addinguser,level, andjob_idparameters to thelogs.gethandler. Whenuseris provided, the server queries hero_proc jobs taggedcodescaler_<user>and aggregates their stdout/stderr. The UI now forwards theuserroute param and reads from a new filter input in the logs toolbar.Bug 3 —
jobs.get/logs/cancel/deleteparam mismatch (job_idvsid)The server read
params["job_id"]but the OpenRPC spec and UI both used"id". All job detail operations silently failed. Fixed by aligning the server to useparams["id"]and updatingwaitForJobTerminalin the UI.Bug 4 —
jobs.bulkparam mismatch (job_idsvsids)Bulk cancel/delete always operated on zero jobs. Fixed by aligning the server to read
params["ids"].Bug 5 —
jobs.listreturned a wrapped object instead of an arrayThe server returned
{ total, jobs: [...] }but the UI called.filter()directly on the result. Since objects have no.filter, the Jobs tab was always empty. Fixed: the server now returns a plain array; the UI also has a fallback to unwrapdata.jobsfor backward compatibility.Bug 6 — OpenRPC spec out of sync
logs.gethad nouser/level/job_idparams documented. Updatedopenrpc.jsonandopenrpc.client.generated.rsto reflect all parameter and response shape changes.Files Changed
crates/hero_codescalers_server/src/main.rs— fixedlogs.getfield names, added user/level/job_id support, fixed jobs.* param namescrates/hero_codescalers_server/src/jobs.rs— changedjobs.listto return plain arraycrates/hero_codescalers_server/openrpc.json— updatedlogs.getparams and result schemacrates/hero_codescalers_server/openrpc.client.generated.rs— updated generated client structscrates/hero_codescalers_ui/static/js/dashboard.js— forwarded user param in loadLogs, fixed loadJobs array handling, fixed waitForJobTerminal param namecrates/hero_codescalers_ui/templates/index.html— added user filter input to logs toolbarTest Results