package solutions.tretter.githugandroid

/**
 * Port of the upstream ruby-githug `log` level.
 *
 * Setup documents the repository shape the learner explores. Evaluation is kept
 * state-based whenever the exercise changes repository objects; answer-only
 * levels intentionally validate the answer entered at the prompt.
 */
internal fun logLevel(): Level = level(
    id = "log",
    title = "Log",
    description = "Identify the hash of the latest commit.",
    hints = listOf("You need to investigate the logs."),
    commandSuggestions = listOf("git log"),
    setup = { RepoState(initialized = true, commits = listOf(CommitNode("0000001", "THIS IS THE COMMIT YOU ARE LOOKING FOR!")), branches = mapOf("master" to 1)) },
    validator = commitHashAnswer("0000001"),
    testCases = listOf(
        levelTestCase("answer short hash", "0000001"),
    ),
)
