Skip to content

feat(repo): repo fetch --json prints the pinned sha as JSON - #8

Closed
vchamarthi wants to merge 1 commit into
mainfrom
feat/repo-fetch-json
Closed

vchamarthi wants to merge 1 commit into
mainfrom
feat/repo-fetch-json

Conversation

@vchamarthi

Copy link
Copy Markdown
Owner

Summary

dokimi repo fetch prints <sha>\t<git_dir>. A script has to split a tab-separated line to get the pinned commit. --json prints {"sha", "git_dir"} instead, the same flag repo validate, scan and inspect already take. The default output is unchanged.

Evidence

  • base: 5c70cbf90f4eab95b30dcd6ad7ae60a4f37de268
  • command: run.sh under experiment_safe.py (macOS sandbox): python3.14 -m pytest tests/test_repo_manifest.py -k repo_fetch_cli, and tests/test_docs_code_refs.py
  • before: exit 2. test_repo_fetch_cli_json failed with dokimi: error: unrecognized arguments: --json.
  • after: test_repo_fetch_cli_json passes. It checks the JSON keys and that the default line is still <sha>\t<git_dir>. tests/test_docs_code_refs.py: 31 passed.
  • not claimed: the existing git-backed test_repo_fetch_cli could not run in the sandbox (git cannot open /dev/null there), so it was not re-run. The new test stubs open_source, so it does not clone. make ci-local was not run. No live fetch.

Blast radius

cmd_repo_fetch and the fetch parser in dokimi/dokimi/commands/repo.py, one new test, one line in repo-evaluation-contract.md, and one changelog fragment. Without --json the output is byte-for-byte the same.

Overlap

Created with claude-sonnet-5-5.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@vchamarthi

Copy link
Copy Markdown
Owner Author

Superseded by intel#149 and intel#150.

@vchamarthi vchamarthi closed this Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant