Project Info
Inspiration
Critical workflows often survive because nobody is confident enough to replace them. Their real rules are scattered across UI behavior, API responses, database side effects, and operator memory. Generating a cleaner interface is easy; proving that refunds, approvals, inventory, and failure atomicity still behave correctly is the hard part. TraceForge is built around that missing proof. Instead of asking an AI to guess a specification from a few screenshots, it treats migration as an experiment: observe behavior, expose uncertainty, choose the next counterexample, rebuild inside a narrow evidence boundary, and let an independent verifier decide what matches.
What it does
TraceForge runs one bounded legacy workflow through five server-owned stages: Observe records legacy decisions and SQLite before/after state. Infer asks a read-only GPT-5.6 Sol Trace Archaeologist for narrow, evidence-linked hypotheses, invariants, and explicit unknowns. Challenge asks Counterexample Hunter turns for discriminating inputs. The host—not the model—executes those inputs and exact boundary probes, then a Contract Critic resolves the behavior contract. Build gives Codex the contract, four failed proofs, and only disclosed scenarios. Codex can edit one workflow file in a detached worktree; it cannot change the verifier, commit, push, or deploy. Verify creates one verification-only input after the writing turn, resets both systems, and compares five deterministic fields across seven scenarios. The demo begins with a $45 standard damaged return and a $120 VIP damaged return. Crossed and boundary inputs reveal an undocumented priority rule: damaged returns at or above $500 enter manual review before tier-specific behavior. A zero-stock probe exposes another hidden requirement: a replacement must fail atomically with no return record or inventory side effects. Codex repairs rule priority, inventory disposition, and stockout atomicity. The host finishes at 7/7 scenarios, 35/35 assertions, and zero mismatches. The contract is intentionally narrow. It covers the observed DAMAGED branch. Non-damaged inputs are rejected with a typed OUTSIDE_EVIDENCE_BOUNDARY result before persistence or side effects, so the generated candidate cannot silently invent unsupported behavior.
How we built it
gpt-5.6-sol performs four read-only, schema-constrained archaeology turns: Trace Archaeologist, two Counterexample Hunter turns, and Contract Critic. The host validates every cited evidence ID and executes every proposed scenario itself. OpenAI Codex SDK performs the single code-writing role in an isolated detached Git worktree. The repair input is immutable and contains the exact contract, four failed proofs, and disclosed scenario pack. A one-file allowlist prevents the writer from editing the verifier, tests, repository history, or deployment. TypeScript, Node.js, Express, node:sqlite, React, Vite, pnpm, native Server-Sent Events, Git worktrees, and JSON Schema form the product runtime. Deterministic assertions compare decision, return status, refund amount, sellable inventory, quarantine inventory, and failure atomicity. SHA-256 digests bind model inputs and outputs, repair inputs, candidate source and diff, commands, artifacts, evidence, scenario sets, and proof bodies. Why GPT-5.6 and Codex are essential GPT-5.6 is not a chat layer. In the authenticated source migration it completed four evidence-producing turns totaling 121,673 tokens. Each turn preserves its bounded application prompt, structured output, thread ID, timing, usage, digests, and cited evidence IDs. Its most important job is not summarization; it is choosing the next observation that separates plausible hidden rules. Codex receives the resolved contract and the real failed proofs. It changed one permitted TypeScript workflow module. The system then ended the writing turn and handed control to a host-owned verifier. The writer never sees the verification-only scenario while editing and cannot issue its own passing proof.
Challenges we ran into
The hardest problem was separation of powers. A model that proposes a rule or writes code cannot also execute the legacy workflow or certify its own result. The host therefore owns scenario execution, evidence-ID validation, state resets, policy enforcement, tests, and proof issuance. We also learned that provenance has two different meanings. The original successful source proof must remain byte-for-byte reproducible, while the current application needs to prove which scenario set and recorded verifier artifact it is replaying today. TraceForge now preserves the historical object and wraps it in a separately verifiable v2 evidence envelope that binds the current scenario set and generated verifier artifact. The Local Runner exposed useful failures too: revoked authentication, usage limits, unsafe candidate patterns, and an older verifier fixture that did not reject out-of-contract inputs. We kept the policy fail-closed and added a host-owned SELLABLE boundary probe. A local proof can be issued only when the candidate rejects that input before any result or side effect. Accomplishments we are proud of Four real GPT-5.6 turns produce inspectable evidence and explicit uncertainty rather than a predetermined contract behind a chat UI. The unknown lifecycle is enforced: Build cannot begin while an in-scope blocking unknown remains. Codex receives the real contract and failed proofs but cannot edit or invoke the verifier. The source candidate passed 56/56 candidate-safe tests; four replay-integrity guards stay separate and visible. The final differential matrix passed 7/7 scenarios and 35/35 assertions with zero mismatches. Historical proof integrity and current replay binding can be checked independently. The public replay is honest: recorded GPT/Codex provenance plus a fresh host proof, not a disguised live model call. Judges can optionally run a fresh build with their own Codex through a pinned, loopback-only Local Runner. No credentials, generated source, session handles, or local files leave their machine.
What we learned
The trustworthy output of AI-assisted modernization is not code alone. It is code plus evidence provenance, preserved failures, an explicit evidence boundary, a verifier outside the writer's control, and a precise statement of what was covered. The model's most valuable behavior was choosing the next experiment; the system's most valuable behavior was refusing to let the writer grade itself.
What's next
Next we will add browser-extension capture for real web applications, redacted evidence envelopes, separate legacy and candidate services, signed append-only proof bundles, more database adapters, and maintainer-approved pull-request publication. Deterministic assertions and human-controlled promotion will remain the authority for proof and deployment. Scope and limitations This submission demonstrates one controlled Web returns workflow in a TypeScript process with REST and SQLite. It does not claim universal behavioral equivalence or arbitrary-application reconstruction. The proof claims conformance only for the seven executed scenarios and asserted fields. The public deployment does not expose an anonymous write-capable model trigger; the optional Local Runner is the explicit path for a fresh Codex build. Try it Live product: https://traceforge.axiqo.xyz Source code: https://github.com/a252937166/traceforge Source-run evidence: https://github.com/a252937166/traceforge/tree/main/docs/evidence/live-champion-run
TraceForge
Modernize undocumented workflows without guessing.
TraceForge is an evidence-bounded behavior migration system. It turns observed workflow behavior into an evidence-linked contract, challenges that contract with counterexamples, lets Codex rebuild the workflow in an isolated worktree, and gives the final decision to a deterministic host verifier.
Hosted showcase: traceforge.axiqo.xyz
2:44 judge demo: GPT-5.6 discovers the rules, Codex rebuilds, the host verifies
The current executable laboratory is deliberately narrow: one Web returns workflow, REST, and SQLite. It is not a claim that arbitrary software can already be migrated. It demonstrates the hard part of that product honestly: preserving uncertainty, finding a hidden priority rule, rejecting an incomplete implementation, and issuing a proof limited to the scenarios actually executed.
Migration Loom is the name of TraceForge's judge-facing product experience: the evidence-custody path from recorded behavior to a bounded candidate and fresh host proof. TraceForge is built by ouyangduning as a solo project; the GitHub organization/account and video channel linked below are publication surfaces for the same entry.
How Codex & GPT-5.6 were used
| System | Real role in the project | Verifiable output |
|---|---|---|
| GPT-5.6 Sol | Four read-only, schema-constrained behavior-archaeology turns: propose competing hypotheses, choose discriminating counterexamples, and critique the final evidence-linked contract. The host—not the model—executes every proposed input. | 121,673 tokens of bounded inputs and structured outputs, with thread IDs, cited evidence IDs, and content digests in the champion run evidence. |
| OpenAI Codex SDK | One isolated code-writing turn receives the resolved contract, four preserved failed proofs, and disclosed scenarios. It may repair only apps/api/src/candidates/generated-return-workflow.ts; it cannot edit the verifier, commit, push, deploy, or decide that it passed. | Codex thread 019f5244-7bef-71f2-8f25-8ed1446a539e, its exact immutable inputs, accepted one-file diff, and host command log are checked in with the evidence. |
| TraceForge host verifier | Materializes a concrete verification-only input after the Codex turn, resets both systems, and compares deterministic decisions plus SQLite side effects. | 7/7 scenarios, 35/35 assertions, zero mismatches, and a downloadable digest-bound proof. |
GPT-5.6 is therefore the behavior investigator, Codex is the constrained implementer, and neither is allowed to certify its own result.
The five-stage run
- Observe — capture two SQLite-backed legacy traces: a $45 standard damaged return and a $120 VIP damaged return.
- Infer — GPT-5.6 Sol proposes competing, schema-constrained hypotheses and cites trace evidence IDs.
- Challenge — GPT-5.6 Sol proposes discriminating inputs; the host executes them, searches the exact $500 review boundary, and asks a contract critic to narrow the rules.
- Build — the seeded candidate is rejected. Codex receives the evidence-bounded contract, all four failed proofs, and only the disclosed scenarios. It may edit the complete replacement module in a detached worktree, with a one-file allowlist and no network access.
- Verify — after the Codex writing turn ends, the host generates one concrete verification-only input, resets state, and compares legacy and candidate behavior across six visible scenarios plus that verification-only scenario. The agent that writes code never sees that final input and never decides whether it passed.
The workbench is driven by server events from those stages. It does not advance through client-side timers or preload a successful result.
Source-run and Local Runner isolation are different
The checked-in source run gave Codex a detached repository worktree and restricted legacy-oracle and verifier reads through the repair prompt. The host technically enforced the accepted write boundary—only apps/api/src/candidates/generated-return-workflow.ts could change—and rejected verifier-relevant tampering. That source run should not be described as filesystem-level read isolation.
The optional Local Runner has the stronger read boundary: it prepares a minimized writer workspace that omits the legacy implementation, verifier, hidden input, and private host files, then verifies the resulting candidate in a separate host-owned workspace. In both paths, Codex never decides whether its own output passed.
Reproducible evidence
The checked-in champion run evidence records:
- source live migration
migration_efaa0383-628a-4fba-94df-96bfe344bcbe; - four real
gpt-5.6-solarchaeology invocations totaling121,673tokens, with raw bounded inputs, structured outputs, thread IDs, and content digests; - an explicit unknown lifecycle:
4initial blocking unknowns,4evidence-linked resolutions, and0remaining unknowns before the host permitsREADY_FOR_BUILD; - Codex thread
019f5244-7bef-71f2-8f25-8ed1446a539eediting onlyapps/api/src/candidates/generated-return-workflow.tsfrom base commiteb0e6169974b96bd3bff3b536b38ef5f665127c2; - the exact contract, four failed proofs, and disclosed scenarios supplied to Codex under repair-input digest
sha256:afe5ac02691e8929f1600f00bf57247b1915da88b759892087deb3b6e81755b8; - a post-turn host verification covering
2 observed + 2 counterexample + 2 boundary + 1 verification-onlyscenarios; 56/56candidate-safe tests, with four replay-only guards separated from the candidate worktree gate;7/7passing scenarios,35/35deterministic assertions, and zero mismatches;- proof digest
sha256:4be44d476f222ca492d025a13f296997148142471e2387d532c61479bc3703bc.
Six successful rows compare decision, return status, refund amount, sellable quantity, and quarantine quantity. The exhausted-stock counterexample instead compares five failure and atomicity facts: failure status, failure code plus message, no return record, unchanged inventory, and zero side effects.
The checked-in evidence directory is the successful live-ai source run. The public UI leads with Replay a verified run (recorded-replay): it streams the disclosed model events with their original provenance, then executes the differential suite again and issues fresh artifacts. No GPT or Codex call is implied to be running during replay. A new live run remains a secured, credentialled capability rather than an anonymous public trigger.
Verify the untouched historical proof and its derived v2 scenario-set envelope locally:
pnpm proof:verify-integrity docs/evidence/live-champion-run/proof.json
pnpm proof:verify-envelope docs/evidence/live-champion-run/source-run-envelope-v2.json
Both commands return valid: true. The first checks only the original object's canonical digest; the second binds its exact bytes and the checked-in recorded verifier artifact's exact bytes to the seven ordered per-scenario proof digests, then parses the artifact's unique final suite and recomputes coverage, scenario-set digest, and the split 56/56 + 4 replay guards host gate. Fresh proofs issued by the hardened runtime use pnpm proof:verify-current <proof.json>.
Historical integrity result:
{
"valid": true,
"claimedDigest": "sha256:4be44d476f222ca492d025a13f296997148142471e2387d532c61479bc3703bc",
"computedDigest": "sha256:4be44d476f222ca492d025a13f296997148142471e2387d532c61479bc3703bc"
}
Run the build with your own Codex
Reviewers can run the bounded Build + Verify stages with their own local Codex sign-in. The public site copies one pinned macOS/Linux command. Launch clones and installs the pinned release, prepares the fixture and private configuration, starts the loopback server, and checks Codex access. No Codex writing turn or verifier command runs until the reviewer approves the disclosed scope.
macOS or Linux:
node -e 'const [major, minor] = process.versions.node.split(".").map(Number); if (major < 22 || (major === 22 && minor < 13)) { console.error(`TraceForge Local Runner requires Node.js >=22.13.0; found ${process.versions.node}. Install Node.js 22.23.1, then rerun. No clone or installation was started.`); process.exit(64); }' && EXPECTED_SHA="d9b0d853acc7cab36eba859a778763c231e37325" && RUN_DIR="$(mktemp -d)" && git clone --filter=blob:none --branch local-runner-v0.1.10 https://github.com/a252937166/traceforge.git "$RUN_DIR/traceforge" && cd "$RUN_DIR/traceforge" && ACTUAL_SHA="$(git rev-parse HEAD)" && { test "$ACTUAL_SHA" = "$EXPECTED_SHA" || { echo "Unexpected TraceForge release commit" >&2; exit 64; }; } && export TRACEFORGE_LOCAL_RELEASE_SHA="$ACTUAL_SHA" && NODE_ARCH="$(node -p 'process.arch')" && npm_config_arch="$NODE_ARCH" corepack pnpm install --frozen-lockfile && npm_config_arch="$NODE_ARCH" node --import tsx apps/local-runner/src/cli.ts
The leading gate rejects Node.js 22.12 and older with exit code 64 before cloning or installing anything. The command then verifies that the pinned local-runner-v0.1.10 tag resolves to commit d9b0d853acc7cab36eba859a778763c231e37325 before installation, exports that checked-out SHA, and binds it into the local proof. The resulting provenance is explicit: GPT-5.6 archaeology is recorded source evidence, while the gpt-5.6-sol Codex build, post-turn verification-only input, deterministic host verification, diff, and proof are fresh on the reviewer's machine. Preflight forces a credential refresh and fails closed when Codex reports a reached usage limit. The Runner uses a dedicated ChatGPT sign-in, never reads global ~/.codex/auth.json, permits one candidate file to change, and disables agent command network and Git publication operations.
The pinned v0.1.10 Local Runner executes 15 focused candidate tests plus one host-owned SELLABLE refusal probe (16/16 host gates), followed by seven differential scenarios with 35/35 assertions. The source champion gate separately contains 56 candidate-safe tests plus four replay-integrity guards. The linked v0.1.9 and v0.1.6 evidence directories remain explicitly historical rather than proof of the current profile.
The optional hands-on path has been exercised from a fresh local-runner-v0.1.10 clone through the actual loopback UI with a real gpt-5.6-sol Codex turn. It passed 15/15 focused tests plus the host-owned refusal probe (16/16 host gates), 7/7 scenarios, and 35/35 assertions—including 5/5 exhausted-stock failure assertions—with zero mismatches. Proof sha256:b67ba62f1e5cae421d96e8b28596a456f5234f8a303a070e67dcf5244832c272 binds thread 019f5eb8-3394-7bc0-ae68-0c134f314c7f; diff sha256:5b996c8e70acf203fd41e0c8062ea8714397b22059e080738a6d3da293e37567 binds the one allowed change. UI deletion removed the session, writer, verifier, worktree registration, lock, and loopback server. See the sanitized v0.1.10 run evidence; the v0.1.9 and v0.1.6 evidence is retained as historical context.
Requires Node.js >=22.13.0, Corepack/pnpm 10.33.2, Git, Codex CLI exactly 0.144.1, and access to gpt-5.6-sol. Node 22.23.1 is pinned in .nvmrc and CI and is the recommended reviewer version; Node 22.13 is the minimum because it is the first Node 22 release that exposes node:sqlite without a command-line flag. A public browser cannot silently start local Codex, so the terminal launch is required on first use. Windows is not supported by this verified release. See docs/local-runner.md for exact read/write/network/Git boundaries, artifacts, cleanup, and troubleshooting. The hosted replay remains the zero-install fallback.
Run it
Requires Node.js >=22.13.0 and pnpm 10.33.2; Node 22.23.1 is pinned for development and CI. The minimum is required because the API uses the unflagged node:sqlite module.
corepack enable
pnpm install --frozen-lockfile
pnpm dev
Open http://localhost:5174. The API listens on http://localhost:8787.
Run the CI-equivalent typecheck, tests, and production builds:
pnpm check
Run the complete migration acceptance gate:
pnpm acceptance:all
See docs/acceptance-tests.md for the exact claim behind each gate.
Three explicit execution modes
| Mode | What runs | What it claims |
|---|---|---|
live-ai | Fresh GPT-5.6 Sol archaeology, host-executed counterexamples, a Codex SDK repair, and host verification | Live model work only when both adapters are explicitly enabled; otherwise the job fails and no other mode is substituted |
recorded-replay | Recorded model events with original provenance, followed by a fresh host differential suite and artifact export | The model work happened at the disclosed recording time; it is not happening now |
deterministic-only | Current candidate and host verifier only; Infer, Challenge, and Build are marked skipped | No GPT-5.6 or Codex execution |
Enable live model work only in an authenticated local environment:
TRACEFORGE_ENABLE_GPT56=1 TRACEFORGE_ENABLE_CODEX=1 pnpm dev
The adapters reuse the operator's existing Codex ChatGPT login unless TRACEFORGE_CODEX_API_KEY is set explicitly. Ambient OPENAI_API_KEY and CODEX_API_KEY values are not forwarded.
API and artifacts
POST /api/migrations
GET /api/migrations/:id
GET /api/migrations/:id/events
GET /api/migrations/:id/proof
GET /api/migrations/:id/artifacts
GET /api/migrations/:id/downloads/:filename
POST /api/proofs/verify-digest
/events supports Server-Sent Events, sequence-based replay, and JSON inspection. A completed job exposes contract.json, evidence.jsonl, candidate.diff, commands.json, and proof.json as downloadable artifacts with SHA-256 headers.
Export one completed migration:
node scripts/export-migration.mjs \
http://127.0.0.1:8787 \
migration_your_id \
.traceforge/export
Repository map
apps/api Legacy oracle, candidate modules, GPT archaeology, Codex adapter,
migration jobs, SSE, SQLite evidence, and host verifier
apps/web Five-stage migration workbench driven by server events
docs Architecture, threat model, demo, acceptance, submission, evidence
scripts Browser/API acceptance and evidence export helpers
Claim boundary
TraceForge proves behavioral conformance only for the seven executed scenarios. Six successful rows check decision, return status, refund amount, sellable quantity, and quarantine quantity; the exhausted-stock failure row checks failure status, code plus message, absence of a return record, unchanged inventory, and zero side effects. The raw proof schema calls its final partition held-out; the judge-facing product deliberately labels it verification-only, which is the precise claim: its concrete input is generated by the host after the Codex turn, not evidence of statistical generalization. External payments, carrier systems, arbitrary browser capture, other databases, cryptographic signatures, and universal behavioral equivalence are outside the current claim.
Read docs/architecture.md for the implemented trust boundaries and docs/threat-model.md for the remaining risks.
Impact claims are tracked separately in docs/impact-validation.md. The current repository contains a controlled technical validation, not invented customer adoption or production-savings claims. The pre-event baseline and in-window work are separated in BUILD_WEEK_CHANGES.md.
Analysis
View
Metric
- 4
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- ExpressIn code
- HTMLIn code
- ReactIn code
- TypeScriptIn code
- Node.jsClaimed
5 of 6 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
1.1 MB
Source files
102
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
a252937166/traceforge
230 files · 4.1 MB · @ afc94fa
Structure
Interface
1 file · 0%Screens, components and styles rendered to the user.
API & routing
26 files · 11%Request entry points: routes, handlers and controllers.
Application logic
24 files · 10%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- TypeScript68%
- Markdown13%
- YAML9%
- CSS8%
- Shell1%
- HTML0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
apps/web/package.json
npm · 13- @vitejs/plugin-react
- react
- react-dom
- vite
- +9 more
apps/api/package.json
npm · 10- @openai/codex-sdk
- cors
- express
- +7 more
apps/local-runner/package.json
npm · 4- @iarna/toml
- +3 more
package.json
npm · 33 development-only dependencies.
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.