Maintain a Codex project through changes with a clear outcome, acceptance check and recovery plan. Keep a project map and separate backups of code, data and uploaded files.
Large projects are hard to maintain when form, authorization, and data structure change in one request. After an error, it's unclear which solution caused it and which part to restore.
I suggest making one change with one outcome and its own acceptance check. For example: fix message saving after a network error. Rate change, new user role, and design overhaul are separate tasks.
Project map instead of retelling the whole story
Save a short description: which file launches the project, where pages are located, where data comes from, which services are connected, and how to check operation. Next to it, record accepted decisions: who has data access, which actions are measured, and which programs are needed to run. Store current task info in PROJECT_STATE.md.
Give each change a clear record: reason, affected parts, verification, and recovery method. If you need to change the database structure, like adding or removing a column, record it as a separate action. Such a change is called a migration. You cannot hide column removal under "optimization."
How to bring a long task in Codex to completion
A separate project copy is useful when several tasks change the same files. For a small fix, it may be unnecessary. Before merging, check the changes and preservation of others' work.
Checks that run automatically
CI means automated checks when code is updated. Configure what helps notice breakage: build, critical user path, rights operation, and data interface compatibility. The test should check behavior where the project can break.
GitHub Actions allows running ready test programs. For third-party programs, GitHub recommends specifying the exact version ID, commit SHA, and verifying it against the source project. Token rights and secret handling also require restrictions. A pinned version won't update silently. Its code still needs review. GitHub: secure use.
Record the CI result in the audit log. Before release, you still need to check the target configuration and the interface result, especially when data or integrations change.
How to prepare a site for test publication.
Code, data, and files are restored separately
Git stores the project file history. A saved version is called a commit. You can restore files tracked by Git from it. It does not restore database rows, deleted uploaded documents, or changes in the provider's cabinet. Therefore, "rolled back a commit" does not yet mean "restored the application."
The sample has three parts: program settings in app.json, two fictional data records and a separate text document. The data is stored in JSON, a text format with named fields and values. The original commit and separate copies of the data and document were saved first. Then the code was deliberately changed incorrectly and the sample data was corrupted.
The only file restored from the original commit was app.json. A new recovery commit was then created, preserving the history of the faulty change. The data and document were restored from their own copies. The check compared SHA-256 checksums, digital fingerprints that can confirm whether file contents match.
| Experience Check | Result |
|---|---|
| Source Code Saved in Git History | Completed |
| Data and file copies match the originals | Completed |
| Erroneous change has a separate commit. | Completed |
| Selected code file restored byte for byte | Completed |
| History saved, recovery commit created | Completed |
| Unrelated untracked file saved | Completed |
| Two synthetic records restored | Completed |
| Content of a single file restored | Completed |
The demo command uses git restore --source <initial commit> -- app.jsonIt overwrites the selected working copy file. In a real project, first save its unfinished changes and ensure you selected the correct source. This is not a universal server rollback command.Git: restore.
You can repeat the experience from the “Training Project - Recovery” archive: unpack it into a separate folder and run python3 run_demo.py. Python 3 and Git are required. The script creates a new training directory inside its folder, uses a synthetic Git identity only for local commands, and does not push anything to a remote repository.
Expected output: passed: 8, total: 8. The environment versions and results are saved in results.json. The script is included so you can inspect the scope of its changes. On Windows with the Python launcher installed, use py -3 run_demo.py; this command has not been tested here.
This experience uses JSON and a regular file. Checking SQL database recovery, cloud Storage objects, and consistent running service state remains a separate scenario.
How to restore project, data, and files after an error
Analytics after changes
Choose a metric related to the task result. For a form, these are submission, error, and server receipt of the application. A client button click event does not confirm database recording.
Record event schema: name, send time, properties, identifier, and duplicate removal rules. Do not add user message text to analytics events without necessity. Compare the report with the control table on synthetic data.
When a failure occurs, save the version, time, observation, and related logs. Do not include secrets or personal data in the report. After fixing, repeat the path where the error occurred and update CHECKS.md with the actual result.