Bound oversized list output; route usage/quota and notification-count questions in the skill index - #179
Merged
Conversation
…in the domain index Extend the SKILL.md Domain index so question types it previously did not cover resolve to a card (or an explicit no-CLI answer) instead of a --help sweep: - usage/quota/billing 额度/用量/计费: route per product — RUM session usage/quota to reference/rum.md resource-info (free_cnt/used_cnt, session_limit_reached, billing window); AI-SRE token usage to safari session-list (token_usage is the account-billing source of truth); anything else (e.g. 语音通知额度) has no CLI verb — point to the console 费用中心 instead of sweeping --help. - per-person notification counts 通知次数: route to insight responder (total_notifications); note that per-person delivery outcome detail is incident timeline i_notify entries (person_id + failed_reason only — there is no answer/接通 field). - add aggregated-metrics (insight) vs raw-feed (incident timeline) disambiguation terms (通知量 / 通知明细) to the existing insight and incident rows, plus a matching line in insight.md's Route-here block.
…insight incidents Generated list verbs printed their full response as unbounded dense JSON/TOON; a large page could dump tens of kilobytes in one shot. Route their structured output through the existing bounding machinery (boundProjectedList, 16 KiB limit, stderr note) already used by the curated incident/alert/alert-event projections: - printGenericResult measures the encoded payload; anything under the limit takes the pre-existing printer path, byte-identical. Over-cap list payloads — a top-level object array, or an items/docs/list envelope whose siblings are scalar pagination metadata (the shape cligen's listEnvelope recognizes) — are reduced to the leading rows that fit, with envelope keys kept and the reduction announced on stderr. A single oversized row is shortened with "..." markers instead; identifier fields are never shortened. - The typed response reaches the bounding machinery through a JSON round trip that decodes numbers as json.Number before narrowing to int64/float64, so integer IDs above 2^53 (channel_id, team_id, ...) keep full precision in bounded output. Rows inside an envelope are re-fit against the limit minus the observed envelope overhead, so the whole printed payload lands under it. - Detail-shaped single objects are never reduced or rejected. Curated insight incidents gains the incident-list treatment in json/toon mode: a compact default projection (incident_id,title,severity,channel_name,seconds_to_ack,seconds_to_close,notifications) with a stderr note, a --fields flag to choose a different projection, and the same bounding. Table mode is unchanged. Tests: stub-driven end-to-end coverage for the bounded envelope and top-level-array paths, >2^53 ID precision, oversized-detail passthrough, and the single-row shorten path; insight incidents projection, --fields override, bounding, and unchanged table output.
docs(skill): route usage/quota and per-person notification questions in the domain index
Bound oversized structured list output from generated list verbs and insight incidents
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release of two merged changes:
--helpacross command groups.insight incidentsnow bound oversized structured output to the existing 16 KiB limit with a stderr note; under-cap output is byte-identical.Both PRs passed full CI (build ×3 platforms, lint, CodeQL) before merging into this branch.