Skip to content

Harden loop self-observability#36

Merged
Svaag merged 1 commit into
mainfrom
codex/self-observability-hardening
Jul 3, 2026
Merged

Harden loop self-observability#36
Svaag merged 1 commit into
mainfrom
codex/self-observability-hardening

Conversation

@Svaag

@Svaag Svaag commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • switch Pi backend default invocation to JSON mode and normalize usage/cost/result fields
  • derive planner acceptance criteria from issue body Acceptance sections
  • add per-issue daemon budget tiers via loop:budget-* labels or body fields
  • fail gates explicitly when tools cannot start, and use repo dev dependencies for Python gates when available

Validation

  • uv run ruff check src tests
  • uv run mypy --strict src
  • uv run pytest

Closes #6
Closes #11
Closes #12
Closes #13

@Svaag Svaag merged commit 2575131 into main Jul 3, 2026
4 checks passed
@Svaag Svaag deleted the codex/self-observability-hardening branch July 3, 2026 14:19

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 401d732b0c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

1,
int(config.max_wall_clock_minutes_per_run * multiplier),
)
budget["max_cost_usd"] = round(config.max_cost_usd_per_run * multiplier, 4)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Cap tiered run cost at the remaining daily budget

With the default daemon config, max_cost_usd_per_day is $10 and max_cost_usd_per_run is $5, but a loop:budget-xl issue now hands the runner a $20 max_cost_usd before any cap against the ledger. daemon_once only checks whether the existing ledger is already over the daily cap before launching the run, so a single labeled issue can exceed the supposedly hard per-day cost budget unless the operator also raises the daily limit. Please cap this value by the remaining daily budget or reject the tier when it would exceed it.

Useful? React with 👍 / 👎.

update["gate_commands"] = select_gate_commands_for_mutations(
changed_paths or list(mutations)
changed_paths or list(mutations),
cwd=_gate_selection_cwd(state),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Select dependency-aware gates per worktree

When a run has multiple promotion worktrees, this chooses a single gate command list using only the first worktree's pyproject.toml, but gate_execution_node later runs that same list in every worktree. If the first repo has a dev group/extra and another repo does not, the later repo will fail on uv run --group/--extra dev ... even when its own changes do not require that setup. Build gates per worktree or avoid using one repo's dependency layout globally.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant