AGENT PIPELINE · CONTRACTS

Agent pipeline: ordered transformations and failure propagation

Push ten invoices through six ordered stages, inject a fault into one, and see whether bad output is stopped, quarantined or published.

Computed drill · sixty inspection seconds

Event trace

    Computed data

    Final metrics

    Ten fictional invoices worth $1300. A crash is transient (the next attempt works); malformed and empty outputs are deterministic, so retrying returns the same output. Without contract checks a missing amount flows downstream and summarize adds only the amounts present. Stage timing, partial writes and backfill of quarantined rows are not modeled.

    A confident wrong report

    Ten invoices worth $1300 pass through ingest, clean, extract, enrich, summarize and publish. By default extract drops the amount field on INV-3, INV-6 and INV-9 and no contract is checked, so enrich and summarize pass the damaged rows along and publish reports "10 invoices, total $685": CORRUPT REPORT PUBLISHED. Moving the fault to summarize gives the same $685.

    Check contracts between stages

    Tick Check each stage output against its contract. With On a failed stage left at Retry, then halt and 1 retry, extract fails its contract twice, because a deterministic fault returns the same output, and the pipeline halts: HALTED SAFELY, nothing published. Quarantine invalid rows moves the three rows to a dead-letter table and publishes $685 over 7 invoices, labelled partial: PUBLISHED WITH QUARANTINE, with $615 held for repair. Halt the pipeline stops at the first failed check.

    Transient versus deterministic faults

    Fault type Crash on the first attempt throws once. With 1 retry the second attempt succeeds and all 10 invoices publish: PUBLISHED CORRECT, $1300. At 0 retries, or with the halt policy, the pipeline halts although a retry would have worked; quarantine cannot set aside an exception, so it halts too. Return zero rows without checks publishes an empty report; with checks it halts. Retries help only faults that can change between attempts.

    Reading the board

    Stage chips turn green when a stage passes, amber when it retried or quarantined, red when it halted or carried corrupt rows. Rows in flight counts rows, rows missing an amount and quarantined rows. The table records each stage's output size and how many rows lacked an amount when it finished; Faulty stage None publishes all 10.

    Replay and limits

    Any change recomputes the run and rewinds it; the Complete-run preview states the outcome at once. Play and Pause walk through the events, Next event jumps one event, Restart rewinds, Speed runs from 0.25x to 2x and Inspection time seeks from 0 to 60 seconds, where the outcome and final metrics appear. A crash is transient, malformed and empty outputs are deterministic, and summarize adds only the amounts present. Stage timing, partial writes and backfilling quarantined rows are not modeled.

    Views are my own and do not represent any employer, past or present.

    Search