Hive Hive
Sign in

fix(specs): raise comment body limit to 20k

GitHub issue · Closed

Metadata
Source
tuist/hive #40
Updated
Jun 24, 2026
Domains
Hive
Details

What

Raise the spec comment body length limit from 4,000 to 20,000 characters in Hive.Specs.Comment.

Why

The 4,000-char cap was an arbitrary application-level guardrail with no storage backing — the spec_comments.body column is :text, so Postgres imposes no limit. The cap was:

  • Cramped for non-human authors. Comments aren’t only typed in the dashboard form; they’re also posted by MCP clients/agents via the add_spec_comment tool. 4,000 chars (~600–800 words) is tight for an agent posting a detailed review or analysis.
  • Inconsistent. The spec body itself allows 20,000, yet a comment discussing it was capped at a fifth of that.

What changed

  • lib/hive/specs/comment.ex: validate_length(:body, min: 2, max: 4_000)max: 20_000.

Notes for reviewers

  • One-line change. The min: 2 floor is kept, so empty/one-char comments are still rejected.
  • No migration needed — the column is already :text.
  • No tests asserted the old 4,000 limit. mix compile --warnings-as-errors passes.
  • Backend-only; nothing user-facing to document in the README.

🤖 Generated with Claude Code

Flights

Investigate, reproduce, or fix this item in an isolated repository. Each Flight preserves its outcome and agent session.

New Flights are paused Configure model inference, GitHub, and a sandbox provider to start another Flight. Existing results remain available below.
No Flights yet

Start a Flight and preserve its objective, outcome, and session here.

Comments

No GitHub comments yet.