Skip to content

fix(profiles): return invalid state for malformed profile index (#176) - #184

Merged
rafaself merged 1 commit into
mainfrom
feat/176-invalid-profile-index
Jun 24, 2026
Merged

fix(profiles): return invalid state for malformed profile index (#176)#184
rafaself merged 1 commit into
mainfrom
feat/176-invalid-profile-index

Conversation

@rafaself

Copy link
Copy Markdown
Owner

Summary

  • Add explicit storeStatus: "invalid" when the KV application profile index exists but contains malformed JSON or fails schema validation.
  • Fail closed on profile-specific tools with a safe diagnostic message; generic AWS tools remain unaffected.
  • Read the index as text so missing keys and malformed JSON are distinguishable.

Test plan

  • pnpm run typecheck
  • pnpm test
  • pnpm run test:integrity
  • pnpm run verify:connector-contract
  • Loader tests cover missing binding, missing index, empty valid index, malformed JSON, invalid schema, duplicate IDs, disallowed region, and safe output
  • Profile tool resolution rejects invalid index
  • list_application_profiles exposes storeStatus: "invalid" and error
  • list_ec2_instances succeeds with invalid profile index in context

Closes #176

Made with Cursor

Surface corrupt KV profile index configuration as storeStatus invalid
instead of masquerading as an empty profile list, and fail closed on
profile-specific tools while keeping generic AWS tools unaffected.

Closes #176

Co-authored-by: Cursor <cursoragent@cursor.com>
@rafaself
rafaself merged commit e444920 into main Jun 24, 2026
2 checks passed
@rafaself
rafaself deleted the feat/176-invalid-profile-index branch June 24, 2026 00:04
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.

Return explicit invalid state for malformed application profile index

1 participant