Migrating Oracle Forms with behavioural proofs
We migrated a legacy Oracle Forms application to Rust with Bosun and Parity, multiple times, and compared it with regular AI-assisted modernization. Bosun scores 89%.
Oracle Forms dates back to 1979 and is still used today to manage data entry and control on Oracle databases. Dated, yet it’s still wildly used in Enterprise. Years of stored procedures handling critical data is risky and complicated to modernize.
We set out to see if we can effectively modernize the SUMMIT example, and how it compares to using just a coding agent. We set up a benchmark that tests user journeys and data validity on both legacy and the target. The test suite remains hidden during the implementation. Without human intervention, Bosun passes 89%, opposed to the coding agent alone at 53%.
You can check out the code on github and dataset on huggingface.
Capturing undefined behavior
A big challenge in modernization is capturing behavior that is not well defined. And from our experience, it’s exactly this behavior that makes a modernization risky. Locks, error handling, transactions, and so on.
For instance, two people and one order. When the first one changes the order, Oracle Forms locks its row in the database. The second one is stopped with “Could not reserve record (2 tries). Keep trying?”.
Bosun can capture this behavior without explicitly defining it. The only thing explicit, is when behavior intentionally differs between legacy and target. This is the core feedback-loop for our agents, so our agents (and humans) understand exactly what is captured, must stay the same, and what must change.
In the benchmark we run a Bosun workflow, where it explores and modernizes the form slice-by-slice, test driven with a Parity proof.
The experiment
The subject is Oracle’s Summit ORDERS sample form, running on Oracle Forms 14.1.2 with Oracle Database 23ai. The target is a Rust web application on PostgreSQL.
We migrated it twelve times: six times with Bosun, and six times with Codex. All twelve used the same model, GPT-6.1 Sol, and the same task. The task describes the interface only, no business rules nor specifications.
Every migration was graded on a hidden suite of 87 user journeys, run against the Oracle Forms application and against the migrated one. It covers the form’s 38 in-scope triggers and alerts.
Results
We graded in two buckets, visually on screen, and stricter with comparing database interaction and state added.
The strictest grading compares the screen, the saved data and the conversation with the database on 89 journeys. There the Bosun and Parity migrations pass 89% and the coding agent 53%.
Graded on screen and saved data over the 87 journeys, it is 91% against 77%. Every Bosun and Parity migration scored above every agent.
Grading the finished applications also turned up the following defects:
A migration cost about $3.20 (€2.80) with Bosun and Parity and about $2.90 (€2.50) with the agent alone, counting model usage at provider list prices. It used about 12 million and 11 million tokens, over 90% of them read from cache, and took about 115 and 35 minutes.
Example: Changing the customer on an order
Let’s explore a proof generated by an agent for changing the customer on an existing order.
A user opens order 101 and changes its customer from 205 to 201. While the user types the new number, the customer name on screen stays “Kam’s Sporting Goods”, because Oracle Forms checks the field only when the cursor leaves it. Then the name becomes “Unisports”, and the sales rep changes with the customer, from 14 (Dumas) to 12 (Giljum). Saving reports “FRM-40400: Transaction complete: 1 records applied and saved.”
The proof is thin, and covers the steps the user would take. When ran, it executes on the frontend of both legacy and target.
proof orders-end-to-end.explicit-query-edit { when entered = enter_query() when criteria = type(item = "order-id", value = 101) when queried = execute_query() when changed = type(item = "customer-id", value = 201) when left = click(item = "date-shipped") when saved = save()
then { assert steps.entered.mode == "query" assert steps.queried.order["order-id"] == 101 assert steps.changed.order["customer-name"] == "Kam's Sporting Goods" assert steps.left.order["customer-name"] == "Unisports" assert result.order["rep-id"] == 12 assert result.messages == ["FRM-40400: Transaction complete: 1 records applied and saved."] }}Each when line is one user action, run on Oracle Forms and on the migrated application. After every action Parity compares the two screens. The then block holds what the agent expected and must hold on both sides.
The six assertions in the then block are what a hand-written test of this journey would state. After each action Parity compared the whole screen: the mode, the cursor position, the order header, all seven order lines, the total, the messages, and which items are disabled or required. That is 202 values per side. It compared the stored order row before and after the save, and checked that no audit rows were added. Both databases stored this change:
{ "CUSTOMER_ID": 205, "CUSTOMER_ID": 201, "DATE_ORDERED": "1992-08-31", "DATE_SHIPPED": "1992-09-15", "ID": 101, "ORDER_FILLED": "Y", "PAYMENT_TYPE": "CREDIT", "SALES_REP_ID": 14, "SALES_REP_ID": 12, "TOTAL": 8056.6}Parity also recorded what both programs did beyond the screen: files, database state and interaction, processes and network. 320 records on the Oracle Forms side and 311 on the target.
Beyond validating a screen
Back to the two people and one order. In five out of six cases, Codex omitted the lock. On screen and in the saved rows the two look the same. The difference only shows when we look at how the application communicates over the wire.
None of the five Bosun and Parity applications has this defect. Those migrations observed the running original and carried its constraints over.
Other behavior identified by Parity:
- No duplicate products in the same order.
- Multi-tenant silently overwriting someone else’s work.
The remaining 11%
About ten of the 89 journeys per application still differ from the original, and we know which ones.
They are of this kind:
- Pressing Cancel after a change does not ask whether to save.
- Products can be typed into a new order before it has a customer. Saving is still refused.
- Duplicate Order offers to save where the original refuses.
Wrong data was saved in 1 of the 522 journeys graded on screen and saved data.
We analysed the failures of an earlier round. Every one was on a path the agent’s proofs had not run on the original. What a proof ran, matched.
This trial was done fully hands-off. In a production scenario, human review and expertise are still the gate. I feel it’s also worth noting that given we know there is a gap and what the gap is, we are in a good spot.
Proof by observation
A Bosun modernization comes with evidence that it behaves like the original, journey by journey.
The example repository holds one migrated application and its proofs. What still differs, and the limits of this experiment, are in the repository and the dataset.
Bring us a legacy system, one form or program of yours. We run both approaches on it, and you get the proofs and the comparison.