Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/kody-fleet-autofix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# DEFAULT-DISABLED SETUP DRAFT. This pin implements the initial DeepSeek route only.
# MiniMax routing and budget integration remain pending in Usage-Monitor #1602:
# https://github.com/Simple-With-Us/Usage-Monitor/issues/1602
# Keep disabled until the reviewed replacement and secure activation setup are ready.
# daily_attempt_limit is zero and budget_policy_id is pending.
name: Kody DeepSeek Fix Proposals

# Generated offline. Missing SWU_KODY_AUTOFIX_ENABLED means disabled.
# Budget approval and protected-environment setup are separate owner actions.
# Daily attempt slots bound this repository only; they are not a dollar cap.
on:
check_run:
types: [completed]

permissions: {}
concurrency:
group: kody-caller-${{ github.repository_id }}-${{ github.event.check_run.pull_requests[0].number || github.event.check_run.id }}
cancel-in-progress: false
Comment on lines +16 to +18

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

kody code-review Bug high

Concurrency cancellation in .github/workflows/kody-fleet-autofix.yml silently drops serialized Kody runs for the same PR: under GitHub's default queue: single, each newly queued run cancels the previous pending run regardless of cancel-in-progress: false, which protects only the in-progress run, so a third near-simultaneous check completion can prevent fix proposals for the reviewed head SHA even though the daily slot remains. Key the group by github.event.check_run.id (falling back to github.event.check_run.pull_requests[0].number) so each eligible trigger owns its slot while the callee's per-UTC-day kody-reserve group and create-only attempt tags bound paid work, or use queue: max if per-PR serialization must remain.

concurrency:
  # Key on the check run id: a per-PR group serializes runs, and under the
  # default `queue: single` the pending run is canceled when a newer one is
  # queued, silently dropping proposals even with cancel-in-progress: false.
  group: kody-caller-${{ github.repository_id }}-${{ github.event.check_run.id || github.event.check_run.pull_requests[0].number }}
  cancel-in-progress: false
Prompt for LLM

File .github/workflows/kody-fleet-autofix.yml:

Line 16 to 18:

Concurrency cancellation in `.github/workflows/kody-fleet-autofix.yml` silently drops serialized Kody runs for the same PR: under GitHub's default `queue: single`, each newly queued run cancels the previous pending run regardless of `cancel-in-progress: false`, which protects only the in-progress run, so a third near-simultaneous check completion can prevent fix proposals for the reviewed head SHA even though the daily slot remains. Key the group by `github.event.check_run.id` (falling back to `github.event.check_run.pull_requests[0].number`) so each eligible trigger owns its slot while the callee's per-UTC-day `kody-reserve` group and create-only attempt tags bound paid work, or use `queue: max` if per-PR serialization must remain.

Suggested Code:

concurrency:
  # Key on the check run id: a per-PR group serializes runs, and under the
  # default `queue: single` the pending run is canceled when a newer one is
  # queued, silently dropping proposals even with cancel-in-progress: false.
  group: kody-caller-${{ github.repository_id }}-${{ github.event.check_run.id || github.event.check_run.pull_requests[0].number }}
  cancel-in-progress: false

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

​

​


jobs:
propose:
if: >-
vars.SWU_KODY_AUTOFIX_ENABLED == 'true' &&
github.event_name == 'check_run' && github.event.action == 'completed' &&
github.run_attempt == 1 &&
github.event.check_run.app.id == 413034 &&
github.event.sender.type == 'Bot' && github.event.sender.id == 148880201 &&
github.event.sender.login == 'kody-ai[bot]' &&
github.event.check_run.conclusion == 'success' &&
github.event.check_run.pull_requests[0].number != null &&
github.event.check_run.pull_requests[1] == null
permissions:
contents: write
pull-requests: write
checks: read
actions: read
uses: Simple-With-Us/congress-trading-shared/.github/workflows/kody-autofix-reusable.yml@8ef33de1953158f26b2fd872b8d1bc045032844e
with:
repository_id: '1370549454'
profile: 'swift'
source_prefixes: '["Sources/CodeCaps/","Sources/QuotaCore/"]'
daily_attempt_limit: 0
budget_policy_id: 'pending'
Loading