Scrivio Interview library
ScenarioPrincipal6 min read · updated 12 November 2026

A regulated business requires that every production change is traceable to a reviewed commit and an approved release. Engineers want trunk-based development with continuous deployment. How do you reconcile the two?

The two are compatible, because traceability needs evidence, not slow branches. If every merge to main is reviewed and linked to a ticket, enforced by branch protection with required reviews and signed commits, and the pipeline records which commit and artifact were deployed, by whom and when, the audit trail is complete. Approvals become automated policy checks plus a recorded human approval for high-risk changes, and feature flags let code deploy continuously while the release of a feature to users follows the formal approval process.

Why this question is asked

In banks, insurers, healthcare and other regulated industries, auditors ask a simple question: for any change running in production, show who wrote it, who reviewed it, who approved it, and that the tested artifact is the one that was deployed. Many organisations answer it with change advisory boards and monthly releases, which engineers see as the enemy of fast delivery. Interviewers ask this to see whether we can satisfy the control without the ceremony. In this answer, we will look at what the regulation really requires, then build the trail step by step: reviewed and linked commits, protection and signing, deployment records, automated and human approvals, and feature flags to separate deployment from release.

1What Traceability Really Requires

Regulations and audit frameworks rarely say how to branch. They require controls: changes are authorised, reviewed by someone other than the author, which is called separation of duties, tested, and traceable from production back to the source. Traditionally, the evidence was a change ticket with signatures and a release manager who copied files by hand. The evidence was slow to produce, and often only loosely connected to what actually ran.

A well-built pipeline can produce better evidence than that, automatically, for every change. The trick is to treat the evidence as an output of the pipeline, just like the artifact, so it is complete by construction rather than assembled before an audit.

2Every Merge Reviewed and Linked to a Ticket

In trunk-based development every change still enters main through a pull request. We make two things mandatory: at least one approving review by someone other than the author, and a link to a ticket that explains why the change exists. A required CI check can reject pull requests whose title or branch does not reference a valid ticket, for example PAY-1234, and can call the ticket system to confirm it exists and is in an approved state.

So the review and the authorisation are already there, per change, recorded by the repository host with names and timestamps. A small, frequent change is actually easier to review properly than a monthly release with 300 changes, which strengthens the control rather than weakening it.

3Branch Protection and Signed Commits

Branch protection on main enforces the rules technically: no direct pushes, required reviews, required status checks, and no force pushes, so history cannot be rewritten. CODEOWNERS can require specific reviewers for sensitive paths, such as payment logic or security configuration. Administrators should not be able to bypass these rules silently; if a bypass is possible for emergencies, it must be logged and reviewed.

Signed commits add proof of authorship. Each commit is signed with a key, GPG, SSH or a keyless option such as Sigstore's gitsign, tied to the developer's identity, and the host can require signatures on main. That makes it hard for someone to push a commit pretending to be someone else.

4The Pipeline Records What Was Deployed

The pipeline closes the loop from commit to production. It builds the artifact once from a specific commit, records the image digest, an immutable hash of the image's content, and attaches provenance: a signed statement of which source commit, which pipeline run and which builder produced it. When it deploys, it writes a deployment record: which digest, to which environment, at what time, triggered by whom, and which approvals applied.

JSON
{
"deployment": "payments-api",
"environment": "production",
"image": "registry.acme.com/payments-api@sha256:4f1c...e9",
"commit": "8d3a1f2",
"pull_request": 4812,
"ticket": "PAY-1234",
"reviewed_by": ["a.khan"],
"approved_by": "policy:low-risk",
"deployed_by": "pipeline run 99172, triggered by merge from j.smith",
"deployed_at": "2026-11-05T10:42:17Z"
}
Step throughThe audit trail produced by one change
DeveloperRepositoryPipelineApproverProduction
signed commit, PR linked to PAY-1234
required review and checks pass, merge
build once, record digest and provenance
policy checks: tests, scans, risk level
high risk only: request approval
approved, recorded with name and time
deploy digest, write deployment record

7 messages in order. Play them, or step through them one at a time.

Every step leaves evidence; the human approval appears only when the risk needs it.

Notice that every field links to something verifiable: the digest to the registry, the commit and pull request to the repository, the ticket to the change system. Records like this are stored in an append-only place, such as the deployment history of the CI system or a log store with retention, so an auditor can pick any running version and walk back to its review in minutes.

5Approvals as Policy Plus Human Sign-Off

Not every change needs a meeting. Many organisations classify changes, in the spirit of ITIL's standard and normal changes. A low-risk change, such as a code change that passed all tests, scans and review, with no database migration and no change to payment rules, is pre-approved by policy: the pipeline checks the conditions and records that the policy approved it. A high-risk change, for example a schema migration or anything touching money movement, pauses for a recorded approval from a named person, through an environment protection rule or an approval step in the pipeline.

Writing the policy down as code, for example as conditions checked by the pipeline, means it is applied the same way every time and can be shown to auditors. The compliance team approves the policy itself, once, instead of approving each change.

6Feature Flags Separate Deployment From Release

Sometimes the regulation is about what customers see, for example a new interest calculation that must be approved by the business before going live. Feature flags solve this. The code is reviewed, merged and deployed continuously, switched off, which is a low-risk technical change. Turning the flag on is the release, and it goes through the formal approval: the flag change is recorded with who changed it, when and under which approval. Engineers keep the benefit of small, continuous deployments, and the business keeps control over when a feature reaches customers.

7Follow-up questions

Does separation of duties mean developers cannot deploy?

It means one person cannot both write and approve a change alone. In a pipeline, a developer can trigger a deployment of a change that someone else reviewed and the policy approved; the pipeline itself performs the deployment with its own credentials, so no individual needs direct production access.

What do we do about emergency fixes?

Define an expedited path: the same pipeline and evidence, but with a named on-call approver and a review that may happen right after the deployment, recorded and checked within a set time. Bypassing the pipeline should never be the emergency path, because it breaks the trail exactly when changes are riskiest.

How do we convince the auditors?

Involve them early. Show them one change traced end to end, from ticket to running digest, and the policy as code. Auditors care about evidence that controls work consistently, and an automated trail for every change is usually stronger than a monthly sign-off sheet.

8Conclusion

In this answer, we reconciled traceability with trunk-based continuous deployment. Every merge to main is reviewed and linked to a ticket, branch protection, required reviews and signed commits give an audit trail, and the pipeline records which commit and artifact were deployed, by whom and when. Approvals became automated policy checks with recorded human approval for high-risk changes, and feature flags let code ship continuously while releasing features follows the approval process.

What to say in the interviewAbout 80 seconds aloud

Open with

I would start by separating the control from the ceremony. The regulation needs every production change to be authorised, reviewed by someone else, and traceable; it does not need long branches or monthly releases.

Then, if they want more

Trunk-based development can give stronger evidence than that, because every change is small and goes through a pull request. So on main I enforce branch protection: no direct pushes or force pushes, a required review by someone other than the author, required CI checks, CODEOWNERS for sensitive code, and signed commits.

A check makes sure every pull request is linked to a valid ticket. The pipeline builds the artifact once, records its digest and provenance, and on every deployment writes an append-only record of which commit and digest went to which environment, when and triggered by whom.

For approvals, low-risk changes that pass tests, scans and review are approved by a written policy the compliance team signed off once, and high-risk changes like schema migrations or money movement wait for a named approver in the pipeline.

Where the business must approve what customers see, I use feature flags: code deploys continuously switched off, and turning it on is the recorded, approved release.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "A regulated business requires that every production change is traceable to a reviewed...": https://scrivio-interview-library.netlify.app/java/version-control-and-ci/5f5f4ae749/