Repository navigation
[MBA-3824] Retire the .NET booking/capacity slice; legacy booking URLs redirect to /app for every centre - #97
Merged
devin-ai-integration[bot] merged 2 commits intoNov 11, 2026
Conversation
…g URLs redirect to /app for every centre Co-Authored-By: Mason <masonbatchelor81@gmail.com>
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
… first load (no stale A/B race) Co-Authored-By: Mason <masonbatchelor81@gmail.com>
devin-ai-integration
Bot
merged commit Nov 11, 2026
192a423
into
estate/legacy-baseline
7 checks passed
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.
Summary
MBA-3824 (M5). Since M4 every booking/capacity write already goes through the gateway to scheduling-service and legacy logins are denied writes, so the .NET booking/capacity slice, the four booking procs and booking-api's write SQL were dead code. This PR deletes them. The gateway now redirects every legacy booking URL to
/appfor every centre, including centres never on the M3 allow-list, unresolvable ids and URLs with no centre key.routing.coexistence-mode=relayis unchanged. Design and the expected M1 transcript differences are indocs/adr/0004-retire-portal-booking-slice.md.Diff is net-negative: 70 files, +406 / -1792.
Gateway (
services/routing-gateway)StranglerFilter.portal(): aPortalRoutesmatch now goes toretired(ex, m)instead ofdecide(...) ? redirect : forward. GET/HEAD get302and POST gets303, withX-Route: modernand reasonlegacy page retired. The allow-list still applies only to API routes.PortalRoutes.match(): retired pages still match when the centre key is missing.redirect()keepscandidateNumber:/Booking/MyBookings?candidateNumber=NW00000042→/app/my-bookings?candidateNumber=NW00000042. A missing or unresolvable centre falls back to/app/.MyBookings.tsx/candidate.ts(UI only, no domain logic):useCandidateNumber(initial)takes?candidateNumber=before the first render. The old bookmark opens that candidate's bookings, and only that candidate's bookings are requested (fixes the review's A/B race).Portal (
AssessmentDelivery.*)AdminController.CapacityGET/POST; theAdminCapacityroute;AdminService.ChangeCapacity/GetSessionRow;SqlErrorHelper;SeatCounterand its tests./Eligibilityand/Resultsused two reads fromIBookingService. These moved, with the same queries, toIEligibilityService.ListExams()andIResultsService.FindCandidate().BookingStatusconstants moved toRules/BookingStatus.cs. The "Booked" column on /Admin/Sessions is now counted in the EF query (BOOKED+ATTENDED, same rule).~/Booking,~/Booking/MyBookings,~/Admin/Sessions/Capacity/{id}). The gateway redirects them.booking-api / DB
BookingService, the write DAO methods and the request/response models are deleted. A write that reaches :8081 directly now gets410 LEGACY_WRITE_RETIRED(in M4 it got403 LEGACY_WRITE_DENIED).db/procs/090_retire_booking_procs.sqldropsusp_BookSeat,usp_CancelBooking,usp_ChangeCapacityandusp_RescheduleBooking(DROP ... IF EXISTS). Their create scripts 020–023 are deleted and stay in git history (taglegacy-baseline).040_single_writer.sqlno longer has theDENY EXECUTElines for those procs.test_usp_GetCapacityAudit.sqlnow writes its capacity rows the way the old proc did. InLegacySingleWriterITthe proc check expects error 2812 (Could not find stored procedure).scripts/check-retired-booking-writes.sh(.github/workflows/retired-booking-writes.yml). It fails if portal C# or booking-api main code references the four procs, updatesSeatsAvailable, or writesBooking/Waitlist.Expected M1 characterization differences (transcripts not edited; full table in ADR 0004)
/appand writes nothing, so lateraftersnapshots differ. Directly on :8080 it returns 404.Deleted files (25)
AssessmentDelivery.Business/Rules/SeatCounter.csAssessmentDelivery.Services/Booking/BookingListItem.csAssessmentDelivery.Services/Booking/BookingOutcome.csAssessmentDelivery.Services/Booking/BookingService.csAssessmentDelivery.Services/Booking/IBookingService.csAssessmentDelivery.Services/Booking/SessionListItem.csAssessmentDelivery.Services/Booking/SessionSearchCriteria.csAssessmentDelivery.Services/Common/SqlErrorHelper.csAssessmentDelivery.Tests/UnitTests/SeatCounterTests.csAssessmentDelivery.Web/Controllers/BookingController.csAssessmentDelivery.Web/Models/BookingModels.csAssessmentDelivery.Web/Views/Admin/Capacity.cshtmlAssessmentDelivery.Web/Views/Booking/Book.cshtmlAssessmentDelivery.Web/Views/Booking/Cancel.cshtmlAssessmentDelivery.Web/Views/Booking/Index.cshtmlAssessmentDelivery.Web/Views/Booking/MyBookings.cshtmlAssessmentDelivery.Web/Views/Booking/Reschedule.cshtmldb/procs/020_usp_BookSeat.sqldb/procs/021_usp_CancelBooking.sqldb/procs/022_usp_ChangeCapacity.sqldb/procs/023_usp_RescheduleBooking.sqlservices/booking-api/src/main/java/com/northwind/assessment/booking/model/BookingRequest.javaservices/booking-api/src/main/java/com/northwind/assessment/booking/model/BookingResponse.javaservices/booking-api/src/main/java/com/northwind/assessment/booking/model/RescheduleRequest.javaservices/booking-api/src/main/java/com/northwind/assessment/booking/service/BookingService.javaTests (head
c287816; CI: grep guard, scheduling-serviceverifyincl.LegacySingleWriterIT, Snyk, Socket all green)MSBuild.exe AssessmentDelivery.sln -p:Configuration=Debug(VS 2022 Build Tools, .NET 4.8)packages/NUnit.ConsoleRunner.3.16.3/tools/nunit3-console.exe AssessmentDelivery.Tests/bin/Debug/AssessmentDelivery.Tests.dllservices/routing-gateway: mvn -B test(JDK 21)retiredPortalPagesRedirectForEveryCentre(empty allow-list, CHI01, unresolved id)services: ./mvnw -pl booking-api test(JDK 8)BookingControllerTest(410)frontend: npm ci && npm run typecheckbash scripts/check-retired-booking-writes.shsqlcmd -i db/procs/090_retire_booking_procs.sql(run twice),040_single_writer.sql,db/checks/test_usp_GetCapacityAudit.sqlon SQL Server 2022 ExpressEXEC usp_BookSeat→ Msg 2812LegacySingleWriterIT(Testcontainers)verifyjob, Testcontainers)Evidence
Browser walkthrough through :8000 on
c287816(testing agent, real SQL Server). Steps: (a) legacy bookmark/Booking/MyBookings?candidateNumber=NW00000901while another candidate (NW00000001) was remembered: only B's bookings appear and only B's are requested, also after a hard reload. (b) Modern booking in/app: NW00000902 at SFO01 (never on the M3 allow-list), session 154, booking 50000002, seats 10 → 9; the relay projected it into legacydbo.Booking. (c) Legacy/Results?candidateNumber=NW00000902through :8000 renders the legacy page (X-Route: legacy).Before (base
b88cdafportal) / after (this branch). Same inputs: Centers (21 centres, 462 sessions); Eligibility NW00000001 / CTA-CLD3 / 2026-11-11 → NO, retake date 26 Nov 2026; Results NW00000001 → score 541 FAIL.HTTP matrix through :8000 (all passed):
X-Route: modern, then 200 on the Location. This includes SFO01, the repeat run with the allow-list narrowed toBOS01,SEA01,AKL01, and/Admin/Sessions?centerId=999999→/app/.LEGACY_WRITE_RETIRED.X-Route: legacy./app.Caveat: during testing a local service restart reseeded
AssessmentDeliveryand removed the earlier booking 50000001, so the final local reconciliation showed 1 mismatch. That came from the test environment, not this change; booking 50000002 was checked separately in legacy storage.Devin Review
c287816).BUG_..._0002). The retired URL in the ticket's redirect map is/Admin/Sessions?centerId=. Bare/Admin/Sessionsstill goes to the kept legacy action, which redirects to Centers as before (README, docs/SYSTEM_OVERVIEW.md portal routes).candidateNumber.040_single_writer.sql(legacy logins are denied Booking/Waitlist/seat writes) plus code review.Devin-Org: engineering
Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/f760cafeb74443b79b54ad7da6c381f5
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/f760cafeb74443b79b54ad7da6c381f5?variant=devin
Requested by: @mbatchelor81
Note
Devin errored when opening this Pull Request as mbatchelor81.
As a fallback, Devin opened this PR as itself.
🟢 Devin Review found nothing to fix · View findings · Follow Devin's work