Skip to content

Harden ramp.v1 identifier field rules to match ramp.admin.v1 #19

Description

@KonstantinMirin

Context

ramp.admin.v1 (added in the admin RPC surface work, #18) bounds its identifier fields — e.g. tenant_id [(buf.validate.field).string = {min_len: 1, max_len: 255}]. The equivalent identifiers in ramp.v1 are unconstrained:

  • UsageReport.transaction_id (proto/ramp/v1/ramp.proto:2104) — bare
  • UsageReportResponse.report_id (proto/ramp/v1/ramp.proto:2208) — bare, and load-bearing (dispute-chain reference)
  • tenant_id at proto/ramp/v1/ramp.proto:1929, 2031, 2047 — bare

The admin package's stricter rules are the better convention. This issue tracks bringing the ramp.v1 identifiers in line (min_len, a sane max_len, and a token pattern where appropriate).

Why it's separate from the admin PR

This touches the agent hot-path contract: the rules regenerate the Zod/Pydantic types and can newly-reject inputs that validate today. It needs its own changelog entry and a compatibility check against existing corpus/doc examples, so it shouldn't ride the admin change.

Scope

  • Audit all ramp.v1 identifier fields for missing string bounds.
  • Apply rules consistent with ramp.admin.v1.
  • Regenerate clients; confirm the conformance corpus + doc examples still pass (expect additive below_min/pattern mutants, not changed cases).
  • Changelog entry under the proto CHANGELOG.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions