Skip to content

fix(cli): use canonical error documentation URLs - #70

Merged
robinbraemer merged 4 commits into
mainfrom
fm/akua-cli-error-doc-domain-f7
Jul 13, 2026
Merged

fix(cli): use canonical error documentation URLs#70
robinbraemer merged 4 commits into
mainfrom
fm/akua-cli-error-doc-domain-f7

Conversation

@robinbraemer

@robinbraemer robinbraemer commented Jul 12, 2026

Copy link
Copy Markdown
Member

Intent

Fix every Akua CLI structured error documentation URL to use https://cli.akua.dev/errors/ from one authoritative crates/akua-core base, with real human and JSON lint regression coverage, all-known-code coverage, SDK generated schema and type propagation, CLI contract documentation, generated error-site canonical and OpenGraph exact routes, and Pages path triggers that redeploy when the authoritative error contract changes. Keep legitimate https://akua.dev product, dashboard, API, logo, and unrelated links unchanged; update only PR 70 and do not deploy or merge.

What Changed

  • Centralize structured-error documentation URLs on https://cli.akua.dev/errors/<CODE> and propagate them through human/JSON CLI output, SDK artifacts, and CLI documentation.
  • Generate canonical and OpenGraph metadata for every known error route, add missing hosted API error pages, and redeploy Pages when the authoritative error contract changes.
  • Add CLI, core, SDK, and generator regression coverage, and refresh the committed site output and repository guidance.

Risk Assessment

✅ Low: The change is well-bounded, the prior dead documentation route is now consistently mapped to the existing E_INPUTS_PARSE code, and no material risks were found in the full base-to-target review.

Testing

After correcting initial missing-dependency and disk-space setup failures, focused core, CLI, SDK generation/schema, static-site generation, direct binary, and rendered-browser checks all passed; the evidence shows canonical human/JSON URLs and exact page metadata, with a clean worktree afterward.

Evidence: CLI human and JSON error transcript
$ AKUA_NO_AGENT_DETECT=1 akua lint
error[E_PACKAGE_MISSING]: ./package.k not found
  at ./package.k
  docs: https://cli.akua.dev/errors/E_PACKAGE_MISSING
[exit 1]

$ AKUA_NO_AGENT_DETECT=1 akua lint --json
{"level":"error","code":"E_PACKAGE_MISSING","message":"./package.k not found","path":"./package.k","docs":"https://cli.akua.dev/errors/E_PACKAGE_MISSING"}
[exit 1]
- Evidence: Generated E_PACKAGE_MISSING documentation page (local file: /var/folders/1y/cjgf53nj31n_dxsspqnjfjvc0000gn/T/no-mistakes-evidence/01KXB3V7A414R7AECFFN0J1MJN/error-page-E_PACKAGE_MISSING.png)
Evidence: Rendered page metadata

canonical: https://cli.akua.dev/errors/E_PACKAGE_MISSING&#10;og:url: https://cli.akua.dev/errors/E_PACKAGE_MISSING

Generated page: site/errors/E_PACKAGE_MISSING.html
Rendered title: E_PACKAGE_MISSING — akua
canonical: https://cli.akua.dev/errors/E_PACKAGE_MISSING
og:url: https://cli.akua.dev/errors/E_PACKAGE_MISSING

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 1 issue found → auto-fixed ✅
  • ⚠️ docs/cli-contract.md:28 - This example points to E_SCHEMA_INVALID, but that code is absent from codes.rs and no corresponding error page is generated, so the documented URL will return 404 after deployment. Use an existing code and update the mirrored Rust tests, or add E_SCHEMA_INVALID to the official inventory if it is intentional.

🔧 Fix: fix CLI contract inputs error documentation route
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • cargo test -p akua-core cli_contract::error::tests:: (initial environment failure: disk exhausted during default-feature compilation)
  • cargo test -p akua-core --no-default-features cli_contract::error::tests::
  • bun test packages/sdk/src/standard-schema.test.ts (initial setup failure, then passed after bun install --frozen-lockfile)
  • bun scripts/gen-error-pages.ts
  • cargo test -p akua-cli --no-default-features --features oci-fetch,cosign-verify,dev-watch --test cli_integration lint_missing_package
  • TS_RS_EXPORT_DIR=packages/sdk/src/types cargo test -p akua-core --no-default-features --features ts-export --lib export_bindings
  • TS_RS_EXPORT_DIR=packages/sdk/src/types cargo test -p akua-cli --no-default-features --features oci-fetch,cosign-verify,dev-watch,schema-export,ts-export --lib export_bindings
  • cargo test -p akua-cli --no-default-features --features oci-fetch,cosign-verify,dev-watch,schema-export,ts-export --test export_sdk_bundle
  • git diff --exit-code -- packages/sdk/src/types packages/sdk/src/schemas site/errors
  • AKUA_NO_AGENT_DETECT=1 target/debug/akua lint from an empty workspace
  • AKUA_NO_AGENT_DETECT=1 target/debug/akua lint --json from an empty workspace
  • Served site/ locally, rendered E_PACKAGE_MISSING.html in Chrome, captured a screenshot, and inspected canonical plus OpenGraph URLs
  • Confirmed the worktree remained clean and removed transient target/ and node_modules/ directories
✅ **Document** - passed

✅ No issues found.

🔧 **Lint** - 1 issue found → auto-fixed ✅
  • ⚠️ Configured Cargo Clippy could not complete because the filesystem ran out of space during compilation; no Rust lint result is available.

🔧 Fix: Verify formatting and static analysis clean
✅ Re-checked - no issues remain.

✅ **Push** - passed

✅ No issues found.

@robinbraemer
robinbraemer merged commit 25ee8f7 into main Jul 13, 2026
2 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.

1 participant