fix(workbench): bind finding excerpts to selected source paths - #636
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 566f5c4de7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| decoded_name = read_field(0, name_bytes_limit).decode( | ||
| sys.getfilesystemencoding(), errors="surrogateescape" |
There was a problem hiding this comment.
Stop applying checkout name limits to Git tree entries
When a commit/range scan's selected tree contains any sibling entry longer than the current filesystem's PC_NAME_MAX, read_field raises while resolving an otherwise ordinary finding path, so the exception is caught and source excerpts through that directory silently disappear. Git accepts such immutable tree objects even when the checkout filesystem cannot represent their names; stream or skip unrelated names instead of imposing the checkout limit on the tree data.
AGENTS.md reference: sdk/typescript/AGENTS.md:L22-L24
Useful? React with 👍 / 👎.
Summary
Bind optional finding source excerpts to the source paths and exact Git tree selected when a scan starts. Ambiguous normalized paths, linked source ancestry, and replacement-object views now fail closed by omitting the excerpt.
Changes
GIT_REPLACE_REF_BASEwith a bounded one-ref probe, including custom and raw-prefix bases, while retaining fail-closed behavior for malformed bases and Git errors.0.1.27to0.1.28so installed caches receive the updated scripts.Testing
umask 022, system/tmp, and task-scoped caches: 1,785 passed, 28 skipped, 0 failed, 23,582 expectations across 1,813 tests in 94 files.corepack pnpm run generate:models:checkcorepack pnpm exec tsc --noEmitcorepack pnpm run formatgit diff --checkcorepack pnpm run buildcorepack pnpm packcorepack pnpm run check:package -- openai-codex-security-0.1.18.tgz: validated 265 entries, public import, NodeNext types, CLI, 113 bundled plugin files, bundled Codex, and a nested worker without global Codex. Tarball SHA-256:de9b7d2d213114110823cd0aac048ff0a19e3042885ba016df23faf8b1f882d1.Risk and rollout
The migration only adds nullable metadata. Existing scans continue to work and omit the optional excerpt when authority is absent. Replacement-ref inspection is fail closed, so malformed or unsupported Git state can suppress an optional excerpt but cannot change scan results. The bundled plugin version change refreshes installed caches; no separate rollout step is required.
Public disclosure review