Skip to content

test(spaces): pin spaces:info --json generation_object shape - #3884

Open
michaelmalave wants to merge 2 commits into
v12.0.0from
worker/2026-08-21-heroku-types-spaces-cast-fixes-task-2
Open

test(spaces): pin spaces:info --json generation_object shape#3884
michaelmalave wants to merge 2 commits into
v12.0.0from
worker/2026-08-21-heroku-types-spaces-cast-fixes-task-2

Conversation

@michaelmalave

Copy link
Copy Markdown
Contributor

Summary

Pin the migrated spaces:info --json wire shape with a regression test so a revert to the pre-@heroku/sdk object-only generation shape fails. Test-only; no runtime or changelog change.

  • Update the shows space info --json fixture to the 3.sdk shape: generation as a string plus a generation_object: {id, name}.
  • Attach generation_object via an as SpaceWithOutboundIps cast inside the test (the :v3_sdk serializer emits it at runtime but the hyperschema doesn't declare it) — the type is not extended.
  • Assert the emitted --json preserves both fields verbatim.

Type of Change

Breaking Changes (major semver update)

  • Add a ! after your change type to denote a change that breaks current behavior

Feature Additions (minor semver update)

  • feat: Introduces a new feature to the codebase

Patch Updates (patch semver update)

  • fix: Bug fix
  • deps: Dependency upgrade
  • revert: Revert a previous commit
  • chore: Change that does not affect production code
  • refactor: Refactoring existing code without changing behavior
  • test: Add/update/remove tests

Testing

Notes: The changed file type-checks clean. Note a pre-existing, unrelated whole-project tsc -p test failure in src/commands/spaces/vpn/wait.ts + its test (missing @heroku/sdk/extensions/platform exports) that predates this branch — it is not introduced here and does not touch spaces:info.

Steps:

  1. npx mocha test/unit/commands/spaces/info.unit.test.ts — Expect: 7 passing (incl. shows space info --json).
  2. npx tsc -p test --noEmit 2>&1 | grep "commands/spaces/info" — Expect: empty (no type errors in the changed file).

Screenshots (if applicable)

Related Issues

GitHub issue: follow-up from review of #3881 (point #5)
GUS work item: W-23943907

Assert the migrated 3.sdk --json wire shape: generation as a string plus the
:v3_sdk serializer's generation_object ({id, name}). The fixture attaches
generation_object via a cast (the hyperschema doesn't declare it) so a
regression to the old object-only generation shape fails the test.

Ref: W-23943907 (eablack #3881 review #5)
@michaelmalave
michaelmalave requested a review from a team as a code owner August 21, 2026 22:45
@michaelmalave
michaelmalave deployed to AcceptanceTests August 21, 2026 22:45 — with GitHub Actions Active
@michaelmalave
michaelmalave deployed to AcceptanceTests August 21, 2026 22:45 — with GitHub Actions Active
@michaelmalave
michaelmalave deployed to AcceptanceTests August 21, 2026 22:45 — with GitHub Actions Active
@michaelmalave
michaelmalave deployed to AcceptanceTests August 21, 2026 22:45 — with GitHub Actions Active
Fixes the spell-check CI failure on PR #3884: the new comment in
info.unit.test.ts uses the domain term "hyperschema", which the project
dictionary didn't yet contain.
@michaelmalave
michaelmalave deployed to AcceptanceTests August 21, 2026 23:13 — with GitHub Actions Active
@michaelmalave
michaelmalave deployed to AcceptanceTests August 21, 2026 23:13 — with GitHub Actions Active
@michaelmalave
michaelmalave deployed to AcceptanceTests August 21, 2026 23:13 — with GitHub Actions Active
@michaelmalave
michaelmalave deployed to AcceptanceTests August 21, 2026 23:13 — with GitHub Actions Active
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