shadowgraph_rebuild
Rebuilds a projection from the store's journal to report whether the fold completed, leaving journal and live graph untouched.
Instructions
Replay this store's own journal into a projection and report whether the fold was complete. shadowgraph_journal reads the entries themselves, shadowgraph_validate diagnoses the live graph. Reads only: the journal is untouched and the live graph is not replaced by the result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| requireFullHistory | No | When true, refuse to rebuild if pre-journal metadata-only entries exist, returning rebuildable:false instead of a fold that silently starts later. Defaults to false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | True when the fold ran; it does not by itself mean the projection is complete. | |
| legacy | Yes | Entries recognised as pre-journal or non-replayable, each with a why. | |
| reason | Yes | Why the projection is not rebuildable, or null when it is. | |
| applied | Yes | Entries folded into the projection. | |
| skipped | Yes | Entries not folded, each carrying seq, type, and a stable why such as unknown_entry_type or unsupported_schema_version. | |
| duplicates | Yes | Sequence numbers appearing more than once, each { seq, count }. A repeated sequence cannot be totally ordered, so it makes the fold untrustworthy. | |
| projection | Yes | The projection folded from the journal. | |
| replayedTo | Yes | Highest sequence folded. | |
| rebuildable | Yes | True only when every entry in the replay range was folded and the result is trustworthy. | |
| journalEpoch | Yes | First replayable sequence. | |
| replayedFrom | Yes | Lowest sequence folded. |