feat(runtime): jjWorkspace — jj/Jujutsu backend for the Workspace port#196
Merged
Conversation
… port The Workspace port abstracts the durable shared store behind a Shell; this adds a jj-backed implementation alongside gitWorkspace, returning the same WorkspaceCommit discriminated union (drop-in). jj suits accumulating agent loops: no staging area, a first-class operation log (native resume/undo), and conflicts recorded rather than aborted — a rejected push surfaces as a typed blocker. Author identity is injected via --config-toml so a throwaway colocated clone is self-contained (parallels gitWorkspace's -c user.*). Exported via /loops; covered by a test mirroring the gitWorkspace contract that skips when the jj binary is absent (CI).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
jjWorkspace— a Jujutsu (jj) backend for theWorkspaceport, alongsidegitWorkspace. Same port, sameShell, sameWorkspaceCommitdiscriminated union — a drop-in. Exported via/loops.Why
This finishes the "support jj and any other agent-friendly lightweight versioning" ask. jj suits accumulating, resumable agent loops: no staging area, a first-class operation log (native resume/undo), and conflicts are recorded rather than aborted — a rejected push surfaces as a typed blocker. The port already abstracted the durable store behind a
Shell; jj is genuinely a drop-in.How this unifies the two in-flight branches
I traced the two stalled cherry-picks (
feat/observe-closed-loopdeep-clean sequence +feat/cloud-loopworkspace port) against current main. 3 of the 4 orphan commits were already merged through other PRs, so cherry-picking them was re-applying landed work (the source of the conflicts):b3c280csandbox retry hardeningsLoopSandboxClient→SandboxClient)daba562sharedstats.mts+ gate dedupstats.mtsidentical; gates ahead via #191runtimeDecisionPoints)9838392steer-firewall dedup + dropanalyst-driver-hookdynamic.ts→driver.ts)0b110eaWorkspace portjjWorkspacewas the one genuine gapThe orphan
0b110eaalso regressed the commit type to a looserCommitResultinterface (optionalrev?/conflict?, allowing an invalid{ok:true}); this PR keeps main's fail-closedWorkspaceCommitunion instead.Test
pnpm run lint/typecheck/build— clean.jjbinary is absent, e.g. CI; it mirrors thegitWorkspacedurable-state-carry contract when jj is present).jjWorkspaceconfirmed exported throughdist/loops.d.ts.