Skip to content

Move planetaryPositions to astroapi-8 (adds Vertex) — DV-445 - #2

Merged
dubeychandan996 merged 1 commit into
mainfrom
fix/planetary-positions-astroapi-8
Sep 25, 2026
Merged

dubeychandan996 merged 1 commit into
mainfrom
fix/planetary-positions-astroapi-8

Conversation

@dubeychandan996

@dubeychandan996 dubeychandan996 commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

SDK side of DV-445, under DV-433. Companion PRs in the other two SDKs and Dinesh-Gahlot/mcp-western-astrology.

@anubhav-dir — moves planetaryPositions / planetary_positions from astroapi-4 to astroapi-8 so the response includes Vertex, per your finding on DV-433.

What stays the same

Verified 2026-09-25 against the client's chart from DV-433:

  • the data list is backward-compatible — the 17 bodies both hosts return have identical values, the same 13 fields, and the same types
  • house_system (letters and friendly names) and lan behave identically on both hosts
  • astroapi-8 adds Vertex (18 bodies), placed after MC and before Chiron

⚠️ What changes for SDK consumers

This is a real behaviour change for this one method, documented in the method docblock and in the README:

  1. Envelope. astroapi-8 returns {"status": "success", "code": 200, "message": ..., "data": [...]} with no success key. Code that checks success == 1 must switch to status == "success", or just read data.
  2. Errors. Invalid input is now HTTP 422 and throws ValidationException, instead of returning ['success' => 2]. Code that relied on checking success to detect errors will now see an exception instead.
  3. Position. Vertex is inserted mid-list, so code that indexes bodies by position (rather than by name) shifts by one after MC.

Worth noting: this SDK already calls astroapi-8 for around 11 other natal methods, so consumers already see both envelopes across methods. This brings planetary_positions in line with them rather than introducing a new pattern.

Testing (live)

Envelope is status="success" with no success key; 18 bodies incl. Vertex at 321.4875176 Aquarius; house_system honoured (placidus ≠ whole-sign); the error behaviour above verified by sending a request with lat missing; regression — house_cusps, which stays on astroapi-4, still works.

No version field in composer.json — tag v1.10.0 on merge and Packagist picks it up.

🤖 Generated with Claude Code

DV-445, under DV-433. The astroapi-4 planetary-positions is the older
implementation and omits Vertex; astroapi-8 returns it. Verified
2026-09-25 with a client's chart: the 17 bodies both hosts share have
identical values, fields and types, and astroapi-8 adds Vertex after
MC. house_system and lan behave identically.

This is a behaviour change for SDK consumers, documented in the method
docstring and the README:

- the envelope is now {"status": "success", "code": 200, "message",
  "data"}; there is no "success" key, so code checking success == 1
  must switch to status == "success" (or just read data);
- invalid input is now an HTTP 422 and raises instead of returning
  {"success": 2}.

The data list itself is unchanged apart from the added Vertex.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant