← BBS SG Bank submission · All documents

Executive Summary

The current BBS SG Bank batch is a synthetic educational COBOL ledger processor that applies deposits, withdrawals, and transfers from a fixed-width operations file to a fixed-width account ledger. Its current limitation is intentional but material for modernization learning: each operation can trigger a full ledger scan, and each accepted operation rewrites the entire account file. This creates an O(m × n) file-I/O pattern that becomes disproportionately expensive as account and operation fixture sizes grow.

The target state is a one-day working modernization prototype that preserves the existing ledger contract, cent-accurate behavior, rejection semantics, and summary output while replacing repeated ledger scans with indexed in-memory lookups and replacing per-operation rewrites with one deterministic end-of-batch write. The prototype also adds golden-file parity and benchmark evidence so stakeholders can compare the legacy COBOL baseline and modern implementation side by side before any approval.

The primary beneficiaries are modernization engineers, QA/regression testers, and demo stakeholders. The value proposition is risk-controlled modernization: demonstrate measurable performance improvement without changing business behavior, while keeping the solution explicitly scoped to synthetic educational fixtures rather than production banking or real customer records. Transition impact is intentionally narrow: legacy behavior remains the reference, modern output must match exactly, and rollout proceeds offline only through fixture-based side-by-side validation.


Business Objectives and Success Criteria

ObjectiveCurrent State (Before)Target State (After)Success CriteriaMeasurement Method
Preserve ledger behavior during modernizationLedger behavior exists only in the COBOL program and comments, with no executable parity suiteLegacy COBOL output is treated as the authoritative baseline for every fixture100% of P0 parity fixtures match legacy final account output, processed count, rejected count, and total cents before sign-offOffline side-by-side run comparing legacy and modern outputs on the same fixtures
Reduce batch processing cost caused by repeated file I/OEach operation can scan the account ledger, and each accepted operation can rewrite the full ledgerAccounts are loaded once into an indexed structure and written once after all operations[ASSUMPTION] Modern prototype is at least 2x faster than the COBOL baseline on both required benchmark fixture sizes; preliminary local results of 28.6x and 128.1x remain labeled pending independent reviewBenchmark harness measuring 1,200 accounts × 400 operations and 5,000 accounts × 500 operations
Establish repeatable modernization evidenceNo visible automated tests, benchmark fixtures, or CI workflow are presentGolden-file fixtures and benchmark outputs become reviewable evidenceAt least 13 fixture categories are covered: deposits, withdrawals, transfers, malformed rows, insufficient funds, missing source, missing destination, self-transfer, invalid type, non-numeric amount, zero amount, fixed-width formatting, and final totalsTest report showing fixture coverage and pass/fail status
Improve demo stakeholder visibility without implying production readinessCurrent batch prints only three summary lines to standard outputPrototype demo surface shows run status, parity result, benchmark timing, rejection summary, and audit events100% of demo screens and generated reports are labeled “synthetic prototype” and expose no real customer or banking-production claimsDemo checklist and review sign-off
Reduce mutation-window risk during ledger publicationThe ledger is rewritten after every accepted operationOnly one final ledger publication step occurs after all operations are processedExactly one final ledger write phase per batch; no per-operation ledger rewrite in the modern pathRun logs and file artifact comparison showing one publish phase per completed batch

Personas and Stakeholders

NameTypeRoleGoalsPain PointsHow Served
Modernization EngineerPersonaBuilds the modern batch prototype while preserving legacy behaviorReplace inefficient internals without changing ledger semanticsBusiness rules are embedded in a single legacy program and commentsReceives explicit record contracts, parity gates, and migration requirements
QA / Regression TesterPersonaValidates behavior and benchmark evidenceConfirm legacy and modern outputs match exactly across normal and edge casesNo existing automated tests or golden fixtures are presentReceives fixture requirements, byte-level comparison criteria, and benchmark targets
Demo OperatorPersonaRuns before/after demonstration for technical stakeholdersShow run status, timing, rejection summaries, and parity results clearlyExisting batch output is limited to aggregate countersReceives a prototype/demo interface requirement with accessible states and non-production labeling
Technical SponsorStakeholderFunds and approves the one-day prototypeDemonstrate modernization ROI without expanding into a production banking programPerformance value may be questioned if evidence is not repeatableReceives measurable success gates, cost-benefit framing, and side-by-side validation
Governance / Security ReviewerStakeholderReviews prototype-safe handling of financial-style dataEnsure no real customer-data or production-compliance claims are impliedFinancial terminology can create incorrect regulatory expectationsReceives data classification, input validation, auditability, and retention requirements scoped to synthetic fixtures
Future MaintainerStakeholderMaintains the legacy baseline and modern prototype after the demoUnderstand record layouts and batch behavior without re-reading all COBOL logicParsing offsets and rejection behavior are not separated into reusable contractsReceives canonical business rules, fixtures, and documentation requirements

User Stories and Acceptance Criteria

IDAs a...I want to...So that...PriorityAcceptance Criteria
US-001Modernization engineerload the account ledger once into an indexed in-memory structure keyed by 8-digit account IDoperation processing avoids repeated full-ledger scans while preserving account lookup behaviorP0Given a valid account ledger, when the modern batch starts, then it reads the ledger once before operation processing; Given operation records are processed, when source or destination accounts are needed, then lookups use the indexed structure; Given the batch completes, then account ordering remains deterministic and compatible with the original ledger order.
US-002Modernization engineerprocess deposits, withdrawals, and transfers sequentially in operation-file orderaccepted and rejected outcomes remain consistent with the legacy baselineP0Given operation kind D, W, or T, when the amount and account conditions are valid, then the operation is applied using integer cents; Given an operation is unsupported, non-numeric, zero amount, missing an account, self-transfer, or insufficient funds, when it is encountered, then it is rejected, the rejected count increments, and the batch continues.
US-003Modernization engineeraccumulate accepted balance mutations in memory and publish the ledger oncethe prototype reduces write volume and avoids per-operation mutation windowsP0Given operations have been processed, when finalization begins, then exactly one ledger write phase occurs; Given the temporary ledger is incomplete, when publication is evaluated, then the target ledger is not replaced; Given the temporary ledger is complete, then replacement occurs only at the final publish step.
US-004QA / regression testerrun golden-file parity tests across legacy and modern implementationsbehavior drift is detected before sign-offP0Given a fixture set, when both implementations run against the same inputs, then final account output, processed count, rejected count, and total cents are compared; Given any mismatch exists, then the build is blocked and the mismatch is reported; Given all comparisons match, then the fixture passes.
US-005QA / regression testerbenchmark both required fixture sizesthe sponsor can evaluate performance improvement with transparent evidenceP1Given fixture size 1,200 × 400, when the benchmark runs, then runtime is recorded for legacy and modern versions; Given fixture size 5,000 × 500, when the benchmark runs, then runtime is recorded for legacy and modern versions; Given preliminary speedup values are shown, then they are labeled as local prototype results on one host pending independent review.
US-006Demo operatorview run status, parity result, benchmark timing, rejection summary, and generated artifacts in a prototype/demo interface [ASSUMPTION — no existing UI/API code is evidenced]non-engineering stakeholders can understand before/after behaviorP1Given no run has been selected, when the demo interface loads, then it shows an empty state with instructions; Given a run is in progress, then it shows a loading/progress state; Given a run fails, then it shows a user-safe error without stack traces, secrets, or host paths; Given a run completes, then it labels results as synthetic prototype evidence.
US-007Governance / security reviewerreceive audit evidence for batch runs and artifact generationprototype activity is traceable without implying formal compliance certificationP1Given a batch run starts, completes, fails, executes parity, generates a ledger, or records a benchmark, then an audit event is captured with actor or process, timestamp, operation, result, and artifact reference; Given logs are displayed, then sensitive values and host paths are not exposed.
US-008QA / regression testervalidate malformed and empty input conditionsedge cases do not silently produce incorrect outputsP0Given operations.dat is empty, when the batch runs, then processed and rejected counts remain zero and total cents reflects the unchanged ledger; Given a malformed row is present, when it is processed, then it is rejected rather than silently corrected; Given an input file is missing or unreadable [ASSUMPTION — modern harness handles file-level failures explicitly], then the run fails gracefully before publishing a ledger.

Business Process Overview

Process 1: Nightly Ledger Update — Current and Target

Business purpose: Apply a synthetic nightly operation feed to a flat-file account ledger while producing reconciliation totals. The modernization changes the internal processing pattern, not the business outcome.

Trigger event: A modernization engineer, tester, or demo operator starts a batch run against selected synthetic fixture files.

Step-by-step flow, decisions, inputs, and outputs:

  1. Select fixture inputs — Participant: operator/test harness. Input: synthetic account and operation files. Output: run request. If files are missing or malformed at the file level, the modern target flow fails before ledger publication.
  2. Load account ledger — Current: ledger is repeatedly reopened as needed. Target: ledger is loaded once into an indexed structure. Input: account rows. Output: account state for processing.
  3. Read operation feed in order — Participant: batch engine. Input: ordered operation records. Output: candidate operations.
  4. Validate each operation — Decision: accepted or rejected. Input: operation kind, source/destination account IDs, amount. Output: accepted mutation or rejected count.
  5. Apply accepted operation — Current: rewrite the ledger for each accepted operation. Target: mutate in-memory ledger state.
  6. Finalize ledger and totals — Current: scan final ledger and print totals. Target: write one final ledger, compute totals, and emit summary.

Error/exception paths: Invalid records are rejected and do not abort the batch. Missing file, unreadable file, or failed final publication in the modern flow must stop publication and return a user-safe failure state.

Business outcome achieved: A deterministic final ledger and summary totals that match legacy behavior while reducing repeated file work.

flowchart TD
  A[Start batch run] --> B[Read synthetic fixtures]
  B --> C{Inputs available?}
  C -- No --> D[Fail safely before publish]
  C -- Yes --> E[Process operations in order]
  E --> F{Operation valid?}
  F -- No --> G[Count rejection and continue]
  F -- Yes --> H[Apply accepted mutation]
  G --> I{More operations?}
  H --> I
  I -- Yes --> E
  I -- No --> J[Publish final ledger and totals]

Process 2: Offline Parity and Benchmark Validation

Business purpose: Prove the modern implementation preserves COBOL behavior before any stakeholder approval. This process is the primary sign-off model and remains offline only.

Trigger event: QA or the regression harness initiates a parity run for a fixture category or benchmark size.

Step-by-step flow, decisions, inputs, and outputs:

  1. Choose fixture set — Input: fixture category and size. Output: selected account and operation files.
  2. Run legacy baseline — Participant: baseline runner. Input: selected fixtures. Output: legacy final ledger and summary.
  3. Run modern prototype — Participant: modern engine. Input: same selected fixtures. Output: modern final ledger and summary.
  4. Compare outputs — Decision: exact match or mismatch. Input: both ledgers and summary values. Output: parity pass/fail.
  5. Measure runtime — Input: run timing data. Output: benchmark report with labels.
  6. Approve or block — Decision: if any mismatch exists, sign-off is blocked.

Error/exception paths: If either implementation fails to run, the parity result is failed. If outputs differ, the run is blocked and differences are retained for diagnosis. Preliminary speedups must not be presented as independently validated.

Business outcome achieved: Stakeholders receive reviewable evidence that modernization improves internals without changing behavior.

flowchart TD
  A[Select parity fixture] --> B[Run legacy baseline]
  A --> C[Run modern prototype]
  B --> D[Collect legacy outputs]
  C --> E[Collect modern outputs]
  D --> F{Outputs match exactly?}
  E --> F
  F -- No --> G[Block sign-off and report differences]
  F -- Yes --> H[Record parity pass]
  H --> I[Measure and label benchmark]

Process 3: Prototype Demo Review

Business purpose: Help non-engineering stakeholders understand the before/after modernization value without implying production banking readiness. This process is [ASSUMPTION] because no existing UI/API implementation is present in the current repository.

Trigger event: A demo operator selects a fixture run or benchmark report for stakeholder review.

Step-by-step flow, decisions, inputs, and outputs:

  1. Open demo surface — Input: selected run or fixture. Output: run context and prototype disclaimer.
  2. Show current versus target results — Input: legacy and modern summaries. Output: before/after processing view.
  3. Show parity status — Decision: pass, fail, or not yet run. Output: clear status and next action.
  4. Show benchmark evidence — Input: timing data. Output: labeled speedup evidence.
  5. Show audit trail — Input: run events. Output: traceable run history.
  6. Collect sign-off decision — Decision: approve prototype evidence or request rework.

Error/exception paths: Empty states guide the operator when no run exists. Failed runs show safe messages without stack traces, secrets, or host paths. Accessibility failures block demo acceptance.

Business outcome achieved: Sponsors can review prototype value, limitations, and evidence in a controlled, accessible, non-production experience.

flowchart TD
  A[Open prototype demo] --> B{Run selected?}
  B -- No --> C[Show empty state and instructions]
  B -- Yes --> D[Show before and after summary]
  D --> E{Parity passed?}
  E -- No --> F[Show mismatch and block approval]
  E -- Yes --> G[Show benchmark and audit evidence]
  G --> H[Stakeholder sign-off decision]

Business Rules and Policies

RuleWhen It AppliesUser ExperienceExample
Fixed-width account format must be preservedWhenever account ledger data is read, displayed, compared, or writtenUsers see account outputs that remain compatible with the legacy contract; invalid ledger rows are surfaced as fixture/data issues rather than silently reformattedAccount records remain 8-digit account ID, pipe delimiter, and 12-digit integer-cent balance; a malformed account fixture blocks or flags the run depending on test design
Fixed-width operation format must be preservedWhenever operation input is parsed or validatedInvalid operation rows are rejected or reported according to the legacy-compatible validation pathOperation kind, source ID, destination ID, and amount are read from the established fixed positions; a short or malformed row is rejected rather than corrected
Monetary values use integer cents onlyWhenever balances or operation amounts are calculatedStakeholders receive cent-accurate outputs with no floating-point rounding differencesA transfer of 000000001250 subtracts exactly 1,250 cents from source and adds exactly 1,250 cents to destination
Unsupported or unsafe operations are rejected and the batch continuesWhenever an operation has an invalid type, non-numeric amount, zero amount, self-transfer, missing account, or insufficient fundsThe run continues and rejected count increases; the invalid operation does not mutate balancesA transfer from an account to itself increments rejected count and does not change either balance
Accepted operations increment processed countWhenever a deposit, withdrawal, or transfer passes all validationThe run summary reports accepted work separately from rejected workA valid withdrawal with sufficient funds increments processed count by 1
Final summary contract must be preservedAt the end of every successful batch runUsers receive the same three business totals as the legacy baselineSummary includes processed count, rejected count, and total cents in fixed-width-compatible format
Prototype data must remain syntheticAcross fixtures, reports, audit events, demos, and documentationThe interface and reports clearly state that no real bank or customer records are usedA benchmark report is labeled “synthetic prototype evidence” rather than “production banking result”
User-supplied fixture inputs must use allow-list validationWhen fixtures are uploaded, selected, or executed through any demo/tooling surfaceInvalid files produce actionable user-safe errors without stack traces or host pathsA fixture containing an unsupported operation type is rejected by business validation; a fixture with a disallowed filename or path is rejected before execution
Audit evidence must be retained for prototype reviewWhenever a run starts, completes, fails, generates output, or records a benchmarkReviewers can trace what was run, when, by whom or what process, and what result occurredA completed benchmark stores event time, fixture size, parity status, duration, and artifact references; [ASSUMPTION] retained for at least 1 year if audit logging is implemented
Demo UI must meet accessibility requirementsWhenever a user-facing demo surface is implementedKeyboard users, screen-reader users, and users needing sufficient contrast can operate the prototypeRun status, errors, tables, and downloads meet WCAG 2.1 AA expectations
Internationalization is not required for MVP, but numeric formatting is fixedFor the one-day prototype demoUsers see legacy-compatible numeric formats rather than locale-specific currency formattingTotal cents remains a numeric cents field, not $1,234.56 or localized currency text

Success Metrics and KPIs

MetricTargetMeasurement MethodTimelineBusiness Impact
Primary: Parity pass rate100% of P0 fixtures pass with exact final ledger and summary matchGolden-file comparison reportBy end of 2026-09-23 prototype dayConfirms modernization preserves business behavior
Primary: Required fixture coverageAt least 13 fixture categories implemented and executedTest inventory and run reportBy end of 2026-09-23 prototype dayConverts legacy behavior into executable specifications
Primary: Performance improvement threshold[ASSUMPTION] Modern run is at least 2x faster than legacy baseline for both required benchmark sizesBenchmark harness comparing legacy and modern durationsBy end of 2026-09-23 prototype dayDemonstrates measurable ROI beyond parity
Secondary: Ledger write reductionExactly 1 final ledger write phase per completed modern batchRun instrumentation or artifact logBy end of 2026-09-23 prototype dayReduces mutation windows and file-I/O volume
Secondary: Benchmark transparency100% of reports label 28.6x and 128.1x values as local prototype results pending independent reviewReport content reviewBy demo reviewPrevents overstatement of preliminary speedup claims
Secondary: Demo accessibility100% of implemented demo screens pass WCAG 2.1 AA checklist for keyboard navigation, screen-reader labels, and contrastAccessibility checklist/manual testBefore stakeholder demoMakes prototype review inclusive and policy-aligned
Secondary: Audit completeness100% of batch start, batch completion, batch failure, parity execution, ledger generation, and benchmark measurement events are recorded [ASSUMPTION if audit module is implemented]Audit event reviewBefore stakeholder demoImproves traceability and review confidence
Guardrail: Behavior drift0 unmatched final ledgers or summary counters in sign-off fixturesParity diff reportContinuous during prototype validationPrevents performance improvements from changing ledger outcomes
Guardrail: Real-data exposure0 real customer or production bank records usedFixture source reviewContinuousMaintains educational prototype boundary
Guardrail: User-safe error handling0 user-facing errors expose stack traces, secrets, or host pathsError-state review and negative testsBefore demoReduces security and credibility risk

Risks Assumptions Dependencies and Constraints

Risks

RiskProbabilityBusiness ImpactTrigger ConditionsMitigationOwner
Feature parity gap between legacy and modern runsHighIncorrect balances or rejection counts would invalidate the prototypeAny fixture mismatch in final ledger, processed count, rejected count, or total centsBlock sign-off until exact parity is restored; expand fixtures around the failing caseQA / Regression Tester
Fixed-width formatting driftMediumOutput may be numerically correct but incompatible with legacy consumersDifferences in padding, field width, delimiter placement, newline handling, or orderingUse byte-level golden comparisons and canonical record-contract documentationModernization Engineer
Business continuity during cutoverLowOffline demo evidence may be misunderstood as production cutover readinessStakeholders ask to use prototype against real customer or production dataMaintain offline-only side-by-side approval; explicitly label non-production scopeTechnical Sponsor
Data migration integrity and rollback failureMediumA failed final write could overwrite or obscure baseline outputsTemporary output is incomplete, comparison fails, or generated ledger is published earlyRetain original inputs, publish only after complete temp output, and document discard/rerun rollbackModernization Engineer
Performance claims overstatedMediumSponsor trust may be harmed if preliminary speedups are treated as independent benchmarksReports display 28.6x or 128.1x without qualificationLabel all preliminary speedups as local single-host prototype results pending independent reviewDemo Operator
Prototype UI/API scope creep [ASSUMPTION]MediumOne-day delivery could expand into production-platform workRequests for authentication, real-time processing, payment networks, or live banking workflowsKeep demo surface limited to fixture execution, run status, parity, audit, and benchmark reviewProduct Owner
Dependency upgrade cascade [ASSUMPTION]LowTooling choices could require additional package or runtime setup beyond the one-day prototypeAdding a modern API/UI/test stack introduces incompatible dependency requirementsPin minimal tooling, prefer local scripts, and defer production platform concernsModernization Engineer
Accessibility or security policy gap in demo surfaceMediumDemo cannot be approved for stakeholder useUI lacks keyboard support, exposes stack traces, or accepts unsafe fixture inputsApply WCAG 2.1 AA checklist, allow-list validation, and user-safe error messagesGovernance / Security Reviewer

Assumptions

AssumptionImpact if WrongValidation Plan
[ASSUMPTION] The modern implementation language/runtime can be chosen for rapid prototype delivery while keeping COBOL as the baselineDelivery plan may need to change if the target runtime must remain COBOL-onlySponsor confirms target runtime before implementation starts
[ASSUMPTION] A minimum 2x speedup is an acceptable explicit prototype thresholdSuccess metric may be too low or too high for sponsor expectationsReview threshold with technical sponsor before demo sign-off
[ASSUMPTION] Operator/demo interface can be lightweight and prototype-onlyIf stakeholders require production-grade UX/API, one-day scope is not feasibleConfirm demo expectations and label all surfaces as synthetic prototype
[ASSUMPTION] Audit events can be stored as prototype artifacts rather than a production audit platformIf formal compliance storage is required, scope and timeline expandGovernance reviewer confirms educational-prototype audit posture
[ASSUMPTION] Fixture data remains synthetic and can be versioned in the repository or test artifactsIf real data is introduced, privacy, retention, and compliance obligations change materiallyFixture source review before any benchmark or demo

Dependencies

System/TeamDependencyTimelineImpact if Delayed
Modernization engineeringModern batch engine and record contract implementation2026-09-23Blocks parity testing and demo evidence
QA / regression testingGolden fixture creation and comparison harness2026-09-23Blocks sign-off and risks behavior drift
Baseline COBOL environmentAbility to run the legacy baseline consistently2026-09-23Prevents side-by-side parity validation
Demo/operator toolingPrototype run review surface or generated report2026-09-23Reduces stakeholder visibility but does not block core engine validation
Governance/security reviewApproval of synthetic data handling, audit posture, and error messaging2026-09-23Blocks stakeholder demo if unresolved

Constraints

ConstraintTypeImpact
Must preserve account and operation fixed-width flat-file contractstechnicalLimits changes to external record formats and requires byte-level comparisons
Must use integer cents and avoid floating-point monetary arithmetictechnicalPrevents rounding drift and preserves cent accuracy
Must run offline side by side onlybusinessNo live cutover, canary traffic, or production transaction processing in this phase
Must remain a one-day working prototyperesourceForces prioritization of engine, parity, benchmark, and lightweight demo/reporting only
Must not claim production banking compliance or handle real recordsregulatoryKeeps scope educational and avoids inappropriate compliance assertions
Must include secure coding, input validation, auditability, and accessibility requirementsregulatoryAdds mandatory quality gates for any demo or tooling surface

Scope NFRs and Open Questions

In Scope

Capabilities Unchanged During Transition

Out of Scope for Modernization

Out of Scope for This Phase

Future Consideration

Non-Functional Requirements

Open Questions

  1. Target implementation runtime: Should the modern engine be Python, modern COBOL, or another runtime? Owner: Technical Sponsor.
  2. Performance threshold: Is [ASSUMPTION] 2x improvement sufficient for the one-day prototype gate, or should a higher minimum be set? Owner: Product Owner / Technical Sponsor.
  3. Demo surface depth: Is a lightweight report sufficient, or is an interactive dashboard required for the stakeholder demo? Owner: Demo Operator / Sponsor.
  4. Baseline runner: Which COBOL compiler/runtime should be pinned for repeatable parity execution? Owner: Modernization Engineer.
  5. Audit retention: Should prototype audit evidence follow the organization’s 1-year audit retention expectation, or can this be shortened for synthetic demo artifacts? Owner: Governance / Security Reviewer.

Rollout Plan

  1. Phase 1 — Baseline Capture and Fixture Setup
  1. Phase 2 — Modern Engine Prototype
  1. Phase 3 — Single Final Write and Rollback Controls
  1. Phase 4 — Offline Side-by-Side Parity Gate
  1. Phase 5 — Benchmark and Demo Evidence
  1. Phase 6 — Stakeholder Review and Go/No-Go
gantt
  title One-Day Offline Modernization Rollout
  dateFormat  YYYY-MM-DD HH:mm
  section Prototype Day
  Baseline capture and fixtures :a1, 2026-09-23 09:00, 90m
  Modern engine prototype :a2, after a1, 150m
  Single final write controls :a3, after a2, 90m
  Side-by-side parity gate :a4, after a3, 120m
  Benchmark and demo evidence :a5, after a4, 90m
  Stakeholder go-no-go :a6, after a5, 60m