Repository navigation
Commit 680f64a
fix(onboarding): add launch correlation id + full-review fixes
A whole-feature review found the events individually correct but the funnel not
reconstructable. These are the fixes.
Correlation (see #1048):
- Every event now carries `launch_id`, a random value generated once per process
and shared across threads through the environment. The funnel spans the TUI
main thread and the server worker, and most of it runs before any chat session
exists — so the first half of the funnel stamped an empty session and the
second half a real one, leaving no key to join a single run on. It is not
persisted, not derived from the machine or the user, and not reused across
launches. Placed in the event envelope alongside `machine_id`, so it applies
to all telemetry rather than only the onboarding events.
- `~/.altimate/machine-id` is now created exclusively. Both threads initialise
their own copy of the telemetry module, and on a genuinely new install both
can find the file missing at the same moment; with a plain write the loser
overwrote the winner while each kept its own value in memory, so one first run
reported two machine ids. The fallback identity broke on exactly the run it
mattered most for. `wx` makes one writer fail and re-read.
Abandonment:
- `last_stage` no longer advertises values it can never report. `scan_gate` and
`activation` both occur after `onboarding_completed`, which sets `completed`
and suppresses abandonment entirely — abandonment is by definition quitting
before connecting. They are removed rather than documented as live.
- Added `provider_setup`, advanced by any provider choice. A user who picked
Anthropic and quit during key entry was previously reported as abandoning at
`model_picker`, as though they had never chosen anything.
Shutdown:
- `shutdown({timeoutMs})` no longer ignores the budget when a shutdown is
already in flight. It returned the existing promise, which may have been
running on the default 10s, so the exit path waited past its 2s budget and the
worker was terminated mid-flush anyway. The in-flight flush cannot be
shortened, but the caller no longer waits on it beyond its own deadline.
Known and unchanged: choosing "Search all providers…" and then picking from the
full catalogue records only `provider=search_all`. Fixing that means emitting
from the full model picker, which is used outside first-run too, so it needs a
product call.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_018SLUQF3xgZHsGZHSjxe7vb1 parent 55bde58 commit 680f64a
3 files changed
Lines changed: 88 additions & 9 deletions
File tree
- docs/docs/reference
- packages/opencode/src/altimate/telemetry
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
52 | 76 | | |
53 | 77 | | |
54 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1351 | 1351 | | |
1352 | 1352 | | |
1353 | 1353 | | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
1354 | 1370 | | |
1355 | 1371 | | |
1356 | 1372 | | |
| |||
1383 | 1399 | | |
1384 | 1400 | | |
1385 | 1401 | | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
1386 | 1408 | | |
1387 | 1409 | | |
1388 | 1410 | | |
| |||
1485 | 1507 | | |
1486 | 1508 | | |
1487 | 1509 | | |
1488 | | - | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
1489 | 1518 | | |
1490 | | - | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
1491 | 1526 | | |
1492 | 1527 | | |
1493 | 1528 | | |
| |||
1604 | 1639 | | |
1605 | 1640 | | |
1606 | 1641 | | |
1607 | | - | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
1608 | 1659 | | |
1609 | 1660 | | |
1610 | 1661 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
36 | | - | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| |||
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
90 | | - | |
91 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
| |||
0 commit comments