Skip to content

fix: validate compact budget options - #14

Merged
royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
be-student:codex/13-validate-compact-budgets
Sep 7, 2026
Merged

fix: validate compact budget options#14
royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
be-student:codex/13-validate-compact-budgets

Conversation

@be-student

Copy link
Copy Markdown
Contributor

Closes #13.

compact() now rejects negative or non-finite token budgets and non-integer protected-turn counts before cloning or transforming the payload. Regression tests cover the reported values plus infinity and fractional turn counts. The README and changelog document the public validation contract.

Validation: node --test (14 passed).

AI-assisted: implemented and validated with Codex.

@royalpinto007
royalpinto007 merged commit c479aa7 into AgentPostmortem:main Sep 7, 2026
1 check 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.

compact accepts negative/NaN budgets with no validation

2 participants