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:
@@ -10,7 +10,7 @@ This file records the upstream Ruby setup and validation intent beside the Andro
|
||||
|
||||
| Level | Upstream setup intent | Android setup intent | Parity / reason for difference |
|
||||
| --- | --- | --- | --- |
|
||||
| `init` | Starts outside a Git repository. | Starts with empty `RepoState`. | Equivalent. |
|
||||
| `init` | Creates `git_hug`, changes into it, and starts outside a Git repository. | Creates `/sandbox/git_hug`, starts the learner in it, and leaves it uninitialized. | Equivalent. |
|
||||
| `config` | Initializes a repository. | Initializes a repository. | Equivalent. |
|
||||
| `add` | Initializes repo, creates untracked `README`, renames branch to `master`. | Initializes repo with untracked `README` on `master`. | Equivalent. |
|
||||
| `commit` | Initializes repo, creates and stages `README`. | Initializes repo with staged `README`. | Equivalent. |
|
||||
@@ -65,7 +65,6 @@ This file records the upstream Ruby setup and validation intent beside the Andro
|
||||
| `restore` | Creates `file1`, `file2`, then creates and removes `file3` so it is recoverable from reflog/history. | Native setup creates matching history and removes `file3`; model starts without `file3`. | Equivalent. |
|
||||
| `conflict` | Copies fixture with `master` and `mybranch` conflict in non-empty `poem.txt`. | Native setup creates the conflicting poem history, leaving `master` with `Categorized shoes by color` and `mybranch` with the correct `Sat on a wall` line. | Equivalent setup. |
|
||||
| `submodule` | Initializes empty repo. | Same. | Equivalent; network submodule operation is modeled. |
|
||||
| `contribute` | No local setup; solution clones upstream externally. | Empty state. | Deliberate simplification for mobile/offline final prompt. |
|
||||
|
||||
## Validation Summary
|
||||
|
||||
@@ -115,7 +114,7 @@ This file records the upstream Ruby setup and validation intent beside the Andro
|
||||
| `repack` | `git count-objects -v` includes packed/pruned object evidence. | `repack` action recorded. | Equivalent action-level validation; Android does not model object database packing stats. |
|
||||
| `cherry-pick` | Top commits are "Filled in README..." then "Added fancy branded output". | Same commit message order plus `README.md` tracked. | Equivalent. |
|
||||
| `grep` | Answer is TODO count `4`. | Answer is `4`. | Equivalent. |
|
||||
| `rename_commit` | Parent commit message is corrected to `First commit`. | No `coommit` remains and `First commit` exists. | Equivalent for intended reword. |
|
||||
| `rename_commit` | Parent commit message is corrected to `First commit`. | No `coommit` remains and `First commit` exists; the in-app rebase editor uses the subject text on a `reword` line as the replacement message. | Equivalent outcome with a single mobile editor step. |
|
||||
| `squash` | Commit count is two. | Commit count at most two and "Adding README" remains. | Slightly stricter on preserving the base README commit. |
|
||||
| `merge_squash` | Commit count is three and all long-feature changes are included. | Squash action recorded and a commit exists. | Known gap: Android does not yet verify all squash file/content effects. |
|
||||
| `reorder` | `git log` subject order matches `Third.*Second.*First.*Initial`. | Modeled commit order becomes First, Second, Third. | Equivalent relative to Android's oldest-first commit list. |
|
||||
@@ -126,7 +125,6 @@ This file records the upstream Ruby setup and validation intent beside the Andro
|
||||
| `restore` | `file3` exists. | `file3` is tracked. | Equivalent. |
|
||||
| `conflict` | On `master`, merge commit has two parents, conflict markers removed, both poem lines preserved. | Requires the latest commit on `master` to be a two-parent merge commit, conflict markers removed, and the correct `Sat on a wall` poem line preserved. | Equivalent. |
|
||||
| `submodule` | `githug-include-me` directory exists, has README, and is a gitlink/submodule. | `submodules` contains `githug-include-me` URL. | Equivalent state projection. |
|
||||
| `contribute` | Clones upstream and checks for a commit authored by configured user. | Any nonblank command. | Deliberate mobile/offline simplification for the final contribution prompt. |
|
||||
|
||||
## Focused Source-To-Android Checks
|
||||
|
||||
@@ -160,4 +158,6 @@ These are the remaining known non-parity items that need additional model suppor
|
||||
- `stage_lines`: model partial staged vs unstaged hunks.
|
||||
- `merge_squash`: verify the exact squashed file/content effects.
|
||||
- `rebase_onto`: verify final commit count/content and removal of "Wrong changes".
|
||||
- `contribute`, `clone`, `clone_to_folder`: current Android behavior intentionally avoids real network-dependent validation.
|
||||
- `clone`, `clone_to_folder`: current Android behavior intentionally avoids real network-dependent validation.
|
||||
|
||||
The upstream `contribute` call to action is intentionally not implemented as a level because it asks learners to contribute to the original GitHug repository rather than teaching or validating a Git operation.
|
||||
|
||||
Reference in New Issue
Block a user