Repository navigation
Commit c09a486
fix: address cubic review on serve trace lifecycle (#886)
Follow-up to the consensus-review fixes, addressing cubic-dev-ai comments:
- serve.ts: SIGINT/SIGTERM shutdown now exits with signal-conventional codes
(130 / 143) instead of 0, so a signalled stop isn't masked as a successful
run. beforeExit still exits 0. Matches cli/cmd/run.ts.
- trace-consumer.ts (loadConfig): a config-load error no longer disables
tracing — it keeps `enabled` true and falls back to Trace.create()'s default
exporter (the original "must not prevent the host from working" intent), but
now logs a warning so the fallback isn't silent.
- trace-consumer.ts (getOrCreateTrace): drop the dead `Trace.setActive(trace)`
call. It sets a process-global active trace that nothing reads and that is a
footgun in multi-session serve (last-event-wins); per-session routing is via
the sessionTraces map.
Verified: marker guard, typecheck, and trace-consumer / tracing-followups /
worker-trace-clearing / bridge-merge-invariants suites all green.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>1 parent a701fdf commit c09a486
2 files changed
Lines changed: 19 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | | - | |
96 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
97 | 100 | | |
98 | 101 | | |
99 | 102 | | |
| |||
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
142 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
143 | 150 | | |
144 | 151 | | |
145 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| |||
0 commit comments