Skip to main content

The Cartographer

The Cartographer is Flightline’s scenario mapping engine. It identifies what needs to be tested before any data is generated.

What It Does

Before generating random test data, the Cartographer analyzes your schema to identify dimensions of variance: the axes along which your inputs can vary and potentially cause different behaviors.
Input:  Pydantic Schema (e.g., LoanApplication)

Action: Analyze schema to identify dimensions

Output: Test Matrix of 10-20 distinct scenarios

Why Mapping Matters

Most test generation tools create random data. This leads to:
  • Redundant test cases (100 “normal” scenarios)
  • Missing edge cases (the one bankruptcy case you needed)
  • Wasted compute on uninteresting variations
The Cartographer takes a different approach: map first, then generate.

How It Works

Step 1: Dimension Detection

Given a schema, the Cartographer identifies dimensions:
class LoanApplication(BaseModel):
    credit_score: int          # → Dimension: Credit
    annual_income: float       # → Dimension: Income
    loan_type: LoanType        # → Dimension: LoanType (enum)
    loan_amount: float         # → Dimension: Magnitude
    employment_status: str     # → Dimension: Employment
    bankruptcy_history: bool   # → Dimension: Risk Flag

Step 2: Edge Case Identification

For each dimension, the Cartographer identifies interesting regions:
DimensionRegions
Creditlow, fair, good, excellent
Incomezero, low, median, high
LoanTypeFHA, Conventional, Jumbo, VA
Risk Flagtrue, false

Step 3: Scenario Generation

Dimensions are combined to create targeted scenarios:
ScenarioDescription
1High credit, low income, Jumbo loan
2Bankruptcy within 7 years, FHA loan
3Zero income, employed status (inconsistency test)
4Maximum loan amount, minimum credit
Scenario #3 tests for internal inconsistency: a state that shouldn’t be valid but might slip through without proper validation.

The Latent Space

We call the space of all possible inputs the “latent space.” The Cartographer’s job is to identify:
  • Clusters: Groups of similar inputs (the normal cases)
  • Boundaries: Edges where behavior might change (credit score thresholds)
  • Voids: Untested regions that could hide bugs

What’s Next

Once the Cartographer has mapped the scenarios, the Fabricator generates the actual test data.