Skip to content

fix: Compute v2_0 specs and minor code cleanup - #21

Merged
atoomic merged 1 commit into
cpan-authors:mainfrom
Koan-Bot:koan.atoomic/fix-compute-specs-and-cleanup
Sep 11, 2026
Merged

atoomic merged 1 commit into
cpan-authors:mainfrom
Koan-Bot:koan.atoomic/fix-compute-specs-and-cleanup

Conversation

@Koan-Bot

@Koan-Bot Koan-Bot commented Apr 13, 2026 •

Copy link
Copy Markdown
Contributor

What

Fix broken Compute v2.0 API specs and clean up minor code issues.

Why

The v2_0.pm specs were missing the uid field on both getfromid entries (server_from_uid and delete_server_from_uid). This causes setup_api_methods_for_service() to die at load time for any deployment using OpenStack Compute API v2.0 — the method setup code requires uid for token substitution in routes.

Addresses remaining items from #18 (audit findings).

How

  • v2_0.pm: Added uid: '{server_id}' to both getfromid specs, matching the v2_1 counterpart
  • MetaAPI.pm: Removed duplicate $server_status->{status} check in create_vm polling loop (copy-paste artifact), fixed comment typo, initialized $server_is_ready explicitly
  • Routes.pm: Removed unused use YAML::XS import (DataAsYaml handles YAML internally)
  • New test: t/specs-integrity.t validates all spec classes have required fields for their declared types — catches this class of bug automatically

Testing

  • t/specs-integrity.t: 3 subtests (one per spec class), 14+ individual assertions
  • Verified the test correctly catches the bug: removing uid from v2_0 causes test failure

🤖 Generated with Claude Code


Quality Report

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

Code scan: clean

Tests: failed (0 Failed, 512 Tests)

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

Add missing uid: '{server_id}' to both getfromid specs in v2_0.pm —
without this field, setup_api_methods_for_service() dies at load time
for any OpenStack deployment using API version 2.0.

Also: remove duplicate status check in create_vm polling loop,
fix comment typo, initialize $server_is_ready explicitly, and
drop unused YAML::XS import from Routes.pm.

New t/specs-integrity.t validates all spec classes have required
fields for their declared types (prevents future regressions).

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@Koan-Bot
Koan-Bot force-pushed the koan.atoomic/fix-compute-specs-and-cleanup branch from 155c45e to c41f7a3 Compare September 11, 2026 00:52
@Koan-Bot

Copy link
Copy Markdown
Contributor Author

Rebase with conflict resolution

Branch koan.atoomic/fix-compute-specs-and-cleanup was rebased onto main with automatic conflict resolution.

Stats

4 files changed, 63 insertions(+), 3 deletions(-)
Actions performed
  • Already-solved check: skipped (Claude call failed)
  • Resolved merge conflicts (1 round(s))
  • Rebased koan.atoomic/fix-compute-specs-and-cleanup onto upstream/main
  • Pre-push CI check: previous run #24334287356 failed
  • Pre-push CI fix: no changes needed or Claude found nothing to fix
  • Force-pushed koan.atoomic/fix-compute-specs-and-cleanup to origin
  • Private review gate passed
  • CI check enqueued in ## CI (async)

CI status

CI will be checked asynchronously.


Automated by Skuggi

@atoomic
atoomic marked this pull request as ready for review September 11, 2026 00:57
@atoomic
atoomic merged commit c14a8ce into cpan-authors:main Sep 11, 2026
19 checks passed
atoomic added a commit that referenced this pull request Sep 11, 2026
Covers the merge of #21, plus the repository metadata move and the two
policy files added since the log was last written.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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.

2 participants