Fix level setup, reword flow, and catalog scope

- create and enter the level's declared starting directory
- inspect Git state from the repository containing the active directory
- start the init level in /sandbox/git_hug and cover it with a runtime test
- apply edited reword subjects as commit messages in the in-app rebase editor
- cover rename_commit with a native interactive rebase regression test
- remove the upstream contribute call to action from the playable level catalog
- update level parity documentation
This commit is contained in:
Joe Tretter
2026-06-08 14:21:21 -05:00
parent 0d20c089ec
commit 02a23694c3
11 changed files with 194 additions and 68 deletions

View File

@@ -13,9 +13,15 @@ internal fun initLevel(): Level = level(
description = "A new directory, `git_hug`, has been created; initialize an empty repository in it.",
hints = listOf("You can type `git --help` or `git` in your shell to get a list of available git commands."),
commandSuggestions = listOf("git init", "git status"),
setup = { RepoState() },
setup = { RepoState(currentDir = "git_hug") },
validator = repoPredicate { it.initialized },
testCases = listOf(
levelTestCase("plain init", "git init"),
),
setupChecks = listOf(
levelSetupCheck(
name = "starts in git_hug",
failureMessage = "Expected the learner to start in the created git_hug directory.",
) { repo -> repo.currentDir == "git_hug" && !repo.initialized },
),
)