job-revenue-recognition-component
Nightly scheduled job that recognises revenue per booking component on its RevenueDate, querying backoffice for open revenue date events, creating a revenue recognition ledger export, and processing events booking by booking.
Health score
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.
Facts
| Languages | csharp |
| Frameworks | Serilog 4, NodaTime 3, CoreWCF client (System.ServiceModel 8) |
| Runtimes | .NET 8 |
| Tests / CI | none / CI in place |
| Last commit | 2026-03-31 |
| Owner | Owner unknown (mapping to be curated) |
| Domain | Payments and finance (system generated; curate in repo-owners.json to override) |
| Product area | Phenix |
| Hosted | On-prem Deployed to our own machines
|
| Releases | 1 release pipeline(s): \finance\jobs\job-revenue-recognition-component CI |
| Integration | wcf, rest |
| Source | Open in Azure DevOps |
Dependencies in context
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.
Depends on / used by
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
Needs workFeasible through the Workflow Engine's rolling drain, but real preparation is needed: dual-version discipline, better tests, or schema care before at-will release is sensible. No automated tests yet.
- Consumes WCF contract packages: never take a breaking client bump mid-feature, and treat obsolete warnings as migration debt
- Runs as a Windows service or scheduled task: deploy between runs or use overlapping instances; the load-balancer drain pattern does not apply directly
- Adopt the four-stage discipline from the ZDD engineering standard: pre-deployment compatibility, deployment, feature activation behind a flag, post-release cleanup.
- Raise automated test coverage first: ZDD trades the end-of-sprint manual gate for continuous automated confidence, so the tests are the entry ticket.
- 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.
- Wrap behaviour changes in feature flags so code deploys dark and release becomes a business decision, not a deployment event.
- Route deployments through the Workflow Engine's automated drain, deploy, health-check, return cycle (the path proven by the first automated production run in mid-2026).
- 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 applicableNo SQL Server dependency is recorded for this repo. Nothing to migrate.
Containerisation
Ready to containeriseModern runtime, no hosted legacy transport: this service can follow the estate's proven container path (Dockerfile, shared pipeline template, ECS via Terraform).
- Convert the Windows service or scheduled task into a .NET worker service (or an ECS scheduled task) so it has a container-shaped lifecycle.
- Add a Dockerfile and make the app read all configuration from environment variables and the secrets manager, never from machine-local files.
- Log to stdout and expose a health check endpoint so ECS can supervise it.
- Adopt the shared ci.yml pipeline template with the container parameters (awsRegion, containerAfterBuild, ecsTerraformRepo), which is exactly how the estate's existing AWS services deploy.
- Define the service in the Terraform repo, deploy to a non-production environment, then shift traffic and disarm the deployment-group release pipeline.
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
job-revenue-recognition-component
Purpose
Replacement for the obsolete job-revenue-recognition repo, changing revenue recognition from per-booking-at-departure to per-component on each component's RevenueDate, run nightly. For each company it queries backoffice for open RevenueDateEvents on the current date, creates a revenue recognition ledger export if any exist, then groups events by booking and asks backoffice to process them one at a time. Revenue can also be reversed out when revenue dates change.
Tech stack
- C# on .NET 8:
RevenueRecogniseByComponent.Job(logic) plusRevenueRecogniseByComponent.Windows(console exe intended for Windows Task Scheduler; the README notes a Linux/cron binary would need adding). - Serilog logging with a custom TC exception sink, NodaTime, Microsoft.Extensions DI/configuration (v10 packages), per-environment
appsettings.*.json. - Integration via
TC.Phenix.Services.Client8.3 overTC.ConnectionBroker.Wcf(using the .NET 8System.ServiceModel.*WCF client packages) andTC.Ledger.Api.Client5.3.
Deployment
Prod application with 1 release. Build pipeline job-revenue-recognition-component CI (YAML build.yml using shared InternalOSS/azure-pipelines-templates, .NET SDK 8.0.x, publishing the Windows app) feeding release pipeline \finance\jobs\job-revenue-recognition-component CI.
Dependencies
- Internal: the ledger API (
backoffice-ledger-service) viaTC.Ledger.Api.Client; the Phenix/backoffice booking service viaTC.Phenix.Services.Client(hosting repo not confidently identified, so not listed). - Third-party libraries only (Serilog, NodaTime); no external SaaS integrations.
Data stores
None accessed directly; revenue events and ledger postings are handled inside backoffice and the ledger API.
Integration points
- WCF calls to the backoffice booking service (
IBookingServiceFacade) through the connection broker. - REST calls to the ledger API to create revenue recognition ledger exports.
Code health
- No test projects; the job contains meaningful orchestration logic (event grouping, reversal handling) that is untested.
- Template-based YAML CI; actively maintained with last commit 2026-03-31.
Modernisation risks
- Untested financial-posting logic is the biggest risk for a job that writes to the ledger.
- Depends on the legacy WCF booking-service surface, and deployment assumes Windows Task Scheduler hosting despite the .NET 8 runtime being cross-platform.
- Supersedes
job-revenue-recognition; ensure the old job is fully decommissioned to avoid double recognition.