Skip to content

fix: correct spec typos and remove dead data - #27

Draft
Koan-Bot wants to merge 1 commit into
atoomic:masterfrom
Koan-Bot:koan.atoomic/fix-spec-correctness
Draft

fix: correct spec typos and remove dead data#27
Koan-Bot wants to merge 1 commit into
atoomic:masterfrom
Koan-Bot:koan.atoomic/fix-spec-correctness

Conversation

@Koan-Bot

@Koan-Bot Koan-Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor

What

Fix API spec bugs that cause silent filter failures and remove dead data.

Why

The Network v2 ports spec had prokect_id instead of project_id — a typo that silently prevented project_id from being sent as an API-level query filter. Users filtering ports by project would get results, but via slow client-side filtering instead of efficient server-side filtering.

The Compute v2.0 spec was missing the /flavors endpoint entirely (present in v2.1), meaning deployments on Compute API v2.0 had no flavors() method available.

Images.pm carried a stale __DATA__ block with Compute specs (keypairs, flavors) — dead code from a copy-paste that was never consumed.

Addresses remaining items from #18.

How

  • Network/v2.pm: prokect_idproject_id (line 61)
  • Compute/v2_0.pm: Added /flavors spec matching v2_1 parity
  • Images.pm: Removed unused __DATA__ block
  • New test: t/specs-fields.t validates all spec field names against known-good lists and checks for common misspellings — catches this class of typo automatically

Testing

  • t/specs-fields.t: 4 subtests, 212+ assertions covering field name validation and typo detection
  • Full suite passes: 27 tests across 7 files

🤖 Generated with Claude Code


Quality Report

Changes: 4 files changed, 114 insertions(+), 11 deletions(-)

Code scan: clean

Tests: passed (OK)

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

- Network/v2.pm: fix 'prokect_id' → 'project_id' typo in ports query
  spec. This caused project_id filters to be silently ignored at the
  API level, forcing slower client-side filtering.
- Compute/v2_0.pm: add missing /flavors spec (present in v2_1 but
  absent in v2_0), restoring feature parity between API versions.
- Images.pm: remove stale __DATA__ block containing Compute specs
  (keypairs, flavors) that were copy-pasted from another module and
  never consumed by the Images service.
- New test t/specs-fields.t validates field names across all spec
  classes against known-good lists and checks for common misspellings.

Addresses remaining items from atoomic#18.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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