feat(sessions-pipeline): rearm-sweeper pass-receipt env, backport onto prod infra_ref c2aef4a1 (HOLD)
What
Backport onto c2aef4a1 (agentrelay-prod's infra_ref), into base branch backport/agentrelay-prod-c2aef4a1. Item (3) of the "Sweeper infra batch", #owner-decisions 251927619257282560 (Khaliq; route A confirmed by claude-cloud-cloud-b1).
charts/sessions-pipeline/templates/rearm-sweeper.yaml: the rearm-sweeper container gains the provenance env that relayhistory-pipeline src/session-ingest/rearm-sweeper-receipt.ts (799f3925, review PASS) reads:
| Env | Source |
|---|---|
INGEST_REARM_CRONJOB_NAME | literal $name (<release>-rearm-sweeper); the downward API has no owner refs |
INGEST_REARM_IMAGE_DIGEST | the $digest the CronJob already runs (ingestEdge.image.digest) |
INGEST_REARM_JOB_NAME | fieldRef metadata.labels['batch.kubernetes.io/job-name'] |
INGEST_REARM_JOB_UID | fieldRef metadata.labels['batch.kubernetes.io/controller-uid'] (the workload identity) |
INGEST_REARM_POD_NAME | fieldRef metadata.name |
INGEST_REARM_POD_UID | fieldRef metadata.uid |
INGEST_REARM_POD_NAMESPACE | fieldRef metadata.namespace |
All seven are optional in the receipt code (missing → field omitted), so this is harmless before that code is deployed. POD_NAME and POD_UID are beyond the five originally requested; the receipt code documents and reads them.
Why a backport, and no version bump
Prod pins infra_ref c2aef4a1. infra main is 37 commits ahead (sessions-pipeline 0.8.56 → 0.8.62, agent-relay 0.7.76 → 0.7.87), so moving prod to main would ship far more than this. This branch is c2aef4a1 + this one commit. Chart versions are deliberately not bumped: the branch is unreleased, and identical helm.sh/chart labels keep the prod plan to exactly this env change.
Follow-up: the same template change still needs a normal, versioned PR to main, so the next prod infra_ref move does not drop it. rearm-sweeper.yaml is unchanged on main since c2aef4a1, so it applies cleanly.
Rollout (held)
- Merge this into
backport/agentrelay-prod-c2aef4a1. - EO PR:
environments/agentrelay-prod/deploy/ci.jsoninfra_ref→ the merged commit. Its push plan must show onlyCronJob/agent-relay-prod/agent-relay-rearm-sweeperenv (+7), no Jobs. agentrelay-deploy mode=apply(pg_dump control snapshot first), then verify the next sweeper Job completes and carries the env.
🤖 Generated with Claude Code

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Backports pass-receipt provenance env to the rearm-sweeper CronJob on prod's pinned infra_ref c2aef4a1, so its receipt records can identify the run. Registers the new env in the self-hosted requirements registry, re-renders the docs, and adds chart tests covering the env and its exact fieldRefs.
- Seven new env: CronJob name, image digest, and downward-API job/pod names, UIDs, and namespace.
- All are optional in the receipt code, so harmless until that code ships; no chart version bump keeps the prod plan limited to this change.
- Tests still forbid Secret/ConfigMap credentials under Pod Identity, allowing only downward-API fieldRefs.
Rollout (held)
- After merge, point
environments/agentrelay-prod/deploy/ci.jsoninfra_refat the merged commit; the push plan must show only the rearm-sweeper CronJob env change. - The same template change still needs a normal, versioned PR to
mainso the next prodinfra_refmove keeps it.