Skip to content

refactor: add review runtime fingerprints - #115

Merged
norvalbv merged 1 commit into
mainfrom
codex/review-stack-07-fingerprint
Jul 20, 2026
Merged

refactor: add review runtime fingerprints#115
norvalbv merged 1 commit into
mainfrom
codex/review-stack-07-fingerprint

Conversation

@norvalbv

@norvalbv norvalbv commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Review 07 of 20. This is one slice of the hardened replacement for #95. It is not a patch-equivalent split of #95; review only the diff shown in this PR.

What this PR does

Adds deterministic fingerprints for files and directories used by the private review runtime.

  • Hashes file contents plus Git-relevant executable identity.
  • Hashes directory trees in deterministic path order while validating symlinks.
  • Adds pin/verify support for copied manifests and runtime inputs.
  • Adds .devkit/review-runs/ to managed ignored output.
  • Adds focused fingerprint and gitignore tests.

Why this slice exists

Later slices copy snapshots, setup and reviewer assets into private directories. Fingerprints are the evidence that bytes did not change between capture, execution and verification.

Review carefully

  • Check directory ordering and filename encoding are deterministic.
  • Check executable-mode changes alter identity.
  • Check symlink handling cannot escape the intended source tree.
  • Check verification fails closed on missing or mutated inputs.

Explicit non-goals

  • This slice does not expose the public devkit review command.
  • It is not usable as the complete feature on its own.
  • It does not decide which inputs to capture or create a review run.

Stack position

These PRs currently target one another. Landing them individually requires retargeting/rebasing each successor after its predecessor lands; otherwise wait until the full stack has been reviewed and use an agreed stack-collapse strategy.

Size and validation evidence

  • GitHub diff: 5 files, +247/−2.
  • This branch was published through devkit ship; focused regression tests are included in the diff.
  • This description update changes GitHub metadata only—no code or branch bytes.

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@norvalbv, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 8 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3367bb06-6a96-4a4d-b733-fe26a8f3ebad

📥 Commits

Reviewing files that changed from the base of the PR and between e6011a3 and b2c77e5.

📒 Files selected for processing (5)
  • .gitignore
  • cli/__tests__/gitignore-cache.test.mts
  • cli/__tests__/review-runtime-fingerprint.test.mts
  • cli/lib/install/gitignore-cache.mts
  • cli/lib/ship/review/runtime-fingerprint.mts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/review-stack-07-fingerprint

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Stacked on #114.

Adds dormant foundations for freezing trusted review inputs before the public command is exposed:

- manages the durable `.devkit/review-runs/` output ignore through init/clean
- fingerprints file content and Git-relevant executable identity
- fingerprints directories deterministically while dereferencing symlinks
- rejects cyclic, dangling, and unsupported runtime paths
- verifies multiple expected/absent paths through a symlink-safe CLI entrypoint

Verification:
- focused cache/fingerprint tests (15/15)
- `bun run typecheck`
- `bun run lint` (two inherited warnings outside this diff)
- `bun run build`
- `node cli/index.mts doctor`
- Fallow introduced-debt scan clean
- dedicated correctness review PASS after fixing its symlink-entrypoint blocker
@norvalbv
norvalbv force-pushed the codex/review-stack-07-fingerprint branch from b698802 to b2c77e5 Compare July 20, 2026 11:34
@norvalbv
norvalbv merged commit e08b7e7 into main Jul 20, 2026
2 checks passed
norvalbv added a commit that referenced this pull request Jul 20, 2026
## Summary

- capture a target checkout's complete final Git tree without mutating its HEAD, refs, files, or real index
- preserve committed, staged, unstaged, deleted, binary, symlink, executable, force-staged ignored, and non-ignored untracked state
- fail closed on sparse/skip-worktree indexes, unstable files/indexes/ignore rules/projection candidates, producer failures, and signals
- reuse one NUL-safe projection candidate registry while preserving ship/reship behavior

## Stack

Depends on #115. The public `devkit review` command remains unreachable until the final stack slice.

## Validation

- 14 hermetic snapshot tests
- gate projection tests
- ship suite: 61/61
- reship regression suite
- full suite: 1,550 passed, 5 skipped
- typecheck, lint, build, doctor, shellcheck, and Fallow new-only gate
norvalbv added a commit that referenced this pull request Jul 22, 2026
norvalbv added a commit that referenced this pull request Jul 22, 2026
## Summary

- capture a target checkout's complete final Git tree without mutating its HEAD, refs, files, or real index
- preserve committed, staged, unstaged, deleted, binary, symlink, executable, force-staged ignored, and non-ignored untracked state
- fail closed on sparse/skip-worktree indexes, unstable files/indexes/ignore rules/projection candidates, producer failures, and signals
- reuse one NUL-safe projection candidate registry while preserving ship/reship behavior

## Stack

Depends on #115. The public `devkit review` command remains unreachable until the final stack slice.

## Validation

- 14 hermetic snapshot tests
- gate projection tests
- ship suite: 61/61
- reship regression suite
- full suite: 1,550 passed, 5 skipped
- typecheck, lint, build, doctor, shellcheck, and Fallow new-only gate
norvalbv added a commit that referenced this pull request Jul 24, 2026
norvalbv added a commit that referenced this pull request Jul 24, 2026
## Summary

- capture a target checkout's complete final Git tree without mutating its HEAD, refs, files, or real index
- preserve committed, staged, unstaged, deleted, binary, symlink, executable, force-staged ignored, and non-ignored untracked state
- fail closed on sparse/skip-worktree indexes, unstable files/indexes/ignore rules/projection candidates, producer failures, and signals
- reuse one NUL-safe projection candidate registry while preserving ship/reship behavior

## Stack

Depends on #115. The public `devkit review` command remains unreachable until the final stack slice.

## Validation

- 14 hermetic snapshot tests
- gate projection tests
- ship suite: 61/61
- reship regression suite
- full suite: 1,550 passed, 5 skipped
- typecheck, lint, build, doctor, shellcheck, and Fallow new-only gate
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