Skip to content

feat: step through a branch's commits read-only - #126

Merged
flexdinesh merged 2 commits into
mainfrom
feat/commit-stepping
Oct 27, 2026
Merged

flexdinesh merged 2 commits into
mainfrom
feat/commit-stepping

Conversation

@flexdinesh

Copy link
Copy Markdown
Owner
  • Capture (diffsource, collector, fetcher): branch observations now carry the newest 100 merge-base..HEAD commits, oldest first, with metadata, git patch-id --stable and a first-parent diff per non-merge commit (root commits diff against the empty tree). Merges are listed without a diff. Commit patches are budgeted after scope patches, then scope contents, then commit contents. The GitHub fetcher prefetches the commit blobs so offline collection can read them.
  • Ingestion protocol 4: adds optional commits + commitsTotal, validated to a branch comparison ending at HEAD with lowercase unique OIDs and mode/kind commit snapshots. Commit OIDs extend reuse identity only when present, so existing replays are unchanged. The server must be installed before collectors that send commits.
  • Storage schema 14 (additive): observation_commits + observation_commit_ranges; commit diffs reuse diffs with mode commit. Catalog counts and scope summaries exclude them; delete, expiry, prune and reuse cover them. commit is not a DiffMode, so comments and review marks cannot target it.
  • API (OpenAPI, httpapi, reviewservice, mcpapi): adds Context.commits {count, omitted}, GET /contexts/{id}/commits and /commits/{oid}/diff|files/{fileId}/patch|contents, plus DiffViewMode for RepositoryDiff.mode. MCP gains list_commits and an optional commit on get_diff/get_file_patch (not combinable with scope). All read-only.
  • Web: adds a Commits entry in the comparison menu and a toolbar stepper (older/newer, a filterable ui/combobox list, Alt+[ / Alt+]), a commit banner with a plain-text message disclosure, and ?commit=<oid> URLs. Commit views are read-only: file headers show "Open in Branch changes", with no marks, comments or line selection. Merge and missing commits stay selected and explain why. The stream remembers the commit and, after View latest, resumes it by SHA, then patch-id, else the oldest commit with a notice.
  • Docs: docs/system.md, docs/architecture.md, DESIGN.md, plus the docs-site usage/API/MCP pages.

Validation:

  • Go suite passes.
  • Conformance passes, including a new commit contract test.
  • Web unit tests pass: 90.
  • Playwright passes: 138, including 2 new commit scenarios.
  • Contracts, design and docs checks pass.
  • End-to-end script on the real binary checks REST, MCP, merge 404, the working-tree isolation of commit diffs, and rejecting a commit scope.
  • Pre-push mise run check:push passes.

Collectors capture the newest 100 merge-base..HEAD commits with per-commit
diffs in the same observation (schema 14, additive). Commits get REST and MCP
read routes; the web app adds a Commits lens with a stepper, commit banner,
Alt+[ / Alt+], ?commit= URLs and patch-id resume. Commit views are read-only.
@flexdinesh
flexdinesh merged commit 93fa49b into main Oct 27, 2026
2 checks passed
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