MCPcopy Index your code
hub / github.com/openai/plugins / consume_json_budget

Function consume_json_budget

plugins/codex-security/scripts/finding_preview.py:239–244  ·  view source on GitHub ↗
(budget: list[int], size: int)

Source from the content-addressed store, hash-verified

237
238
239def consume_json_budget(budget: list[int], size: int) -> bool:
240 if budget[0] < size:
241 budget[0] = 0
242 return False
243 budget[0] -= size
244 return True
245
246
247def bounded_json_text(value: str, maximum_bytes: int) -> tuple[str, int]:

Callers 1

bounded_json_valueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected