Skip to content

feat: add time_budget policy - #125

Open
Yashika-1705 wants to merge 1 commit into
theagentplane:mainfrom
Yashika-1705:feat/time-budget-policy
Open

feat: add time_budget policy#125
Yashika-1705 wants to merge 1 commit into
theagentplane:mainfrom
Yashika-1705:feat/time-budget-policy

Conversation

@Yashika-1705

Copy link
Copy Markdown

Fixes #66

Adds the time_budget policy - a wall-clock ceiling per run. Trips at
observe when elapsed >= max_seconds and halts the run. Natural sibling
of step_cap for workflows whose cost is latency rather than tokens.

@tishachawla-jg

Copy link
Copy Markdown
Collaborator

Thanks @Yashika-1705 looks good overall. Tests pass locally. A few things:

start = self._started.setdefault(attr.run_id, step.ts)

  • ruff format --check fails on tests/test_policies_wrap_integration.py (missing blank line before the new test). make format fixes it.

  • Docs: the first step doesn't hit an empty window (the ledger records the step before observe runs, so elapsed is 0.0), and the e2e row says max_seconds=0.0 but the test uses 0.5.

Please add a row to docs/product/policies-index.md.

Should be good to merge after that.

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.

Add a policy: the contributor path, and what is worth adding next

3 participants