Skip to content

apurvgaurav/deterministic-code-change-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deterministic Code Change Authorization System

A proof-based deployment control system that authorizes software changes using execution and replay verification rather than review confidence, heuristics, or probabilistic scoring.


Overview

Most deployment decisions today rely on indirect signals:

  • static analysis
  • unit and integration tests
  • human code review
  • policy checks and heuristics

These are useful, but they do not directly establish what a code change actually does under execution.

This system introduces a different control model.

Instead of inferring safety from code appearance or reviewer judgment, it:

  1. executes the candidate change in a controlled environment
  2. replays known scenarios against expected behavior
  3. compares observed results against deterministic validation criteria
  4. returns a proof-based authorization outcome

The output is always one of three states:

  • ALLOW
  • BLOCK
  • UNVERIFIABLE

No scoring.
No “probably safe.”
No AI-generated judgment.

Only proof.


Why This Exists

As software delivery accelerates, the bottleneck is no longer only writing code.
It is determining whether a change can be trusted at release time.

This system introduces a deterministic execution-verification boundary before deployment.

It shifts release approval from:

review confidence
to
replay-verified evidence


Core Idea

The system treats deployment authorization as a proof problem.

A change is approved only when execution and replay establish stable behavioral evidence.

If deviation is detected → BLOCK
If proof cannot be established → UNVERIFIABLE


Decision Model

ALLOW

Execution traces match expected behavior under replay.

BLOCK

Replay reveals behavioral deviation or regression.

UNVERIFIABLE

Stable proof cannot be established.


System Flow

  1. Change Intake
  2. Controlled Execution
  3. Deterministic Replay
  4. Authorization Gate
  5. Verified Release

This introduces a mandatory execution-verification boundary between integration and production.


Example Authorization Outcomes

Scenario Observed Result Decision
Parameterized SQL patch Replay matches expected behavior ALLOW
Auth logic mutation Behavioral divergence detected BLOCK
Non-deterministic dependency Stable replay could not be established UNVERIFIABLE

Replay Trace Snapshot

Execution ID: EXEC-4B5477961BD9
Environment Hash: 1ded43f3...

Step 1: Execute candidate change
Step 2: Capture state transitions
Step 3: Replay expected trace
Step 4: Compare outputs

Result:
MATCH → ALLOW

## Quick Demo
python -m app.main
pytest tests/
Runs predefined scenarios demonstrating deterministic authorization outcomes.

##Repository Structure

The repository is organized around the execution, replay, and authorization pipeline:
app/            core authorization logic and orchestration
data/           templates and replay inputs
docs/           documentation and diagrams
scripts/        evaluation and experiments
tests/          validation scenarios
ui/             interface layer
public/         static assets
artifacts/      evaluation outputs and logs
tools/          helper scripts

## Key Components

app/orchestrator.py → end-to-end flow coordination
app/replay_engine.py → deterministic replay logic
app/decision_gate.py → final authorization logic
app/normalizer.py → input normalization
ledger modules → traceability and audit

## Demo Videos

- Quick Overview (30 sec)
https://www.youtube.com/watch?v=Y68vBlidJ5E
- System Overview (3.5 min)
https://www.youtube.com/watch?v=7cPx0UJNquE
- Architecture Deep Dive (7.5 min)
https://www.youtube.com/watch?v=GL-GLeYNCOU

## Status

- working prototype
- controlled evaluation completed
- public demo series available
- non-provisional patent filed

## What This Project Signals

- deterministic control design under uncertainty
- infrastructure-level ownership of release risk
- product-level thinking for deployment systems

##Summary

This system reframes deployment approval as an execution-verification problem.
It replaces interpretation with proof.

About

Deterministic replay-based system that enforces ALLOW/BLOCK/UNVERIFIABLE decisions for code changes.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages