Skip to content

Fix OpenSearch readiness for alternative field mappings - #139

Merged
afoote-mitre merged 1 commit into
devfrom
af/readiness-capability-groups
Aug 24, 2026
Merged

afoote-mitre merged 1 commit into
devfrom
af/readiness-capability-groups

Conversation

@afoote-mitre

Copy link
Copy Markdown
Collaborator

Summary

  • Treat CNA, ADP, legacy, and CVSS-version fields that implement the same search feature as alternative readiness capabilities.
  • Continue failing readiness when an entire logical capability is absent or when a mapped field has an incompatible OpenSearch type.
  • Add regression coverage for the optional mappings absent from the deployed dev index.
  • Update README and OpenAPI readiness descriptions to reflect grouped capability validation.

Why This Change Is Needed

The deployed dev API returned 503 SEARCH_NOT_READY even while normal /search requests succeeded. A task-local _field_caps diagnostic confirmed that OpenSearch was reachable but six optional physical fields were unmapped. The previous validator required every possible field path, so one absent CNA, ADP, legacy, or CVSS variant made the entire API unready.

The Postman Readiness returns 200 expectation remains correct. Readiness should confirm that each logical search feature has a compatible mapped implementation, not require every optional storage variant to exist.

Primary Files

  • utils/searchReadiness.js: models logical capability groups and validates compatible alternatives.
  • utils/searchReadiness.test.js: covers missing groups, unmapped alternatives, incompatible mapped fields, and the exact dev regression.
  • routes/index.js: updates generated readiness endpoint documentation.
  • api-docs/openapi.json: updates the published readiness description.
  • README.md: documents grouped readiness behavior.

@afoote-mitre
afoote-mitre merged commit 8251cfe into dev Aug 24, 2026
1 check passed
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