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.
- 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.
- 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.
- The Release Constitution decides.
CONSTITUTION.ymlis 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. - 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.
- Canary, all inside GitLab. The image is tagged
:canaryin the Container Registry, started as an isolated service container and probed against the SLO (99.5% availability, p95 ≤ 800 ms). If it fails,:canaryis reset to:productionand nothing is promoted. If it passes, the child pipeline moves:production, starts that image and probes it again. - 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).
- 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_ledgerandread_constitution. AGENTS.mdandagent-config.ymlconfigure 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, andproject_idfor 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
needson 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.
- Issue #3 (first attempt, session https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/42218445/showcase/-/automate/agent-sessions/10007905): failed after 28 seconds, because our runner image (
node:20-bookworm-slim) had nocurlfor the Duo CLI download. We addedcurlin commit 931ac33 (the Constitution scored it risk 46, supervised, and themainpipeline passed) and assigned the issue again. - Issue #3 (second attempt, session https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/42218445/showcase/-/automate/agent-sessions/10007950): posted a flight plan, opened merge request !1 (https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/42218445/showcase/-/merge_requests/1,
docs/TROUBLESHOOTING.md). The reviewer requested changes, the builder pushed a fix, the reviewer approved, the decision was hands-off (risk 7/100), and the MR merged at 22:55 Riyadh time on 24 Oct. The issue closed. - Issue #2 (session https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/42218445/showcase/-/automate/agent-sessions/10008188): MR !2 (https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/42218445/showcase/-/merge_requests/2, tests for
app/data.js, coverage of that file 100%). Approved by the reviewer on the first pass, hands-off (risk 7/100), merged at 23:15 Riyadh time. No change request in this run. - Issue #4 (session https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/42218445/showcase/-/automate/agent-sessions/10008287): MR !3 (https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/42218445/showcase/-/merge_requests/3, shows open or closed for each mission in the cockpit). Approved on the first pass, hands-off (risk 3/100), merged at 23:26 Riyadh time. No change request in this run.
- The cockpit on GitLab Pages now lists these three missions as closed, merged and hands-off.
- Constitution Keeper, run live (session https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/42218445/showcase/-/automate/agent-sessions/10008577, on throwaway MR !5, closed unmerged): asked "should hands-off releases be allowed on Friday afternoons?", it read
CONSTITUTION.yml,AGENTS.mdand the history, and answered with numbers (0 incidents, 0 failed deployments, 3 hands-off MRs all merged on a Saturday outside the freeze windows, so no evidence to change the rule). It proposed no amendment. The flow's approval gate then waits for a human even when there is nothing to approve, so the answer stays in the session log until someone answers the gate. Nothing was written toCONSTITUTION.yml. - Pipeline Medic, run live, only half works (sessions .../agent-sessions/10008570 and .../10008597, on throwaway MR !4 with a deliberately broken comparison, closed unmerged): it read the red
verify:testjob and classified the pipeline correctly asci_failure. But both times it wrapped the word in an explanation, so the literal router did not startci_doctor, and no fix MR was opened. A tightened prompt (catalog version 1.0.1) did not change that. The repair path is written and linted but has not been seen working. - Session logs of both are exported in
docs/LIVE-DRILLS.md(the session pages need a project login). The Flight Director chat agent has not been run live. The reviewer loop with a change request was seen once (!1).
- Issue #3 (first attempt, session https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/42218445/showcase/-/automate/agent-sessions/10007905): failed after 28 seconds, because our runner image (
- Honest note: after MR !1 merged, the
release:publishjob of the follow-upmainpipeline (https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/42218445/showcase/-/pipelines/2985107514) failed with403 Forbiddenwhile 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 theAUTOPILOT_TOKENvariable and cannot turnmainred. 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_TOKENis a personal access token (scopeapi) 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
- Repo: https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/42218445/showcase
- Live cockpit (GitLab Pages): https://showcase-5abe03.gitlab.io
- Latest release (notes, ledger, SBOM): https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/42218445/showcase/-/releases
- Pipelines (public): https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/42218445/showcase/-/pipelines
- Video: https://www.youtube.com/watch?v=wJsVSFFsHoY (2:56, voice-over and captions, no music; screen capture of the live cockpit, public pipelines, the Release page, the real Mission Control run on issue #3 with its merge request, review and merge, and the live Keeper and Medic drills with the Medic limitation stated)
- Testing: open the live cockpit, press "Verify the chain in my browser", then "Try to rewrite history", then ask the referee about a change to
CONSTITUTION.yml. Or run it locally with the 2-minute no-account steps in the README (npm ci && npm test && npm start).
Built With
- gitlab-ci/cd
- gitlab-container-registry
- gitlab-duo-agent-platform
- gitlab-pages
- mcp
- node.js