You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: a failed check notice cuts the output before the reason #25
When check fails, the notice shows the output of the check, but cut so short that the reason is lost. Seen on 2026-11-16 with v0.1.0. The check printed one line of about 200 characters, and the notice showed only:
The reason came after the long tree path ([secret.x] preapprove: is not allowed with ask = "never"), so the owner could not see why from the phone. They had to log in to the host or run the check elsewhere.
Proposal
Replace the tree paths ($PULLGATE_TREE, $PULLGATE_OLD_TREE) in the output with short names such as NEW and OLD before it is cut. These paths are long and say nothing to the owner.
Keep the end of the output when it must be cut, not only the start: most tools print the reason last. For example, keep the first line and the last N characters, with "…" between them.
Make sure the notice shows at least ~600 characters of the check output when the message has room for it.
Done when
A test: a check that prints TREE/broker.toml: <reason> (with the real long tree path) gives a notice that holds <reason> and does not hold the tree path.
A test: a check output longer than the limit keeps its last line.
A check that prints TREE/broker.toml: <reason> with the real tree path gives a notice with the reason and without the tree path: TestCheckNoticeShowsTheReason in internal/gate/check_test.go (the path becomes NEW).
Output longer than the limit keeps its last line: TestCheckNoticeKeepsTheLastLine (gate) and TestOutputKeepsTheEnd (message). The notice now shows up to 10 lines and 1500 characters, and a long line keeps its start and its end.
Activity
groupsky commentedon Nov 17, 2026
Fixed in #39 (squash commit a7b20af).
TREE/broker.toml: <reason>with the real tree path gives a notice with the reason and without the tree path:TestCheckNoticeShowsTheReasonininternal/gate/check_test.go(the path becomesNEW).TestCheckNoticeKeepsTheLastLine(gate) andTestOutputKeepsTheEnd(message). The notice now shows up to 10 lines and 1500 characters, and a long line keeps its start and its end.