Skip to content

fix(datagen): return errors instead of panicking on developer-error input (PIPE-1003) - #276

Open
Dylan-M wants to merge 2 commits into
dylanmyers/pipe-1001-ipv6-networkidentityfrom
dylanmyers/pipe-1003-datagen-panic-to-error
Open

fix(datagen): return errors instead of panicking on developer-error input (PIPE-1003)#276
Dylan-M wants to merge 2 commits into
dylanmyers/pipe-1001-ipv6-networkidentityfrom
dylanmyers/pipe-1003-datagen-panic-to-error

Conversation

@Dylan-M

@Dylan-M Dylan-M commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Stacked on #275

Proposed Change

Converts datagen's panic-on-developer-error paths to error returns. Blitz is
embeddable, so a panic on recoverable input takes down the host process; these
paths now return an error the host can handle.

  • GenerateSystemIdentity, GenerateEnvironment, and the group and username paths
    return an error on nil pointers and invalid input rather than panicking.
  • Adds an error-returning parseCIDRs primitive; the panicking mustParseCIDRs
    form stays only for parsing compile-time constants.
  • Callers and tests handle the returned errors, and the former panic-expecting
    tests now assert error returns.

Validation: the change has no user-facing surface, so it's exercised through unit
tests. Each converted path returns an error (nil domain, invalid CIDR) rather than
panicking, and the happy paths stay clean.

Checklist
  • Changes are tested
  • CI has passed

Dylan-M added 2 commits August 4, 2026 17:30
…er errors (PIPE-1003)

Assisted-by: Claude Opus 4.8
…tParseCIDRs for constants (PIPE-1003)

Assisted-by: Claude Opus 4.8
@Dylan-M
Dylan-M requested review from a team as code owners August 4, 2026 21:32
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