Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 127 additions & 11 deletions architecture.md

Large diffs are not rendered by default.

18 changes: 10 additions & 8 deletions packages/cli/src/deno-repositories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,18 @@ function snapshot(helper: HelperAssembly): HelperAssembly {
}

/**
* What a REPL entry's execution initializes: recording and selection, and
* nothing else.
* What this registration gives a REPL entry's execution: recording, selection
* and local Git.
*
* Registered by the selected REPL host rather than by the bundled Plugin,
* because an entry is not an ordinary run: it retains the file work it does and
* the managed checkouts it selects to do that work in, and installs no Git host,
* publication or external worker. Each executing entry initializes its own, in
* the scope below its Agent attachment, so a passive view — a settled history,
* a frozen position — initializes nothing, creates no managed root and takes no
* lease.
* because an entry is not an ordinary run: it retains the file work it does, the
* managed checkouts it selects to do that work in, and the staging, branch
* switches and commits it performs in them — and it installs no publication and
* no external worker. The issue capability an entry runs with is selected
* separately, above, because it belongs to no checkout. Each executing entry initializes its own, in the scope
* below its Agent attachment, so a passive view — a settled history, a frozen
* position — initializes nothing, creates no managed root, reads no commit
* identity and takes no lease.
*
* The root and the helper are copied here, at registration, rather than held as
* the caller's object. What an entry initializes with has to be what this host
Expand Down
15 changes: 15 additions & 0 deletions packages/cli/tests/repl-repositories-pty.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ import { cliRuntime, cliShellCommand } from "@executablemd/test-support/launch";
import type { Operation } from "effection";
import {
replFilesJourney,
replGitJourney,
replOrdinaryFileWork,
replRepositoryJourney,
replUnsupportedGit,
replUnsupportedSelection,
} from "./support/repl-files-journey.ts";

Expand Down Expand Up @@ -59,9 +61,22 @@ describe("a REPL entry's files, across leaving and coming back", () => {
},
);

it(
JOURNEY
? "E1: a committed object id answers again while the checkout has moved on"
: "E8: this runtime refuses Add, Switch and Commit before a native operation",
function* (): Operation<void> {
yield* JOURNEY ? replGitJourney(sourceCommand, "ambient") : replUnsupportedGit(sourceCommand);
},
);

if (JOURNEY) {
it("E1: a managed Worktree's captured path routes a Dir, and answers again", function* (): Operation<void> {
yield* replRepositoryJourney(sourceCommand, "worktree");
});

it("E1: a selected Worktree's Add and Commit answer again on reopening", function* (): Operation<void> {
yield* replGitJourney(sourceCommand, "worktree");
});
}
});
Loading
Loading