feat: wire WP1–WP5 routers into appRouter + schema declarations (integration) - #160
Merged
Merged
Conversation
- WP1 (#154): entitySearchRouter import + appRouter registration - WP2 (#158): monitoringRouter import + appRouter registration - WP3 (#155): subjectPortalRouter + computeDataCompleteness imports; subjectPortal registration; removed routers.ts-local getFallbackSuggestion (now shared in server/dataCompleteness.ts); getDataCompleteness delegates to computeDataCompleteness; consentPurposeEnum gains consumer_self_check; subjectAccessTokens/subjectDisputes pgTable declarations (matches drizzle/0023_subject_portal.sql) - WP4 (#157): shareableReportsRouter + selfServiceBillingRouter imports + registrations; reportShareLinks/planSignups pgTable declarations (matches drizzle/0024_share_links_and_plan_signups.sql) - WP5 (#156): lookup.phone procedure (gatewayFetch /v1/phone/:number, validated input)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Integration commit wiring the WP1–WP5 feature routers (merged in #154–#158) into
appRouterand adding the matching Drizzle schema declarations. Onlyserver/routers.tsanddrizzle/schema.tsare touched (the stale repo-rootrouters.tswas NOT modified).Per-WP registrations
import { entitySearchRouter } from "./entitySearch";entitySearch: entitySearchRouter,inappRouterimport { monitoringRouter } from "./monitoring";monitoring: monitoringRouter,inappRoutersubjectPortalRouterfrom./subjectPortal,computeDataCompletenessfrom./dataCompletenesssubjectPortal: subjectPortalRouter,inappRoutergetFallbackSuggestion(now lives inserver/dataCompleteness.ts— anti-drift)investigations.getDataCompletenessnow delegates tocomputeDataCompleteness(db, input.investigationRef)drizzle/schema.ts:consentPurposeEnumgains"consumer_self_check"; appendedsubjectAccessTokenPurposeEnum/subjectAccessTokens/subjectDisputeStatusEnum/subjectDisputesdeclarations (verbatim from PR feat: subject portal + consumer self-check #155 body; matchdrizzle/0023_subject_portal.sql)shareableReportsRouterfrom./shareableReports,selfServiceBillingRouterfrom./selfServiceBillingshareableReports: shareableReportsRouter,+selfServiceBilling: selfServiceBillingRouter,inappRouterdrizzle/schema.ts: appendedreportShareLinks/planSignupspgTable declarations (verbatim from PR feat: shareable reports + self-service subscriptions #157 body; matchdrizzle/0024_share_links_and_plan_signups.sql)lookup.phoneprocedure inserted afterlookup.cac, using the in-scopegatewayFetchhelper (verified — same helper used bycac/nin/bvn): inputz.string().min(7).max(20).regex(/^\+?[0-9][0-9\s\-().]*$/), gateway path/v1/phone/:number(URI-encoded)All patches applied via anchored exact-string replacement (each anchor verified unique before replacing); all 9 patches reported OK.
Verification (real output)
Sanity checks:
Typecheck:
WP test files:
Registration smoke + regression:
The single failure (
smoke.comprehensive›creditTenantAccount rejects an unbound legacy reference when TIGERBEETLE_URL is not set— needsBIS_DATABASE_URL) was reproduced identically on pristinemain(verified by stashing this branch's changes and re-running that test) — pre-existing and unrelated, as documented in #155/#157.Notes
drizzle/0023_subject_portal.sqlanddrizzle/0024_share_links_and_plan_signups.sql).