Skip to content

fix(actions): add missing PRESENT_POI case to isValidActionInput#1180

Merged
MoonBoi9001 merged 4 commits intomainfrom
fix/present-poi-validation
Mar 17, 2026
Merged

fix(actions): add missing PRESENT_POI case to isValidActionInput#1180
MoonBoi9001 merged 4 commits intomainfrom
fix/present-poi-validation

Conversation

@MoonBoi9001
Copy link
Copy Markdown
Member

@MoonBoi9001 MoonBoi9001 commented Mar 17, 2026

Motivation

While testing the presentPOI action type introduced in #1162, we found that queuing a presentPOI action through the agent's GraphQL API returns "Invalid action input". The isValidActionInput switch statement in indexer-common has cases for allocate, unallocate, reallocate, and resize, but presentPOI was not included, so hasActionParams is never set to true for this action type.

Summary

  • Add case ActionType.PRESENT_POI to the isValidActionInput switch statement, requiring deploymentID and allocationID with optional POI field validation (matching the existing UNALLOCATE pattern)
  • Add PRESENT_POI to the active allocation check in validateActionInputs
  • Add unit tests for isValidActionInput with PRESENT_POI in actions.test.ts, including the conditional POI field branch (providing poi without publicPOI/poiBlockNumber must fail)
  • Add resolver-level tests for queuing and retrieving resize and presentPOI actions through the GraphQL mutation (in the skipped resolver suite, ready to validate when local-network infrastructure is enabled)

The PRESENT_POI action type was added to the ActionType enum and all
execution logic in #1162, but was omitted from the isValidActionInput
switch statement. This caused the action queue to reject presentPOI
actions with "Invalid action input" since hasActionParams was never
set to true.

Also adds PRESENT_POI to the active allocation check in
validateActionInputs, matching the existing pattern for unallocate,
reallocate, and resize.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-project-automation github-project-automation bot moved this to 🗃️ Inbox in Indexer Mar 17, 2026
MoonBoi9001 and others added 2 commits March 17, 2026 00:04
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Test the conditional branch where providing a POI on a non-legacy
action requires publicPOI and poiBlockNumber to also be present.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@MoonBoi9001 MoonBoi9001 requested a review from tmigone March 17, 2026 05:12
@github-project-automation github-project-automation bot moved this from 🗃️ Inbox to ✅ Approved in Indexer Mar 17, 2026
Add tests to the skipped resolver test suite that verify resize and
presentPOI actions can be queued and retrieved through the GraphQL
resolver. These will catch validation gate omissions when the
local-network test infrastructure is enabled.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@MoonBoi9001 MoonBoi9001 merged commit 880ddcd into main Mar 17, 2026
7 checks passed
@MoonBoi9001 MoonBoi9001 deleted the fix/present-poi-validation branch March 17, 2026 16:09
@github-project-automation github-project-automation bot moved this from ✅ Approved to 🚗 Merged in Indexer Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🚗 Merged

Development

Successfully merging this pull request may close these issues.

2 participants