← All articles

Building AI-SGAP - Part 19 When the Builds Disagree: Lessons in AI-Assisted Engineering

Originally published on LinkedIn. Build status reflects the original publication date.

Today, part of our progress involved reconstructing what we had already built.

We had source packages, container images, test results, validation scripts, and historical records. Individual pieces had passed their checks. Bringing them together exposed discrepancies in the relationship between the current source, earlier build identities, and the evidence needed to validate a successor package.

In Part 18, I discussed why passing automated tests and clearing a security gate are separate achievements. Today’s work added another question:

Can we establish exactly which combination of source, dependencies, environment, and evidence produced a result?

That question matters when AI helps write the code. It would also matter if a team of human engineers were delivering the same product.

What actually diverged

We have been advancing several workstreams:

  1. model-assisted assessment,
  2. customer and assessor workflows,
  3. runtime integration,
  4. database validation, and
  5. staging preparation.

Each has its own development history and supporting artifacts. A successful result within one workstream does not automatically validate the combined product.

Today’s reconciliation exposed several concrete issues.

  • One assembled successor package did not contain the historical increment manifest expected by its verification process. The existing checker also retained assumptions about an earlier build identity that needed explicit reconciliation with the successor.
  • Later, after more of the historical context had been recovered and verified, the prerequisite check stopped because a required historical gate log was unavailable at the expected location. The full successor verification therefore never started.
  • There was also a scope distinction in the runtime work: successful build and smoke-check execution covered a bounded portion of the application. Other workflow integrations remained unfinished.

These were different problems requiring different responses.

  • Missing evidence required recovery or an explicit gap.
  • An outdated build assumption required reviewed reconciliation.
  • An unfinished integration required additional engineering.

Treating all three as “the build failed” would have obscured what to do next.

Why we faced this

The evidence points to a coordination and packaging problem across evolving workstreams.

Source code had advanced. Validation procedures had accumulated dependencies on earlier records. Some checks depended on context outside the immediate source package.

Historical evidence and current implementation were not always traveling together.

That created a gap between a locally useful change and a complete, independently verifiable handoff.

We had deliberately isolated work so that feature development could continue while staging issues were investigated. That isolation helped contain changes. It also made integration discipline essential: every handoff needed to identify its starting point, changes, dependencies, and remaining obligations.

A version label alone could not establish those relationships. Neither could a summary saying that tests had passed. The missing information was often the connection between otherwise useful artifacts.

Where AI helped - and where it needed supervision

Codex helped implement changes, investigate failures, prepare validation procedures, compare artifacts, and work through integration corrections.

It also participated in a workflow where context was distributed across conversations, directories, packages, and logs.

An AI assistant can produce a change that fits the material available in its current workspace. That does not establish that it has the complete project history or every dependency needed for integration.

A detailed explanation can sound comprehensive while describing only a bounded result. That makes verification of scope especially important.

My responsibility as the person directing the work is to ensure that the next task starts from an identified baseline and that completion claims remain tied to the evidence.

We should judge a generated script by what it actually executed. We should judge a package by what it contains. We should judge an integrated result against the requirements of that integration.

Could a human team working in silos have encountered this?

Plausibly, yes.

Imagine:

  • an application engineer completing a workflow change,
  • a platform engineer updating container packaging, and
  • a security engineer maintaining validation procedures.

Each could be working competently against a different snapshot.

  • A test could pass on one branch while the release package omitted a dependency.
  • A historical log could remain on one engineer’s machine.
  • An integration checker could retain assumptions that were valid before the latest change.

That is a plausible parallel, not evidence that a human team would have reproduced our exact incident.

A human team might also have caught these problems earlier through code review, a shared repository, centralized CI artifacts, or an engineer explicitly responsible for integration.

Those practices help because they create shared state and clear ownership.

But, AI changes how quickly we can generate and revise work. It does not remove the need for those coordination mechanisms. So, there's that tradeoff at times between high-velocity and accuracy. In the right hands, AI-assisted coding is a powerful tool.

Creating the Command and Build Ledger

Today we created the initial AI-SGAP Command and Build Ledger, with a structured companion register.

The first reconstruction contains 2,071 records drawn from 270 materialized artifacts. That is a count of records - not a claim that 2,071 distinct commands were executed successfully.

The ledger distinguishes proposed commands, confirmed execution, failures, superseded work, and unknown execution status. It preserves available command text, purpose, working directory, result, source, and artifact references.

Where an exact command, timestamp, or outcome cannot be established, the gap remains explicit.

This gives us a way to answer questions that conversation summaries alone cannot reliably settle:

  • What ran?
  • Against which build?
  • What happened?
  • Which correction followed?
  • Where is the evidence?

The initial ledger is still a reconstruction with gaps. Its value will increase as we capture those details during the work.

What we are changing

The prevention work is focused on making integration and evidence capture routine:

  • Identify the baseline before each task. Record the source version, workstream, intended change, and permitted actions.
  • Package the verification context. Include required dependencies and records, or identify exactly where they must be obtained.
  • Validate the assembled deliverable. Component results remain useful inputs; the combined package needs its own checks.
  • Retain durable evidence. Preserve failed attempts, corrections, logs, and receipts beyond temporary workspaces.
  • Reconcile daily. Update the ledger, connect results to the relevant build, and carry unresolved issues into the next handoff.

These changes should reduce recurrence and make discrepancies easier to diagnose. They still need to be followed consistently and tested through subsequent handoffs.

At this update, the successor remains unadopted, and its full verification has not completed. Today’s reconciliation did not authorize a staging deployment.

The broader lesson applies directly to AI-SGAP: useful assurance depends on knowing what a result establishes, what it leaves unresolved, and what evidence supports the next decision.

When your team says “this passed,” can the next engineer identify exactly what was tested and reproduce the basis for that statement?

#BuildingAISGAP #AIEngineering #SoftwareEngineering #DevSecOps #BuildInPublic

Building AI-SGAP is an open founder-engineering journal. This series shares high-level design principles, lessons, and build progress without disclosing proprietary implementation details. It does not certify compliance or guarantee that an AI system is secure or ready for deployment.