Skip to content

Agent builder executor#1791

Open
hulto wants to merge 21 commits intomainfrom
agent-builder-executor
Open

Agent builder executor#1791
hulto wants to merge 21 commits intomainfrom
agent-builder-executor

Conversation

@hulto
Copy link
Collaborator

@hulto hulto commented Feb 11, 2026

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

hulto and others added 9 commits February 9, 2026 04:28
* Add executor library with mock and Docker implementations

Introduce an executor interface for build task execution with two
implementations: MockExecutor for testing and DockerExecutor for
production use. The Docker executor pulls the specified build image,
runs the build script as the container entrypoint, and streams
stdout/stderr over channels. The builder agent now passes claimed
tasks to the executor, collects output/errors from channels, and
reports results back to the server via gRPC.

https://claude.ai/code/session_017WBbxwiwQS6tXTNcaBrfBH

* cleanup

---------

Co-authored-by: Claude <noreply@anthropic.com>
hulto and others added 6 commits February 11, 2026 03:31
- Extract poll interval magic number to taskPollInterval const
- Simplify ClaimBuildTasks to follow beacon task claiming pattern
  (use rollback helper, reload tasks after commit, remove debug query)
- Add rollback.go helper matching c2 package pattern
- Add TODO section to README: concurrent builds, streaming tests,
  gRPC streaming for SubmitBuildTaskOutput

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
…ield type

- Remove SetStartedAt from ClaimBuildTasks so claimed_at and started_at
  are distinct lifecycle stages (started_at should be set at execution time)
- Update README with current gRPC API, executor docs, and full package table
- Change BuildTask error field from String to Text for consistency with
  the output field and the Task schema pattern

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Mirror the Task schema pattern: add output_size field with a
HookDeriveBuildTaskInfo hook that auto-computes byte length from
the output field on create/update. Enables sorting and filtering
build tasks by output size in GraphQL.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
- Run build tasks concurrently with a semaphore (max 4) instead of
  sequentially blocking the poll loop. Wait for in-flight builds on
  context cancellation.
- Invert channel ownership: executor implementations now close both
  outputCh and errorCh before returning (sender closes). This follows
  standard Go channel conventions and prevents fragile caller-side
  close ordering.
- Make SubmitBuildTaskOutput idempotent: if a task is already finished,
  return success without overwriting. Handles network retries safely.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>

// buildCommands maps (target_os, target_format) -> cargo build command.
var buildCommands = map[buildKey]string{
{c2pb.Host_PLATFORM_LINUX, TargetFormatBin}: "cargo build --release --bin imix --target=x86_64-unknown-linux-musl",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

TargetFormatBin replace with Enum.

KCarretto
KCarretto previously approved these changes Feb 15, 2026
Copy link
Collaborator

@KCarretto KCarretto left a comment

Choose a reason for hiding this comment

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

Image

Base automatically changed from agent-builder to main February 15, 2026 23:38
@hulto hulto dismissed KCarretto’s stale review February 15, 2026 23:38

The base branch was changed.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 16, 2026

Summary

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
2592    ±0 2592    ±0 0    ±0 0    ±0 0    ±0 0    ±0 1ms    ±0

Previous Results

Build 🏗️ Result 🧪 Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
#984 2592 2592 0 0 0 0 24.5s

Insights

Average Tests per Run Total Flaky Tests Total Failed Slowest Test (p95)
2592 0 0 5.2s

Slowest Tests

Test 📝 Results 📊 Duration (avg) ⏱️ Duration (p95) ⏱️
eldritch-libsys: std::dll_inject_impl::tests::test_dll_inject_simple 1 5.2s 5.2s
TestDockerExecutor_Build_ContextCancellation 1 5.2s 5.2s
imix::bin/imix: install::tests::test_install_execution 3 1.2s 3.4s
imix::bin/imix: install::tests::test_install_execution 3 1.2s 3.4s
imix::bin/imix: install::tests::test_install_execution 3 1.2s 3.4s
imix::bin/imix: tests::task_tests::test_task_streaming_output 3 3.0s 3.0s
imix::bin/imix: tests::task_tests::test_task_streaming_output 3 3.0s 3.0s
imix::bin/imix: tests::task_tests::test_task_streaming_output 3 3.0s 3.0s
imix::bin/imix: tests::task_tests::test_task_streaming_error 3 3.0s 3.0s
imix::bin/imix: tests::task_tests::test_task_streaming_error 3 3.0s 3.0s

🎉 No failed tests in this run. | 🍂 No flaky tests in this run.

Github Test Reporter by CTRF 💚

🔄 This comment has been updated

@hulto hulto marked this pull request as ready for review February 16, 2026 01:11
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