Skip to content

docs: fix documentation drift from codebase#2

Draft
Sbussiso wants to merge 1 commit into
masterfrom
claude/lucid-babbage-0ycLK
Draft

docs: fix documentation drift from codebase#2
Sbussiso wants to merge 1 commit into
masterfrom
claude/lucid-babbage-0ycLK

Conversation

@Sbussiso

Copy link
Copy Markdown
Contributor

Summary

  • API header fix: corrected X-API-KeyX-Node-API-Key for register/heartbeat in AGENTS.md outbound API table (verified against src/api/client.rs)
  • ARM64 build status: updated from "source-only, no ARM image published" to reflect that both prebuilt binaries and multi-arch Docker images (linux/arm64) are published on every release (verified against .github/workflows/release.yml)
  • Dependencies: removed tracing-appender from key dependencies table (not in Cargo.toml)
  • config.example.yaml: added streaming.hls section (segment_duration, playlist_size, bitrate) and motion section (enabled, threshold, cooldown_secs) — previously undocumented in the example config

Test plan

  • Verify X-Node-API-Key header matches all .header() calls in src/api/client.rs
  • Verify config.example.yaml sections match Config struct in src/config/settings.rs
  • Verify ARM64 targets in .github/workflows/release.yml build matrix

https://claude.ai/code/session_01DdzBKawH6BhahW6BFiPsEW

- Fix outbound API header: X-API-Key → X-Node-API-Key for register/heartbeat
- Update ARM64 build status: prebuilt binaries and Docker images are published
- Remove tracing-appender from dependencies (not in Cargo.toml)
- Add streaming.hls and motion sections to config.example.yaml

https://claude.ai/code/session_01DdzBKawH6BhahW6BFiPsEW
Sbussiso added a commit that referenced this pull request Apr 27, 2026
🔴 #2 from yesterday's code review.

Previously the SCM lifecycle was:
  StartPending → Running → run Config::load → fail → Stopped(1)

That sequence briefly showed the service as Running before the
config-missing failure was detected, which made services.msc and
its consumers report a "service started successfully and then
crashed" condition. The truth is closer to "service never reached
Running" — and SCM should reflect that.

New ordering:
  StartPending → Config::load + validate → (skip Running on failure) → Stopped(1)

If config is fine: StartPending → Running → run node → Stopped(0).

Implementation:
- Extracted load_and_validate_config() from run_node_blocking so
  the service main can call it during StartPending.
- run_node_blocking now takes a pre-loaded Config rather than
  loading inside.
- On validation failure, the service goes directly to Stopped with
  exit_code=1, never touching ServiceState::Running.

Net effect: services.msc reflects the truth about whether the
service got far enough to actually start. Operators triaging a
"service won't start" issue see Stopped (not Running-then-crashed)
and reach for the right diagnostics first.

147/147 unit tests still pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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