docs(status-page): correct the command names in the README and e2e tests - #153
Merged
Conversation
The status page group is registered as `status-page`, but the README and the
e2e suite still used `statuspage` with subcommands (`changes`,
`create-incident`, `create-timeline`, space-separated `migrate ...`) and a
`--id` flag that never existed. Anyone following them — a person or an agent
reading the docs — got "unknown command".
Corrected against the registrations in zz_generated_status_pages.go, and
documented the two things that trip up a first call: `change-create` takes
page-id as a positional that overrides the `--data` key, and the required
`updates` array has no flag, so every real call carries `--data` (or
`--data -` to read the body from stdin).
The e2e suite is behind the e2e build tag and skips without an app key, so
it was not failing CI, but it was broken in both directions: the positive
tests could not have passed, and the negative ones passed for the wrong
reason — asserting a validation error while actually getting "unknown
command". Two further defects surfaced while fixing them: the list helpers
unmarshalled a top-level array where the CLI prints an {"items":[...]}
envelope, and the header assertion named columns the reflective heuristic
never emits.
Two tests had no valid replacement verb and were retargeted rather than
deleted: `list` has no --id filter, so single-page lookup became
`status-page info`, and the invalid-id case moved to `change-active-list`.
The generated fences and the flashduty skill card were already correct and
are untouched.
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
The status page group is registered as
status-page, but the README and the e2e suite still usedstatuspage, with subcommands (changes,create-incident,create-timeline, space-separatedmigrate ...) and a--idflag that never existed. Anyone following them — a person, or an agent reading the docs — gotunknown command.Everything here is corrected against the registrations in
internal/cli/zz_generated_status_pages.go. No generated file is touched.The two things that trip up a first call
Both are now documented explicitly:
change-createtakes<page-id>as a required positional that overrides thepage_idkey inside--data.updatesarray (with its nestedcomponent_changes) has no flag, so every realchange-createcarries a--datapayload.--data -reads the whole body from stdin.e2e
The suite is behind the
e2ebuild tag and skips withoutFLASHDUTY_E2E_APP_KEY, so it was not failing CI — but it was broken in both directions. The positive tests could not have passed, and the negative ones passed for the wrong reason: asserting a validation error while actually gettingunknown command.Two further defects surfaced while fixing them:
printGenericResultemits an{"items":[...]}envelope;status-page listhas nodisplayColumns, so it takes the first 8 scalar fields).Two tests had no valid replacement verb and were retargeted rather than deleted:
listhas no--idfilter, so single-page lookup becamestatus-page info, and the invalid-id case moved tochange-active-list.Every rewritten negative assertion was verified against the real binary and fails locally with no network.
Checks
go build ./...,go test ./...(9/9),go vet -tags e2e ./e2e/...,gofmt -l,golangci-lint run(0 issues),go run ./internal/cmd/skilldoc check(cards OK) — all clean.Context
Part of the AI-SRE status page drafting work: the agent drafts a status page update and a human publishes it. The skill card the agent reads was already correct; these docs were the stale copy alongside it.