Skip to content

Fix operator API health leak, preserve bootstrap break‑glass, and fix structured logging#160

Merged
aidankhogg merged 2 commits into
dev/alphafrom
codex/fix-critical-issues
Jun 29, 2026
Merged

Fix operator API health leak, preserve bootstrap break‑glass, and fix structured logging#160
aidankhogg merged 2 commits into
dev/alphafrom
codex/fix-critical-issues

Conversation

@aidankhogg

Copy link
Copy Markdown
Contributor

Motivation

  • Prevent unauthenticated health responses from leaking sensitive last_error details while still indicating an error occurred.
  • Preserve local lifecycle automation by allowing an explicitly configured X-Bootstrap-Secret to act as a break‑glass admin credential even after Phase 4 (OIDC) completion.
  • Eliminate Loguru formatting errors caused by nested extra payloads in the HTTP request middleware.

Description

  • Stop returning raw last_error in the unauthenticated health response and keep only the presence flag via last_error_present in netengine/api/routes.py.
  • Accept an explicitly configured X-Bootstrap-Secret as a local admin credential before falling back to normal Phase 4/OIDC behavior in netengine/api/auth.py.
  • Change the structured request logging in netengine/logs/middleware.py to bind event metadata rather than passing it under extra, avoiding Loguru format_map KeyError issues.
  • Update tests to reflect the promoted experimental gateway feature-state behavior and mirrored gateway validation requirements (tests/test_cli.py, tests/test_gateway_federation.py, tests/test_spec_parsing.py).

Testing

  • Ran the full test suite with pytest -q, producing 573 passed, 10 skipped, 24 warnings.
  • Re-ran targeted failing tests to verify fixes: the gateway/spec parsing tests and operator API health/reload tests passed.
  • Confirmed structured logging no longer triggers Loguru format errors during request handling in the test runs.

Codex Task

@aidankhogg aidankhogg self-assigned this Jun 29, 2026
@aidankhogg aidankhogg added bug Something isn't working invalid This doesn't seem right labels Jun 29, 2026
@aidankhogg aidankhogg merged commit 81ad8db into dev/alpha Jun 29, 2026
@aidankhogg aidankhogg deleted the codex/fix-critical-issues branch June 29, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working codex invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant