fix: load config.yaml on boot; issue real device token; live smoke test
- main() previously used Config() defaults, silently ignoring config.yaml (port + token); now loads config.yaml from repo root (BRIDGE_CONFIG override) - config.yaml: port 8766 (8765 taken on this host), real sha256 token for xiaozhi-main - smoke_live.py: live WS verification (health, auth rejection x2, handshake, full turn) - README: correct run command (python -m app.main) - HANDOFF/plan: Phase 1.5 live-verified evidence
This commit is contained in:
1 parent
52d9ecfb70
commit
b00312cbe5
6 files changed
+134
-6
No files matched your search
+14
-1
@@ -41,9 +41,22 @@ def make_app(cfg: Config | None = None) -> FastAPI:
|
||||
def main() -> None:
|
||||
import uvicorn
|
||||
|
||||
cfg = Config()
|
||||
cfg = _load_config()
|
||||
uvicorn.run(make_app(cfg), host=cfg.host, port=cfg.port)
|
||||
|
||||
|
||||
def _load_config() -> Config:
|
||||
"""Load config.yaml from the repo root; fall back to all-mock defaults."""
|
||||
import os
|
||||
|
||||
path = os.environ.get(
|
||||
"BRIDGE_CONFIG",
|
||||
os.path.join(os.path.dirname(os.path.dirname(__file__)), "config.yaml"),
|
||||
)
|
||||
if os.path.exists(path):
|
||||
return Config.from_file(path)
|
||||
return Config()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in new issue
Block a user