Skip to content

fix(service): decode job records in webhook issue caching #7110

Done

Description

@dan-petty

Problem Description

issue_from_event in src/devops_cli/roadmap/stores/brain_issues.py passes the raw dictionary returned by split_record directly into IssueRecord(..., job_record=job_record) without decoding it with decode_job_record. Because encode_job_record serializes implement.repair_rounds as an integer in the GitHub issue body record block, webhook deliveries and own-write refusal checks fail Pydantic validation with Input should be a valid string for job_record.implement.repair_rounds and raise an unhandled ValidationError in roadmap-service.

Reproduction Steps

  1. Call issue_from_event("dan-petty/devops-cli", webhook_issue) on a WebhookIssue whose body ends with <!-- devops-roadmap-record {"implement.repair_rounds": 0} -->.
  2. Observe pydantic.ValidationError on IssueRecord.job_record.implement.repair_rounds.

Expected vs Actual Behavior

Expected: issue_from_event decodes the split record through decode_job_record (matching GitHubRoadmapStore REST reads in src/devops_cli/roadmap/stores/store.py) and returns a valid CachedIssue.
Actual: IssueRecord raises pydantic_core._pydantic_core.ValidationError (type=string_type, input_value=0, input_type=int), causing Exception in ASGI application in uvicorn.error from _remember_delivery_issue and _remember_own_delivery_issue (src/devops_cli/server/routes/webhooks.py).

Environment Diagnostics

  • DevOps CLI: observed live in cluster roadmap-service logs on 2026-11-25 (origin/main feb4e969a).
  • Source: src/devops_cli/roadmap/stores/brain_issues.py (issue_from_event), src/devops_cli/roadmap/stores/store.py (decode_job_record, encode_job_record).

Logs, Traces, or Terminal Output

File ".../devops_cli/server/routes/webhooks.py", line 447, in _remember_own_delivery_issue
  remember_issue(repo, issue_from_event(repo, issue))
File ".../devops_cli/roadmap/stores/brain_issues.py", line 82, in issue_from_event
  record = IssueRecord(
pydantic_core._pydantic_core.ValidationError: 1 validation error for IssueRecord
job_record.`implement.repair_rounds`
  Input should be a valid string [type=string_type, input_value=0, input_type=int]

Source

Source: #6966

Activity

  1. added
    type/bug
    source/agent
    status/new
    effort/low
    on Nov 25, 2026
  2. dan-petty commented on Nov 25, 2026

    @dan-petty
    OwnerAuthor
  3. added
    value/high
    scope/service
    priority/p0-critical
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 25, 2026
  4. removed
    status/in-review
    owner/agent
    on Nov 25, 2026
  5. devops-cli-service commented on Nov 25, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-25 07:20 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p0-criticalscope/servicesource/agenttype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions