Skip to content

feat(sessions-pipeline): optional rearmSweeper.image override, backport onto prod infra_ref bb41fe6f (HOLD) - #566

Open
khaliqgant wants to merge 2 commits into
backport/agentrelay-prod-bb41fe6ffrom
backport/agentrelay-prod-rearm-sweeper-image
Open

khaliqgant wants to merge 2 commits into
backport/agentrelay-prod-bb41fe6ffrom
backport/agentrelay-prod-rearm-sweeper-image

Conversation

@khaliqgant

@khaliqgant khaliqgant commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

What

Backport onto bb41fe6f (agentrelay-prod's current infra_ref), into base branch backport/agentrelay-prod-bb41fe6f. Route (B), "sweeper-only", of #owner-decisions 251927619257282560 item 2 (cleared by infragrok).

An optional rearmSweeper.image (repository, digest, pullPolicy) for the rearm-sweeper CronJob only. Each unset field falls back to ingestEdge.image, so the default {} renders exactly as before. INGEST_REARM_IMAGE_DIGEST follows the sweeper's image. A digest that is not sha256:<64 hex> is refused.

Why: the sweeper needs the services image with the pass-receipt code (relayhistory-pipeline fde1fe24, 96bulls-services@sha256:fe310fc3…, publish run 45951595065). Until now its image was hard-wired to ingestEdge.image, so bumping it would also roll the live ingest-edge Deployment. That is route (A), not approved.

Proof (helm template, this branch, agentrelay-prod values: values-eks.yaml + EO sessions-pipeline)

  • Override unset: diff -r against bb41fe6f is empty (byte-identical render).
  • With rearmSweeper.image.digest = sha256:fe310fc3…: the only diff is rearm-sweeper.yaml. ingest-edge.yaml is byte-identical (Deployment unchanged).
-              image: "ghcr.io/agentworkforce/96bulls-services@sha256:3274ca4008824137e3d8b37711188b9283ff5f399851a0b29d9d5383934ace7d"
+              image: "ghcr.io/agentworkforce/96bulls-services@sha256:fe310fc3a7a77ab6ec0d3e0ee90463327743d64cbdfe6a76efaf6cac008aa1ec"
-                - { name: INGEST_REARM_IMAGE_DIGEST, value: "sha256:3274ca40…" }
+                - { name: INGEST_REARM_IMAGE_DIGEST, value: "sha256:fe310fc3…" }

Tests: new test_sweeper_image_override (default, override, ingest-edge Deployment unchanged, bad digest refused). ci/sessions-pipeline-s3-ledger/test_chart.py passes locally: 19 tests OK.

No chart version bump: this is an unreleased backport, kept consistent with #564. The "Chart version bumped" step will be red by design. The versioned change is the main PR.

merge-train:hold. Prod pins this branch's head directly via an EO infra_ref PR; plan and apply are cleared separately.

🤖 Generated with Claude Code


Get evidence
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Adds an optional rearmSweeper.image override so the sweeper CronJob can use a different image without rolling the ingest-edge Deployment.

  • Unset fields fall back to ingestEdge.image, so the default {} renders byte-identically; INGEST_REARM_IMAGE_DIGEST follows the sweeper image.
  • Rejects malformed or explicitly empty/falsy digests; with releaseContract.unifiedServicesDigest enabled, the sweeper digest must match worker.image.digest.
  • Adds tests for overrides and digest validation. No chart version bump; this is an unreleased backport.

Written for commit f664be3. Summary will update on new commits.

View guided diff Turn on auto-fix

…rt onto bb41fe6)

rearmSweeper.image {repository, digest, pullPolicy} lets the sweeper CronJob run a
newer services image without rolling the ingest-edge Deployment. Each unset field
falls back to ingestEdge.image, so {} (the default) renders byte-identically.
INGEST_REARM_IMAGE_DIGEST follows the sweeper image. A malformed digest is refused.
New test test_sweeper_image_override. No chart version bump (unreleased backport
for the agentrelay-prod infra_ref).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@khaliqgant khaliqgant added the merge-train:hold Do not merge without Khaliq's direct OK label Nov 27, 2026
@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3cff8f89-2fdc-4c09-87ee-fad5d73b497c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-27T06:41:35.644986Z 0c4bd52 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@devin-ai-integration devin-ai-integration 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.

Devin Review found 1 potential issue.

3 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

{{- $digest := required "ingestEdge.image.digest requires a qualified SERVICE=session-ingest image" $c.image.digest -}}
{{- /* rearmSweeper.image: optional override; each field falls back to ingestEdge.image, so unset renders as before. */ -}}
{{- $si := $s.image | default dict -}}
{{- if and $si.digest (not (regexMatch "^sha256:[0-9a-f]{64}$" (toString $si.digest))) }}{{ fail "rearmSweeper.image.digest must be sha256:<64 hex>" }}{{ end -}}

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.

🟡 Malformed digest silently selects ingest version

When rearmSweeper.image.digest is false or 0, validation skips the supplied value. Helm then uses the ingest digest, so the sweeper runs without the intended update.

Suggested change
{{- if and $si.digest (not (regexMatch "^sha256:[0-9a-f]{64}$" (toString $si.digest))) }}{{ fail "rearmSweeper.image.digest must be sha256:<64 hex>" }}{{ end -}}
{{- if and (not (kindIs "invalid" $si.digest)) (not (regexMatch "^sha256:[0-9a-f]{64}$" (toString $si.digest))) }}{{ fail "rearmSweeper.image.digest must be sha256:<64 hex>" }}{{ end -}}

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

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.

@khaliqgant, linking your fix and test receipt for malformed digests at f664be3 to this open thread: #566 (comment) . Please verify the finding against that head and mark it resolved if covered. Keep the existing backport base and hold.

@greptile-apps

greptile-apps Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5 · The reviewed changes appear safe to merge; the previous shared-digest bypass is fixed.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The reviewed changes appear safe to merge; the previous shared-digest bypass is fixed.

Summary

Adds an optional sweeper-only image override without changing the ingest Deployment.

  • The rearm-sweeper CronJob can use its own image settings.

Reviews (2) · Last reviewed commit: "fix(sessions-pipeline): rearmSweeper.ima..." · Reviewed by Greptile

- Validate whenever rearmSweeper.image has a digest key (hasKey), so false, 0,
  empty or null fail instead of silently falling back to ingestEdge.image.
- Under releaseContract.unifiedServicesDigest=true, rearmSweeper.image.digest
  must equal worker.image.digest (the single services digest).
- Tests: falsy digests refused; new test_sweeper_image_override_unified_contract;
  the override tests use a digest distinct from the fixture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@khaliqgant

Copy link
Copy Markdown
Member Author

Review findings addressed in f664be35 (same fix on #567 as 8d561ffd):

  • Greptile P1 (single-image setting bypassed): under releaseContract.unifiedServicesDigest=true, a set rearmSweeper.image.digest must now equal worker.image.digest; otherwise the render fails with "releaseContract.unifiedServicesDigest requires rearmSweeper.image.digest to equal worker.image.digest". New test test_sweeper_image_override_unified_contract: all contract digests are equal; a different sweeper digest fails; the same digest passes.
  • Devin (falsy digest falls back): validation now runs whenever the digest key is present (hasKey), and requires a sha256:<64 hex> string. The test covers "latest", "", false, 0 and null.
  • The override tests also now use a digest distinct from the fixture's, so they prove a real image change.
    Local: ci/sessions-pipeline-s3-ledger/test_chart.py 20 tests OK. Prod render proof is unchanged: override unset = byte-identical to bb41fe6f; fe310fc3 = rearm-sweeper CronJob image + INGEST_REARM_IMAGE_DIGEST only; ingest-edge Deployment byte-identical. (Prod does not set unifiedServicesDigest; default false.)

🤖 Generated with Claude Code

khaliqgant added a commit that referenced this pull request Nov 27, 2026
…ns-pipeline 0.8.64, agent-relay 0.7.89) (HOLD) (#567)

* feat(sessions-pipeline): optional rearmSweeper.image override (sessions-pipeline 0.8.64, agent-relay 0.7.89)

rearmSweeper.image {repository, digest, pullPolicy} lets the sweeper CronJob run a
newer services image without rolling the ingest-edge Deployment. Each unset field
falls back to ingestEdge.image, so {} (the default) renders unchanged.
INGEST_REARM_IMAGE_DIGEST follows the sweeper image; a malformed digest is refused.
Same change as the agentrelay-prod backport (#566). New test
test_sweeper_image_override; release-matrix rows and docs updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(sessions-pipeline): rearmSweeper.image review findings

- Validate whenever rearmSweeper.image has a digest key (hasKey), so false, 0,
  empty or null fail instead of silently falling back to ingestEdge.image.
- Under releaseContract.unifiedServicesDigest=true, rearmSweeper.image.digest
  must equal worker.image.digest (the single services digest).
- Tests: falsy digests refused; new test_sweeper_image_override_unified_contract;
  the override tests use a digest distinct from the fixture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@agent-relay-code

Copy link
Copy Markdown
Contributor

@khaliqgant, one additional open thread on the existing backport handoff needs a disposition: r4716417189 on malformed digest handling in rearm-sweeper.yaml. Please reply there with the fixing head/test or the reason to decline. The chart-version check and pinned-base hold remain on the existing #575 handoff.

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

merge-train:hold Do not merge without Khaliq's direct OK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant