Merged PR 2429: Add public search API grouping facade slice

Add public search API grouping facade slice

Related work items: #23754
This commit is contained in:
Robert Bond
2026-06-25 08:48:43 +00:00
parent 33dcb6b863
commit a266fa5428
8 changed files with 351 additions and 5 deletions
+86
View File
@@ -18,6 +18,92 @@ Follow-ups:
---
### CL-2026-06-25-API-GROUPING-FACADE-SEARCH-VERTICAL-SLICE: active public search results grouping and service adoption
date: 2026-06-25
author: Cline
scope: `pages/api/search/basic-paged.js`, `pages/api/search/advanced.js`, `pages/api/search/advanced-paged.js`, `pages/api/search/basic-details-paged.js`, `actions/services/searchDirectService.js`, `tests/phase22/api-grouping-facade-search.test.cjs`, `context/api-grouping-adoption-roadmap.md`
type: change
rationale: Implement the next additive API grouping façade vertical slice by grouping the active Public Search results journey under `pages/api/search/` and adopting the grouped routes only in the existing common public-search service layer, while preserving legacy endpoint handlers unchanged and leaving adjacent/excluded search journeys alone.
impact: Runtime behaviour is intended to remain unchanged; grouped search façade routes now cover the proven active public-results path, `actions/services/searchDirectService.js` now targets those grouped routes for the bounded in-scope calls, legacy endpoint handlers remain canonical, and no migration, route deletion, query-parameter change, paging change, sorting change, payload change, or response-contract change has occurred.
status: completed
Summary:
- Confirmed the required context was read before implementation:
- `context/api-grouping-plan.md`
- `context/api-grouping-adoption-roadmap.md`
- `context/api-route-map.md`
- `context/journey-architecture-map.md`
- `context/portal-api-platform-assessment.md`
- `context/architecture.md`
- `memory-bank/change-log.md`
- Performed a bounded audit of the active Public Search journey across pages, components, services, and endpoint usage.
- Audit findings established that:
- the active public results UI is driven through `pages/searchresults.js` and `components/search/searchresults.js`
- the advanced results page `pages/advancedsearchresults.js` is part of the active public-search scope
- the common owning service layer is `actions/services/searchDirectService.js`
- `components/search/searchresults.js` actively uses:
- `getBasicSearchPaged`
- `getAdvancedSearchPaged`
- `getSearchDetailsPaged(...)`, which in turn uses `getBasicSearchDetailsPaged`
- `pages/advancedsearchresults.js` actively uses `getAdvancedSearch(...)` for bootstrap
- `getbasicsearch_api.js` and `getbasicsearchdetails_api.js` remain active in adjacent case-detail/bootstrap paths and therefore remained out of scope for this bounded public-results slice
- address-search routes, DNS routes, and myportal search pages were intentionally excluded as separate journeys
- Added grouped façade routes under `pages/api/search/` for the proven active public-results path only:
- `basic-paged.js`
- `advanced.js`
- `advanced-paged.js`
- `basic-details-paged.js`
- Implemented each façade as the smallest safe compatibility wrapper:
- import the existing legacy endpoint handler
- delegate `req` and `res` directly to that existing handler
- Updated only the suitable common service layer in `actions/services/searchDirectService.js` to target grouped façade routes for:
- `getBasicSearchPaged`
- `getAdvancedSearch`
- `getAdvancedSearchPaged`
- `getBasicSearchDetailsPaged`
- Left the following unchanged:
- existing endpoint handlers
- query parameter names
- CRM queries
- paging behaviour
- sorting behaviour
- search semantics
- case-detail behaviour
- document behaviour
- excluded search journeys
- Added focused characterization coverage to prove:
- grouped search façade routes delegate correctly
- active service methods now target grouped search routes
- legacy endpoint handlers remain present
- adopted service methods no longer target the legacy endpoint URLs directly
- request-contract strings/parameter names remain unchanged
- excluded routes remain outside grouped adoption scope
- Updated the adoption roadmap to record the active Public Search grouping slice and its exact scope boundary.
Validation:
- Focused validation only intended for this slice:
- `npx eslint actions/services/searchDirectService.js pages/api/search/*.js tests/phase22/api-grouping-facade-search.test.cjs`
- `node tests/phase22/api-grouping-facade-search.test.cjs`
- No repository-wide validation run.
Follow-ups:
- The active Public Search journey is now a complete vertical grouping slice for the bounded public-results scope:
- grouped façade routes
- active service-layer adoption
- legacy canonical handlers retained
- unchanged behaviour
- Adjacent or excluded search journeys should remain separate future slices if needed:
- case-detail bootstrap search
- address search
- DNS search
- myportal search
---
### CL-2026-06-25-API-GROUPING-FACADE-DOCUMENTS-VERTICAL-SLICE: active published-document metadata grouping and service adoption
date: 2026-06-25