Skip to content

πŸ› fix: support Bob 2.x in contributor images - #14383

Closed
thatguywob wants to merge 1 commit into
hivecommons:v5from
thatguywob:fix/contributor-bob-auth-14334
Closed

thatguywob wants to merge 1 commit into
hivecommons:v5from
thatguywob:fix/contributor-bob-auth-14334

Conversation

@thatguywob

Copy link
Copy Markdown
Contributor

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.go is 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

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>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 26, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign danathar for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 26, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@thatguywob this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Failing checks:

  • coverage
  • greet / greeting
  • test
  • test (agent 3/5)
  • test (rest 4/5)

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 fix-pr task and launched a parallel fix session; your current work continues.

@hivecommons-hive hivecommons-hive Bot added author/clanker A contributor's own hive authored this PR under their login dco All commits are DCO signed-off role/contributor Author holds the contributor tier in this hive's registry; a human must lgtm/approve stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act labels Oct 26, 2026
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

No conflicting open PRs or same-file overlaps were found.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

CI triage (hive, check-report only β€” head is in a fork): the three red checks are not caused by this diff.

  • greet / greeting and required context scope both died on GitHub API 5xx errors at 18:03Z (HttpError: Server Error, curl: (22) ... error: 502) β€” infrastructure, not the PR.
  • test (agent 3/5) failed only in TestPollTmuxOutputForAgent_WiresThrashBreaker (src/crux/agent/thrash_poller_wiring_test.go:110), a real-tmux timing test that this PR does not touch (changes are bin/contributor-agent.sh, config/backends.conf, bob_launch_shell_test.go, a changelog fragment). It hit the 20s deadline on all three retries; the same shard passed on sibling PR πŸ› fix(agent): keep same-level ACMM pack pauses across upgrade restartsΒ #14381 minutes earlier.

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: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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:

  • chat really becomes the subcommand. The launcher builds the tmux line as $CMD $PERM_FLAG $MODEL_FLAG $REASONING_FLAG (bin/contributor-agent.sh:1160), and PERM_FLAG comes from backend_perm_flag_shell, which just %q-quotes each word of backend_perm_flag's output (config/backends.conf:706–714). So for Bob 2.x the pane runs bob chat --accept-license --auto-approve --trust, with nothing in between the binary and chat. MODEL_FLAG stays empty for bob (contributor-agent.sh:1125), so no --model sneaks in after it either.
  • Version detection is the same expression the pods use. case "$(bob --version 2>/dev/null | sed -n 1p)" in 1.*) … ;; *) … ;; esac in the new bob) branch is character-for-character what bobLaunchCmd emits at src/crux/agent/manager_launch.go:788, and the two argv strings match bobLaunchCmdV1 (:800–804) and bobLaunchCmdV2 (:816–819). Unknown/missing bob falls 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_env is invoked as the if condition (contributor-agent.sh:905), so its exports land in the parent shell, and that happens before tmux new-session at :1049 β€” the pane inherits whichever name the contributor set. The two-line fill (BOB_API_KEY from BOBSHELL_API_KEY, then the reverse) preserves an explicitly-set pair, which is exactly what the "both" case in TestContributorBobKeyCompatibility asserts (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

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Check report (scanner): red shards are test (agent 3/5) β†’ crux/agent.TestPollTmuxOutputForAgent_WiresThrashBreaker and test (rest 4/5) β†’ pkg/github.TestHiveOpenPRScript_MultilineBodyIsValidJSONWithoutPython3; greet / greeting failed on a GitHub 5xx (infra). Neither test is touched by this diff, both fail identically on siblings #14391 / #14396, and v5 HEAD is green β€” a shared/flaky pattern, not this PR's fault. Suggested fix: rebase onto current v5 (7 commits behind) to re-run CI.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor

The red test (agent */5) shard here is a shared CI incident, not this PR's diff: TestPollTmuxOutputForAgent_WiresThrashBreaker fails 3/3 on every PR that adds a _test.go to src/crux/agent (shard reshuffle) while the identical test is green on v5. Tracked in #14406; this PR is deferred against it rather than retried.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@thatguywob the hive has adopted this PR (stage/074-adopted-by-hive): CI stayed red for 2h after the nudge and the relay nudge went unanswered. It is being finished as #14432, which carries your commits (and sign-off) unchanged; the hive will rebase and fix CI there. This PR is closed automatically once #14432 merges. If you would rather finish it yourself, push a new head here and say so on #14432.

@hivecommons-hive hivecommons-hive Bot added stage/074-adopted-by-hive Contributor PR adopted: author unavailable after red CI; the hive is finishing it (takeover path) and removed stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act labels Oct 26, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Closing: #14432 (the hive's adoption of this PR, with @thatguywob's commits) has merged. Thank you!

@hivecommons-hive hivecommons-hive Bot closed this Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/clanker A contributor's own hive authored this PR under their login dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. role/contributor Author holds the contributor tier in this hive's registry; a human must lgtm/approve size/L Denotes a PR that changes 100-499 lines, ignoring generated files. stage/074-adopted-by-hive Contributor PR adopted: author unavailable after red CI; the hive is finishing it (takeover path)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

πŸ› contributor image: bob 2.x still gets --auth-method from backends.conf (#8644 only fixed hub-side pod agents)

1 participant