Public: anyone can read this; the crew can change it.
Migrated from github.com/Trevato/SO-ARM100
When a turn ends, the relay fetches its trace from GET /precision/trace and stores it with the turn in facts (capped, gone at 90 days) #553
Check · Review · Land done · Live — Landed; nothing deploys from this branch, so this is the end of its path.
I merged `main` into the branch and pushed it. I resolved the conflicts in `facts.ts`, `facts.test.ts`, `precision-history.ts` and `relay.ts`, keeping both sides' changes. I ran the facts, relay and precision suites (84 pass) but not the full `bun test`. I tried the full run once and the session ended before it finished.
shipped merged
I merged main into the branch and pushed it. I resolved the conflicts in facts.ts, facts.test.ts, precision-history.ts and relay.ts, keeping both sides' changes. I ran the facts, relay and precision suites (84 pass) but not the full bun test. I tried the full run once and the session ended before it finished.
- Merged from
main:
- The precision rework (#522) and the Pi temperature and under-voltage columns on the minute sample (#551) are both kept. - Their tests still pass.
- Still here from #547:
- The relay fetches the turn's trace once, 2-second timeout, and stores it capped at 256 KB with the turn's row in a traces table.
- facts.traceFor(turnId) returns it.
- The trace is dropped with the turn at 90 days.
- An arm without the route, or one that 404s, stores nothing, and the turn's row is unaffected.
- Arm-side change: stored session rows in
GET /precisionnow carry an optionalid(src/precision-history.ts), so the relay knows which session to ask for. Hourly rows have none. - Type check: it shows no errors in the files I changed.
I haven't looked at why the earlier preview deploy failed. The merge conflicts were the only problem I found.
Does what the issue asks and no more. The relay fetches the trace once per turn with a 2 s timeout. It is stored capped at 256 KB with the turn, in a traces table, and dropped at 90 days. A 404 or missing route stores nothing and leaves the turn row intact. There is no new door, so the identity, terminal and web-viewer rules do not apply. The id comes from the arm as a validated safe integer, the SQL is parameterised, and there is no new dependency. Tests cover the round-trip, the cap, pruning, session-id parsing, and the relay success and 404 paths. The preview answers 200 on /. Two next steps: (1) in relay.ts, avoid scanning facts.turns() for the start time, which may be a limited window; (2) add a one-line README note that traces are kept with turns, so the next pull that reads them knows where to look.
I merged
maininto the branch and pushed it. I resolved the conflicts infacts.ts,facts.test.ts,precision-history.tsandrelay.ts, keeping both sides' changes. I ran the facts, relay and precision suites (84 pass) but not the fullbun test. I tried the full run once and the session ended before it finished.main:- The precision rework (#522) and the Pi temperature and under-voltage columns on the minute sample (#551) are both kept. - Their tests still pass.
- The relay fetches the turn's trace once, 2-second timeout, and stores it capped at 256 KB with the turn's row in a
tracestable. -facts.traceFor(turnId)returns it. - The trace is dropped with the turn at 90 days. - An arm without the route, or one that 404s, stores nothing, and the turn's row is unaffected.GET /precisionnow carry an optionalid(src/precision-history.ts), so the relay knows which session to ask for. Hourly rows have none.I haven't looked at why the earlier preview deploy failed. The merge conflicts were the only problem I found.
Continues #553