Title: perf(skill): slim incident-summary output + serialize same-host monit-agent probes by ysyneu · Pull Request #68 · flashcatcloud/flashduty-cli · GitHub
Open Graph Title: perf(skill): slim incident-summary output + serialize same-host monit-agent probes by ysyneu · Pull Request #68 · flashcatcloud/flashduty-cli
X Title: perf(skill): slim incident-summary output + serialize same-host monit-agent probes by ysyneu · Pull Request #68 · flashcatcloud/flashduty-cli
Description: Two token-efficiency fixes surfaced by /audit-ai-sre-sessions (audit run audit-2026-06-26). Both touch files kept byte-identical with their embedded copies in fc-safari (logic/runtime/bootstrap/skills/flashduty/) — mirrored in linked PR flashcatcloud/fc-safari#337 (the two must land together). P6 — slim incident-summary.sh (scripts/incident-summary.sh) What: the script dumped ~80K chars of toon per incident (81042 / 79075 in the audited session), most of it empty boilerplate, exceeding the inline output cap and forcing 3-4 sequential read calls to page ~600 lines back in (steps 5,6,8,10,12,21,22,24 of sess_TRdrnq5oA345qF66GgbYrY). Root cause: run() appended --output-format toon to every command. For these read verbs that selects the machine-readable branch, which marshals the full raw response object — every empty field on incident detail (account_locale, account_name, ai_summary: "", …) plus heavy blobs like a change's labels.steps deploy-JSON. Each verb's default (table/summary) renderer is instead a curated projection of exactly the summary-relevant fields (printIncidentFullDetail → id/severity/progress/channel/timestamps/ai_summary/root_cause/resolution/impact/description/labels/responders; change list → id/title/status/channel/time; etc.). Fix: drop --output-format toon from run() so each command uses its lean default renderer — that default is the field projection a fault summary needs. Kept all six commands, set -uo pipefail, the no-errexit intent, and the read-only "print real output" purpose. Adjusted the header note (the lean detail shows the channel by name; to scope post-mortems to the incident's channel, read channel_id via incident info … --output-format toon | grep '^channel_id:'). Tradeoff: the lean change list table omits labels (one correlation signal) along with the noisy steps blob; the incident's own labels still print under detail, and a specific change can be drilled into via the change card's documented toon path. Net: a massive token cut for a fast overview. P8 — serialize same-host monit-agent probes (reference/monit-agent.md) What: in sess_QmoruPkRjrwA2tcHvEbNvT (steps 10,11,12) os.top_processes was rejected with code=overloaded — per-target concurrency limit reached for kind="host" locator="10.101.214.50" — because multiple monit-agent probes were fired in parallel against the same host, forcing an identical retry that re-sent the growing context. Fix: added a Gotchas line steering fan-out to serialize per target (batch a host's tools into a single invoke, whose tools array already runs concurrently agent-side) and parallelize only across distinct targets. Prose outside the GENERATED fence. Verification bash -n scripts/incident-summary.sh # OK shellcheck scripts/incident-summary.sh # no findings env -u GOROOT go build ./... # BUILD OK go run ./internal/cmd/skilldoc check # skilldoc: cards OK (fence unchanged)
Open Graph Description: Two token-efficiency fixes surfaced by /audit-ai-sre-sessions (audit run audit-2026-06-26). Both touch files kept byte-identical with their embedded copies in fc-safari (logic/runtime/bootstrap/ski...
X Description: Two token-efficiency fixes surfaced by /audit-ai-sre-sessions (audit run audit-2026-06-26). Both touch files kept byte-identical with their embedded copies in fc-safari (logic/runtime/bootstrap/ski...
Opengraph URL: https://github.com/flashcatcloud/flashduty-cli/pull/68
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:89f4ca3e-6e86-e6ce-6900-c031f30f6556 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A3B2:3E0D60:3EDC1D3:56D9455:6A4F4F0B |
| html-safe-nonce | 06e8e3aedf0b312b32d9c9d84e766776fc8437c81c4930816830bc5f0a1097eb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBM0IyOjNFMEQ2MDozRURDMUQzOjU2RDk0NTU6NkE0RjRGMEIiLCJ2aXNpdG9yX2lkIjoiNDQyMDQ3MzY2Mzg3NjE4OTk2MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c95a7c79147c498679c7d967714c0f83b9bedfc567e72ee919fbb65c9eaba9ce |
| hovercard-subject-tag | pull_request:3942640683 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/flashcatcloud/flashduty-cli/pull/68/files |
| twitter:image | https://avatars.githubusercontent.com/u/9045284?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/9045284?s=400&v=4 |
| og:image:alt | Two token-efficiency fixes surfaced by /audit-ai-sre-sessions (audit run audit-2026-06-26). Both touch files kept byte-identical with their embedded copies in fc-safari (logic/runtime/bootstrap/ski... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/flashcatcloud/flashduty-cli git https://github.com/flashcatcloud/flashduty-cli.git |
| octolytics-dimension-user_id | 90465697 |
| octolytics-dimension-user_login | flashcatcloud |
| octolytics-dimension-repository_id | 1209147161 |
| octolytics-dimension-repository_nwo | flashcatcloud/flashduty-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1209147161 |
| octolytics-dimension-repository_network_root_nwo | flashcatcloud/flashduty-cli |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4b249b445842943ed31549e027f57a8ade9881ed |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width