Skip to content

feat: add time_budget policy - #125

Merged
tishachawla-jg merged 3 commits into
theagentplane:mainfrom
Yashika-1705:feat/time-budget-policy
Sep 14, 2026
Merged

tishachawla-jg merged 3 commits into
theagentplane:mainfrom
Yashika-1705:feat/time-budget-policy

Conversation

@Yashika-1705

Copy link
Copy Markdown
Contributor

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.

@Yashika-1705

Copy link
Copy Markdown
Contributor Author

@tishachawla-jg Completed the above comments, let me know if it's good to go now!

@tishachawla-jg
tishachawla-jg merged commit a94dcd9 into theagentplane:main Sep 14, 2026
3 checks passed
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

2 participants