Skip to content

[code quality] Small API inconsistencies: emit "scan.started" with state "queued"; sessionTicket skips the strict decode every other endpoint uses #116

Closed

Description

@devin-ai-integration

Two small inconsistencies:

  1. start emits scan.started while reporting state: "queued" (service.go:303) — event name says started, payload says queued. Event consumers listening for an actual start see a lie; rename the event or emit it when the run actually begins.
  2. sessionTicket hand-rolls json.NewDecoder(...).Decode(&input) (auth.go:216) instead of the shared decode() helper used by every other handler — so it silently ignores unknown fields ({"path": "/api/v1/x", "admin": true} decodes fine) while sibling endpoints reject them with DisallowUnknownFields. Either use decode() or document why this one route is laxer.
  3. Bonus nit: stopServer writes the 202 response and then go s.shutdown() — the process can exit before the response flushes, so the caller may see a dropped connection instead of the acknowledgement.

Activity

  1. sanketpatel32 commented on Nov 22, 2026

    @sanketpatel32
    Owner

    Fixed in PR #128 (merged 76e635c, shipped in v0.51.0).

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions