Repository navigation
feat(cli): add the change workflow - #3
Conversation
ace6cb5 to
b2029f3
Compare
b2029f3 to
6a0a0b2
Compare
6a0a0b2 to
0f4dd66
Compare
9f980dc to
da4eb3a
Compare
ca7c586 to
6b92dcd
Compare
6b92dcd to
1baba39
Compare
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 29 minutes. View limit details
Walkthrough
Merge Risk:
|
432bc36 to
555b40d
Compare
555b40d to
3cc47ec
Compare
3cc47ec to
45f58a8
Compare
2be0349 to
fb2ffe5
Compare
fb2ffe5 to
421cfad
Compare
acf77a0 to
7922f78
Compare
The local command line on the change model. `origin init` creates the repository with the node's key (in ~/.config/origin or $ORIGIN_CONFIG_DIR), a signed `policy` target naming the node authority of `policy` and `main`, an empty `main`, and a first change. There is no commit: the working copy is always a revision of the current change, and every command that reads it snapshots it, with the stat cache and parallel snapshots, writing the new objects in one durable batch. `new`, `describe`, `edit`, `status`, `diff`, `show`, `log`, `evolog`, `abandon` (a core.abandon statement), `converge` and `index rebuild` work on changes, named by unique id prefixes. Divergence, detected by the index, shows in `status`, `log` and `show`. Benchmarks: divan snapshot benchmarks, and `just bench-git` timing origin against git with hyperfine, `origin new` standing in for a commit. A closed output pipe, as in `origin log | head`, ends a command quietly instead of panicking.
7922f78 to
c21e9be
Compare
The old CLI was built on commits and branches, which v2 removes.
What it adds:
origin init. It creates the node key in~/.config/origin(or$ORIGIN_CONFIG_DIR), a signedpolicytarget naming this node the authority ofpolicyandmain, an emptymain, and a first change.status,diff,show,logandevologshow it without recording anything. The commands that build on the change (new,describe,edit,abandon,converge) record it as a new revision first, so a change's history holds the points that mattered rather than every command run while editing.new,describe,edit,status,diff,show,log,evolog,abandon,convergeandindex rebuild. Changes are named by any unique id prefix, and divergence shows instatus,logandshow.origin log | head) ends a command quietly instead of panicking.Benchmarks (20k files, durable):
status, nothing changedstatus, 100 files editedstatuswith edits still writes the new objects in one durable batch, but no longer records a revision. That took it from 70.7 ± 4.4 ms to 57.0 ± 4.8 ms (hyperfine, 40 runs). With nothing changed it stays at about 30 ms.Review fixes: a crash's leftover temporary key no longer blocks
init,initloads the key before creating.origin, the README gives the full config lookup order, and bench-git honorsCARGO_TARGET_DIRand quotes the paths it hands tosh. Proved with two new tests that fail without their fix,just(320 tests), and bench-git run against a target path holding a space and a'.Reviewed with review-loop: 1 round with 2× GPT-6.1 Sol and Claude Opus 5.5. Verdict: approved
Note
Written by Claude Opus 5.5 in Claude Code, reviewed by GPT-6.1 Sol and Claude Opus 5.5 over three review rounds (via T3 Code).
🤖 Generated with Claude Code