Skip to content

docs(status-page): correct the command names in the README and e2e tests - #153

Merged
ysyneu merged 1 commit into
mainfrom
feat/statuspage-ai-draft
Aug 20, 2026
Merged

docs(status-page): correct the command names in the README and e2e tests#153
ysyneu merged 1 commit into
mainfrom
feat/statuspage-ai-draft

Conversation

@debidong

Copy link
Copy Markdown
Collaborator

What

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.

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-create takes <page-id> as a required positional that overrides the page_id key inside --data.
  • the required updates array (with its nested component_changes) has no flag, so every real change-create carries a --data payload. --data - reads the whole body from stdin.

e2e

The suite is behind the e2e build tag and skips without FLASHDUTY_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 getting unknown command.

Two further defects surfaced while fixing them:

  • the list helpers unmarshalled a top-level array, but printGenericResult emits an {"items":[...]} envelope;
  • the header assertion named columns the reflective heuristic never emits (status-page list has no displayColumns, so it takes the first 8 scalar fields).

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.

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.

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.
@ysyneu
ysyneu merged commit e64c7cf into main Aug 20, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants