Inspiration

AI can now write code faster than any team can review it. The bottleneck has moved to everything after the code: review, security, release, operations. Teams answer with one global switch: "agents may merge" or "agents may not". Both are wrong. A typo fix and a change to the deploy script deserve different freedom. And when an agent ships on its own, "trust me" is not an audit trail.

What it does

Flight Recorder is a hands-off delivery autopilot that earns its autonomy per change.

  1. You open an issue. The Mission Control flow plans it, builds it with tests, reviews it with an independent agent (which can send it back), and opens a merge request.
  2. The pipeline measures everything: tests and coverage, a linter for Duo flow YAML, GitLab SAST and Secret Detection, licence policy, a CycloneDX SBOM, a runtime-contract check, and a container image.
  3. The Release Constitution decides. CONSTITUTION.yml is a short, human-readable policy. It turns that evidence into a 0–100 risk score: sensitive paths, size, security findings introduced by the change, coverage, dependencies, freeze windows, the error budget left, and the carbon budget. The result is hands-off (merge and promote alone), supervised (one click), or blocked. The reasons are posted on the MR.
  4. The pipeline rewrites its own autonomy. The production stage is a dynamic child pipeline, generated from the decision. Low risk promotes itself. Medium risk waits for one click. High risk produces a hold job that explains why.
  5. Canary, all inside GitLab. The image is tagged :canary in the Container Registry, started as an isolated service container and probed against the SLO (99.5% availability, p95 ≤ 800 ms). If it fails, :canary is reset to :production and nothing is promoted. If it passes, the child pipeline moves :production, starts that image and probes it again.
  6. Release and monitor. Notes are written from commits. A GitLab Release carries the ledger and SBOM. The cockpit is rebuilt and published on GitLab Pages. A schedule probes the live site, and the Pipeline Medic flow is meant to fix broken pipelines (through the same Constitution) or open incidents; live, only its triage step has been seen working (see the honest notes below).
  7. Govern the governor. The Constitution Keeper flow proposes rule changes from evidence. It stops at a human approval gate, and its amendment MR is always blocked. Agents can never widen their own autonomy.

Every decision, probe, promotion and carbon figure is appended to a sha256 hash-chained flight recorder. The cockpit (live on GitLab Pages) re-verifies the whole chain in your browser with WebCrypto. Change one byte and it shows you which entry broke. The cockpit also compiles the risk engine to the browser, so anyone can ask "what would the Constitution decide for this change?" with no server.

How we built it

  • Duo Agent Platform:
    • 3 custom flows (flow registry v1):
    • Mission Control: 5 agents with a conditional review loop.
    • Pipeline Medic: a triage router to a CI doctor or an incident commander.
    • Constitution Keeper: a HumanInput approval gate.
    • A Flight Director chat agent.
    • An MCP server that exposes assess_change, verify_ledger and read_constitution.
    • AGENTS.md and agent-config.yml configure the agent sandbox.
  • A deterministic engine (autopilot/, Node.js, one dependency). Agents reason; code measures and enforces. It covers the risk engine, ledger, SLO judge, SCI carbon model, SBOM generator, runtime-contract check, release notes, auto-merge, the child-pipeline generator, the static-site builder, and a linter for Duo flow YAML that encodes the platform's documented pitfalls.
  • GitLab CI/CD: 8 stages, 19 jobs of our own plus the SAST and Secret Detection jobs, dotenv handoffs, a dynamic child pipeline, Docker-in-Docker and service containers, environments (canary, production, cockpit), Releases, Pages, schedules, and auto-cancel of superseded pipelines.
  • Zero cost on purpose. The whole release path uses features every free GitLab project has. There is no cloud account to sign up for, no secret to leak, and nothing that can send a bill.
  • Quality: 48 tests, about 97.6% line coverage, including an end-to-end CLI run in a scratch git repo, tamper detection, parity between the browser and server ledgers and referees, and CI-config reference checks.

Stages covered (all 9)

Plan · Create · Verify · Secure · Package · Release · Configure · Monitor · Govern. The README has a table mapping each one to its job or agent.

Sustainability, measured

Each release reports its SCI (Green Software Foundation, ISO/IEC 21031:2024): (E × I + M) per release, from job durations, runner power, the grid intensity of the runner's real region (GitLab.com hosted runners in us-east1 and us-east5; we use the dirtier one, us-east1, 579.44 gCO2e/kWh), and embodied emissions. Release v1.42.0 measured 1.2 gCO2e, the next one 1.3 gCO2e, and the latest one on the cockpit 1.23 gCO2e, against a 2 g budget that is enforced in the Constitution. Jobs skip when their inputs did not change (20% saved on that run), and superseded pipelines cancel themselves. The cockpit also shows what the same jobs would emit in other regions (europe-north1: about 95% less) as an informational comparison for teams that run their own runners; we do not claim to have moved anything.

Challenges we ran into

  • Bot-authored pipelines (rightly) do not fire Duo triggers. We designed around this: Mission Control follows its own pipeline inside the session, and a human-owned schedule reaches Pipeline Medic.
  • Flow YAML has sharp edges, for example {{ in system prompts, routing rules for HumanInput, and project_id for API tools. We turned each documented one into a lint rule, so they fail in CI rather than at runtime.
  • A child pipeline whose only job is manual counts as "skipped" and fails the parent under strategy: depend. Supervised promotion therefore has a visible announce job plus a manual, allow-failure deploy job. We found that on the live platform, and it is covered by a test.
  • SAST reports are Developer-only artifacts, so the baseline comparison ("charge a change only for findings it introduces") had to use the job token.
  • Honest note: 26 of our first 28 pipeline runs (22–24 Oct, all scheduled monitoring runs) failed config validation ("no jobs created"). The cause was a needs on a job that schedules skip, fixed in commit 173a744. The failed runs are still in the pipeline list; we did not hide them.
  • Honest note: Mission Control (the Duo flow) was run for real on three public issues, by assigning each issue to its service account. Nothing was merged by hand.
  • Honest note: after MR !1 merged, the release:publish job of the follow-up main pipeline (https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/42218445/showcase/-/pipelines/2985107514) failed with 403 Forbidden while adding the three release asset links. That pipeline was started by the Mission Control service account (the merging user); our own pushes had worked. The Release v1.58.0 was created, without links. We retried the job as the project owner and it passed, which shows the cause is the identity of the job token, not the config. We did not find which GitLab rule refuses the service account's job token. The durable fix (commit dd40e26) moves the links into a separate job, release:links, that uses the AUTOPILOT_TOKEN variable and cannot turn main red. It was proven on the next two Mission Control merges (pipelines 2985140063 and 2985152327, both started by the service account, both green, links attached).
  • Honest note: AUTOPILOT_TOKEN is a personal access token (scope api) of the project owner, masked and not protected, because a Developer cannot create a project access token on this project. So the decision notes and the auto-merge requests on the MRs appear under the owner's name. Without the variable, runs ended with "merge left to a human".

Accomplishments we're proud of

  • A pipeline that generates its own production stage from a policy decision, and a release that ran end to end on GitLab with no human click after the merge: decision, canary, promotion, Release, Pages. We saw it three times, after merges made by the Mission Control service account (pipelines 2985140063 and 2985152327; the first one, 2985107514, hit the release-link problem described above).
  • A Duo flow that took three public issues to merged MRs on its own, with an independent reviewer that sent one of them back.
  • An audit trail a judge can verify without trusting us, in the browser, with no server.
  • An agent system that cannot promote itself, by construction.
  • A whole release path with no cloud account and no cost.

What we learned

Autonomy is not a setting; it is a function of evidence. Once you write that function down, humans can review it, change it, and hold the agents to it.

What's next

  • Learn rule weights from incident history; the Keeper already proposes them.
  • Sign ledger heads with Sigstore.
  • Use real energy telemetry from runners.
  • Package the Constitution as a CI/CD Catalog component.

Try it

Built With

  • gitlab-ci/cd
  • gitlab-container-registry
  • gitlab-duo-agent-platform
  • gitlab-pages
  • mcp
  • node.js
Share this project:

Updates

Submission history