Skip to content

feat(config): refuse unbound WH_* env and unusable data_dir at boot - #569

Merged
taitelee merged 10 commits into
mainfrom
boot-config-strict
Sep 10, 2026
Merged

taitelee merged 10 commits into
mainfrom
boot-config-strict

Conversation

@taitelee

@taitelee taitelee commented Sep 8, 2026

Copy link
Copy Markdown
Member

Summary

Boot is now the validator for the non-hot-reloadable half of configuration; there is no dry-run subcommand (decided on #530). config.Load refuses to start on a WH_* environment variable that no Config field binds and the binary doesn't otherwise read, naming every offender — the environment half of the strict YAML loader, so WH_DEDUPE_ENABLED=true left over from before the settings-directory move can no longer be set, ignored, and believed. Only the WH_ prefix is checked, since the environment always carries unrelated names.

Right after Load, before the settings directory or ClickHouse are touched, config.CheckDataDir probes that data_dir is a writable directory (or absent under a writable parent, so boot can create it), so a root-owned bind mount refuses boot in the first second of the log with the UID-65532 remediation attached. Docs state that boot is the validator and that wavehouse validate stays the settings-directory dry run only.

Related Issues

Closes #530

@github-actions github-actions Bot added documentation Improvements or additions to documentation go Pull requests that update go code area/docs Documentation, site/, README area/infra CI, build, deploy, Docker, release labels Sep 8, 2026
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: bf146868-e6fe-4d59-b9dd-35c370f2d8db

📥 Commits

Reviewing files that changed from the base of the PR and between 4d64cb2 and 48ffc10.

📒 Files selected for processing (1)
  • internal/config/check.go

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Recent review details
🔇 Additional comments (1)
internal/config/check.go (1)

30-30: LGTM!


📝 Summary

Summary by CodeRabbit

  • New Features

    • Startup now rejects unrecognized WH_* environment variables and undeclared configuration keys.
    • Startup verifies that data_dir is non-empty, usable, and writable before proceeding.
    • Configuration errors provide clearer remediation guidance for inaccessible storage locations.
    • Documentation build controls now use DOCS_SKIP_DIAGRAM_PNG.
  • Documentation

    • Expanded configuration, deployment, architecture, and settings guidance for strict validation and boot-time checks.
    • Documented wavehouse validate, restart requirements, Kubernetes service-link considerations, and upgrade checks.
    • Added changelog coverage for startup validation behavior.

Walkthrough

Boot configuration now rejects unbound WH_* variables and checks data_dir writability before startup network operations. Startup uses exported environment constants. Tests, documentation, deployment guidance, and shared permission text were updated.

Changes

Boot Configuration Validation

Layer / File(s) Summary
Config validation and tests
internal/config/config.go, internal/config/check.go, internal/config/check_test.go
The config package validates WH_* bindings and data_dir usability. Tests cover environment names, directory states, symlinks, permissions, and error reporting.
Startup validation wiring
cmd/wavehouse/main.go
Startup uses EnvConfig and EnvLogLevel, then checks data_dir after config loading and exits before network dial-out when validation fails.
Shared storage permission guidance
internal/config/persistence.go, deployments/Dockerfile, deployments/Dockerfile.goreleaser, docs/src/content/docs/deployment.md
Storage errors reuse UID-65532 permission guidance. Deployment files and documentation describe writable host directories and early data_dir validation.
Validation documentation
AGENTS.md, CHANGELOG.md, config.yaml, docs/src/content/docs/architecture.md, docs/src/content/docs/configuration.mdx, docs/src/content/docs/settings-directory.mdx, docs/src/content/docs/deployment.md
Documentation describes strict YAML and environment validation, data_dir probing, Kubernetes service-link variables, exported process-level names, and boot as the validator without a dry-run command.
Documentation build environment naming
docs/src/integrations/diagram-png.mjs
The diagram build hook uses DOCS_SKIP_DIAGRAM_PNG for its skip guard and log message.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant main
  participant config.Load
  participant config.CheckDataDir
  participant Startup
  main->>config.Load: Load boot configuration
  config.Load-->>main: Return Config or validation error
  main->>config.CheckDataDir: Check cfg.DataDir
  config.CheckDataDir-->>main: Return validation result
  main->>Startup: Continue only when validation succeeds
Loading

Suggested reviewers: ericandrechek

Merge Risk: 🟡 Moderate · up to 48ffc

Boot now validates data_dir before startup, but a dangling symlink may still be accepted even though the configured path cannot be created or used. This creates a material startup-availability risk that should be resolved before merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 71.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 6 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the two primary changes: rejecting unbound WH_* environment variables and unusable data_dir values during boot.
Description check ✅ Passed The description directly explains boot-time validation, data_dir checks, the retained scope of wavehouse validate, and the related issue.
Linked Issues check ✅ Passed The changes satisfy issue #530: config.Load rejects unbound WH_* variables, CheckDataDir runs immediately after loading, wavehouse validate remains limited to settings-directory validation, and the do…
Out of Scope Changes check ✅ Passed The documentation, remediation-message updates, Docker comments, and DOCS_SKIP_DIAGRAM_PNG rename support the boot-validation change or prevent documentation tooling from triggering unbound WH_* failu…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch boot-config-strict
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch boot-config-strict

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

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

📚 Docs preview is livehttps://6298e464-wavehouse-docs.wave-rf.workers.dev

  • Commit48ffc10: fix(config): name the process-level variables in the unbound-env error
  • Author@taitelee
  • Committed — 2026-09-10 12:13 (UTC-04:00)
  • Deployed — 2026-09-10 12:22 EDT

@github-code-quality

github-code-quality Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: Go

Go

The overall line coverage in commit 48ffc10 in the boot-config-strict branch remains at 91%, unchanged from commit a5d7825 in the main branch.

Show a line coverage summary of the most impacted files.
File main a5d7825 boot-config-strict 48ffc10 +/-
internal/config/persistence.go 94% 93% -1%
cmd/wavehouse/main.go 66% 66% 0%
internal/config/config.go 93% 93% 0%
internal/config/check.go 0% 96% +96%

Updated September 10, 2026 16:22 UTC

coderabbitai[bot]
coderabbitai Bot previously requested changes Sep 8, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 61793bce-c51f-433c-845e-6de232bbb2af

📥 Commits

Reviewing files that changed from the base of the PR and between f72c8c6 and f5f5315.

📒 Files selected for processing (10)
  • AGENTS.md
  • CHANGELOG.md
  • cmd/wavehouse/main.go
  • docs/src/content/docs/architecture.md
  • docs/src/content/docs/configuration.mdx
  • docs/src/content/docs/settings-directory.mdx
  • internal/config/check.go
  • internal/config/check_test.go
  • internal/config/config.go
  • internal/config/persistence.go

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Coverage
  • GitHub Check: E2E tests
🧰 Additional context used
📓 Path-based instructions (2)
**WH001 applies to every tracked Markdown file, with no carve-out**

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • docs/src/content/docs/settings-directory.mdx
  • CHANGELOG.md
  • docs/src/content/docs/architecture.md
  • AGENTS.md
  • docs/src/content/docs/configuration.mdx
In MDX, leave a blank line between a JSX tag and a code fence.

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • docs/src/content/docs/settings-directory.mdx
  • docs/src/content/docs/configuration.mdx
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
Repo: Wave-RF/WaveHouse

Timestamp: 2026-09-08T19:18:47.827Z
Learning: Run `make lint` and `make test` before considering work complete.
Learnt from: CR
Repo: Wave-RF/WaveHouse

Timestamp: 2026-09-08T19:18:47.827Z
Learning: Every new function should have corresponding test cases.
📚 Learning: 2026-08-13T12:17:52.620Z
Learnt from: EricAndrechek
Repo: Wave-RF/WaveHouse PR: 470
File: docs/src/content/docs/reverse-proxy.mdx:137-144
Timestamp: 2026-08-13T12:17:52.620Z
Learning: For Wave-RF/WaveHouse documentation, verify claims about implementation control flow against the authoritative implementation source (for example, internal/auth/auth.go) rather than relying solely on docs/** content. Documentation may lag behind or paraphrase behavior, so control-flow claims should be confirmed in source code.

Applied to files:

  • docs/src/content/docs/settings-directory.mdx
  • docs/src/content/docs/configuration.mdx
📚 Learning: 2026-08-19T15:44:27.183Z
Learnt from: taitelee
Repo: Wave-RF/WaveHouse PR: 500
File: internal/settings/settings.go:31-31
Timestamp: 2026-08-19T15:44:27.183Z
Learning: In the WaveHouse Go codebase, do not flag package-level lookup tables or precomputed stateless values when they are immutable and read-only, including settings.Files, validate.pipeParamTypes, mutationVerbs, nonMutationVerbs, identEscaper, intBounds, and package-level regular expressions. The no-global-state guideline applies to injected application dependencies and mutable singletons, not immutable lookup data.

Applied to files:

  • internal/config/persistence.go
🔇 Additional comments (3)
internal/config/persistence.go (1)

27-27: LGTM!

cmd/wavehouse/main.go (1)

153-153: LGTM!

Also applies to: 163-168, 170-171, 208-208

AGENTS.md (1)

36-36: LGTM!

Comment thread cmd/wavehouse/main.go Outdated
Comment thread docs/src/content/docs/configuration.mdx Outdated
Comment thread internal/config/check.go
Comment thread internal/config/persistence.go Outdated
@github-project-automation github-project-automation Bot moved this from Backlog to In review in WaveHouse Task Board Sep 8, 2026
@taitelee

taitelee commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@taitelee

taitelee commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
internal/config/check.go (1)

97-104: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Reject dangling symlinks during the ancestor walk.

When dir or an intermediate component is a dangling symlink, os.Stat returns fs.ErrNotExist. The loop then probes an unrelated existing ancestor with os.CreateTemp, so CheckDataDir can return nil. Pebble.Open and the embedded NATS server later receive paths under the dangling cfg.DataDir and can fail during storage initialization.

Use os.Lstat during the walk so the symlink itself is detected. Add regression tests for final and intermediate dangling symlinks.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 2b141d14-b229-4ed2-b83f-0953c054e976

📥 Commits

Reviewing files that changed from the base of the PR and between f5f5315 and e187f01.

📒 Files selected for processing (7)
  • CHANGELOG.md
  • cmd/wavehouse/main.go
  • docs/src/content/docs/architecture.md
  • docs/src/content/docs/configuration.mdx
  • internal/config/check.go
  • internal/config/check_test.go
  • internal/config/persistence.go

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Review details
🧰 Additional context used
📓 Path-based instructions (2)
**WH001 applies to every tracked Markdown file, with no carve-out**

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • docs/src/content/docs/architecture.md
  • docs/src/content/docs/configuration.mdx
  • CHANGELOG.md
In MDX, leave a blank line between a JSX tag and a code fence.

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • docs/src/content/docs/configuration.mdx
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: Wave-RF/WaveHouse

Timestamp: 2026-09-08T20:20:40.183Z
Learning: **Go 1.26**, strict formatting (`gofumpt`, enforced by CI)
Learnt from: CR
Repo: Wave-RF/WaveHouse

Timestamp: 2026-09-08T20:20:40.183Z
Learning: **Every new function should have corresponding test cases.**
📚 Learning: 2026-08-13T12:17:52.620Z
Learnt from: EricAndrechek
Repo: Wave-RF/WaveHouse PR: 470
File: docs/src/content/docs/reverse-proxy.mdx:137-144
Timestamp: 2026-08-13T12:17:52.620Z
Learning: For Wave-RF/WaveHouse documentation, verify claims about implementation control flow against the authoritative implementation source (for example, internal/auth/auth.go) rather than relying solely on docs/** content. Documentation may lag behind or paraphrase behavior, so control-flow claims should be confirmed in source code.

Applied to files:

  • docs/src/content/docs/configuration.mdx
🔇 Additional comments (6)
internal/config/persistence.go (1)

13-13: LGTM!

internal/config/check_test.go (1)

119-126: LGTM!

CHANGELOG.md (1)

13-13: LGTM!

cmd/wavehouse/main.go (1)

153-153: LGTM!

Also applies to: 163-169, 208-208

docs/src/content/docs/architecture.md (1)

111-111: LGTM!

docs/src/content/docs/configuration.mdx (1)

20-20: LGTM!

coderabbitai[bot]
coderabbitai Bot previously approved these changes Sep 8, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: ce55f954-a133-465d-9e14-54a1247a07bf

📥 Commits

Reviewing files that changed from the base of the PR and between e187f01 and bf87191.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • docs/src/content/docs/configuration.mdx
  • docs/src/content/docs/deployment.md
  • internal/config/check.go
  • internal/config/check_test.go

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Review details
⏰ Context from checks skipped due to timeout. (7)
  • GitHub Check: Coverage
  • GitHub Check: Integration tests
  • GitHub Check: E2E tests
  • GitHub Check: Docs build
  • GitHub Check: Lint
  • GitHub Check: Analyze (go)
  • GitHub Check: Analyze (go)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: Wave-RF/WaveHouse

Timestamp: 2026-09-09T22:42:50.425Z
Learning: Every code change should update the corresponding docs in the same PR.
Learnt from: CR
Repo: Wave-RF/WaveHouse

Timestamp: 2026-09-09T22:42:50.425Z
Learning: Run `make lint` and `make test` before considering work complete.
📚 Learning: 2026-08-13T12:17:52.620Z
Learnt from: EricAndrechek
Repo: Wave-RF/WaveHouse PR: 470
File: docs/src/content/docs/reverse-proxy.mdx:137-144
Timestamp: 2026-08-13T12:17:52.620Z
Learning: For Wave-RF/WaveHouse documentation, verify claims about implementation control flow against the authoritative implementation source (for example, internal/auth/auth.go) rather than relying solely on docs/** content. Documentation may lag behind or paraphrase behavior, so control-flow claims should be confirmed in source code.

Applied to files:

  • docs/src/content/docs/configuration.mdx
🪛 LanguageTool
docs/src/content/docs/configuration.mdx

[style] ~19-~19: This sentence is over 40 words long. Consider splitting it up, as shorter sentences make the text easier to read.
Context: ... carries names that aren't WaveHouse's. One outside source does share the prefix: Kubernetes injects {SERVICE}_SERVICE_HOST, {SERVICE}_PORT, and similar link variables into every pod for each Service that existed before it, so a Service named wh or wh-* produces WH_SERVICE_HOST, WH_PORT, … and the pod refuses to boot on its next restart. Set enableServiceLinks: false on the ...

(TOO_LONG_SENTENCE)

🔇 Additional comments (4)
internal/config/check.go (1)

30-30: LGTM!

Also applies to: 56-60, 64-67

internal/config/check_test.go (1)

7-7: LGTM!

Also applies to: 10-10, 34-53, 56-65

docs/src/content/docs/deployment.md (1)

189-189: LGTM!

docs/src/content/docs/configuration.mdx (1)

20-20: LGTM!

Also applies to: 22-22

Comment thread CHANGELOG.md Outdated
Comment thread docs/src/content/docs/configuration.mdx Outdated
Comment thread docs/src/content/docs/deployment.md Outdated
coderabbitai[bot]
coderabbitai Bot previously approved these changes Sep 10, 2026

@EricAndrechek EricAndrechek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff. My only real find is that the permission-denied path returns without the permission hint which is what it exists for and there's no test that would have caught that I don't think.

A couple tiny other nitpick things I left in check.go, and then everything else is just stale comment/doc things, as per usual.

Comment thread docs/src/content/docs/configuration.mdx Outdated
Comment thread internal/config/check.go
Comment thread CHANGELOG.md Outdated
Comment thread docs/src/content/docs/configuration.mdx Outdated
Comment thread docs/src/content/docs/architecture.md Outdated
Comment thread docs/src/content/docs/deployment.md
Comment thread internal/config/check.go
Comment thread internal/config/check.go Outdated
Comment thread docs/src/content/docs/deployment.md Outdated
Comment thread docs/src/content/docs/deployment.md
coderabbitai[bot]
coderabbitai Bot previously requested changes Sep 10, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 6fb12e14-3325-4bf3-bd3c-e9b2e2eeef4c

📥 Commits

Reviewing files that changed from the base of the PR and between b4b5807 and 2782842.

📒 Files selected for processing (11)
  • CHANGELOG.md
  • config.yaml
  • deployments/Dockerfile
  • deployments/Dockerfile.goreleaser
  • docs/src/content/docs/architecture.md
  • docs/src/content/docs/configuration.mdx
  • docs/src/content/docs/deployment.md
  • docs/src/integrations/diagram-png.mjs
  • internal/config/check.go
  • internal/config/check_test.go
  • internal/config/config.go

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: Docs preview
  • GitHub Check: E2E tests
  • GitHub Check: Coverage
  • GitHub Check: Integration tests
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: Wave-RF/WaveHouse

Timestamp: 2026-09-10T13:41:57.966Z
Learning: Run `make lint` and `make test` before considering work complete.
Learnt from: CR
Repo: Wave-RF/WaveHouse

Timestamp: 2026-09-10T13:41:57.966Z
Learning: Every code change updates its docs + `CHANGELOG.md` in the same PR
📚 Learning: 2026-08-13T12:17:52.620Z
Learnt from: EricAndrechek
Repo: Wave-RF/WaveHouse PR: 470
File: docs/src/content/docs/reverse-proxy.mdx:137-144
Timestamp: 2026-08-13T12:17:52.620Z
Learning: For Wave-RF/WaveHouse documentation, verify claims about implementation control flow against the authoritative implementation source (for example, internal/auth/auth.go) rather than relying solely on docs/** content. Documentation may lag behind or paraphrase behavior, so control-flow claims should be confirmed in source code.

Applied to files:

  • docs/src/content/docs/configuration.mdx
🪛 LanguageTool
docs/src/content/docs/deployment.md

[locale-violation] ~343-~343: In American English, ‘afterward’ is the preferred variant. ‘Afterwards’ is more commonly used in British English and other dialects.
Context: ..., because none of them announces itself afterwards: - **Nullable(T) DEFAULT … columns n...

(AFTERWARDS_US)


[style] ~347-~347: Consider using a more formal/concise alternative here.
Context: ...ry this release — the ClickHouse wiring other than the password, dedupe.*, dlq.*, `str...

(OTHER_THAN)

CHANGELOG.md

[typographical] ~23-~23: Consider using an em dash in dialogues and enumerations.
Context: - **Boot refuses an unbound WH_* enviro...

(DASH_RULE)

🔇 Additional comments (11)
internal/config/config.go (1)

38-38: LGTM!

internal/config/check.go (1)

20-20: LGTM!

Also applies to: 26-26, 33-33, 39-39, 80-87, 96-100

internal/config/check_test.go (1)

30-31: LGTM!

Also applies to: 53-53, 150-163

docs/src/integrations/diagram-png.mjs (1)

112-113: 🎯 Functional Correctness

No in-repository caller still uses WH_SKIP_DIAGRAM_PNG.

The repository contains only DOCS_SKIP_DIAGRAM_PNG and its changelog entry. No compatibility alias is required for an in-repository caller.

CHANGELOG.md (1)

23-24: LGTM!

config.yaml (1)

1-4: LGTM!

docs/src/content/docs/architecture.md (1)

110-111: LGTM!

docs/src/content/docs/configuration.mdx (1)

19-20: LGTM!

Also applies to: 22-22

docs/src/content/docs/deployment.md (1)

189-189: LGTM!

Also applies to: 209-215, 343-343

deployments/Dockerfile (1)

32-32: LGTM!

deployments/Dockerfile.goreleaser (1)

10-10: LGTM!

Comment thread docs/src/content/docs/deployment.md Outdated
@EricAndrechek

Copy link
Copy Markdown
Member

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Sep 10, 2026
@taitelee
taitelee marked this pull request as ready for review September 10, 2026 14:19
@taitelee
taitelee requested review from a team and EricAndrechek September 10, 2026 14:19
EricAndrechek
EricAndrechek previously approved these changes Sep 10, 2026

@EricAndrechek EricAndrechek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok approving it cause the rest is all docs. I don't know enough about k8s to understand what/why its getting nit-picky at comments and docs so I had it try to help explain it to me, which I thought you may find helpful too. It also flagged our pm-triage skill which I left out as I already know I need to fix that skill up and think I have an issue to track it's general fixes already. Here's what it said:

Kubernetes service links

Worth spelling out, because we describe this in three places and no copy is
quite right.

kubelet injects a set of environment variables into every container for each
Service it can see. It's a Docker-links compatibility feature, on by default
through enableServiceLinks: true on the PodSpec. Three rules decide what a
pod actually receives:

  • Namespace. Only Services in the pod's own namespace, plus the
    kubernetes API Service from default. A wh Service in some other
    namespace is harmless.
  • Timing. Only Services that already existed when the pod started. A
    Service created afterwards injects nothing until the pod restarts.
  • ClusterIP. Services with clusterIP: None are skipped, so a headless
    wh Service injects nothing at all.

Names are the Service name uppercased with - mapped to _, then a fixed set
per Service (port numbers here are illustrative — they follow the Service's
own ports):

Service "wh"     → WH_SERVICE_HOST, WH_SERVICE_PORT, WH_PORT,
                   WH_PORT_8080_TCP, WH_PORT_8080_TCP_ADDR, …
Service "wh-foo" → WH_FOO_SERVICE_HOST, WH_FOO_SERVICE_PORT, WH_FOO_PORT,
                   WH_FOO_PORT_8080_TCP, …

Every one of those starts with WH_, so every one trips the new check. That
part of the feature is working as intended. What's off is how we describe it:

  • configuration.mdx:19 says "into every pod". It's every pod in the
    Service's namespace
    , and never for a headless Service.
  • check.go:30 says a Service named wh or wh-* injects
    WH_SERVICE_HOST, WH_PORT. Only an exact wh produces those — wh-foo
    produces WH_FOO_SERVICE_HOST and WH_FOO_PORT. This is the copy that
    matters most: it's what an operator reads when the pod won't start, and it
    sends them grepping for a variable that isn't there while the real offender
    is already named in the list printed directly above it. No inline comment on
    it, but it wants the same edit as the doc.
  • deployment.md:347 is already correct as of 26d9076.

Two consequences worth putting in the docs, because they're the shapes this
will actually take in the field:

  • The failure is a restart, not a deploy. The Service almost always
    pre-exists, so a cluster runs fine until something recycles the pod — a
    rollout, a node drain, an OOM kill — and then it doesn't come back. Bad thing
    to learn at 3am.
  • The likeliest instance is self-inflicted. If WaveHouse's own Service is
    named wh, WaveHouse's own pods get WH_SERVICE_HOST and refuse to boot.
    Our deployment docs should probably say don't name it that.

I'm reasoning from kubelet's behaviour rather than from a cluster in front of
me, so before rewriting anything: kubectl exec <pod> -- env | grep ^WH_ on a
pod in a namespace that has a wh-* Service. If that comes back empty, I've
got something wrong and I'd rather find out first.

Upgrade audit

Two comments on the same bullet at deployment.md:347. It's presented as the
complete list of what to strip before upgrading, so gaps in it are the
difference between a clean upgrade and a pod that won't start — WH_AUTH_JWKS_URL
in particular, since JWKS is the standard production auth posture.

pm-triage — follow-up, not this PR

Renaming the diagram knob was the right call, and the same argument covers nine
more names we own: .claude/skills/pm-triage/scripts/board.sh and state.sh
read WH_REPO, WH_OWNER, WH_PROJECT_ID, WH_PROJECT_NUM,
WH_PRIORITY_FIELD, WH_STATUS_FIELD, and WH_PM_STATE_{BRANCH,AUTHOR,EMAIL},
and SKILL.md:93 documents them as the supported override mechanism.

export WH_PROJECT_ID=… to point the routine at a different board and every
make dev in that shell then dies at boot blaming the settings-directory move.
Lower odds than the docs knob — it's an occasional local routine — so this is a
follow-up issue rather than something to hold #530 for. Happy to file it.

Comment thread docs/src/content/docs/configuration.mdx Outdated
Comment thread docs/src/content/docs/deployment.md Outdated
Comment thread docs/src/content/docs/deployment.md Outdated
Comment thread docs/src/content/docs/architecture.md Outdated
@taitelee

Copy link
Copy Markdown
Member Author

Added a short note in the k8s section of deployment.md not to name our own Service wh, since that's the case people will actually hit and it only surfaces on a restart.

pm-triage is tracked in #582, since #526 only covers the rubric.

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

@taitelee I will review the updated documentation and the current PR changes.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

coderabbitai[bot]
coderabbitai Bot previously requested changes Sep 10, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 5680fd1f-1043-456c-9aab-44a3de0bb97e

📥 Commits

Reviewing files that changed from the base of the PR and between 26d9076 and 4d64cb2.

📒 Files selected for processing (4)
  • docs/src/content/docs/architecture.md
  • docs/src/content/docs/configuration.mdx
  • docs/src/content/docs/deployment.md
  • internal/config/check.go

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Review details
🧰 Additional context used
📓 Path-based instructions (2)
Never hard-wrap prose.

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • docs/src/content/docs/architecture.md
  • docs/src/content/docs/deployment.md
  • docs/src/content/docs/configuration.mdx
In MDX, leave a blank line between a JSX tag and a code fence.

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • docs/src/content/docs/configuration.mdx
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: Wave-RF/WaveHouse

Timestamp: 2026-09-10T15:55:34.178Z
Learning: Run `make lint` and `make test` before considering work complete.
📚 Learning: 2026-08-13T12:17:52.620Z
Learnt from: EricAndrechek
Repo: Wave-RF/WaveHouse PR: 470
File: docs/src/content/docs/reverse-proxy.mdx:137-144
Timestamp: 2026-08-13T12:17:52.620Z
Learning: For Wave-RF/WaveHouse documentation, verify claims about implementation control flow against the authoritative implementation source (for example, internal/auth/auth.go) rather than relying solely on docs/** content. Documentation may lag behind or paraphrase behavior, so control-flow claims should be confirmed in source code.

Applied to files:

  • docs/src/content/docs/configuration.mdx
🔇 Additional comments (3)
docs/src/content/docs/architecture.md (1)

110-113: LGTM!

docs/src/content/docs/configuration.mdx (1)

19-20: LGTM!

Also applies to: 22-22

docs/src/content/docs/deployment.md (1)

309-309: LGTM!

Also applies to: 349-349

Comment thread internal/config/check.go Outdated
@taitelee

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@EricAndrechek

EricAndrechek commented Sep 10, 2026

Copy link
Copy Markdown
Member

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@taitelee
taitelee enabled auto-merge September 10, 2026 16:31
@taitelee
taitelee added this pull request to the merge queue Sep 10, 2026
Merged via the queue into main with commit e462135 Sep 10, 2026
20 checks passed
@taitelee
taitelee deleted the boot-config-strict branch September 10, 2026 16:37
@github-project-automation github-project-automation Bot moved this from In review to Done in WaveHouse Task Board Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Documentation, site/, README area/infra CI, build, deploy, Docker, release documentation Improvements or additions to documentation go Pull requests that update go code

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

config: loud validation for boot config (dry-run validate, required keys, unbound WH_* env)

2 participants