Story changes and reverts
Inspect recorded people, models, skills and inputs, discuss a specific change or run, and follow a revert from its draft PR to deployment evidence.
Open a story and expand Changes & reverts. Each linked pull request shows its author, when it opened, who merged it, the recorded commit references and changed files. Use the search field to find a person, model, skill, pull request or file in the loaded history. Export downloads the history currently available to you as JSON, including its evidence and limits.
Understand the evidence
The person requesting work, the agent and model executing it, and the person merging a pull request can be different. CodeBook displays these identities separately. When a pull request has an exact recorded run, Read the conversation opens the saved agent conversation and tool activity.
An agent’s name is not inferred from a Git author or from a run happening around the same time. A run referenced only by the branch name is labelled as such; it does not establish authorship. Missing run attribution, model information or file evidence is labelled. The history can be incomplete for older work or after the organization’s retention period. A linked pull request establishes a relationship to the story; it does not prove that every changed line came from an agent.
For the story’s station visits, waiting time and execution costs, use History. For its tests, artifacts and outcomes, use the corresponding panels in the same story.
Compare and restore story fields
Open Field history below Changes & reverts, in either the board's story dialog or the full story page. It records changes to the title, description, priority and due date, including the recorded person or agent, source and time. Compare fields shows the values before and after that edit. Earlier changes that were never recorded remain unknown.
To restore selected fields:
- Open a recorded change and choose Before this change or After this change. A creation record has only an after snapshot.
- Select the fields to restore, then choose Preview restore against current story.
- Compare the current saved values with the proposed values, enter a reason and choose Restore selected fields.
You need current write access. Save or discard unsaved card edits first. A preview expires after 15 minutes, and another descriptive edit requires a fresh preview. Restoring creates a new revision with your identity and reason; original history remains available. The selected fields are saved together.
This operation changes the story's wording and descriptive fields. It does not move the story, restart work, change access, revert code or roll back a deployment. Use the separate code-revert flow below for a merged pull request.
Inspect the recorded inputs
An attributed run separates the requesting person, the installed agent, the person running it locally when recorded, the requested model, the model recorded by SSO and any model reported by an outside runner. Its location identifies CodeBook, a person’s runner or an outside runtime when that evidence exists.
Expand these sections when available:
- Prepared skill versions shows the exact reusable package versions recorded while preparing input, including selected skills and dependencies, their instruction hashes and available repository source references.
- Released instruction versions identifies the saved instruction versions used. New versions can include their skill components when those components exactly match the saved instructions.
- Recorded input references shows input and retrieval identifiers, instruction and request hashes, configuration fingerprints and source-reference hashes. Missing retrieval records remain labelled unavailable.
These are identities and hashes, not copied prompt or source bodies. CodeBook does not substitute today’s agent configuration for missing historical evidence. Older runs, old released versions and custom instructions can have unknown skill components. Retention can remove content while leaving the limited references shown here; those references cannot reconstruct it.
A recorded publication commit remains visible if later pushes change the PR head. The page identifies that difference against the last synchronized head. It does not infer ancestry or per-line authorship from the earlier publication. Refreshing this panel reads CodeBook’s recorded history; source-host synchronization determines how current PR metadata is.
The view is bounded to recent records: up to 50 pull requests, runs and contributor events, 100 files per pull request, and 20 input references and skill receipts per run. Read its coverage notices and open the source host for a complete code review.
Discuss a change, file or run
Choose Discuss change, Discuss file or Discuss run to open Review discussion. Start a thread, post replies and use @ to mention people or agents through the existing story discussion. The threads are shared with people who can read the story and also appear in its main Discussion panel.
A PR or file thread keeps the recorded commit it started from. A run thread keeps its recorded run reference. For a file, Line reference (optional) lets you name a line; check it at the source host first. The line number is a reference, not verification of that line’s contents.
Use Resolve discussion when the question is settled, or Reopen discussion when more work is needed. The thread records who changed that state and when. A later synchronized PR head makes an older reference Outdated reference rather than moving it to new code. Source unavailable means the source can no longer be read, for example after it is detached, access is revoked or retained run content is removed. Existing comments are not proof that the source remains accessible.
Resolving a discussion does not approve a pull request or satisfy its merge gates. These threads live in CodeBook; they are not source-host review comments. To comment on a pull request's lines at the host, use Review changes.
Check a pull request's Git history
A pull request can change after a run published it: someone rebases it, force-pushes, squashes it or adds commits. To see how what is on GitHub now relates to what CodeBook recorded, open the story's Development panel and choose Git history on the pull request, then Check GitHub now.
CodeBook reads that pull request through its approved Bookbag repository connection and saves a check with your name, the time, the exact reference and each commit's Git author and committer. For an open pull request the reference is its head; for a merged one it is the merge commit. This is what the host showed at that moment. It does not say what is deployed.
A run is credited with a commit only through CodeBook's own records: a successful publication by the run, or a published workbench draft and the workspace checkpoints that hold it. A Git author never identifies an agent or a model, and a commit added later from outside has no CodeBook author unless its own publication record says so.
Each original commit gets one of these labels:
- Exact commit included: the host shows the original commit in the current history.
- Equivalent candidate: review needed: exactly one commit in the check changes the same files to the same contents and modes, for example after a rebase. Choose Review the equivalent commit, look at both, say what you checked, and choose Confirm equivalence. CodeBook checks your access and the pull request again before it saves your review beside the original.
- Ambiguous replacements: several commits match, so none is chosen.
- Outside the observed history: the host says the original is no longer in this history, and no equivalent was found within the check's limits.
- Unresolved evidence: a missing object, an incomplete read, a changed patch or a squash leaves the relationship unknown.
The comparison is exact on purpose: every changed path and its before and after Git object and mode must match. It does not guess who wrote a line and does not combine squashed commits. Earlier checks and reviews stay in the history; a later check marks a review the new evidence no longer supports. If GitHub cannot be reached, nothing is saved and no commit is marked as lost.
This works for GitHub repositories connected through Bookbag. Each check compares up to 12 current commits and 8 original ones, with bounded reads. A story and pull request keep up to 100 checks; the dialog lists the latest 20. Nothing runs in the background, and checking or confirming changes no code. Anyone who can read the story can read the checks; recording one needs permission to change the factory.
Revert a merged change
- In Changes & reverts, choose Revert changes beside the merged pull request.
- Read the original merge reference, current target branch and proposed inverse changes. Expand each file to inspect the available text diff.
- Enter the reason for the revert, then select Create revert PR.
- Open the resulting draft pull request, review the complete diff and run your repository’s checks before merging it at the source host. CodeBook leaves these revert PRs for a person, including in a workflow otherwise configured to merge automatically.
The inverse is prepared against the current target branch so later work can be preserved. CodeBook rechecks that branch when you submit. If the branch has moved, check again and review the new preview. A repeated submission recovers the same revert request instead of intentionally opening duplicates.
Creating the revert PR does not mean the original change has been reverted or deployed. The code changes after that PR is merged; deployment follows the repository’s release process. Reverting code does not restore database contents, undo external side effects or restore the story’s fields.
Follow the revert through deployment
The original change shows the revert reason, requesting person, time and current recorded stage: preview or publication, a draft awaiting review, a PR awaiting merge, closed without merging, or merged. Once merged, it also shows the merger and merge commit when synchronized.
The deployment panel distinguishes an exact merge-commit record from a release association or a person’s reported outcome. A release association alone does not independently prove that the commit was included. A merged revert reaches Revert merged; deployment reported for its exact commit only when a successful production deployment record names that exact merge commit. Missing evidence leaves production state unconfirmed; a later recorded rollback is shown separately.
Deployment reported, deployment verification passed and deployment verification failed are separate states. These labels describe the evidence CodeBook received. They do not run a deployment or independently inspect the running application.
When a revert cannot be prepared
Revert PR creation supports approved GitHub repositories and connected GitLab and Gitea / Forgejo repositories. GitLab opens a Draft: merge request and Gitea / Forgejo a [WIP] pull request. Symbolic links and submodules cannot be written through the GitLab or Gitea API, and Gitea cannot set file modes, so those changes show as conflicts in the preview. See Reviewing pull requests in CodeBook. You need current write access to the factory and the repository connection must still permit proposing changes.
CodeBook refuses an automatic revert when it cannot establish the complete original change. This can happen with ambiguous rebased commit ranges, incomplete source-host evidence or changes beyond the preview’s limits. Conflicts with later edits require manual resolution. Binary files, file modes and deletions are handled only when the inverse can be established safely; a text merge is never used as a substitute for missing binary evidence.
Open the original pull request at the source host to resolve a refusal manually, then link the resulting PR in Development. The refusal does not alter the target branch.
For new text changes, use the Repository workbench to prepare and review a shared draft PR.
Other kinds of rollback
- To restore a factory definition, use factory versions.
- To review instructions, staffing or model-policy changes, use factory changes.
- To inspect release verification, use proof runs and the repository’s deployment records.
These are separate operations with separate evidence. A code revert does not silently perform any of them.