Fix Codex adapter size budget validation#73
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the
Package AllCI failure wherescripts/generate_adapters.py --validaterejected the generated Codex rootAGENTS.mdfor exceeding the 32 KiB budget.This branch updates the Codex adapter index generation and adds focused regression coverage for the budget contract.
Changes
truncate_description()somax_charsincludes the appended ellipsis instead of allowing truncated strings to exceed the requested limit.CodexAdapter.ROOT_DESCRIPTION_MAX_CHARSand applies it consistently to root index entries for rules, agents, commands, and skills.AGENTS.mdsize from the failing 32,798 bytes to 23,347 bytes, 71% of the 32 KiB budget.tests/test_generate_adapters.pycoverage that generates the Codex adapter from the real package set and asserts the root file stays within the configured size budget.Validation
uv run python scripts/generate_manifest.py && git diff --exit-code manifest.yaml && uv run python scripts/generate_adapters.py --validateuv run pytest tests/test_generate_adapters.pygit diff --check main..HEADNotes
uv run pytestpassed locally before this branch was pushed: 410 tests passed.ruff check, repo-wideruff format --check ., and targetedmypy --strictare not clean in the current checkout due to existing unrelated lint, formatting, and typing debt. The failing GitHub Actions job does not run those gates.