Skip to content

Spec lint, portability matrix and spec-plan; camelCase spec keys now honoured; golden renderer tests; dependency upgrades - #17

Merged
ssahani merged 7 commits into
mainfrom
feat/spec-lint-portability-plan-upgrades
Nov 23, 2026
Merged

ssahani merged 7 commits into
mainfrom
feat/spec-lint-portability-plan-upgrades

Conversation

@ssahani

@ssahani ssahani commented Nov 23, 2026

Copy link
Copy Markdown
Member

Summary

  • aether lint (src/speclint.rs): line-numbered diagnostics with unknown-key 'did you mean' hints, label and annotation validation, control-character checks, and input guards (1 MiB, more than 16 YAML aliases, over 200,000 nodes, nesting over 48).
  • aether portability (src/portability.rs): a per-field matrix of what Podman, Kubernetes and KubeVirt honour, derived from what the adapters read. It was derived by reading the adapters plus grep counts and was not checked against a live runtime: treat it as best-effort until reviewed.
  • aether spec-plan OLD [NEW] --detailed-exit-code (src/specplan.rs): shows the effect of an edit per runtime (no effect, in-place, rolling restart, replace), redacts secret-looking values and escapes control characters.
  • API: POST /api/spec/lint, /api/spec/portability and /api/spec/plan. Golden tests for the Kubernetes Deployment/Service and the KubeVirt VM (AETHER_UPDATE_GOLDEN=1 regenerates). Hostile-input tests cover malformed YAML, alias bombs, oversized specs, label injection, forged output lines and golden-name path traversal. Docs: docs/guides/spec-tools.md, CLI reference entries, the mkdocs nav, a CLAUDE.md pattern line (and the test count updated to 1,268), docs/RESEARCH.md.

Behaviour changes: please read (bugs the linter surfaced)

  • Documented camelCase keys were silently ignored. network.serviceType and networkPolicy, build.buildArgs, config.configMaps/envFrom and ingress.paths[].pathType (and similar) were deserialised from snake_case only, while the schema, docs and shipped examples all use camelCase; for example serviceType: NodePort rendered a ClusterIP Service. The structs now use camelCase and keep snake_case aliases, so older specs still load, but rendered output changes for specs that set these keys.
  • kubernetes.rolloutStrategy.type was ignored (a type: Recreate had no effect); it is now read as documented. The stale sample workload-kubevirt.yaml used keys that do not exist and was rewritten. Dockerfile.aether was missing the libssl3t64 runtime library. Discovery timestamps from kube/k8s-openapi now end in Z instead of +00:00.

Upgrades (many majors)

  • Kubernetes stack: kube 0.97 to 5.1, k8s-openapi 0.23 to 0.29 (spec fields are no longer Option), tower 0.4 to 0.5, tower-http 0.5 to 0.7, axum 0.7 to 0.8 (route paths now use /{name}; the old /:name form would panic at router build), axum-server 0.7 to 0.9. TUI: ratatui 0.29 to 0.30, crossterm 0.28 to 0.29. Observability: opentelemetry, opentelemetry_sdk and opentelemetry-otlp 0.27 to 0.33, tracing-opentelemetry 0.28 to 0.34 (provider shutdown rewired). Crypto: the RustCrypto 0.11 generation together (sha2, aes-gcm, aes, cbc, rsa 0.10, ed25519-dalek 3), jsonwebtoken 9 to 12 (with rust_crypto), rand 0.8 to 0.10; a hexfmt::hex_lower helper replaces {:x} on sha2 0.11 digests; the SAML encrypt/decrypt round-trips and the secrets tests pass after the upgrade. Other: redis 0.27 to 1.8, ldap3 0.12 (with tls-rustls-ring, to keep the repo's ring preference), x509-parser 0.18, which 8, dirs 7, colored 3, indicatif 0.18, comfy-table 8, prometheus 0.14, base64 0.23, plus in-range updates (tokio 1.54, clap 4.6).
  • Dashboard npm: react and react-dom 19, react-router 8, vite 8, @vitejs/plugin-react 6, vitest 5, lucide-react 1, typescript 7, plus in-range bumps; lockfile kept. Docker: Dockerfile.aether builds on rust:1.100-slim-trixie and runs on debian:trixie-slim; Dockerfile uses debian:trixie-slim with libssl3t64 (tags verified via the Docker Hub API; images not built). Actions: checkout v7, setup-node v7, setup-python 3.14, upload-artifact v7, download-artifact v8, build-push v7, buildx v4, login v4, metadata v6, action-gh-release v3, codecov v7 (each checked against the repo's latest release); the archived actions-rs/toolchain is replaced by dtolnay/rust-toolchain@stable; Node pins 20 to 24; docs requirement floors mkdocs>=1.6.1 and mkdocs-material>=9.8.
  • Held back (CHANGELOG): reqwest stays at 0.12: openidconnect 4.1 is its latest release and src/oidc.rs passes it a reqwest 0.12 client, so 0.13 does not compile (and would default to rustls with aws-lc-rs); tailwindcss stays at 3 (v4 replaces the PostCSS plugin and config, and the glass theme and hex-surface guard cannot be checked visually without a browser); bitnami/kubectl:latest in the Cilium cronjob (a floating tag) was left alone.

Rejected

Rendered-manifest diff (the renderers are pub(crate) and need an image context); Score/Compose import (aether compose already exists); Crossplane/OAM resource claims (changes the spec's identity); saved plan files (they carry secrets). No TUI surface was added (no spec-centric TUI screen to attach to).

Caveats

  • Research: Score, podman kube play, kompose, kubeconform and terraform plan were read from fetched pages; OAM/KubeVela, Radius, Humanitec, Crossplane, kube-linter, Polaris, Quadlet and Kustomize/Helm are marked [U] (the fetches returned stubs or 404s). aether lint takes line numbers from a block-style YAML indexer; flow-style keys fall back to the nearest block-style ancestor line. The first commit also includes cargo fmt changes in files that had already drifted from rustfmt. requirements.storage and build are exempt from the 'ignored' warning because the schema requires them.
  • Not run: Playwright e2e (needs a browser), Docker builds, anything against a real Podman, Kubernetes or KubeVirt, and mkdocs build --strict (mkdocs is not installed). CI runs cargo test --verbose without --all-features; the agent used --all-features to match clippy.

Testing

cargo fmt --all -- --check; cargo clippy --all-targets --all-features -- -D warnings (re-run on the final tree: clean); cargo test --all-features: 1268 passed, 0 failed (lib 1146 plus the integration tests); the five examples pass aether validate and scripts/validate-schema-examples.sh passes; dashboard npm run build (includes tsc and the hex-surface check), npm test (31 passed) and npm run validate:schema pass. GitHub CI has not run.

🤖 Generated with Claude Code

ssahani and others added 7 commits November 23, 2026 14:10
… to latest majors

kube 5 / k8s-openapi 0.29, axum 0.8, ratatui 0.30, opentelemetry 0.33,
jsonwebtoken 12, rand 0.10, RustCrypto 0.11 generation (sha2, aes-gcm, aes,
cbc, rsa, ed25519-dalek) and more; dashboard React 19 / vite 8 / vitest 5 /
TypeScript 7; trixie base images; current GitHub Actions majors.
Held back: reqwest 0.12 (openidconnect 4.1 needs it) and tailwind 3.
See CHANGELOG.md for the full list.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Tests no longer unwrap the now non-optional k8s-openapi spec fields; jsonwebtoken Validation is built in one expression; drop a redundant borrow.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…rgs and configMaps

NetworkSpec, BuildSpec, ConfigSpec, ConfigMapSpec, SecretSpec, IngressSpec and IngressPath had no camelCase rename, so keys used by the schema, docs and examples were silently ignored. snake_case spellings stay as aliases. Also fixes the stale workload-kubevirt.yaml sample and installs libssl3t64 in the Dockerfile.aether runtime stage.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Line-numbered spec diagnostics with input guards (size, aliases, depth), a per-runtime field support matrix, and an offline Terraform-style plan of a spec edit with per-runtime impact. Adds POST /api/spec/{lint,portability,plan}, docs and tests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Renders shipped examples and compares with tests/golden; AETHER_UPDATE_GOLDEN=1 regenerates.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Covers Score, podman kube play, kompose, kubeconform and terraform plan from fetched pages; other tools are marked unverified.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The field was named strategyType in code but type in the schema and examples, so type: Recreate was ignored. Also refresh the test count in CLAUDE.md and the changelog.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ssahani
ssahani merged commit 0b8bd41 into main Nov 23, 2026
1 of 3 checks passed
@ssahani
ssahani deleted the feat/spec-lint-portability-plan-upgrades branch November 23, 2026 13:55
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