GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(review): add pinned review scopes, snapshots, and activity tracking by puri-adityakumar · Pull Request #1768 · Nano-Collective/nanocoder

Conversation

@puri-adityakumar

@puri-adityakumar puri-adityakumar commented Oct 15, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

This PR is part of a stacked series for #1287: Q (#1478, merged) → Foundation (this PR) → Grounded default → Deep → Headless. They merge in that order (plan). This PR doesn't close the issue on its own.

Overview

The grounded review in the next PR lets agents read files and check their claims against the code. For that to be safe and honest, the target has to be settled before any model call: which commits, which files, and nothing that changes halfway through. Today /review builds its diff on the fly. This PR adds the groundwork that resolves and pins a review target, plus the activity tracking the live view will use. None of it is connected to /review yet, so /review and /review quick behave exactly as on main. The next PR connects it.

  • Reads review requests. branch <name>, a remote branch, a PR number or URL, last N commits (optionally on branch <name>), and working tree. Anything else gets a usage hint instead of a guess.
  • Pins the target before review. Each request resolves to exact commit IDs. A PR keeps its base tip, merge-base and head. If a name matches more than one candidate, or the working tree has changes while the branch also has commits ahead, it asks which one you mean.
  • Reads files from Git, not the disk. Snapshots come from Git objects. A working-tree review copies the index to a scratch file and runs git add --all and git write-tree against it, so the real index and files are never touched. Oversized files, too many files, or too much content fail the resolution instead of returning a partial scope.
  • Keeps fetched refs tidy. PR and remote heads are fetched into one fixed ref per source under refs/nanocoder/review/ and removed afterwards. Nothing is checked out.
  • Records activity. Each Git, gh and model step goes into a bounded event store with secrets redacted. The activity view shows a one-line summary, d for details, and Esc to cancel. It's tested here and appears in /review from the next PR.
  • Decodes Git output once. execGit and execGh decoded each stdout chunk on its own, which can break a multi-byte UTF-8 character split across two chunks. They now collect the bytes and decode once, and accept an abort signal. execGitBuffer returns raw bytes for snapshots.

/review on the same fixture repo and model (Groq openai/gpt-oss-20b). The findings are worded differently because the model's output varies from run to run; the scope line, layout and footer are the same.

main This PR
/review on main /review on this PR

Try it

/review and /review quick are unchanged. The new code runs through its tests:

pnpm run test:ava source/review/review-request.spec.ts source/review/review-resolver.spec.ts source/review/review-activity.spec.ts source/components/review-activity.spec.tsx source/tools/git/utils.spec.ts

Testing

  • New unit tests for request parsing, target resolution, snapshots, review refs, the activity store and view, and byte-exact Git output. The 5 spec files above pass (64 tests).
  • Format, lint, types, knip and build pass
  • Full suite on Node 22, merged with current main: 9,409 pass. The only 2 failures are macOS temp-path tests in gh-pr-worktree.spec.ts that also fail on main. Line coverage is 94.19% (main badge 94.2%).
  • Checked by hand in the TUI with a real model: /review and /review quick main show the same scope, layout and footer as main
  • CI on this PR passes

Findings

  • A working-tree snapshot hashes untracked, non-ignored files into the object store before the 1 MiB per-file limit is checked. Those objects are unreferenced and removed by normal git gc.
  • Two reviews of the same PR at the same time share one fixed ref. Head fetches check the expected commit ID, so the worst case is a newer tip of the same base branch or a failed resolution you can retry, never another target's commit.
  • Review traces aren't saved in sessions yet. That comes with the next PR, when the review has a session to belong to.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
puri-adityakumar and others added 16 commits September 25, 2026 10:11
@puri-adityakumar
feat(review): add pinned review foundation
3085d30
@puri-adityakumar
Merge remote-tracking branch 'origin/feat/1287-quick-fixes' into feat…
7f3a1d5
…/1287-review-foundation
@puri-adityakumar
docs(review): define session trace follow-up
1dfc0ce
@cursoragent
Merge branch 'feat/1287-quick-fixes' into feat/1287-review-foundation
fef80da
@cursoragent
test(review): isolate review Git fixtures from host config
fca270a
@cursoragent
fix(review): identify credentialed HTTPS GitHub remotes
2e07bab
@puri-adityakumar
Merge remote-tracking branch 'origin/feat/1287-quick-fixes' into feat…
b28d7b7
…/1287-review-foundation
@puri-adityakumar
Merge remote-tracking branch 'origin/feat/1287-quick-fixes' into feat…
a6dcbe6
…/1287-review-foundation
@puri-adityakumar
fix(review): discover untracked files from the repository root
67f2f57
@puri-adityakumar
fix(review): select recent commits along first-parent history
96a5182
@puri-adityakumar
fix(review): accept www GitHub remote hostnames
5af565a
@puri-adityakumar
test(review): isolate binary Git fixture from host configuration
4a0d6d3
@puri-adityakumar
refactor(review): simplify worktree snapshots and remote review refs
9fc9e32
@puri-adityakumar
chore: merge upstream main into feat/1287-review-foundation
3a5ffae
@puri-adityakumar
docs(review): name the next stage instead of a fork PR number
46bdb48
@puri-adityakumar
chore: merge upstream main into feat/1287-review-foundation
95ce7e4
@github-actions github-actions Bot added area:tools Tool implementations and tool-calling area:tui Terminal UI area:docs Documentation labels Oct 15, 2026
@puri-adityakumar
puri-adityakumar marked this pull request as ready for review October 15, 2026 10:05
@puri-adityakumar
puri-adityakumar requested review from addyCooks, akramcodez and will-lamerton as code owners October 15, 2026 10:05
@addyCooks

addyCooks commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

Thanks @puri-adityakumar, this is carefully built.
I checked the security-sensitive parts: ref names are validated (leading "-", whitespace and special characters rejected, and "--" / "--end-of-options" used before user-influenced values), the fetch uses check-ref-format with no tags or submodules and an expected-commit check, temp refs are cleaned up, and all file contents come from git cat-file blob, so nothing is read from disk but a copy of the index.
I ran it locally: types, lint and knip are clean, and 63 of the 64 tests in the five specs pass (the one failure is the symlink test, which can't create a symlink on Windows: EPERM).

Three small things:

  1. Please skip the symlink test on Windows (or catch EPERM), so it doesn't fail for Windows contributors.
  2. review-snapshot.ts:391: copyFile(...).catch(() => undefined) hides a failed index copy. Please record it in the activity log.
  3. A design question for the next PRs, for @will-lamerton and you: a working-tree review snapshots untracked, non-ignored files with git add --all. A stray .env that isn't gitignored would be included, and later sent to the model. Should we exclude common secret filenames, warn, or ask first? It's worth settling before the grounded default PR connects a model.

No changes needed to merge this foundation as is; I'd like Will's sign-off on the design before it goes in.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@puri-adityakumar

puri-adityakumar commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @addyCooks, really appreciate you testing on Windows and the careful read.

My suggestions:

  1. Symlink test: skip it on Windows, the same way lifecycle-hooks.spec.ts does. It still runs on macOS and Linux. Open to suggestions.
  2. Index copy: stay quiet only when there's no index yet (a fresh repo). For any other failure, log a warning to the review activity and carry on.
  3. Untracked .env: keep untracked files in reviews, but skip ones that clearly look like secrets (.env / .env.* except .env.example, *.pem, *.key, id_rsa*, id_ed25519*) and show a line in the activity, e.g. "Skipped 1 file that looks like a secret: .env.local". No prompt, so headless runs keep working.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@addyCooks

addyCooks commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Thanks so much @puri-adityakumar,
I really appreciate the quick and thoughtful reply.
All three proposals work for me:

  1. Skipping the symlink test on Windows, the same way lifecycle-hooks.spec.ts does: sounds good.
  2. Staying quiet only when there's no index yet, and otherwise logging a warning to the review activity and carrying on: that works well.
  3. Skipping secret-looking untracked files with a visible line in the activity and no prompt, so headless runs keep working: a great approach.

For the third one, if it's not too much trouble, here are a few small suggestions:

  • A few more patterns could be worth covering: .netrc, .npmrc, *.p12, *.pfx, *.keystore and .aws/credentials.
  • Please apply it only to untracked files in working-tree reviews (committed content is reviewed as is), and keep file contents out of the activity line.
  • It would be great to have a test for each of these: a secret-looking file is skipped and reported, .env.example is kept, and a normal untracked file is kept.

Whenever you've pushed these, I'll happily take another look.
@will-lamerton, when you have a moment, could you also take a look at the overall design of the stack?
This PR is the foundation for the grounded review PRs that follow.

Thanks again for the careful work on this.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

puri-adityakumar added 4 commits October 16, 2026 12:30
@puri-adityakumar
test(review): skip the symlink snapshot test on Windows
dd9117a
@puri-adityakumar
fix(review): report Git index copy failures instead of hiding them
66514c7
@puri-adityakumar
fix(review): leave secret-looking untracked files out of worktree sna…
a813af8
…pshots
@puri-adityakumar
chore: merge upstream main into feat/1287-review-foundation
9f7c80c
@puri-adityakumar

puri-adityakumar commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @addyCooks, pushed all three fixes (Windows symlink test skip, index copy warning, secret-looking untracked files left out with only names shown) and merged the latest main to clear the conflict.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@addyCooks

addyCooks commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

Thanks @puri-adityakumar, I re-checked this at 9f7c80c.
All three of my points are addressed: the Windows symlink test is skipped, a failed index copy is reported, and secret-looking untracked files are excluded safely. The tests pass here and CI is green. Approving.

Non-blocking, for you or the next PRs:

  1. One file over 1 MiB (e.g. a changed lockfile) fails the whole review. Listing it as "skipped, too large" may be friendlier.
  2. Please add a direct test that execGit (the string version) no longer corrupts split UTF-8; only execGitBuffer is tested today.
  3. The update-ref -d cleanup swallows errors silently, so a leftover ref would go unnoticed.
  4. validateRefName allows @{...} and ..; git check-ref-format --branch would match the "exact Git refs" wording.
  5. Redaction doesn't cover a bare token as a URL username, or glpat-/xoxb-/AKIA keys.

@will-lamerton, could you take a look at the overall design of the stack before this merges?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Hi @puri-adityakumar, thanks for this PR! It looks like a maintainer has left feedback
or review activity and there are still some outstanding items to wrap up.

Whenever you get a chance, could you take a look at the open comments?
If anything is unclear or you'd like a hand, just reply here and we'll help you get it across the line.

puri-adityakumar reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the stale:nudged label Oct 24, 2026
@github-actions

github-actions Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Hi @puri-adityakumar, just a heads-up that this PR still has outstanding items
and hasn't seen any activity in a while.

If we don't hear back within about a week, we'll close it to keep the queue tidy.
You can always reopen it later. Happy to help if anything is blocking you - just say the word.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added stale:final-warning and removed stale:nudged labels Oct 31, 2026
@puri-adityakumar

puri-adityakumar commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

hello, @addyCooks @akramcodez any update on this ?

akramcodez reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@akramcodez akramcodez removed the stale:final-warning label Nov 7, 2026
@akramcodez
akramcodez merged commit c3824ff into Nano-Collective:main Nov 7, 2026
17 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@akramcodez

akramcodez commented Nov 7, 2026

Copy link
Copy Markdown
Member

Huge thanks @puri-adityakumar 🎉

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

will-lamerton added a commit that referenced this pull request Nov 11, 2026
@will-lamerton @claude
chore(review): remove the unwired review foundation
6012c02
source/review/ (pinned review scopes, snapshots, activity store and the
ReviewActivity component) landed in #1768 as the first stage of a staged
review rewrite. The next stage that would have wired it into /review never
landed, so nothing outside its own specs imported it.

Delete the module and component, and rewrite docs/features/review.md to
document the /review command that actually ships instead of the staging
plan.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@will-lamerton will-lamerton mentioned this pull request Nov 11, 2026
chore(review): remove the unwired review foundation #2032
Merged
will-lamerton added a commit that referenced this pull request Nov 11, 2026
@will-lamerton @claude
chore(review): remove the unwired review foundation (#2032)
dfcea49
source/review/ (pinned review scopes, snapshots, activity store and the
ReviewActivity component) landed in #1768 as the first stage of a staged
review rewrite. The next stage that would have wired it into /review never
landed, so nothing outside its own specs imported it.

Delete the module and component, and rewrite docs/features/review.md to
document the /review command that actually ships instead of the staging
plan.

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
jay23606 added a commit to jay23606/nanocoder that referenced this pull request Nov 12, 2026
@jay23606 @cursoragent
feat(review): add pinned review scopes, snapshots, and activity track…
8e8821b
…ing (Nano-Collective#1768)

* feat(review): add pinned review foundation

* docs(review): define session trace follow-up

* test(review): isolate review Git fixtures from host config

* fix(review): identify credentialed HTTPS GitHub remotes

* fix(review): discover untracked files from the repository root

* fix(review): select recent commits along first-parent history

* fix(review): accept www GitHub remote hostnames

* test(review): isolate binary Git fixture from host configuration

* refactor(review): simplify worktree snapshots and remote review refs

* docs(review): name the next stage instead of a fork PR number

* test(review): skip the symlink snapshot test on Windows

* fix(review): report Git index copy failures instead of hiding them

* fix(review): leave secret-looking untracked files out of worktree snapshots

---------

Co-authored-by: Cursor Agent <[email protected]>
jay23606 added a commit to jay23606/nanocoder that referenced this pull request Nov 12, 2026
@jay23606 @claude
chore(review): remove the unwired review foundation (Nano-Collective#…
a9040e7
…2032)

source/review/ (pinned review scopes, snapshots, activity store and the
ReviewActivity component) landed in Nano-Collective#1768 as the first stage of a staged
review rewrite. The next stage that would have wired it into /review never
landed, so nothing outside its own specs imported it.

Delete the module and component, and rewrite docs/features/review.md to
document the /review command that actually ships instead of the staging
plan.

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This was referenced Nov 17, 2026
Agentic /review: ground findings against the codebase (tier 2) #1287
Closed
feat(review): restore the review foundation that grounded /review builds on #2297
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@will-lamerton will-lamerton Awaiting requested review from will-lamerton will-lamerton is a code owner
@akramcodez akramcodez Awaiting requested review from akramcodez akramcodez is a code owner
@addyCooks addyCooks Awaiting requested review from addyCooks addyCooks is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

area:docs Documentation area:tools Tool implementations and tool-calling area:tui Terminal UI

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@puri-adityakumar @addyCooks @akramcodez @cursoragent
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.