feat(cli): drop transparent curated ID-verb shadows (parity via #50)#51
Merged
Conversation
Drop the curated shadow commands whose generated twins now have full parity after #50 (positional <id> args). genAddLeaf surfaces the generated leaf at the same name once the curated AddCommand is removed. Dropped (same generated name, same SDK endpoint, positional id folds to the *_ids/_id wire field, generated flags ⊇ curated): incident ack POST /incident/ack incident unack POST /incident/unack incident wake POST /incident/wake incident reopen POST /incident/reopen (+--reason, superset) incident disable-merge POST /incident/disable-merge alert merge POST /alert/merge Flag-name delta (for the paired docs migration): alert merge: curated --incident → generated --incident-id (also gains superset --alert-ids/--owner-id/--title) Accepted deltas of converging on the generated single source: - unack/wake/disable-merge lose the curated client-side ≤100-id cap; the backend still enforces it (help: "At most 100 per call"). - alert merge loses MarkFlagRequired("incident"); incident_id stays required server-side. - success line changes from the curated phrase to "OK: POST <path>". validateIncidentIDBatch is kept (still used by comment/remove, which stay curated for their --comment cap / destructive-confirm). Tests: migrated the unit + e2e assertions for the dropped commands to the generated twins' surface; dropped the unack/wake subtests of the 100-id-cap test (that cap is curated-only and intentionally gone).
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.
What
Drops curated shadow commands whose generated twins now have full parity after #50 (positional
<id>args). The mechanism:genAddLeafsurfaces the generated leaf at the same name once the curatedAddCommand(...)is removed (curated registers first viainit()and wins on name-collision; generated is dropped). This continues the convergence on the generated single source.Dropped (parity proven)
Each: generated twin has the same leaf name, the same SDK endpoint +
*Requeststruct, positional<id>folds to the wire id field (#50), and generated flags ⊇ curated.incident ackPOST /incident/ack(Incidents.Ack/AckIncidentRequest)incident_ids(slice, array-wins)--incident-ids(curated had no flags)incident unackPOST /incident/unack(UnackIncidentRequest)incident_ids--incident-idsincident wakePOST /incident/wake(WakeIncidentRequest)incident_ids--incident-idsincident reopenPOST /incident/reopen(ReopenIncidentRequest)incident_ids--incident-ids, +--reason(superset)incident disable-mergePOST /incident/disable-merge(DisableIncidentMergeRequest)incident_ids--incident-idsalert mergePOST /alert/merge(Alerts.WriteMerge/AlertMergeRequest)alert_ids(slice)--incident→--incident-id, +--comment/--alert-ids/--owner-id/--titleFlag-name deltas (CRITICAL — for the paired fc-safari doc migration)
alert merge:--incident(curated) →--incident-id(generated). Also gains superset--alert-ids,--owner-id,--title.incident reopengains a new optional--reasonflag (superset, additive).Accepted behavior deltas of converging on the generated single source
unack/wake/disable-mergelose the curated client-side ≤100-id cap; the backend still enforces it (help: "At most 100 per call").alert mergelosesMarkFlagRequired("incident");incident_idstays required server-side.OK: POST <path>(in--json:{"message":"OK: POST <path>"}).Held back (NOT dropped) + reasons
incident remove— curated has destructive-confirm (--force/ interactive prompt); generated twin has none. Hidden curated-only safety value → KEEP.incident snooze(--durationmin-conversion + validation),incident comment(--comment1024-char cap) — curated-only input semantics → KEEP.incident get/detail(short-id resolve),timeline(per-id/incident/feedfan-out + operator-name enrichment),update(Reset + per-field FieldReset),merge/reassign/add-responder,war-room*— curated-only resolution/defaulting/enrichment → KEEP.alert get/events/timeline— these are renames, not same-name shadows: the generated twins already coexist atalert info/event-list/feed. Do not drop. → recommended for a future generated-ALIAS approach (see below).oncall schedule get(the prompt called this "schedule info") — premise did not hold. The curated command isoncall schedule get(under theoncall schedulegroup), while the generatedschedule infois a top-levelschedulecommand — different path and different name, so there is no shadow relationship and they already coexist. The curatedgetalso carries curated-only value (person-name resolution via/person/infos, formatted detail block, computed-slots table). Dropping it would be a pure destructive removal with no same-path twin → KEEP. (Same class as thealert getrenames; candidate for a future alias.)Rename-via-alias recommendation (not implemented)
For the rename cases (
alert get→info,alert events→event-list,alert timeline→feed, andoncall schedule get↔schedule info), rather than dropping the rich curated command, add a thin alias on the generated leaf (cobraAliases) — or register a curated-name alias pointing at the generated twin — so the familiar name keeps working without duplicating logic. Recommend, don't implement here.Verification
go build -tags=jsoniter ./...clean;go test -tags=jsoniter ./...pass (migrated the unit + e2e assertions for the dropped commands to the generated twins' surface; dropped theunack/wakesubtests of the 100-id-cap test since that cap is curated-only and intentionally gone).help <group> <name>shows theAPI: POST <path>block; no-arg invocation triggers the generatedrequireArgsvalidator).origin/feat/ai-sre(testbacklocalhost:11480): ZERO new failures. Both baseline and after have an identical 80-test failure set, all pre-existingNoLicenseenvironment failures (the testback license gate rejects incident/change/escalation/statuspage APIs regardless of branch).comm -23 after baselineis empty.incident ack <id>reachesPOST /incident/ackon testback (returns the sameNoLicenseenv gate, proving the path is wired through the generated twin).