Expand description
Bug-report payload builder.
:report-bug shows the operator a scrubbed report containing
version / OS / recent-log-lines / recent activity, and offers two
ways to actually file it:
y— copy to clipboard (paste into a GitHub issue manually)b— open a new GitHub issue in the browser, body pre-filled via URL query paramsesc— cancel
Ebman itself never sends the payload anywhere. The friction (operator pastes into an issue) is the feature: it keeps the tool defensible to operators running against regulated workloads.
The scrubber runs over the assembled payload to redact the obvious leaks: account IDs, ARNs, env names from the live env list, profile / role names from the active context, and CNAMEs / FQDNs. It’s not bulletproof — a freeform error message could still embed a customer name — which is why the operator sees the exact payload before it leaves their machine.
Structs§
- Report
Input - Markdown-ish report payload, ready to be displayed in the
overlay or pasted into a GitHub issue. Caller passes pre-collected
pieces of context so this module stays free of
App/tokiodependencies — pure string assembly, testable in isolation. - Scrub
Context - Sensitive tokens supplied by the caller — pulled from the live App
state at report-build time.
account_idis the operator’s own account, but it’s still PII for “this is the org running ebman” so gets the same treatment as the others.
Functions§
- build_
report - Build the full report. Returns the assembled + scrubbed payload. Two passes:
- github_
issue_ url - Build the GitHub
issues/newURL with the report pre-filled. GitHub caps URL length at ~8192 chars; truncate the body if it would push us past 7900 so the title + URL params still fit. - latest_
crash_ log - Read the most recent crash log written by the panic hook. Returns
Nonewhen no crash logs exist. Helper so the report builder can stay synchronous + pure. - scrub
- Apply identifier scrubbing to
text. Order matters: longer / more-specific patterns first so the shorter ones don’t eat substrings of them. Pure; tested below. - tail_
ebman_ log - Read the tail of
~/.cache/ebman/ebman.log— up tonlines. Errors silently to an empty Vec; the report still ships, just without log context. - url_
encode - URL-encode a body for GitHub’s
issues/new?body=URL. Lighter than pulling inurlencodingfor one call site; only encodes the characters GitHub’s URL parser is sensitive to.