Background Coding Agents for Large-Scale Dataset Migrations

spotify · Media & Entertainment · 2026 · source Agentic: yes · promotional bias: med · source-backed · extracted with prompt 0.5.4 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Large-scale dataset consumer migration

Spotify needed to migrate thousands of downstream data-pipeline consumers from deprecated user datasets to new versions within six months without spending roughly ten engineering weeks on manual edits.

Constraints:

Architecture

Spotify used Backstage endpoint lineage and Codesearch to identify affected repositories, Fleetshift to orchestrate the migration, and Honk background coding agents to generate PRs from carefully engineered context files. The team narrowed scope to the more standardized BigQuery Runner and dbt frameworks, encoded field mappings in tables, instructed Honk to leave judgment-call fields unchanged with comments and migration-guide links, and monitored 240 automated migration PRs through Fleetshift/Backstage while relying on owning teams for manual testing where build-time tests were absent.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  deprecated-datasets[Deprecated datasets] --> backstage-lineage[Backstage lineage]
  backstage-lineage --> codesearch[Codesearch]
  codesearch --> fleetshift[Fleetshift]
  context-file[Context file] --> honk-agent[Honk agent]
  fleetshift --> honk-agent
  honk-agent --> dbt-repositories[dbt repositories]
  honk-agent --> bigquery-runner-repositories[BigQuery Runner repositories]
  context-file --> scio-repositories[Scio repositories]
  honk-agent --> automated-prs[Automated PRs]
  automated-prs --> downstream-owning-teams[Downstream owning teams]
  fleetshift --> migration-dashboard[Migration dashboard]
  migration-dashboard --> downstream-owning-teams
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Deprecated datasets Old user datasets whose downstream consumers needed migration. Backstage lineage
Backstage lineage Shows direct and indirect downstream consumers for dataset endpoints. Deprecated datasets, Codesearch
Codesearch Finds repositories containing target dataset usages across GitHub Enterprise. Backstage lineage, Fleetshift
Fleetshift Orchestrates repository shifts, progress monitoring, and PR navigation. Codesearch, Honk agent, Automated PRs, Migration dashboard
Context file Comprehensive prompt/material with explicit field mappings and human-guide links. Honk agent
Honk agent Background coding agent that applies dataset migration edits from context. Fleetshift, Context file, Automated PRs
dbt repositories Standardized SQL framework targets for automated migration. Honk agent, Downstream owning teams
BigQuery Runner repositories Standardized SQL framework targets for automated migration. Honk agent, Downstream owning teams
Scio repositories Flexible Scala framework excluded from the initial automated migration scope. Context file
Automated PRs Migration pull requests generated by Honk and reviewed/tested by owning teams. Fleetshift, Downstream owning teams
Migration dashboard Backstage/Fleetshift UI for monitoring progress and troubleshooting. Fleetshift, Downstream owning teams
Downstream owning teams Teams responsible for reviewing, testing, and merging generated PRs. dbt repositories, BigQuery Runner repositories, Automated PRs, Migration dashboard

Data flow

Backstage lineage surfaces downstream dataset consumers. Codesearch finds target repositories across Spotify GitHub Enterprise and Fleetshift marks them in scope. Honk receives comprehensive context files and migration mappings, edits standardized dbt/BigQuery Runner repositories, leaves ambiguous fields commented for humans, opens PRs, and Fleetshift/Backstage provides progress monitoring and links to PRs for downstream teams.

3 supporting quotes
“Each endpoint’s Backstage page gave a clear list of downstream consumers, giving us an immediate sense of the scale of our migration.”article, stated
“With Codesearch, we wrote queries that would find target repositories across the Spotify GitHub Enterprise landscape”article, stated
“we successfully rolled out 240 automated migration PRs using Fleetshift.”article, stated

Why this architecture

Spotify combined lineage, repository search, orchestration, and background coding because the hard part was not just editing code: it was scoping thousands of consumers, providing enough context for a constrained agent, and managing PR progress across owning teams. The team deliberately limited scope to standardized frameworks and left use-case-specific judgment calls for humans.

3 supporting quotes
“Before we could begin making any code changes, we had to first understand the lineage of our deprecated datasets”article, stated
“This lack of standardisation across our data landscape made it hard to write all-in-one prompts for Honk that could truly capture all available permutations of what it would encounter.”article, stated
“we asked Honk to leave the fields unchanged, but to add comments above them with links to human engineer migration guides”article, stated

Models used: Honk · Claude Code

Scale

Alternatives considered (roads not taken)

Manually migrate all downstream pipelines

Rejected because: The estimate was about ten engineering weeks for a six-month, 1,800-pipeline effort.

“We estimated that it would have taken around 10 engineering weeks of effort to complete these migrations manually.”article, stated

Automate Scio migrations in the first pass

Rejected because: Scio's flexibility made comprehensive prompting too unwieldy without external skills/configurability.

“We therefore made the decision not to continue trying to make Scio migrations work at that time, and focused on the other two pipeline frameworks.”article, stated

Repurpose a human migration guide directly

Rejected because: The generated context omitted mapping detail and caused incorrect agent assumptions.

“However, the resulting context was not comprehensive enough, and Honk was left to make assumptions about how to map from one dataset field to another that were often incorrect.”article, stated

Patterns

tool-use-orchestration (developer-platform)

Backstage, Codesearch, Fleetshift, and Honk coordinate scoping, editing, PR creation, and monitoring.

“Backstage and Fleet Management platforms to ease the pain of migrating thousands of dataset consumers”article, stated

human-in-the-loop-gate (review)

Ambiguous fields are left for human reviewers, and owning teams manually test PRs where automated tests are absent.

“we had to rely on the downstream owning teams to perform their own manual testing before merging the automated PRs.”article, stated

context-compaction (prompting)

The team compresses migration rules and mappings into context files the agent can use without external access.

“the prompt given to it had to be comprehensive, because it could not do things like use MCPs to go and read dataset schemas”article, stated

eval-driven-development (process)

The team learned that validation and standardized data/framework conventions are prerequisites for scaling background agents.

“we must enforce requirements for testing and validation across repositories so that agents like Honk can verify their work”article, stated

Tradeoffs

Limit Honk's access during migration

Chose comprehensive up-front context files over allowing the agent to read schemas/docs via MCP or skills.

Rationale: The design established guardrails around possible migration outcomes.

“This was a design choice made to establish guardrails around the range of possible outcomes during the migration.”article, stated

Leave judgment-call fields unchanged

Chose comments with links to human guides over having Honk make use-case-specific migration decisions.

Rationale: Human owners were better positioned to decide ambiguous field migrations.

“where a use case–specific judgement call was required”article, stated
“add comments above them with links to human engineer migration guides”article, stated

Use Backstage/Fleetshift monitoring

Chose central overview UI and PR links over manually searching repositories for migration progress.

Rationale: Ongoing troubleshooting and team communication are part of large migration success.

“a snapshot view of migration progress, and the ability to easily click through and view any of the automated PRs”article, stated

Gotchas (what bit them)

Flexible pipeline frameworks break all-in-one prompting.

Root cause: Scio varied too much across teams to capture all permutations in a comprehensive prompt.

Resolution: Spotify deferred Scio and focused on more standardized dbt and BigQuery Runner repositories.

“Scio pipelines, which can vary hugely between teams due to the relative flexibility that the framework provides”article, stated

Human-oriented migration guides are not automatically agent-ready.

Root cause: They may leave implicit mapping knowledge that an agent will guess incorrectly.

Resolution: Spotify rewrote mappings into explicit tables and fine-grained instructions.

“made all mappings clear using tables in the context file”article, stated

Lack of build-time tests removes a key feedback loop.

Root cause: BigQuery Runner and dbt repositories rarely used build-time unit testing.

Resolution: Downstream owning teams had to perform manual testing before merge.

“BigQuery Runner and dbt repositories across the company rarely used any build-time unit testing.”article, stated

Evaluation

Spotify evaluated the migration through scope discovery, PR rollout count, manual-vs-automated effort, framework suitability, context-file iteration, manual test/review by owning teams, and Fleetshift monitoring.

Metrics: about 1,800 direct downstream pipelines · six-month migration window · around 10 engineering weeks avoided · 240 automated migration PRs · three pipeline frameworks considered, two automated initially

3 supporting quotes
“saving an estimated 10 engineering weeks in the process.”article, stated
“we successfully rolled out 240 automated migration PRs”article, stated
“This was invaluable for troubleshooting, progress monitoring, and facilitating communication with the owning teams.”article, stated

Outcomes

This is a production migration case with concrete scale: ~1,800 direct downstream pipelines, thousands more indirectly affected, six months, 240 PRs, and ten engineering weeks saved.

3 supporting quotes
“reducing manual toil for our engineering teams.”article, stated
“allow the agent to spend some time gathering its own context, for example by reading JIRA tickets or documentation”article, stated
“perform complex code changes at scale, just like we do at Spotify”article, stated