feat: implement grip object model CLI (grip#606)#728
Open
laynepenney wants to merge 1 commit into
Open
Conversation
Bridge grip_cli.py to match TDD spec contract in test_grip_object_model.py: auto-discover repos from workspace_spec.toml, add JSON index layer at .grip/snapshots/index.json, block on dirty repos, track detached HEAD and empty repo states. Internal storage stays git plumbing. Closes #606 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
grip_cli.pyto match TDD spec contract intest_grip_object_model.py(14 tests, all previously failing)workspace_spec.tomlwhen--reposnot provided.grip/snapshots/index.jsonfor O(1) lookup alongside git plumbing storageDetails
The existing
test_grip_snapshot.py(35 tests) tested the library API directly and all passed. Thetest_grip_object_model.py(14 tests) tested through the CLI via typer CliRunner and expected a different interface:workspace_spec.toml(not--reposrequired).grip/snapshots/index.jsonid,message,repos,repo_statescontaininghead,head_state,is_empty.grip/stateThis implementation reconciles both contracts: keeps git plumbing internally (content-addressable), adds JSON index as a view layer, makes
--reposoptional with workspace_spec fallback.Test plan
test_grip_object_model.pytests pass (previously 0/14)test_grip_cli.pytests pass (no regressions)test_grip_snapshot.pytests pass (no regressions)Premium boundary: core OSS (workspace orchestration, git plumbing).
Closes #606
🤖 Generated with Claude Code