This repository was archived by the owner on Oct 23, 2026. It is now read-only.
Repository navigation
refactor(init): simplify V2 file reads - #1450
Merged
Merged
Conversation
Give deterministic workflow reads a larger bounded path and byte profile while keeping normal agent reads compact. This lets plan, recovery, and verification consume complete large files without weakening the shared sandbox.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
betegon
marked this pull request as ready for review
August 21, 2026 17:42
5 tasks
This branch was successfully deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
read-files now has one exact V2 contract:
The reader scans large prefixes incrementally without retaining them, keeps only the bounded result page, handles short reads and UTF-8 boundaries, and returns complete lines with explicit truncation.
Path handling is shared with startup pre-reads and rejects absolute paths, traversal, aliases, invalid portable path forms, duplicate canonical paths, unsafe symlinks, non-regular files, and TOCTOU changes. Tool cwd is resolved against the immutable selected root before every local operation, closing symlink-based cwd escapes.
This is the paired CLI rollout for getsentry/cli-init-api#244.
Rollout
Release this change as CLI 0.43.0 and verify that sentry cli upgrade serves it before deploying the strict API. The API accepts init protocol v1 only, requires CLI 0.43.0+, uses read-files V2 only, and gives older clients an explicit upgrade instruction.
Test plan