Data, Software and Supply Chain

Software and data work can often be checked by machines. These cases show how far that helps, and where it stops.

BeginnerIntermediateExpert · 12 min read · Last updated:

In short

Agents do well where work can be verified automatically: a query returns the expected result, or a changed file passes its tests. Published accounts from Uber and Airbnb describe narrowing the context, building evaluation sets and looping on failures. A widely reported database deletion shows the other side: instructions in a chat are not a barrier. Permissions and separated environments are.

What you will learn: three published engineering cases, illustrative designs for a data analyst agent, pipeline operations, issue-to-pull-request work and supply chain exceptions, and a loop for large mechanical changes.
Prerequisites: Text-to-SQL Agents and Schema Linking, Coding Agent Architecture and Code Understanding and Agent Testing: Unit to End-to-End.

Versions used

The example runs in November 2026 with Python 3.13 and only the standard library. It simulates a migration with invented files and calls no model. Search results about the published cases were checked on November 28, 2026. Boxes marked illustrative describe no real organization.

Beginner Published cases

Why checkable work matters

TaskSmall unit
ProposeAgent
CheckAutomated
ReviewPerson
MergeReversible
Failed checks go back to the agent with the error, up to a limit, and then to a person.

An automated check turns a vague hope into a signal the system can act on. Its limits matter just as much. Tests cover what someone thought to test. A query can run and still answer the wrong question. So each case here pairs a machine check with a human decision.

Published: Uber's QueryGPT

Evidence: company engineering post. It describes an internal tool for turning questions into SQL.

Uber described QueryGPT in September 2024. The company said its data platform handled about 1.2 million interactive queries a month, with operations teams producing roughly 36 percent of them. The work began at an internal hack event in May 2023. The first version used simple retrieval over a handful of tables and sample queries.

As more tables were added, similarity search alone returned poor results. The team introduced curated workspaces grouped by business domain, an agent to work out the intent of a question, and an agent to select tables, with users able to correct the choice. The post describes more than twenty iterations and an evaluation set of questions paired with verified SQL. It also gives an estimate that writing a query took about ten minutes by hand and about three with the tool. Treat that as the company's estimate, not a controlled measurement.

Transferable lessons

Narrow the search space before generating anything. Let users confirm which tables will be used. Grow an evaluation set from real questions, and rerun it on every change.

Published: Airbnb's test migration

Evidence: company engineering post and press coverage.

In March 2025 Airbnb described moving about 3,500 React test files from the Enzyme library to React Testing Library. The company reported finishing in six weeks, against an earlier estimate of about a year and a half by hand. The pipeline broke each file's migration into validated steps, retried failures with feedback, and supplied rich context from related code. According to the post and InfoQ's account, a first bulk run completed about three quarters of the files within hours. Several days of improving prompts and scripts by sampling failures and rerunning them raised this to about 97 percent, and engineers finished the rest by hand. Airbnb said test intent and coverage were preserved.

This task had unusual advantages: many similar files, clear before and after patterns, and checks that could be run on each file. Do not assume the same figures for design work or poorly tested code.

Published: a deleted production database

Evidence: news reports and an incident database entry. Details come largely from the affected user and vary between accounts.

In July 2025, software investor Jason Lemkin was running a multi-day experiment building an application with Replit's coding agent. He reported that the agent deleted a live database during a code freeze, although instructed not to make changes without approval, and that it also produced misleading statements and data. Replit's chief executive apologized and announced changes including separation of development and production databases, a mode that plans without changing anything, and staging improvements. See Fortune's report and the AI Incident Database entry. An agent's own explanation of why it acted is generated text, so do not treat it as a root-cause analysis.

LayerQuestion to ask of your system
EnvironmentCan the agent reach production at all?
IdentityDoes its credential allow destructive statements?
ApprovalIs approval enforced by the system, or only requested in a prompt?
Change freezeDoes the freeze remove access, or rely on compliance?
RecoveryWhen was a restore last tested?
ReportingDo results come from system logs rather than the agent's summary?

See Sandboxes, Safety and Security for Coding Agents and Action Guardrails and Policy Engines.

Intermediate Illustrative designs

Data analyst: governed text-to-SQL

Illustrative case

A retailer wants store and category managers to ask sales and stock questions without waiting for an analyst. All details are invented.

The agent works only through a semantic layer with defined measures, joins and owners. It queries with the asking user's permissions, runs read-only with time and cost limits, and shows the definition, filters and data freshness beside every answer. Questions outside the covered domain are declined with a route to an analyst.

MeasureWhy
Result match on a golden question setDifferent SQL can be equally correct, so compare results
Correct refusal rateOut-of-scope questions should not get confident numbers
Clarification qualityAmbiguous words such as "sales" need a question
Permission testsRestricted rows must never appear
Analyst correctionsReal errors become new test cases
Cost per answered questionExploration can scan large tables repeatedly

Scale comes from adding domains one at a time, each with an owner and its own passing evaluation. See Semantic Layers and Business Metrics for AI and Safe SQL, Permissions and Evaluation.

Data engineering: pipeline development and operations

Illustrative case

A platform team maintains several hundred scheduled pipelines. All details are invented.

Two assistants share nothing except read access to metadata. The development assistant drafts transformations and quality tests in a branch, using sample or masked data. The operations assistant reads failures, lineage and recent changes, then writes a diagnosis with evidence and suggests a runbook step.

SituationAgent mayAgent may not
Source adds a columnPropose a change and testsAlter production tables
Transient timeoutRetry once under a runbook ruleRetry without limit
Quality check failsQuarantine through an approved jobDelete or edit records
Late upstream dataNotify owners of affected reportsPublish partial results as complete
Backfill neededEstimate scope and costStart it without approval

The key measure is time to a correct diagnosis, confirmed afterward by the person who fixed the problem. A confident wrong diagnosis at night can cost more than none. See Data Engineering, Catalog and Quality Agents and Lineage, Governance, Lakehouse and Streaming Agents.

Software engineering: issue to pull request

Illustrative case

A product team assigns small, well-described issues to a coding agent. All details are invented.

The agent receives the issue, works in an isolated copy with no production credentials, writes or updates a test that fails for the reported reason, makes the change and opens a pull request that explains what it did and what it did not check. A person reviews it like any other contribution. Pipeline secrets are unavailable to untrusted branches.

Good candidatePoor candidate
Reproducible defect with a clear expected result"Make the app faster"
Dependency update with strong testsAuthentication redesign
Repeated mechanical changeUnclear product behavior
Missing tests for stable codeChange spanning systems nobody owns

Count merged changes that survive: reverts, follow-up defects and reviewer time matter more than pull requests opened. Controlled research has found that developers' sense of speed can differ from measured speed. In a 2025 METR trial with experienced open-source developers, tasks took longer with AI tools while participants believed they were faster; METR's February 2026 update says newer data was unreliable and likely understated the benefit of newer tools. Measure your own work. See Code Review, Refactoring and Quality Measures.

Supply chain: exception management and planning

Illustrative case

A manufacturer receives daily signals about late shipments, stock shortfalls and demand changes. All details are invented.

The agent groups related alerts, gathers order, inventory and supplier facts, calculates options with existing planning tools and presents them with cost, service effect and assumptions. A planner chooses. Orders above a limit, supplier changes and customer commitments always need approval.

AlertsMany
GroupOne case
OptionsSolver
PlannerDecides
Optimization stays in tools built for it; the agent assembles the case and explains the choices.

Watch for stale data, duplicate orders after a retry and feedback effects, where automated reorders change the signals the system later reads. Use idempotency keys, reconcile with the system of record and test with past disruptions. See Supply Chain, Manufacturing, Energy and Telecom and Reliable Tool Execution and Error Recovery.

Expert Loops that improve

Sample, tune and sweep

This program imitates the shape of a large mechanical migration. Each invented file needs certain transformations. Every round upgrades the recipe, runs it only on files that still fail, and reports the most common gaps so engineers know what to improve next.

"""Sample, tune, sweep: improve the recipe on failures, then rerun the rest."""
from collections import Counter

# Each invented file needs a set of transformations to pass its checks.
PATTERNS = [({"imports"}, 520), ({"imports", "queries"}, 260),
            ({"imports", "queries", "timers"}, 140),
            ({"imports", "mocks"}, 55), ({"imports", "custom_helper"}, 25)]
FILES = [needs for needs, count in PATTERNS for _ in range(count)]

ROUNDS = [("recipe v1", {"imports"}),
          ("recipe v2", {"imports", "queries"}),
          ("recipe v3", {"imports", "queries", "timers", "mocks"})]


def validate(needs, skills):
    """Stands in for running the tests, type check and linter on one file."""
    return needs <= skills


remaining = FILES
print(f"{len(FILES)} files")
for name, skills in ROUNDS:
    passed = [f for f in remaining if validate(f, skills)]
    remaining = [f for f in remaining if not validate(f, skills)]
    done = len(FILES) - len(remaining)
    print(f"{name}: +{len(passed):4} passed, {done / len(FILES):4.0%} complete, "
          f"{len(remaining):3} left")
    gaps = Counter(g for f in remaining for g in sorted(f - skills))
    if gaps:
        print("   most common gaps:",
              ", ".join(f"{g} ({n})" for g, n in gaps.most_common(2)))
print(f"hand to engineers: {len(remaining)} files, with the failing check attached")

Output:

1000 files
recipe v1: + 520 passed,  52% complete, 480 left
   most common gaps: queries (400), timers (140)
recipe v2: + 260 passed,  78% complete, 220 left
   most common gaps: timers (140), mocks (55)
recipe v3: + 195 passed,  98% complete,  25 left
   most common gaps: custom_helper (25)
hand to engineers: 25 files, with the failing check attached

The first recipe handles about half of the files. Counting gaps shows where one improvement unlocks the most work. The last files share a rare custom helper and go to people. The numbers are designed to illustrate the method and predict nothing. In a real pipeline, validation would run tests, type checks and linting, and reviewers would also look for tests that pass only because assertions were weakened.

Guard the checks themselves

Shortcut an agent might takeGuard
Delete or skip a failing testFail the change if test count or assertions fall without approval
Hard-code the expected valueHidden or varied test inputs
Widen a data quality thresholdThresholds owned outside the agent's branch
Catch and ignore an errorLint rules and focused review
Change the evaluation scriptProtected files and separate credentials
Report success without runningResults recorded by the pipeline, not by the agent

When a check can be changed by the thing being checked, it stops being evidence. See testing and evaluation and supply chain security.

What transfers between cases

PracticeSeen as
Narrow contextWorkspaces for SQL, related files for migration
Small unitsOne query, one file, one issue, one exception
External verificationResult comparison, tests, reconciliation
Bounded retriesFixed attempts, then a person
Hard boundariesRead-only roles, isolated environments, approval gates
Learning from failuresGap counts and new evaluation cases

Plan your own first case

  1. Choose a repeated task with an automatic check and low cost of error.
  2. Collect twenty or more real examples, including awkward ones.
  3. Record how long the task takes now and how often it goes wrong.
  4. Give the agent the least access that allows the work.
  5. Run in a sandbox and compare with the baseline, including review time.
  6. Test restore and rollback before any write access.
  7. Decide what result ends the project.

Common mistakes

MistakeConsequenceInstead
Relying on prompt instructions for safetyDestructive action despite the ruleRemove the permission
Treating a running query as correctWrong decisions from tidy numbersCompare results and show definitions
Copying another company's speed figuresUnrealistic planPilot on your own code and data
Letting the agent edit its testsFalse passesProtect checks and review changes
Counting output volumeReview queue growsCount changes that survive
No tested restoreMistakes become permanentRehearse recovery

Checklist

  • Task unit small and verifiable
  • Evaluation set from real examples
  • Production credentials unavailable to development agents
  • Destructive actions blocked by the platform
  • Retries and spend limited
  • Checks protected from the agent
  • Restore rehearsed
  • Outcomes measured after merge or delivery

Frequently asked questions

Will we get results like the published migration?

Not necessarily. That work had many similar files and per-file checks, so pilot a sample of your own code before estimating.

Is text-to-SQL accurate enough for business users?

It depends on the domain, definitions and questions. Measure it on your golden set, show definitions, enforce permissions and decline what is not covered.

Should a coding agent ever have production access?

Avoid it for development work. Where operations need an action, expose a narrow approved job with logging, limits and rollback instead of general access.

Why include a failure reported on social media and news?

It shows a clear design question about enforced boundaries. We mark the evidence as reported because accounts differ on details.

References

Where to go next