René's URL Explorer Experiment


Title: feat(cli): add --fields projection to incident/alert list by ysyneu · Pull Request #58 · flashcatcloud/flashduty-cli · GitHub

Open Graph Title: feat(cli): add --fields projection to incident/alert list by ysyneu · Pull Request #58 · flashcatcloud/flashduty-cli

X Title: feat(cli): add --fields projection to incident/alert list by ysyneu · Pull Request #58 · flashcatcloud/flashduty-cli

Description: What Add an additive --fields flag to the curated incident list and alert list commands. In structured (--output-format json|toon / --json) mode, --fields a,b,c projects each row to only the named JSON-tagged fields via one shared reflection helper (internal/cli/fieldproject.go::projectFields), so the first list call is already compact. Default behavior (no --fields) is byte-identical to today — the full nested record still dumps. Regression-tested. --fields is a no-op in table mode (documented in flag help). Unknown field names fail fast, listing the valid tag names for the row type. Projected values keep their original typed value (e.g. flashduty.Timestamp), so per-field encoding stays byte-consistent with the full dump. Examples: fduty alert list --fields alert_id,title,alert_severity,created_at --output-format toon fduty incident list --fields incident_id,title,incident_severity,progress,start_time --json Root cause In structured mode the curated compact column set (cols []output.Column) passed to ctx.PrintList is completely ignored — TOONPrinter/JSONPrinter marshal the whole nested SDK struct (IncidentInfo/AlertItem with responders, alerts, labels, incident, events blobs). So the agent's first incident list/alert list dump is huge and pure waste: it spills to a file and is then immediately re-queried with a narrower jq projection (which even failed in one session because jq isn't installed in the sandbox). --fields lets the FIRST call be compact: no spill, no jq. Evidence (audit run audit-2026-06-23) All 6 cited oversized findings are the first full dump being waste: sess_CAikSKGN2GFsHh6nYsXQw6 — 83.7KB / 2593 lines for 66 alerts; re-queried with jq (jq absent in sandbox). sess_7BvVWNcaRcCmw8DykPSaki — 69.7KB for 20 incidents. sess_H3xYYtxVpEpXNFUgDAMem9 — 52KB + 67KB dumps. sess_8mJca7nB7gCcsGUHLQgwQz — 60.4KB never used. Scope Deliberately out of scope (per the design's "do not stretch" rule): the proposal's --count/group-by summary mode (a mini query engine with unsettled design surface), nested/dotted field paths, and any change to the generated command layer or the internal/output printers. The default path is untouched end-to-end. Verification $ env -u GOROOT go build ./... # exit 0 $ env -u GOROOT go test ./... # all packages ok ok github.com/flashcatcloud/flashduty-cli/cmd/flashduty ok github.com/flashcatcloud/flashduty-cli/internal/cli ok github.com/flashcatcloud/flashduty-cli/internal/output ... (all green) $ env -u GOROOT go vet ./internal/cli/ # clean New tests in internal/cli/fieldproject_test.go drive the real command via the newGFStub harness: Default-unchanged regression (conductor constraint): no --fields under toon and json still emits the full nested keys (responders/labels for incident, events/incident for alert). Projection: toon + json emit exactly the requested keys and drop the rest (json asserted structurally via json.Unmarshal — exactly N keys). Table-mode ignore: --fields is a no-op; normal headers still print. Unknown field: errors with the offending name. Note: make lint fails in this environment due to a pre-existing toolchain mismatch (installed golangci-lint v2.2.1 built with go1.24 refuses a module targeting go1.25.1) — unrelated to this change; gofmt -s and gci are clean on the touched files.

Open Graph Description: What Add an additive --fields flag to the curated incident list and alert list commands. In structured (--output-format json|toon / --json) mode, --fields a,b,c projects each row to only the named ...

X Description: What Add an additive --fields flag to the curated incident list and alert list commands. In structured (--output-format json|toon / --json) mode, --fields a,b,c projects each row to only the named ...

Opengraph URL: https://github.com/flashcatcloud/flashduty-cli/pull/58

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:12955267-10ea-b70f-fe73-571cb6f8af6d
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD16C:2D8184:5A0B2C:82FEFB:6A4E0B52
html-safe-nonce40090d3ee9be867d55f94a0a4532be5498cd7e5a7bfadf380cd7f8d090289bec
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTZDOjJEODE4NDo1QTBCMkM6ODJGRUZCOjZBNEUwQjUyIiwidmlzaXRvcl9pZCI6IjU2ODEyOTEwODIwMzUyMzU2NjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacfe3bcb75d07b22a4bd41a6d8ef8a1c2d2bf64585050121ec4c0913c8ab27d9f9
hovercard-subject-tagpull_request:3918322877
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/flashcatcloud/flashduty-cli/pull/58/files
twitter:imagehttps://avatars.githubusercontent.com/u/9045284?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/9045284?s=400&v=4
og:image:altWhat Add an additive --fields flag to the curated incident list and alert list commands. In structured (--output-format json|toon / --json) mode, --fields a,b,c projects each row to only the named ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonedf0492960db29b4938cb72070351d6b1d0c6c0767b27ceb8394bbf4fcc0223c6
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/flashcatcloud/flashduty-cli git https://github.com/flashcatcloud/flashduty-cli.git
octolytics-dimension-user_id90465697
octolytics-dimension-user_loginflashcatcloud
octolytics-dimension-repository_id1209147161
octolytics-dimension-repository_nwoflashcatcloud/flashduty-cli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1209147161
octolytics-dimension-repository_network_root_nwoflashcatcloud/flashduty-cli
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release51470c353b8a1f52a88d3e3cc2014b17ab8cc1ce
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/flashcatcloud/flashduty-cli/pull/58/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fflashcatcloud%2Fflashduty-cli%2Fpull%2F58%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fflashcatcloud%2Fflashduty-cli%2Fpull%2F58%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=flashcatcloud%2Fflashduty-cli
Reloadhttps://github.com/flashcatcloud/flashduty-cli/pull/58/files
Reloadhttps://github.com/flashcatcloud/flashduty-cli/pull/58/files
Reloadhttps://github.com/flashcatcloud/flashduty-cli/pull/58/files
Please reload this pagehttps://github.com/flashcatcloud/flashduty-cli/pull/58/files
flashcatcloud https://github.com/flashcatcloud
flashduty-clihttps://github.com/flashcatcloud/flashduty-cli
Notifications https://github.com/login?return_to=%2Fflashcatcloud%2Fflashduty-cli
Fork 2 https://github.com/login?return_to=%2Fflashcatcloud%2Fflashduty-cli
Star 4 https://github.com/login?return_to=%2Fflashcatcloud%2Fflashduty-cli
Code https://github.com/flashcatcloud/flashduty-cli
Issues 0 https://github.com/flashcatcloud/flashduty-cli/issues
Pull requests 0 https://github.com/flashcatcloud/flashduty-cli/pulls
Actions https://github.com/flashcatcloud/flashduty-cli/actions
Projects https://github.com/flashcatcloud/flashduty-cli/projects
Security and quality 0 https://github.com/flashcatcloud/flashduty-cli/security
Insights https://github.com/flashcatcloud/flashduty-cli/pulse
Code https://github.com/flashcatcloud/flashduty-cli
Issues https://github.com/flashcatcloud/flashduty-cli/issues
Pull requests https://github.com/flashcatcloud/flashduty-cli/pulls
Actions https://github.com/flashcatcloud/flashduty-cli/actions
Projects https://github.com/flashcatcloud/flashduty-cli/projects
Security and quality https://github.com/flashcatcloud/flashduty-cli/security
Insights https://github.com/flashcatcloud/flashduty-cli/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fflashcatcloud%2Fflashduty-cli%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fflashcatcloud%2Fflashduty-cli%2Fissues%2Fnew%2Fchoose
ysyneuhttps://github.com/ysyneu
feat/ai-srehttps://github.com/flashcatcloud/flashduty-cli/tree/feat/ai-sre
audit-fix/audit-2026-06-23-audit-cli-list-fields-projectihttps://github.com/flashcatcloud/flashduty-cli/tree/audit-fix/audit-2026-06-23-audit-cli-list-fields-projecti
Conversation 0 https://github.com/flashcatcloud/flashduty-cli/pull/58
Commits 2 https://github.com/flashcatcloud/flashduty-cli/pull/58/commits
Checks 12 https://github.com/flashcatcloud/flashduty-cli/pull/58/checks
Files changed https://github.com/flashcatcloud/flashduty-cli/pull/58/files
Please reload this pagehttps://github.com/flashcatcloud/flashduty-cli/pull/58/files
feat(cli): add --fields projection to incident/alert list https://github.com/flashcatcloud/flashduty-cli/pull/58/files#top
Show all changes 2 commits https://github.com/flashcatcloud/flashduty-cli/pull/58/files
bdddc1a feat(cli): add --fields projection to incident/alert list (json/toon) ysyneu Jun 23, 2026 https://github.com/flashcatcloud/flashduty-cli/pull/58/commits/bdddc1aecdf6137073a542a15f536f2c0819eb54
61feb1d fix(skilldoc): regenerate incident/alert cards for --fields flag ysyneu Jun 23, 2026 https://github.com/flashcatcloud/flashduty-cli/pull/58/commits/61feb1defc906da9d41def7f3755cb997e4e61ed
Clear filters https://github.com/flashcatcloud/flashduty-cli/pull/58/files
Please reload this pagehttps://github.com/flashcatcloud/flashduty-cli/pull/58/files
Please reload this pagehttps://github.com/flashcatcloud/flashduty-cli/pull/58/files
alert.go https://github.com/flashcatcloud/flashduty-cli/pull/58/files#diff-1902e77c61cabce3fc3fd434b1f20008128a8c7d6a5cb19ba972db850f54daca
fieldproject.go https://github.com/flashcatcloud/flashduty-cli/pull/58/files#diff-c7439ff3205d23c539af45bf6a0dd67f8d68d397a07f1e9831e3df90ea659ec6
fieldproject_test.go https://github.com/flashcatcloud/flashduty-cli/pull/58/files#diff-5f6ec137b5a2f8a47a41abe04655328df39a6abc8837c9084de0fdca9d99fcb4
incident.go https://github.com/flashcatcloud/flashduty-cli/pull/58/files#diff-05c2f8bcfb40153901db33fffe61e61b1297cb7217770f125ba989cd7f45aff2
alert.md https://github.com/flashcatcloud/flashduty-cli/pull/58/files#diff-a83c45a7f9acfdb77bc28517e833842ef9c0358c309902f428fc77559a826caf
incident.md https://github.com/flashcatcloud/flashduty-cli/pull/58/files#diff-b2451abfd7cb0daea6cda3ca7d433b08b9b439d3f50686e31751a3ac32acac0a
internal/cli/alert.gohttps://github.com/flashcatcloud/flashduty-cli/pull/58/files#diff-1902e77c61cabce3fc3fd434b1f20008128a8c7d6a5cb19ba972db850f54daca
View file https://github.com/flashcatcloud/flashduty-cli/blob/61feb1defc906da9d41def7f3755cb997e4e61ed/internal/cli/alert.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/flashcatcloud/flashduty-cli/pull/58/{{ revealButtonHref }}
https://github.com/flashcatcloud/flashduty-cli/pull/58/files#diff-1902e77c61cabce3fc3fd434b1f20008128a8c7d6a5cb19ba972db850f54daca
https://github.com/flashcatcloud/flashduty-cli/pull/58/files#diff-1902e77c61cabce3fc3fd434b1f20008128a8c7d6a5cb19ba972db850f54daca
https://github.com/flashcatcloud/flashduty-cli/pull/58/files#diff-1902e77c61cabce3fc3fd434b1f20008128a8c7d6a5cb19ba972db850f54daca
https://github.com/flashcatcloud/flashduty-cli/pull/58/files#diff-1902e77c61cabce3fc3fd434b1f20008128a8c7d6a5cb19ba972db850f54daca
https://github.com/flashcatcloud/flashduty-cli/pull/58/files#diff-1902e77c61cabce3fc3fd434b1f20008128a8c7d6a5cb19ba972db850f54daca
internal/cli/fieldproject.gohttps://github.com/flashcatcloud/flashduty-cli/pull/58/files#diff-c7439ff3205d23c539af45bf6a0dd67f8d68d397a07f1e9831e3df90ea659ec6
View file https://github.com/flashcatcloud/flashduty-cli/blob/61feb1defc906da9d41def7f3755cb997e4e61ed/internal/cli/fieldproject.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/flashcatcloud/flashduty-cli/pull/58/{{ revealButtonHref }}
internal/cli/fieldproject_test.gohttps://github.com/flashcatcloud/flashduty-cli/pull/58/files#diff-5f6ec137b5a2f8a47a41abe04655328df39a6abc8837c9084de0fdca9d99fcb4
View file https://github.com/flashcatcloud/flashduty-cli/blob/61feb1defc906da9d41def7f3755cb997e4e61ed/internal/cli/fieldproject_test.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/flashcatcloud/flashduty-cli/pull/58/{{ revealButtonHref }}
Please reload this pagehttps://github.com/flashcatcloud/flashduty-cli/pull/58/files
Please reload this pagehttps://github.com/flashcatcloud/flashduty-cli/pull/58/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.