Skip to content

Take startup bindings from the boot file, not the restored revision - #22

Open
Deep-Sixed wants to merge 1 commit into
mainfrom
claude/sleepy-curie-g8429q
Open

Deep-Sixed wants to merge 1 commit into
mainfrom
claude/sleepy-curie-g8429q

Conversation

@Deep-Sixed

Copy link
Copy Markdown
Owner

Problem

After a restart, SqliteControlPlane.bootstrap restores the last active revision from SQLite, and create_app read boot_config = lifecycle.active.config from it. That covers server.api_token_env, admin_token_env, admin_sso, authentik, telemetry, public_docs and admin_config_roots. Meanwhile cli.py takes the listen host and port from the boot file.

Reproduced: v1 = host: 127.0.0.1, no api token (a valid config). The operator edits the file to host: 0.0.0.0 + api_token_env and restarts. The process then listens on 0.0.0.0 while enforcing v1's absent token, and an unauthenticated remote client got 200 on /v1/chat/completions.

Change

  • boot_config = document.config: the startup settings come from the same document cli.py binds from. Routing policy still follows the restored active revision.
  • When the boot file's checksum differs from the restored revision's, a warning is logged at startup.
  • /admin/status fusion now reports the active revision instead of the boot config.
  • docs/persistence.md documents the rule.

Tests

  • New tests/test_boot_bindings.py fails on main and passes here.
  • Full suite: 320 passed. Ruff (lockfile's 0.15.22) is clean.
  • Run locally on Python 3.13, because 3.14.5 was unavailable in the session. CI will cover 3.14.5.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Lj4neZ1qzw7tpiCJ8oedxJ


Generated by Claude Code

After a restart, create_app read server/auth/SSO/authentik/telemetry
bindings from the revision restored out of SQLite while cli.py bound the
listen host and port from the boot file. An operator who changed the file
to a public host plus an api token and restarted got a public listener
enforcing the old revision's (absent) token.

Bindings now come from the boot document; routing policy still follows
the restored active revision, and a mismatch is logged at startup. The
admin fusion status now reports the active revision rather than boot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lj4neZ1qzw7tpiCJ8oedxJ

Copy link
Copy Markdown
Owner Author

validate failed at scripts/check-public-history.py, not in this PR's code. That script scans every fetched branch, and it flagged a private-IP literal in tests/test_loopback_host.py on #24's branch. This PR's own test step passed; this PR's earlier push run was green.

The fix is at the source: #24's single commit was amended to use 203.0.113.7 (a documentation address) and force-pushed, and the history scan now reports 0 findings. Failed jobs re-run once.


Generated by Claude Code

@Deep-Sixed
Deep-Sixed marked this pull request as ready for review October 11, 2026 00:42
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