Behavior hides in implementation
Tax rules, tier thresholds, rounding, refunds, ledger effects, audit events, and state transitions may not be fully documented.
IBM Bob reconstructs legacy behavior, modernizes the monolith, diagnoses drift, and repairs the candidate. Aegis seals the reference behavior and independently verifies that the modern system preserves the observable behavior represented by the contract.
This is the Aegis ContractLock product. The PR workflow later is one concrete proof that the full modernization control loop works.
Bob investigates the legacy source and available policy context to reconstruct an executable behavioral contract.
Aegis executes the legacy reference and records normalized evidence across scenarios, state, ledger, audit, and invariants.
Bob transforms the monolith into a cleaner, modular candidate architecture.
Legacy and modern implementations receive the same scenarios and their observable behavior is compared.
Any mismatch can block acceptance and produce a behavioral counterexample.
Bob diagnoses from evidence and applies a focused repair without self-approving the result.
Aegis re-verifies independently. Bob may review read-only. A human retains merge authority.
LEGACY MONOLITH
│
▼
IBM BOB — CONTRACT ARCHAEOLOGY
reconstruct executable behavior contract
│
▼
AEGIS — BASELINE SEAL
returns + exceptions + state + ledger + audit + idempotency + invariants
│
▼
IBM BOB — MODERNIZATION
monolith → modular modern candidate
│
▼
AEGIS — TWIN-RUN VERIFICATION
legacy reference ⇄ same scenarios ⇄ modern candidate
│
├──────── behavior matches ────────► ACCEPTED
│
└──────── behavior drifts ─────────► BLOCKED
│
▼
BEHAVIORAL COUNTEREXAMPLE
│
▼
IBM BOB — REPAIR
│
▼
AEGIS — RE-VERIFY
│
▼
HUMAN MERGE DECISION
Legacy systems frequently encode business rules in implementation details that are easy to disturb during AI-assisted refactoring.
Tax rules, tier thresholds, rounding, refunds, ledger effects, audit events, and state transitions may not be fully documented.
A candidate can be cleaner and pass ordinary tests while silently changing a boundary condition or financial outcome.
Bob changes the software. Aegis checks the evidence. A human decides whether to merge.
A real pricing refactor looked safe until Aegis exercised the exact VIP boundary.
Pricing thresholds were refactored into named policy constants.
One semantic drift appeared at the exact VIP premium threshold.
$965.25 expected. $997.43 produced by the defective PR.
Bob diagnosed the inclusive-boundary regression and repaired one operator.
The repaired candidate matched the executed contract.
Every runnable mutation in the finite PR-specific challenge was detected.
Bob reviewed evidence read-only. Human authorization remained required.
Bob preserved the named-constant refactor and changed only the comparison operator.
The current public corpus is broader than the historical Bob clean-room run and remains separately attributed.
| Structural Metric | Legacy Monolith | Modern Candidate | Delta / Decoupling |
|---|---|---|---|
| Python modules | 1 | 11 | +10 modules with domain separation |
| Largest module LOC | 381 | 205 | -176 LOC (-46.19%) |
| Classes / types | 6 | 8 | Typed domain models and errors |
| Imports from legacy | — | 0 | 0 modern imports from legacy |
| Dependency cycles | 0 | 0 | 0 cycles |
The historical 47-scenario corpus proves the modernization lifecycle itself was genuinely executed in IBM Bob.
Bob investigated the legacy system and produced the clean-room behavioral contract and evidence. Historical result: 47 scenarios, 60 workflow steps, 183 declared invariants.
Bob mapped the legacy monolith into a modular target architecture while preserving the behavioral contract as the acceptance boundary.
Bob implemented the candidate. The historical clean-room candidate reached 47 / 47 ACCEPTED.
A deliberate >= → > boundary regression was injected. Aegis returned 46 / 47 BLOCKED with a +$32.18 behavioral drift.
Bob diagnosed from preserved evidence and applied the one-line repair, restoring 47 / 47 ACCEPTED.
Bob reviewed the preserved clean-room evidence while Aegis retained the independent acceptance role.
Aegis validates its own sensitivity through verifier tests, seeded negative controls, and separate post-freeze adversarial challenges.
The hardened verifier includes fail-closed contract parsing, relative-import analysis, non-vacuous mutation validation, and sealed-baseline immutability checks.
Seeded semantic regressions test whether the contract can actually detect meaningful behavioral drift.
Nine survivors remain disclosed. The frozen contract was not backfitted after observing them.
Aegis is designed to turn raw verification into inspectable evidence that a human reviewer can use before merge.
The evidence certificate binds recorded verification artifacts and semantic fingerprints so reviewers can detect evidence changes.
The standalone dashboard surfaces contract coverage, verification status, architecture evidence, and readiness without requiring a reviewer to inspect every raw file.
Bob may return as a read-only evidence reviewer. Aegis may mark the evidence eligible. The final merge decision remains explicitly human.
The repository preserves genuine Bob task captures and keeps integrity fingerprints separate from claims of correctness or authorship.
Task 1: 4.67 · Task 2: 2.15 · Task 3: 5.08 · Task 4: 2.25 · Task 5: 3.15
| Corpus | Evidence Descriptor | SHA-256 / Identifier | Status |
|---|---|---|---|
| Hardened Public | Baseline Semantic Evidence Fingerprint | 2fd2c2f96614e5bcf8fa807b5c1b777fc702f53707be047ddf01c5a852680da7 | Sealed |
| Hardened Public | Accepted Candidate Semantic Evidence Fingerprint | d919b4055c09e30ee9654d92e302aa64c46195716d53525d57023e1430216c99 | Accepted |
| Bob Clean-Room | Historical Baseline Semantic Fingerprint | 2d9d6ef6b3e1d972e0cf68c504083f239391e1becb939c6726fabdad6d906db5 | Preserved |
| Bob Clean-Room | Historical Accepted Candidate Fingerprint | f6c79144ab8592e71b459be6729ff774740922c15207397c75950773a4e321cf | Preserved |
| Bob Clean-Room | Historical Blocked Rehearsal Fingerprint | d569d131fdbe2f23dd9943431f72c435138fa06f4cab4be5bf3959f43a5fd654 | Blocked |
IBM Bob modernizes legacy systems. Aegis reconstructs and seals the reference behavior, independently detects semantic drift, drives evidence-based repair, and gates the final human merge decision.