Platform Evolution
Assessment run-2026-07-27-1 · 213 of 213 repos assessed
Repos / cost-savings-api

cost-savings-api

ASP.NET Core 8 API that records and serves cost savings agents achieve on bookings, kept in sync with booking changes via a MassTransit/SQS consumer and backed by MongoDB.

89 · greenlowloosely attachedAWSZDD: no excuseapi

Health score

89

0 to 100 across seven weighted factors; nothing is hidden. Green is 75 and above, amber 50 to 74, red below 50. How scoring works.


Runtime currency / 25
25
Runs on supported modern .NET
Legacy transport / 15
6
Calls at least one legacy WCF endpoint
Test posture / 15
15
Good test coverage
Security hygiene / 15
15
No credentials found in source
Dangerous coupling / 15
15
No dangerous coupling detected
Activity / 10
8
Last commit six to twelve months ago
Deployment hygiene / 5
5
CI in place
Health over time
2026-07-27 (run-2026-07-27-1): 89
Baseline 89 recorded 2026-07-27. The trend fills in with each monthly assessment run.

Facts

Languagescsharp
FrameworksASP.NET Core 8, MediatR, FluentValidation 12, MassTransit 8, Serilog
Runtimes.NET 8
Tests / CIgood / CI in place
Last commit2025-12-31
OwnerOwner unknown (mapping to be curated)
DomainData and insight (system generated; curate in repo-owners.json to override)
Product areaShared platform
HostedAWS Deployed to AWS
  • build "cost-savings-api" (azure-pipelines.yml): AWS signal "useTFVarsDeployment: true"
Releases0 release pipeline(s):
Integrationrest, jwt, masstransit, sqs, wcf
SourceOpen in Azure DevOps

Risk flags

No risk flags recorded.

Each flag links to its glossary definition.

Dependencies in context

Laying out the graph…
greenamberreddata store (square, dashed link)Node size follows fan-in. Click any node to open it.

Entanglement

loosely attached Bound into the core by 1 mechanism(s).

  • Speaks WCF (client)

Detaches when its WCF surface gains a modern interface or its WCF calls move to one.

Migration playbooks

Generated from this repo's assessment data: what is feasible, what blocks it, and the steps in order. Ratings: green means actionable now, amber means sequence other work first, red means blocked, grey means not applicable.

ZDD adoption

No excuse

Nothing technical is holding this repo on the three-week release. It either already deploys without downtime (AWS) or is a modern, well-tested service the automated stealth path can carry today. Already deploys as a container to AWS, which releases without downtime today. Separating it from the three-week release is a process decision, not a technical one.

Dependencies and gotchas
  • Consumes WCF contract packages: never take a breaking client bump mid-feature, and treat obsolete warnings as migration debt
  • Serialized state or messages in flight (Redis or queues): new code must deserialize objects written by the previous version
Steps
  1. Adopt the four-stage discipline from the ZDD engineering standard: pre-deployment compatibility, deployment, feature activation behind a flag, post-release cleanup.
  2. Make every change dual-version safe: backwards-compatible APIs (new major version for breaking wire changes), expand and contract for any schema change, and consumers tolerant of unknown fields.
  3. Audit serialized data: anything in Redis, queues or shared caches must deserialize cleanly across adjacent versions.
  4. Wrap behaviour changes in feature flags so code deploys dark and release becomes a business decision, not a deployment event.
  5. Use ECS rolling deployments with health checks gating traffic, and take this service off the three-week release train.
  6. Verify with area-scoped regression rather than the whole-platform cycle, and watch error rates after rollout with automated rollback on alert.

SQL Server exit

Not applicable

No SQL Server dependency is recorded for this repo. Nothing to migrate.

Containerisation

Already containerised

Its pipelines already build containers and deploy to AWS. Nothing to do here.

Recommended actions

No specific actions for this repo. It either needs only normal maintenance, or its work is covered by an estate-level action. See the full programme.

Assessment notes

cost-savings-api

Purpose

CRUD API for "cost savings" — the discounts/savings a travel counsellor achieves against booking components — with a Reasons reference-data controller, per-component validation (standard, flight, fare, ticket types), and a BookingChangedConsumer that keeps saved cost savings aligned with booking changes arriving over MassTransit/Amazon SQS. A separate TC.CostSavings.Importer console backfills or re-imports cost savings by pulling bookings from the backoffice Accounts GraphQL API and the Phenix booking WCF service.

Tech stack

C# on .NET 8, layered solution (API, Application, Common, DataAccess, Domain, Messaging, Importer). MediatR pipeline with validation and current-user behaviors, FluentValidation 12, Serilog with an S3 request/response logging sink, Asp.Versioning, Swashbuckle, Phenix.Auth.JWTBearer, TC.ConnectionBroker 1.20 (Api/Aws/Mongo/HttpClient), MongoDB.Driver 3.4 with TC.ScriptRunner.Mongo change scripts, MassTransit 8.5 + TC.MassTransit.AmazonSQS; the importer additionally uses Dapper/Microsoft.Data.SqlClient and ConnectionBroker Sql/Wcf.

Deployment

No classic release pipelines (release_count 0); traced via build->yaml-deploy, build pipeline cost-savings-api. azure-pipelines.yml uses the shared InternalOSS/azure-pipelines-templates ci.yml to container-build TC.CostSavings.API (.NET 8 SDK, containerAfterBuild, useTFVarsDeployment, functional area/namespace phenix, eu-west-1) for ECS; a second build.yaml packs TC.CostSavings.Domain as a NuGet package (consumed elsewhere, e.g. the streams-masstransit adapter). Per-environment appsettings for qa/preproduction/production.

Dependencies

Internal: TC.ConnectionBroker.* (tc-connectionbroker), TC.Exceptions.WebApiClient.AspNetCore (tc-exceptions), TC.Diagnostics.HealthChecks (tc-diagnostics-portal), the backoffice Accounts GraphQL API and TC.Phenix.Accounts.Events contracts (backoffice), TC.StreamsMassTransitAdapter.Events (tc-streams-masstransit-adapter). TC.Phenix.Services.Client (importer's WCF booking service) and TC.MassTransit.AmazonSQS map to no included repo with confidence. External: AWS (SQS eu-west-1, S3 logging buckets).

Data stores

Owns the CostSavings MongoDB database (CostSavings and Reasons collections, script-runner change scripts, Mongo health check). Writes request/response logs to per-environment S3 buckets (tc-costsavings-api-{qa,stg,prod}-request-response-logs). The importer also reads booking data from SQL via Dapper for backfills.

Integration points

Inbound REST with Phenix JWT bearer auth and API versioning; inbound BookingChangedEvent messages via MassTransit over Amazon SQS; the importer makes outbound GraphQL calls to backoffice Accounts and WCF calls to the Phenix booking service.

Code health

Good: five xUnit test projects (~189 Fact/Theory tests) covering handlers, validators, component merging, messaging consumers and domain calculations. README is a single pointer to an Azure DevOps wiki page — documentation lives off-repo. Clean configuration-by-extension structure. Last commit 2025-12-31.

Modernisation risks

Low — modern .NET 8, containerised ECS deployment via Terraform tfvars, solid tests and YAML CI. Residual concerns: correctness depends on upstream BookingChangedEvent/accounts contracts (schema drift risk), the importer retains legacy WCF and direct SQL paths into backoffice for backfills, and in-repo documentation is minimal.