Skip to content

Support adding a [build] table to agents' hackbot.toml - #7705

Open
suhaibmujahid wants to merge 1 commit into
masterfrom
perf-plugin/build-table
Open

suhaibmujahid wants to merge 1 commit into
masterfrom
perf-plugin/build-table

Conversation

@suhaibmujahid

Copy link
Copy Markdown
Member

Part of #7610


Stack created with GitHub Stacks CLI • Give Feedback 💬

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.
@suhaibmujahid
suhaibmujahid requested a review from a team as a code owner November 29, 2026 18:17
Copilot AI balanced review requested due to automatic review settings November 29, 2026 18:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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-build and 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

No deployments
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.

2 participants