Reconstruct a pipeline incident from evidence
The public aquarium announces that its overnight software update has been published. The automated report is cheerful. Packaging completed, the repository accepted the release, and the notification went to the support team. By breakfast, the first visitors renewing annual memberships discover that the problem the update was supposed to fix is still there. A manager calls the engineering team and asks how a tested correction could have shipped without the correction. The answer begins with an uncomfortable detail: the package that was published belongs to yesterday’s successful build, not to the source revision reviewed last night.
This is an illustrative incident, but the failure pattern is common enough to deserve careful reasoning. The aquarium has one pipeline that builds and tests its membership application after code changes. Another scheduled workflow collects an approved package and publishes it for installation at the aquarium’s sites. The separation made sense when the software was released once a month. As updates became more frequent, the team added a convenient repository label that meant the most recent available successful package. The publishing workflow trusts that label and records its own upload as successful. No single job is lying about what it accomplished. The collection of jobs is making a claim none of them has actually proved.
Start with the evening before the incident. A developer corrects a duplicate-renewal defect and gets a review on the main development branch. The source-control system records the new revision. The build workflow starts and completes the preparation and compilation steps. Its integration tests, however, need a temporary membership database. That database fails to start, so the required end-to-end checks do not pass. The pipeline cannot produce a newly approved package. Elsewhere, the older package remains available in the repository under the convenient label. Later, an independent publishing schedule wakes up, finds the familiar label, and publishes whatever it points to.
An optional exercise with the Bare Metal Cyber AutoOps+ Study Guide is to reconstruct this evening without seeing any logs. Identify the developer’s source revision, the failed test run, the older accepted artifact, and the scheduled publication as separate objects. Then decide which of those objects actually establishes that the duplicate-renewal correction was tested. The exercise teaches why a source commit, a pipeline run, a candidate package, and a publication event cannot be treated as interchangeable evidence.
The first engineer assigned to the incident sees two status pages. The build workflow is red and the publishing workflow is green. At first she thinks a dashboard bug caused an inconsistent report. The workflow owners explain that the results come from different runs with different purposes. Red means the build and test path did not produce the required successful result. Green means the publishing job completed the instructions it was given. A job can do its assigned work perfectly even when its inputs are wrong. The investigation needs to connect those two runs rather than choosing one status as the truth of the whole release.
The engineer asks how each workflow began. One was triggered by the code change and associated with the developer’s revision. The other was triggered by a nightly schedule. A third run appears in the history because an operator had manually retried a failed test earlier in the evening. That manual run did not produce a verified release artifact either. It is important to identify triggers because they carry context: which branch or revision was selected, who requested an action, and what permissions the resulting jobs received. A scheduled event is a reason to check for work, not proof that new work is ready.
Next she follows the artifact rather than the release announcement. A package has an identity independent of the friendly version name printed on its label. An immutable digest can identify its exact contents, while build records can associate those contents with a source revision, toolchain, dependency set, and test results. In the aquarium case, the package retrieved by the publishing workflow has the digest and source revision from the earlier successful build. The correction is absent. No amount of confidence in the upload event can change which software bytes entered the repository that morning.
Why did the publishing process accept the old package? Its designers allowed an artifact lookup based on the latest successful item in a shared location. That is useful for finding an available file, but it does not necessarily mean the file came from the run the publisher intended to use. Some cross-pipeline retrieval mechanisms explicitly select the latest successful job for a named branch or reference rather than waiting for a newer job that is still running. Other environments simply implement a mutable alias in an artifact store. The safe design must account for the actual retrieval behavior, instead of assuming the word latest describes the newest code or the newest test attempt.
The incident team briefly considers whether the scheduled publish started before the developer pushed the fix. The timestamps rule that out in this fictional example. The main branch had the corrected source when its test run began. The missing link is later: the new run failed and never produced an approved artifact. The publishing workflow did not require a specific successful build run as its parent. It performed a general lookup and found what was available. That distinction is useful when diagnosing any distributed automation. A correct trigger and correct source checkout do not guarantee a downstream consumer received the intended artifact.
The team also finds that notifications added to the confusion. The publishing workflow posted a message saying the overnight release succeeded, but it included only the release label and the upload result. It omitted the source revision, the artifact digest, and the run that supplied the package. The support team reasonably interpreted the message as confirmation of the fix. A better message would say precisely which candidate was published and what gate made it eligible. If the producer failed, the notification should not silently transform old availability into new approval. Reports should expose the boundaries between building, verifying, publishing, and installing.
At this point the release coordinator proposes deleting the old artifact. That would remove one tempting fallback, but it would not fix the underlying design. Another artifact could be placed under the same label, or a cached copy could still be retrieved. Deletion also risks losing material needed for rollback and audit. The team needs an explicit handoff: the publisher should accept the approved artifact identity produced by a particular completed build, not search for a vaguely named substitute. If that identity does not exist or cannot be verified, publication should stop with an understandable reason rather than improvise.
The Bare Metal Cyber Cyber Challenge AutoOps+ practice can be used afterward to extend this aquarium scenario. Imagine an operator sees a successful upload, a failed test, and a valid signature on the uploaded file. Work out what each observation proves and what remains unknown. Then compare a scheduled publication with a publication explicitly authorized to consume one completed build. This sort of scenario is valuable because all the individual status messages can be accurate while the release decision is still wrong.
The investigators now look at the orchestration. A pipeline is often shown as a sequence of boxes, but dependency rules determine whether a downstream job must wait for a specific upstream result. A separate workflow may have no such dependency unless someone designed a verified handoff between them. A job can be scheduled, eligible to run, and equipped with a write token even when the intended producing job failed. The correct fix is not to put a long delay between jobs. Time cannot certify that the right package exists. The publishing workflow must require the appropriate completed result and validate the identity of the artifact it receives.
There is a permission problem as well. The publishing job has a credential that can create release entries in the repository. Its permission is needed for publication, but its scope and timing are broader than necessary. The team can narrow that credential to the repository and action required, issue it only when the protected publish stage is authorized, and prevent ordinary test jobs from receiving it. Those changes would not by themselves correct the old-artifact lookup. They reduce the damage that a mistaken trigger or compromised build could do while the handoff is being repaired. Credential validity and artifact suitability are different questions.
Approval creates another boundary. The aquarium’s manager believed an engineer had approved the fix because the source change was reviewed. Source review checks the proposed code. It does not automatically approve deployment of whichever package a separate job happens to retrieve. A deliberate release gate should connect a person’s or policy’s decision to a particular candidate and target environment. If production approval is required, the decision should occur after the candidate and its tests are identified, not before a generic job searches for a file. Automated promotion can be appropriate too, provided the organization has defined the evidence and authority it needs.
The team reconstructs the event sequence without relying on a wall of copied output. The reviewed correction entered the source repository. The build started on that revision. Compilation succeeded, but an integration dependency failed to start and blocked required testing. No candidate for that revision was approved. The scheduled publishing job then read the older successful artifact through a shared reference. Its privileged upload completed, and its notification lacked the build-to-artifact link. That simple account explains the apparent contradiction between red and green reports and identifies multiple controls that need repair.
A useful timeline includes what the system attempted as well as what it completed. The build attempt that failed still has diagnostic value. The absence of a new artifact is evidence too, but only if the workflow records that absence unambiguously. The publishing job’s successful upload proves that an artifact reached its destination, not that its code came from the desired revision. The team preserves the original run records, artifact identities, and approval history instead of rewriting them to make the night appear clean. An accurate incident history should allow another person to reproduce the reasoning weeks later.
Could the team rerun the integration test and then publish the fix immediately? Possibly, after verifying that the dependency problem is resolved, the required checks run against the corrected candidate, and the publication remains within its approved scope. Rerunning the publishing job alone would simply publish the wrong file again unless the artifact handoff changed. Rerunning the entire build might create a new attempt with different environmental conditions, so the record must identify which attempt produced the accepted package. The team refuses to treat a green rerun as a substitute for examining how the earlier error occurred.
The aquarium also wants a release audit that nondevelopers can understand. The engineer proposes a concise chain of evidence: the approved source revision produced an identified artifact; the required tests passed on that exact artifact or on the precisely bound candidate used to create it; the publishing action consumed that identity; the release authorization applied to that destination; and the destination confirmed receipt. Each link should be independently checkable. An immutable digest is a useful anchor, but a digest alone does not say who built the package or whether its content meets the company’s acceptance rules.
Now imagine the artifact was correct but published to the wrong repository. That would be a different incident with a similar green publishing status. The investigation would move from source and artifact identity to destination configuration, credentials, and the release channel selected by the workflow. Or imagine a valid package was produced but its integration tests were skipped because a branch condition was misconfigured. The bytes could be exactly as intended while the evidence of quality was still missing. Those alternatives reinforce the larger lesson: reconstruct the causal chain rather than forcing every problem into the category of bad code or bad package storage.
The repair has several parts, and they have different owners. Build engineers create an explicit artifact handoff and ensure failed required checks cannot produce an eligible candidate. Repository administrators restrict publishing credentials and protect the destination against unauthorized writes. Release coordinators align approvals and notifications to exact candidates rather than friendly labels. Test owners repair the unreliable temporary database so a useful correction is not held hostage by an unrelated startup problem. None of these changes is a substitute for the others. Each protects a boundary that the incident crossed.
When the revised workflow is rehearsed, the team deliberately causes an integration failure. The publishing side receives no eligible artifact and stops; it does not reach backward for yesterday’s package. When a correct candidate passes, the release record identifies its source revision and verified artifact. When an unapproved run tries to publish, its credential and release gate deny the action. These tests prove the controls under the expected failure conditions, not only when the happy path runs smoothly. The team can explain which evidence is missing and who is authorized to resolve it.
The aquarium finally publishes the corrected application. The membership team checks that duplicate renewal requests are handled correctly, while the engineers preserve the original incident record. Their lesson is broader than the mistaken repository label. A continuous integration incident may cross trigger logic, test dependencies, runner environments, artifact identity, credentials, orchestration, and notifications. Those pieces must be linked by observed evidence. A green job is an account of what that job accomplished. A trustworthy release requires proof that the right work crossed the right boundaries, with the right authority, all the way to its intended destination.