Skip to content

docs(site): shipkeep.yml reference generated from the JSON Schema (part of #246) - #432

Merged
samuelmbabhazi merged 11 commits into
mainfrom
docs/246-config-reference
Nov 23, 2026
Merged

samuelmbabhazi merged 11 commits into
mainfrom
docs/246-config-reference

Conversation

@samuelmbabhazi

Copy link
Copy Markdown
Collaborator

Part of #246: the shipkeep.yml reference of the documentation site, generated from the JSON Schema. Stacked on #430. Merge it after #431: the page says that some fields are refused, which is true only once #431 is merged.

What changed

  • tools/gen/config-reference.mjs writes apps/docs/src/content/docs/reference/shipkeep-yml.md from packages/config-schema/shipkeep.schema.json.
    • It runs with pnpm gen:config. The "Generated code is up to date" job then fails when the page is stale, and the page is never edited by hand. Prettier leaves it alone.
    • Each field gets its type, bounds, pattern, whether it is required, and the schema's description.
  • What the control plane does with a field is not in the schema, so the generator holds two short lists:
    • DEFAULTS: the values the pipeline uses when a field is left out, such as health check interval 5s, one replica, spread node, release timeout 10m, drain 30s (at most 5m), and the default resources.
    • NOTES:
    • The generator's header says to keep both lists in step with UNAPPLIED and the pipeline.
  • ADR 0027 says that this reference is generated, and that the CLI reference will follow the same way.
  • The Reference group in the sidebar.

How it was tested

  • pnpm gen:config runs clean, and the output is the same over two runs.
  • nx run docs:build builds 6 pages.
  • eslint on the generator.
  • Each default was read from the pipeline: container-plan.ts, pipeline.ts, placement.ts and DEFAULT_RESOURCES.

Security considerations

Documentation only. The generator reads the schema and writes one Markdown file.

apps/docs builds static pages with the landing page's look, and copies docs/INSTALL.md in at build time so that the installation guide stays written once. Part of #246.

Signed-off-by: samuel mbabhazi <[email protected]>
tools/gen/config-reference.mjs runs with pnpm gen:config, so CI checks that the page is current. It marks the fields the control plane refuses until they are applied (#431) and the defaults it uses. Part of #246.

Signed-off-by: samuel mbabhazi <[email protected]>
@samuelmbabhazi samuelmbabhazi added documentation Improvements or additions to documentation v0.1-stable In the scope of the first stable version (docs/PLAN.md) labels Nov 23, 2026
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 37 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between c802ba9 and ff73df0.

Files ignored due to path filters: 1

  • tools/gen/config-reference.mjs is excluded by !**/gen/**
Files selected for processing: 5

  • .prettierignore
  • apps/docs/astro.config.mjs
  • apps/docs/src/content/docs/reference/shipkeep-yml.md
  • docs/adr/0027-documentation-site.md
  • package.json
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Nx infers lint and typecheck for apps/docs. Both need the types astro sync generates, so they now depend on a sync target; the site gets its own tsconfig.json and ESLint config, which ignore .astro and dist.

Signed-off-by: samuel mbabhazi <[email protected]>
…n-site

Signed-off-by: samuel mbabhazi <[email protected]>

# Conflicts:
#	pnpm-lock.yaml
…the CLI identifiers in step 5

Signed-off-by: samuel mbabhazi <[email protected]>
@samuelmbabhazi
samuelmbabhazi changed the base branch from docs/246-documentation-site to main November 23, 2026 17:55
…ence

Signed-off-by: samuel mbabhazi <[email protected]>

# Conflicts:
#	.prettierignore
#	apps/docs/astro.config.mjs
#	docs/adr/0027-documentation-site.md
@samuelmbabhazi
samuelmbabhazi merged commit 0ead38b into main Nov 23, 2026
25 checks passed
@samuelmbabhazi
samuelmbabhazi deleted the docs/246-config-reference branch November 23, 2026 18:06
samuelmbabhazi added a commit that referenced this pull request Nov 23, 2026
…246) (#434)

Part of #246: the CLI reference of the documentation site, generated
from the CLI's own help. Stacked on #432.

## What changed

- **One list of commands.** `commands.Commands` holds each command's
name, positional arguments and one-line summary, and the usage text is
built from it. The usage text stays the same, except that `logout` now
says "Forget the saved address and token on this machine": "Forget them"
made sense only right after `login`.
- **`reference_test.go`** renders
`apps/docs/src/content/docs/reference/cli.md`:
- It runs each command with `-h`, with no environment variable, and
keeps what the CLI prints. The page cannot list a flag the CLI does not
have, nor a default it does not use.
- Flags are shown with two dashes, as the rest of the docs write them;
the CLI accepts both.
- The intro covers the platforms of the release archives
(`.goreleaser.yaml`), the token never being a flag, the environment
variables, the identifiers, and the exit statuses 0, 1 and 2.
- **`pnpm gen:cli-reference`** (part of `pnpm gen`) writes the page with
`SHIPKEEP_UPDATE_REFERENCE=1`. Without that variable, the same test
fails when the committed page is stale, so both the Go tests and the
"Generated code is up to date" job catch drift.
- The **Reference** group of the sidebar gets **CLI**.

## How it was tested

- `go test ./cli/...` and `golangci-lint run ./cli/...`: 0 issues.
- The generated page passes its own test.
- `nx run docs:build` builds 7 pages.

## Security considerations

- No behavior change in the CLI beyond one summary line.
- The test runs each command with `-h`, which returns before any network
call or prompt.

---------

Signed-off-by: samuel mbabhazi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation v0.1-stable In the scope of the first stable version (docs/PLAN.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant