Hive Hive
Sign in

fix(specs): assign spec numbers transactionally

GitHub issue · Closed

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

Summary

  • Assign spec numbers inside the Specs.create_spec/2 transaction instead of relying on PostgreSQL sequence defaults.
  • Lock spec-number allocation and compute the next public number from the current maximum so rolled-back creates do not consume numbers.
  • Remove the old specs_number_seq default and add MCP coverage for rollback behavior during spec creation.

Testing

  • mix format
  • mix test test/hive/mcp/components/tools/create_spec_test.exs test/hive/specs_test.exs
  • mix compile --warnings-as-errors
  • mix test
Comments

No GitHub comments yet.