Skip to content

Add support for observability + external optimizer#119

Merged
aliroberts merged 1 commit intodevfrom
feature/external-opt
Mar 17, 2026
Merged

Add support for observability + external optimizer#119
aliroberts merged 1 commit intodevfrom
feature/external-opt

Conversation

@aliroberts
Copy link
Contributor

Summary

Adds weco observe CLI commands for tracking external optimization runs. The CLI is write-only — it creates runs and logs steps. Lifecycle (close/archive) is managed by the dashboard.

New commands

  • weco observe init — Create a run and print the run ID to stdout for capture via $().
    • -s/--source or --sources — source files to track (matches weco run convention)
    • --metric — primary metric name
    • -g/--goalmaximize/max/minimize/min (matches weco run convention)
    • --name, -i/--additional-instructions — optional metadata
  • weco observe log — Log a step with metrics, code snapshot, and optional tree lineage.
    • --run-id, --step (required)
    • --status completed|failed, --description, --metrics (JSON), --parent-step
    • -s/--source or --sources — re-reads files from disk

Design

  • Fire-and-forget — all commands print warnings to stderr on failure but always exit 0. Never crashes the agent's loop.
  • No lifecycle commandscomplete/fail were removed. External runs are perpetually active; the dashboard handles closing. Logging a step to a closed run silently reopens it.
  • Naming conventions — flags match weco run (--source/--sources, --goal, --additional-instructions).

Files

File Purpose
weco/observe/cli.py Argument parsing + command handlers
weco/observe/api.py HTTP client (create_run, log_step)
weco/observe/observer.py Python SDK (WecoObserver, ObserveRun)
weco/observe/__init__.py Public exports
weco/cli.py Registers observe subcommand

@aliroberts aliroberts force-pushed the feature/external-opt branch from b8bd974 to 32a5e99 Compare March 17, 2026 15:06
@aliroberts aliroberts merged commit 4cf2a8e into dev Mar 17, 2026
1 check passed
@aliroberts aliroberts deleted the feature/external-opt branch March 17, 2026 15:11
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.

1 participant