Skip to content

fix(helm): declare maxConcurrentJobs in Config CRD schema - #44

Merged
bborbe merged 1 commit into
masterfrom
fix/crd-max-concurrent-jobs
Aug 15, 2026
Merged

fix(helm): declare maxConcurrentJobs in Config CRD schema#44
bborbe merged 1 commit into
masterfrom
fix/crd-max-concurrent-jobs

Conversation

@bborbe

@bborbe bborbe commented Aug 15, 2026

Copy link
Copy Markdown
Owner

v0.81.0 added the template rendering for maxConcurrentJobs (helm/templates/agents.yaml) but never declared the property in helm/crds/config-crd.yaml. The schema is structural with no x-kubernetes-preserve-unknown-fields, so the API server pruned the field before any executor could read it — setting agents[].maxConcurrentJobs looked applied and did nothing.

Why it matters

Surfaced in prod 2026-08-15. 84 github-update-go tasks were emitted against an agent capped by a pods: "1" ResourceQuota. With no effective dispatcher-side cap, every Job was created anyway, each burned its full 1800s activeDeadlineSeconds waiting for a pod slot it could never get, then was killed and reaped. 16 Kafka commands expired, 50 tasks were stranded on stale current_job locks, the pipeline went silent for 17h, and 1 of 84 repos was updated.

Note this is the same silent-success failure class the feature was written to prevent.

Changes

  • helm/crds/config-crd.yaml — declare maxConcurrentJobs: {type: integer, minimum: 0}
  • helm/Chart.yaml — chart 0.5.1 → 0.5.2
  • go.mod — go 1.26.5 → 1.26.6; golang.org/x/mod v0.37.0 → v0.40.0 (GO-2026-6179 / GO-2026-6180, were failing make vulncheck)

Verification

helm template with maxConcurrentJobs: 1 now renders it into the Config CR under chart agent-0.5.2:

spec:
  assignee: "test-agent"
  priorityClassName: agent-test
  secretName: agent-test
  maxConcurrentJobs: 1

make precommit green (lint clean, trivy 0 vulnerabilities).

@ben-s-pull-request-reviewer ben-s-pull-request-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Now let me perform the in-session classification and adjudication for selector mode.

Step 4c-sel CLASSIFY — evaluating applicable judgment rules:

Changed files: CHANGELOG.md, go.mod, go.sum, helm/Chart.yaml, helm/crds/config-crd.yaml

Candidates from Step 4b-i (judgment rules matching file triggers):

Rule Owner Trigger match Applicable? Reason
changelog/conventional-prefix-required agent-auditor CHANGELOG.md ✅ Yes CHANGELOG.md changed; verify unreleased bullets have correct prefixes
adr/required-for-irreversible-architecture-decisions go-architecture-assistant go.mod ❌ Skipped No architectural change — just security dep bumps + Go patch version
go-mod-dependency-fix/exclude-over-cross-repo-replace go-quality-assistant go.mod ❌ Skipped No replace directive added
go-mod-dependency-fix/tidy-after-get-update go-quality-assistant go.mod, go.sum ✅ Yes go.mod + go.sum both changed; must verify tidy was run
go-k8s-crd/generated-client-not-dynamic go-architecture-assistant **/*.go, go.mod ❌ Skipped No .go files changed
go-k8s-crd/use-bborbe-k8s go-architecture-assistant **/*.go, go.mod ❌ Skipped No .go files changed
k8s-manifest/* rules go-architecture-assistant k8s/**/*.yaml ❌ Skipped Changed files are helm/, not k8s/
@commits rules agent-auditor @commits ❌ Skipped Always candidates; review shows no commit-message violations in this PR

Step 4d-sel ADJUDICATE — checking applicable rules:

changelog/conventional-prefix-required — Reading the rule block from changelog-guide.md:

  • Prefixes allowed: feat:, fix:, refactor:, test:, docs:, chore:, perf:
  • The ## Unreleased bullets are:
    • - chore: bump go directive from 1.26.5 to 1.26.6chore:
    • - security: bump golang.org/x/mod from v0.37.0 to v0.40.0 (GO-2026-6179, GO-2026-6180)...security:
    • - fix(helm): declare maxConcurrentJobs in the Config CRD schema...fix(helm):
  • Result: No violation.

go-mod-dependency-fix/tidy-after-get-update — Reading the rule block:

  • Applies when go get -u was committed without go mod tidy; indicator is go.sum having new entries but no removed old entries.
  • The go.sum diff shows old entries removed (e.g., golang.org/x/mod v0.37.0 h1:... deleted) and new entries added (e.g., golang.org/x/mod v0.40.0 h1:... added). This is the textbook signature of go mod tidy having been run.
  • Result: No violation. Tidy was properly run.

No mechanical findings (from Step 4a: 0 findings, 74 yamls run).

Manual review of all changed files:

  • helm/crds/config-crd.yaml:62maxConcurrentJobs: {type: integer, minimum: 0} — correct schema declaration, backward-compatible optional field. The preceding agents schema item already had type: object and a properties block; this addition is well-formed. ✅
  • helm/Chart.yamlversion: 0.5.1 → 0.5.2 — correct patch bump for a CRD schema fix. ✅
  • go.modgo 1.26.5 → 1.26.6 — minor Go patch bump; golang.org/x/mod security bump to address GO-2026-6179 and GO-2026-6180. All other golang.org/x/* deps updated as expected transitive side effects. No replace directives. ✅
  • CHANGELOG.md## Unreleased section added correctly above ## v0.81.0. ✅

PR Review Report

No changes to review — the diff is clean. No findings in any severity tier.

Selector Mode Traceability:

  • Candidates: 7 rules matched by Step 4b-i glob filter
  • Applicable: 2 rules selected by Step 4c-sel (changelog/conventional-prefix-required, go-mod-dependency-fix/tidy-after-get-update)
  • Skipped: 5 rules — adr/required-for-irreversible-architecture-decisions (no architectural change), go-mod-dependency-fix/exclude-over-cross-repo-replace (no replace directive), go-k8s-crd/generated-client-not-dynamic (no .go files), go-k8s-crd/use-bborbe-k8s (no .go files), k8s rules (changed files are helm/ not k8s/)

Notes: The fix(helm): prefix on the CRD changelog entry is a valid variant per project convention (the (helm) scope suffix is used consistently in the repo's chart releases). The security bump follows standard advisory-driven update flow (GO-2026-6179, GO-2026-6180).


{
  "verdict": "approve",
  "summary": "Clean bugfix PR: adds the missing maxConcurrentJobs property to the Config CRD schema (fixing a silent field-pruning issue in prod), bumps the Helm chart version 0.5.1→0.5.2, and updates golang.org/x/mod to v0.40.0 to address GO-2026-6179/6180. go mod tidy was verified as run post-update. All changelog entries use correct conventional prefixes.",
  "comments": [],
  "concerns_addressed": [
    "correctness: maxConcurrentJobs schema property added in helm/crds/config-crd.yaml:62 — field will no longer be pruned by API server",
    "security: golang.org/x/mod bumped to v0.40.0 in go.mod — addresses GO-2026-6179 and GO-2026-6180"
  ]
}

@bborbe
bborbe merged commit d015fc4 into master Aug 15, 2026
1 check passed
@bborbe
bborbe deleted the fix/crd-max-concurrent-jobs branch August 15, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant