Repository navigation
π fix: support Bob 2.x in contributor images - #14383
thatguywob wants to merge 1 commit into
Conversation
Select contributor launch flags by Bob version and bridge current and legacy API key environment names. Pin contributor and pod-agent argv against the same fake CLI and exercise the contributor startup key check. Hive-Run: hivecommons#14334 Hive-Plan: contributor-bob-version-compatibility Hive-Spec: issue-14334#expected-fix Co-authored-by: odttlnt <91499691+odttlnt@users.noreply.github.com> Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@thatguywob this PR is back in your court ( Failing checks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Your relay session received this as a |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of No conflicting open PRs or same-file overlaps were found. |
|
CI triage (hive, check-report only β head is in a fork): the three red checks are not caused by this diff.
Concrete fix: none needed in the diff. A maintainer re-run of the failed jobs (or an update-branch to v5, now 3 commits ahead) should go green. Hive cannot rerun or push to a fork branch. π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
There was a problem hiding this comment.
The runtime switch and the key aliasing look correct to me and match the hub-side launcher. CI is red on this head, which I could not diagnose from my host β see the open question at the end.
What I checked in the tree:
chatreally becomes the subcommand. The launcher builds the tmux line as$CMD $PERM_FLAG $MODEL_FLAG $REASONING_FLAG(bin/contributor-agent.sh:1160), andPERM_FLAGcomes frombackend_perm_flag_shell, which just%q-quotes each word ofbackend_perm_flag's output (config/backends.conf:706β714). So for Bob 2.x the pane runsbob chat --accept-license --auto-approve --trust, with nothing in between the binary andchat.MODEL_FLAGstays empty for bob (contributor-agent.sh:1125), so no--modelsneaks in after it either.- Version detection is the same expression the pods use.
case "$(bob --version 2>/dev/null | sed -n 1p)" in 1.*) β¦ ;; *) β¦ ;; esacin the newbob)branch is character-for-character whatbobLaunchCmdemits atsrc/crux/agent/manager_launch.go:788, and the two argv strings matchbobLaunchCmdV1(:800β804) andbobLaunchCmdV2(:816β819). Unknown/missingbobfalls to the 2.x form on both sides, so relay and pod agents stay in lockstep as the body claims. - The key check runs where it needs to.
backend_bob_prepare_envis invoked as theifcondition (contributor-agent.sh:905), so itsexports land in the parent shell, and that happens beforetmux new-sessionat:1049β the pane inherits whichever name the contributor set. The two-line fill (BOB_API_KEYfromBOBSHELL_API_KEY, then the reverse) preserves an explicitly-set pair, which is exactly what the"both"case inTestContributorBobKeyCompatibilityasserts (current-key/legacy-key). Neither value is printed.
Open question (not verified): test (agent 3/5), test (rest 4/5), coverage and required context scope are failing on ae908a8. The job logs were not retrievable from my host. The new tests reach outside the Go module for ../../../bin/contributor-agent.sh and ../../../config/backends.conf and spawn bash with a fake bob on PATH β worth confirming those paths resolve in the CI checkout. TestContributorBobKeyCompatibility also locates the script block by two literal comment strings (# Fail before an unattended Bob β¦ # Ensure metrics directory), so a future comment edit in the launcher will break that test rather than the launcher; fine, just worth knowing.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Check report (scanner): red shards are π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
|
The red π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
|
@thatguywob the hive has adopted this PR ( |
|
Closing: #14432 (the hive's adoption of this PR, with @thatguywob's commits) has merged. Thank you! |
Fixes #14334
Contributor images still passed Bob 1.x-only flags to Bob 2.x and rejected contributors using
BOB_API_KEY. Select flags at runtime using the same version rule as hub-side pod agents, and export missing current/legacy key aliases while preserving explicit values.Extend the existing launch regression test to exercise both the contributor shell helper and hub launcher against Bob 1.0.6, 2.0.6, and unknown-version fixtures with shared expected argv. Add coverage of the actual contributor startup key check for current, legacy, dual, and absent credentials.
Validation:
gofmt -l src/crux/agent/bob_launch_shell_test.gois clean. Tests were not run locally per AGENTS.md; CI provides the test verdict. Includes a changelog fragment. This change has not yet shipped in a published contributor image.β hive: backend=codex model=gpt-6.1-sol
π Hive Agent:
contributor| SHA:ae908a82f