Commit c68afa4
feat(cli): npx t3 triage hands a broken install to your own coding agent (#56)
* feat(cli): npx t3 triage hands broken installs to your own coding agent (#6563)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 324ddda3146d54cc7195a67ef5506e93674085ba)
* feat(cli): npx t3 triage hands a broken install to your own coding agent
Ports upstream #6563 as a Pylon feature rather than a cherry-pick. `t3 triage`
collects machine facts — version, OS, paths, server liveness — into a scratch
directory and launches claude or codex with a playbook that walks the agent
from "what went wrong" through diagnosis to a well-formed issue.
Upstream's version could not be adopted as-is: its playbook hardcodes
pingdotgg/t3code, searches T3's issues, fetches a newer playbook from T3's raw
GitHub URL, and builds a t3code issues/new link. Running it in Pylon would have
funnelled Pylon users' bug reports into T3's tracker.
The destination is configuration now, not a constant. `PYLON_TRIAGE_REPOSITORY`
names the repository to search and file against; it is unset by default,
because `pylon-code/pylon` is private and pointing users at a tracker they
cannot open is worse than pointing them nowhere. With it unset the playbook
tells the agent to write the finished issue to a file and hand over the path
instead of trying to post. Two tests cover both branches.
Upstream's "check for a newer playbook" step is dropped for the same reason:
a private repo has no unauthenticated raw URL, so the embedded copy is the only
playbook a release can follow. The remaining steps are renumbered and the
byte-identity test between PLAYBOOK.md and TRIAGE_PLAYBOOK still holds.
* fix(cli): address the xhigh review of Pylon triage
Six findings from the review of the port, in rough order of severity.
**Triage inspected the wrong install.** `resolveBaseDir` falls back to `~/.t3`,
which is T3 Code's runtime home, not Pylon's `~/.pylon-code`. On a Pylon Desktop
machine that reported the server as not running, pointed the agent at another
product's database, logs, and secrets directory, and created the scratch dir
inside a live T3 install. Triage now prefers Pylon's home when nothing is
specified and it exists. The shared resolver's default is left alone: every
other CLI command depends on it, so changing it belongs in its own change.
**One repository could not serve both roles.** The clone source and the issue
tracker are the same repo upstream but not here, so the documented example
(an issues-only repo) would have had the agent cloning a tree with no code in
it. Split into PYLON_TRIAGE_REPOSITORY and PYLON_TRIAGE_SOURCE_REPOSITORY, with
the playbook and context file naming which is which.
**An empty value read as configured.** `Config.string` accepts "", so an
exported-but-blank variable defeated the "not configured" guard and rendered a
blank repository line. Blank and whitespace now normalize to unset.
**The nightly caveat was inside the git ref.** `releaseTag` carried
"(nightly build; if this tag does not exist, clone main)", which the playbook
substitutes verbatim into `git clone --branch`. The tag is bare again and the
caveat moved to its own field.
**The label could lose a report.** `via-triage` does not exist in this repo, so
`gh issue create --label via-triage` would fail after the agent had written the
issue. The playbook now files without the label rather than losing the work.
**No user documentation.** Added docs/user/triage.md; the two environment
variables were documented only in a source comment.
---------
Co-authored-by: Theo Browne <me@t3.gg>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent d9a351e commit c68afa4
7 files changed
Lines changed: 958 additions & 0 deletions
File tree
- .github
- ISSUE_TEMPLATE
- triage
- apps/server/src
- cli
- docs/user
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 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 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 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 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| |||
0 commit comments