apiVersion: jenkins.io/v1 kind: PipelineActivity metadata: annotations: lighthouse.jenkins-x.io/cloneURI: https://github.com/greencapitaltrade/jarvis.git lighthouse.jenkins-x.io/job: release pipeline.jenkins-x.io/traceID: 8d04fdc250853ae0b44deabe7c24cf53 creationTimestamp: "2026-07-13T07:00:10Z" generation: 7 labels: branch: main build: "108" buildID: "1783925999435" created-by-lighthouse: "true" event-GUID: 74579af4-7e88-11f1-8ed1-d1ef8fc2196c lighthouse.jenkins-x.io/baseSHA: 274300578e4df093f76d93c01079261b811b396d lighthouse.jenkins-x.io/branch: main lighthouse.jenkins-x.io/buildNum: "1783925999435" lighthouse.jenkins-x.io/context: release lighthouse.jenkins-x.io/id: capitaltrade-jarvis-main-release-njbd5 lighthouse.jenkins-x.io/job: release lighthouse.jenkins-x.io/lastCommitSHA: 274300578e4df093f76d93c01079261b811b396d lighthouse.jenkins-x.io/refs.org: greencapitaltrade lighthouse.jenkins-x.io/refs.repo: jarvis lighthouse.jenkins-x.io/type: postsubmit owner: greencapitaltrade podName: capitaltrade-jarvis-main-release-j7tm6-from-build-pack-pod provider: "" repository: jarvis tekton.dev/pipeline: capitaltrade-jarvis-main-release managedFields: - apiVersion: jenkins.io/v1 fieldsType: FieldsV1 fieldsV1: f:metadata: f:labels: .: {} f:branch: {} f:build: {} f:buildID: {} f:owner: {} f:provider: {} f:repository: {} f:spec: .: {} f:batchPipelineActivity: {} f:build: {} f:gitBranch: {} f:gitOwner: {} f:gitRepository: {} f:pipeline: {} manager: jx-gitops-1.3.0 operation: Update time: "2026-07-13T07:00:10Z" - apiVersion: jenkins.io/v1 fieldsType: FieldsV1 fieldsV1: f:spec: f:lastCommitMessage: {} f:lastCommitSHA: {} f:releaseNotesURL: {} f:version: {} manager: jx-changelog-0.10.22 operation: Update time: "2026-07-13T07:08:18Z" - apiVersion: jenkins.io/v1 fieldsType: FieldsV1 fieldsV1: f:spec: f:completedTimestamp: {} f:startedTimestamp: {} f:status: {} manager: jx-promote-0.6.42 operation: Update time: "2026-07-13T07:09:01Z" - apiVersion: jenkins.io/v1 fieldsType: FieldsV1 fieldsV1: f:metadata: f:annotations: .: {} f:lighthouse.jenkins-x.io/cloneURI: {} f:lighthouse.jenkins-x.io/job: {} f:pipeline.jenkins-x.io/traceID: {} f:labels: f:created-by-lighthouse: {} f:event-GUID: {} f:lighthouse.jenkins-x.io/baseSHA: {} f:lighthouse.jenkins-x.io/branch: {} f:lighthouse.jenkins-x.io/buildNum: {} f:lighthouse.jenkins-x.io/context: {} f:lighthouse.jenkins-x.io/id: {} f:lighthouse.jenkins-x.io/job: {} f:lighthouse.jenkins-x.io/lastCommitSHA: {} f:lighthouse.jenkins-x.io/refs.org: {} f:lighthouse.jenkins-x.io/refs.repo: {} f:lighthouse.jenkins-x.io/type: {} f:podName: {} f:tekton.dev/pipeline: {} f:spec: f:baseSHA: {} f:buildLogsUrl: {} f:context: {} f:gitUrl: {} f:message: {} f:steps: {} manager: jx-build-controller operation: Update time: "2026-07-13T07:26:07Z" name: greencapitaltrade-jarvis-main-108 namespace: jx resourceVersion: "184302201" uid: 61c4fdef-1a09-4f35-bac3-e92eb7e24078 spec: baseSHA: 274300578e4df093f76d93c01079261b811b396d batchPipelineActivity: {} build: "108" buildLogsUrl: s3://logs-gct-prod-20260425045301534100000007/jenkins-x/logs/greencapitaltrade/jarvis/main/108.log completedTimestamp: "2026-07-13T07:09:01Z" context: release gitBranch: main gitOwner: greencapitaltrade gitRepository: jarvis gitUrl: https://github.com/greencapitaltrade/jarvis.git lastCommitMessage: "fix(queue): acknowledge Redis processing claim on all worker exit paths (closes #219)\n\n## Bug\n`_handle_exit_code` (and other terminal paths in `_execute_task`) deleted\nthe filesystem claim path but never called `r.hdel(jarvis:processing:,\ntask_uuid)`, so `recover_stale(stale_minutes=10)` re-injected every COMPLETED\ntask ~10 min after completion → the replay storm that re-parked #222 and\nprevented the bot from producing sub-task PRs.\n\n## Fix\n1. Add `queue.acknowledge(root, pool, task_uuid, stage=None)` — HDEL from\n `jarvis:processing:`, best-effort (Redis exception caught+logged,\n never re-raised). Export from `jarvis_lib.__init__`.\n\n2. Wire `acknowledge()` into ALL six terminal worker exit paths in\n `bin/jarvis_workers.py`:\n \ - `_execute_task`: freshness-gate drop (stale context)\n - `_execute_task`: duplicate-in-flight drop (per-issue mutex)\n - `_handle_exit_code` exit 0: success / re-route\n - `_handle_exit_code` exit 75: temp failure / re-enqueue with backoff\n \ - `_handle_exit_code` exit < 0: signal-interrupted / silent re-enqueue\n - `_handle_exit_code` permanent failure (any other exit): no re-enqueue\n\n3. Also add `from __future__ import annotations` to `redis_client.py` for\n Python 3.9 local-dev compatibility (CI runs 3.11+, but the annotation\n `redis.Redis | None` caused an import error on 3.9).\n\n## Tests\n- `bin/jarvis_lib/tests/test_acknowledge.py` — 7 unit tests for the primitive\n (export, HDEL, no-op absent, idempotent, prevents stale-recovery, log\n fields, exception swallowed).\n- `bin/jarvis_lib/tests/test_workers.py` — 6 spy tests asserting each of the\n six exit paths calls `acknowledge()` with the correct task_uuid; a future\n regression that drops the wiring will fail CI.\n- `tests/test_acknowledge_e2e.py` — un-skip (remove `pytest.skip`), full\n \ claim→acknowledge→no-stale-recovery lifecycle.\n\nAll 286 jarvis_lib tests + 1 e2e test pass locally.\n\nCloses #219 #228 #229 #230 #231. Supersedes #227 #232 (consolidated to break\nthe pipeline deadlock).\n\n\U0001F916 Generated with [Claude Code](https://claude.com/claude-code)\n\nCo-Authored-By: Claude Fable 5 \n" lastCommitSHA: 28059d0c9343902997032f0ddcda2a950d96a7ec message: 'Tasks Completed: 1 (Failed: 0, Cancelled 0), Skipped: 0' pipeline: greencapitaltrade/jarvis/main releaseNotesURL: https://github.com/greencapitaltrade/jarvis/releases/tag/v0.15.13 startedTimestamp: "2026-07-13T07:08:01Z" status: Succeeded steps: - kind: Stage stage: completedTimestamp: "2026-07-13T07:09:01Z" name: Release startedTimestamp: "2026-07-13T07:08:01Z" status: Succeeded - kind: Stage stage: completedTimestamp: "2026-07-13T07:09:44Z" name: from build pack startedTimestamp: "2026-07-13T07:00:03Z" status: Succeeded steps: - completedTimestamp: "2026-07-13T07:00:04Z" name: Git Clone startedTimestamp: "2026-07-13T07:00:03Z" status: Succeeded - completedTimestamp: "2026-07-13T07:00:06Z" name: Next Version startedTimestamp: "2026-07-13T07:00:05Z" status: Succeeded - completedTimestamp: "2026-07-13T07:00:10Z" name: Jx Variables startedTimestamp: "2026-07-13T07:00:07Z" status: Succeeded - completedTimestamp: "2026-07-13T07:02:39Z" name: Build Test startedTimestamp: "2026-07-13T07:00:10Z" status: Succeeded - completedTimestamp: "2026-07-13T07:02:40Z" name: Check Registry startedTimestamp: "2026-07-13T07:02:39Z" status: Succeeded - completedTimestamp: "2026-07-13T07:07:55Z" name: Build Container Build startedTimestamp: "2026-07-13T07:02:40Z" status: Succeeded - completedTimestamp: "2026-07-13T07:08:18Z" name: Promote Changelog startedTimestamp: "2026-07-13T07:07:56Z" status: Succeeded - completedTimestamp: "2026-07-13T07:08:23Z" name: Promote Helm Release startedTimestamp: "2026-07-13T07:08:19Z" status: Succeeded - completedTimestamp: "2026-07-13T07:09:04Z" name: Promote Jx Promote startedTimestamp: "2026-07-13T07:08:23Z" status: Succeeded - completedTimestamp: "2026-07-13T07:09:44Z" name: Publish Org Kb startedTimestamp: "2026-07-13T07:09:05Z" status: Succeeded - kind: Stage stage: completedTimestamp: "2026-07-13T07:09:44Z" name: from build pack startedTimestamp: "2026-07-13T07:00:03Z" status: Succeeded steps: - completedTimestamp: "2026-07-13T07:00:04Z" name: Git Clone startedTimestamp: "2026-07-13T07:00:03Z" status: Succeeded - completedTimestamp: "2026-07-13T07:00:06Z" name: Next Version startedTimestamp: "2026-07-13T07:00:05Z" status: Succeeded - completedTimestamp: "2026-07-13T07:00:10Z" name: Jx Variables startedTimestamp: "2026-07-13T07:00:07Z" status: Succeeded - completedTimestamp: "2026-07-13T07:02:39Z" name: Build Test startedTimestamp: "2026-07-13T07:00:10Z" status: Succeeded - completedTimestamp: "2026-07-13T07:02:40Z" name: Check Registry startedTimestamp: "2026-07-13T07:02:39Z" status: Succeeded - completedTimestamp: "2026-07-13T07:07:55Z" name: Build Container Build startedTimestamp: "2026-07-13T07:02:40Z" status: Succeeded - completedTimestamp: "2026-07-13T07:08:18Z" name: Promote Changelog startedTimestamp: "2026-07-13T07:07:56Z" status: Succeeded - completedTimestamp: "2026-07-13T07:08:23Z" name: Promote Helm Release startedTimestamp: "2026-07-13T07:08:19Z" status: Succeeded - completedTimestamp: "2026-07-13T07:09:04Z" name: Promote Jx Promote startedTimestamp: "2026-07-13T07:08:23Z" status: Succeeded - completedTimestamp: "2026-07-13T07:09:44Z" name: Publish Org Kb startedTimestamp: "2026-07-13T07:09:05Z" status: Succeeded version: 0.15.13 status: {}