Skip to content

✨ images: build and publish hive-mx (Betty C2 part 2) - #18428

Merged
kubestellar-prow[bot] merged 1 commit into
v5from
feat/18395-mx-image
Nov 16, 2026
Merged

kubestellar-prow[bot] merged 1 commit into
v5from
feat/18395-mx-image

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Part 2 of #18395 (Betty C2, email in; plan #18391). Follows #18423 (hive-mx itself).

What

  • src/Dockerfile.mx: the same digest-pinned golang:1.27-alpine builder as src/Dockerfile and src/Dockerfile.hub (cross-compiled per TARGETARCH, CGO_ENABLED=0, -trimpath), and a runtime of gcr.io/distroless/static-debian12:nonroot pinned to its multi-arch index digest: one static binary, CA certificates, no shell, uid/gid 65532, ports 2525 (SMTP; the Service maps 25 to it) and 8080 (health). Time zone data is linked into the binary (time/tzdata in cmd/hive-mx).
  • docker.yml: build-mx and merge-mx, copies of build-hub / merge-hub: per-arch build by digest on the same runners (linux/amd64 and linux/arm64, hive-oke is arm64), manifest list and moving tags through publish-image-tags.sh (:<sha7>, :<branch>-latest, :latest, :candidate on v5) as ghcr.io/<owner>/hive-mx, and the cross-org mirror.
  • v2-ci.yml: the pre-merge docker matrix builds src/Dockerfile.mx too (docker (mx)); the generated integration workflows are regenerated with generate-integration-ci.py.
  • releases.md: hive-mx is published with the others but not yet retagged :v<version>, promoted to :stable or pruned (adding it to those loops would fail a release whose SHA predates the image); deploy it pinned by tag and digest.

🤖 Generated with Claude Code

@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 16, 2026
@hivecommons-hive

hivecommons-hive Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Failing checks:

  • contract-tests

Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path.

Review findings from reviewer-2 (folded here because this head already carries its hive review):

This PR edits workflow files (docker.yml, v2-ci.yml, the two generated integration workflows), which hive routes to a person. I did not find a defect.

What I read: build-mx is a copy of build-hub (same gate condition, the release-gate/* exclusion, SHA-pinned actions, GHCR login only when push == 'true'). The workflow's top-level permissions (contents: read, packages: write, docker.yml:77-79) already covers it, so no permission widening. src/Dockerfile.mx uses the same digest-pinned builder, a digest-pinned distroless nonroot runtime, USER 65532, no shell.

Open question for the maintainer: this adds a new externally published package and a new required-looking docker (mx) check in v2-ci.yml. Confirm that's wanted, including the cross-org mirror, before it lands.

hive/awaiting-ci: 'Sign-off survives the squash' fails on sign-off attribution (a commit's Signed-off-by must name its author; the hive cannot certify the human's DCO). Needs the PR author to re-sign (git rebase --signoff / commit --amend -s) and force-push. native-queue-policy is also red. Deferring this kick.


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

— hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.325

@hivecommons-hive

hivecommons-hive Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor
70a43d2

ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blocked

Hive flagged this PR (author @clubanderson, head 70a43d21c784) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation — a maintainer should confirm the change is intended before it merges.

  • sensitive_path — changes 6 sensitive path(s) (Touches a sensitive path (OWNERS, workflows, policies, hive config, security docs, …))
    • .github/workflows/docker.yml
    • .github/workflows/integration-candidate.yml
    • .github/workflows/integration-technical-v2-ci.yml
    • .github/workflows/v2-ci.yml
    • src/Dockerfile.mx
    • src/deploy/test_arm64_lane_probes_pr_code.sh
  • ci_gate_weakening — CI configuration is deleted, softened or has gate checks removed (Disables or softens CI gates (continue-on-error, || true, removed checks))
    • .github/workflows/docker.yml

Hive did not add the sentinel-alert label because this author is trusted. The finding remains recorded for audit and the dashboard Security tab; set sentinel.trusted_authors_block: true to require the blocking label for trusted authors too.

@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.

Decision needed: @clubanderson should confirm the new build-mx/merge-mx jobs in .github/workflows/docker.yml (GHCR push with GITHUB_TOKEN, cross-org mirror login) are acceptable to publish a new public image.

Routing, not a defect finding: this PR edits .github/workflows/* and adds a new published image (external side effect), which I always send to a person.

Verified in the diff: all new uses: are SHA-pinned with version comments; docker/login-action uses secrets.GITHUB_TOKEN (docker.yml diff lines ~70, ~155) and a third login for the cross-org mirror (~197); no pull_request_target; the push gating copies build's needs.gate.outputs.push condition. I did not find a permissions widening in the added lines, but I did not confirm the job-level permissions: blocks match build-hub/merge-hub; a maintainer should check that. The body's description matches the file list.

— hive: agent=reviewer backend=claude model=claude-sonnet-5-5 claude=2.1.325

@hivecommons-hive

hivecommons-hive Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

@clubanderson this PR is back in your court (stage/071-needs-author). Its commits are signed off as the hive App rather than as you, so a squash merge would misattribute them and the sign-off attribution check stays red. No hive agent can rewrite a contributor's commits — the fix is yours:

  • 1 commit is signed off as the hive App instead of you, so a squash merge would misattribute it — set git config user.email to your own address, then run git rebase --exec 'git commit --amend --no-edit --reset-author -s' HEAD~3 && git push --force-with-lease

Once the new head lands, CI and the review swarm re-run automatically and the PR returns to the normal path. Current head: 70a43d21c784.

Updates (newest last):

  • updated 2026-11-16 15:03 UTC: head c9815146b600, 1 commit signed off as the hive App
  • updated 2026-11-16 15:08 UTC: head 70a43d21c784, 1 commit signed off as the hive App

@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.

Decision needed: @clubanderson should decide whether .github/workflows/docker.yml may start publishing a new public image ghcr.io/<owner>/hive-mx (and mirror it cross-org) from every v5 push.

Routing to a human, not a defect: this PR edits .github/workflows/docker.yml (new build-mx/merge-mx jobs, +228 lines) and adds a new externally published image plus a cross-org mirror, which is a trust-surface and external-publish change.

What I read: build-mx/merge-mx (docker.yml diff) are a faithful copy of the hub jobs. They keep the same SHA-pinned actions, contents-less token use, the needs.gate.outputs.push gating, the same v5 true candidate publish args, and the same hard-fail when the cross-org secret is missing on hivecommons. src/Dockerfile.mx pins both base images by digest and runs as 65532. The four count assertions in test-publish-image-tags.sh and test_arm64_lane_probes_pr_code.sh were bumped 3 to 4 consistently with the new jobs. I found no logic error.

Note for the decider: releases.md documents that hive-mx is deliberately not retagged :v<version>, promoted to :stable or pruned, so it will accumulate untagged-by-release images until a follow-up lands. That seems intentional per the PR body.

— hive: agent=reviewer backend=claude model=claude-sonnet-5-5 claude=2.1.325

@hivecommons-hive

Copy link
Copy Markdown
Contributor

hive/scanner: 'Sign-off survives the squash' fails on d54fbdc and merge commit c981514: Signed-off-by names the hive App bot while the PR author is clubanderson. Reword and re-sign as the contributor (git commit --amend -s --no-edit, git push --force-with-lease) or squash the bot commits into signed ones. I'm leaving the human's DCO certification to the human. runtime-tests and native-queue-policy also fail; the sign-off fix goes first, then re-read those logs.


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

— hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.325

src/Dockerfile.mx: the digest-pinned golang:1.27-alpine builder (go.mod
and the Crux go.mod first for a module-download layer) and a static
hive-mx on gcr.io/distroless/static-debian12:nonroot (index digest
pinned, uid 65532, ports 2525 and 8080). docker.yml gains build-mx and
merge-mx, copies of the hub jobs: per-arch build by digest for amd64 and
arm64, manifest list via publish-image-tags.sh and the cross-org mirror.
v2-ci's pre-merge docker matrix builds it too (integration CI
regenerated); the publish-tag and arm64-lane contract tests count four
image rows; TRUSTED_SCRIPTS_TREE re-pinned.

Part of #18391, #18395.

Signed-off-by: Andy Anderson <andy@clubanderson.com>

@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.

Decision needed: @clubanderson should confirm the new TRUSTED_SCRIPTS_TREE value in .github/scripts/integration-governance.cjs is the intended regenerated tree hash, since this PR edits the workflow/CI trust surface and publishes a new GHCR image with the cross-org PAT.

Routing, not rejecting: I read the diff and found no defect, but it changes CI trust surfaces, which I don't approve alone.

What I read (diff at head dafbd9e):

  • build-mx/merge-mx in .github/workflows/docker.yml mirror build-hub/merge-hub: same action SHA pins, same gate conditions, same publish-image-tags.sh args (v5 true candidate), and the same cross-org credential gate (secrets[needs.gate.outputs.cross_secret]). Nothing new in permissions or secrets handling.
  • The mx matrix rows in v2-ci.yml and the two generated integration workflows are consistent with each other.
  • src/Dockerfile.mx uses digest-pinned bases and runs as 65532 with no shell. test-publish-image-tags.sh and test_arm64_lane_probes_pr_code.sh counts (3→4) match the four publish-image-tags.sh, run-number label, INCLUDE_LATEST and arm64-runner occurrences the new jobs add.

Open question for a human (not verified): integration-governance.cjs:12 swaps the hardcoded TRUSTED_SCRIPTS_TREE (b60380f… → ae5964e…). The comment above it says a caller-supplied value must never choose the verifier tree, so this literal is a trust anchor. I can't recompute the tree hash of the .github closure from here; someone should confirm it comes from generate-integration-ci.py as the body says and not a hand edit.

Also: the new image publishes :latest and :candidate for a service that receives inbound mail; releases.md says it is deliberately outside retag/promote, which reads as intentional.

— hive: agent=reviewer backend=claude model=claude-sonnet-5-5 claude=2.1.325

@clubanderson clubanderson added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 16, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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

The pull request process is described 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant