feat(config): observability block schema (#119 PR-1 of 4) - #2450
Merged
Merged
Conversation
Hermes-style declarative block grouping cadence + verbosity knobs into one place. Schema-only in this PR — wiring into heartbeat.py and main.py lands in PR-3 of the #119 stack. Two fields with live consumers waiting: - heartbeat_interval_seconds (default 30, clamped to [5, 300]) → heartbeat.py:134 currently has hard-coded HEARTBEAT_INTERVAL = 30 - log_level (default "INFO", uppercased at parse) → main.py:465 currently has hard-coded log_level="info" Clamp band [5, 300] is intentional: sub-5s flooded the platform during IR-2026-03-11; >5min lets crashed workspaces look healthy long enough to mask failure. Coerce at parse so adapters and heartbeat.py can read the value without re-validating. Tests pin defaults, explicit YAML override, partial override, and parametrized clamp behavior (10 cases including garbage strings + None). Part of: task #119 (adopt hermes-style architecture) Stack: PR-1 schema → PR-2 event_log → PR-3 wire consumers → PR-4 skill compat
HongmingWang-Rabbit
requested a review
from hongmingwang-moleculeai
as a code owner
May 1, 2026 04:59
HongmingWang-Rabbit
pushed a commit
that referenced
this pull request
Jun 12, 2026
…nflicts (#2450) Replaces the fixed :8080 bind with an OS-allocated ephemeral port in both lifecycle-stub and lifecycle-real jobs. This eliminates the "address already in use" failures caused by stale processes or concurrent jobs on shared docker-host runners. Changes: - Configure platform env: allocate PORT via socket.bind(('', 0)) and set BASE=http://localhost:8000. - Start platform: use PORT=8000 instead of hardcoded 8080. - Kill stale platform-server: remove the fuser/lsof port-scan for 8080 (no longer needed) and keep the comm-scan process cleanup. - Update comments to reflect dynamic-port rationale. Fixes #2450 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ObservabilityConfigdataclass toworkspace/config.py: groups cadence + verbosity knobs into one declarative block (hermes-style).heartbeat_interval_seconds(default 30, clamped to [5, 300]) —heartbeat.py:134has hard-codedHEARTBEAT_INTERVAL = 30log_level(default "INFO", uppercased at parse) —main.py:465has hard-codedlog_level="info"Why this shape
Daniel's incident IR-2026-03-11 showed sub-5s heartbeats flood the platform; >5min lets crashed workspaces look healthy long enough to mask failure. Clamp band [5, 300] is the safe operating range — coerce at boundary, not at every read site.
Stack
EventLogmodule +EventLogConfignested under observabilityPart of task #119 (adopt hermes-style architecture: event-log, declarative skill compat, observability config block).
Test plan
pytest workspace/tests/test_config.py— 48 tests pass (45 existing + 7 new for the new block)