Repository navigation
Support adding a [build] table to agents' hackbot.toml - #7705
Open
suhaibmujahid wants to merge 1 commit into
Open
suhaibmujahid wants to merge 1 commit into
suhaibmujahid wants to merge 1 commit into
Conversation
Declares the internal GitHub repositories an agent image fetches at build time, each at a pinned full commit. hackbot-deploy check-build validates every agent's table, and a pre-commit hook runs it when a hackbot.toml changes, so a bad table fails review rather than a release.
There was a problem hiding this comment.
🟡 Changes recommended
Malformed TOML raises an uncaught parsing exception, causing the checker to abort without identifying the offending file or checking the remaining agents.
1 open issue
What changed in this PR
Adds optional [build] configuration to agents’ hackbot.toml files, laying groundwork for private GitHub repository downloads in #7610.
Changes:
- Defines strict validation for one GitHub dependency pinned to a full commit.
- Adds
check-buildand a pre-commit hook to validate agent build tables. - Documents the configuration and tests valid and invalid inputs.
| File | Description |
|---|---|
tools/hackbot-deploy/tests/test_build_tokens.py |
Tests build-table validation and CLI reporting. |
tools/hackbot-deploy/README.md |
Documents the optional build table. |
tools/hackbot-deploy/hackbot_deploy/cli.py |
Adds the check-build command and error handling. |
tools/hackbot-deploy/hackbot_deploy/build_tokens.py |
Defines and loads validated build configuration. |
.pre-commit-config.yaml |
Registers the build-table validation hook. |
Review effort: Balanced
Comment on lines
+49
to
+54
| with path.open("rb") as fh: | ||
| data = tomllib.load(fh) | ||
| try: | ||
| return BuildConfig.model_validate(data.get("build", {})) | ||
| except ValidationError as exc: | ||
| raise BuildTokensError(f"{path}: invalid [build] table\n{exc}") from exc |
This branch has not been deployed
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.

Part of #7610
Stack created with GitHub Stacks CLI • Give Feedback 💬