Skip to content

fix(workbench): bind finding excerpts to selected source paths - #488

Draft
mldangelo-oai wants to merge 16 commits into
mainfrom
mdangelo/codex/finding-excerpt-scope-v8-20260816
Draft

fix(workbench): bind finding excerpts to selected source paths#488
mldangelo-oai wants to merge 16 commits into
mainfrom
mdangelo/codex/finding-excerpt-scope-v8-20260816

Conversation

@mldangelo-oai

@mldangelo-oai mldangelo-oai commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Bind optional finding source excerpts to the exact Git objects and requested paths recorded when a scan starts. If the scanned bytes are not available as immutable objects, omit the excerpt and keep the finding.

Changes

  • Save nullable source-scope metadata with each new scan through migration 34.
  • Validate paths and filesystem aliases before reading tree and blob objects without network access.
  • Keep exact, unambiguous historical scopes readable while rejecting replacement-ref ambiguity, unsafe aliases, missing objects, and paths outside the selected scope.
  • Omit excerpts for working-tree diff scans instead of showing stale committed HEAD content.
  • Give the merged bundled plugin version 0.1.36 and verify a cached 0.1.25 bundle refreshes without losing stored credentials.
  • Include the shared source-scope helper in the packaged plugin.

Testing

Checks on cad99e064009a02ce28acb452fdc28bc021da31b:

  • pnpm run types, pnpm run format, pnpm run build, Ruff, and git diff --check: passed.
  • Focused source-scope regression: 22 passed, 0 failed. This covers file and directory scopes, aliases and collisions, linked worktrees, replacement refs, unsafe paths, every scan-start path, migration 34, working-tree omission, and a committed-range control.
  • Full seeded Bun suite (--seed 488): 1,597 passed, 30 platform-specific skips, 0 failed across 88 files.
  • pnpm pack and the installed-package checker: passed. The tarball contains 256 entries and the smoke test verified the public import, NodeNext types, CLI, 112 bundled plugin files, bundled Codex, and a nested worker without a global Codex executable.
  • Final Deslop review: no remaining actionable simplification, correctness, or security findings.

Native Windows end-to-end behavior remains delegated to CI. Hosted checks were not awaited before moving to the next PR.

Risk and rollout

Migration 34 adds a nullable column and does not rewrite existing scan records. Source excerpts remain optional, and an omitted excerpt does not remove the finding. The bundle identity change refreshes cached preview contents but does not publish a package or deploy anything.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

Existing automated review comments contain requester-only report references. They are not reproduced here, and the second attestation remains unchecked because those comments are already part of the public PR history.

@github-actions github-actions Bot added the bug Something isn't working label Aug 16, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: e2e177ba65

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: e2e177ba65

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review commit 90df0d476b7705a699256ef42078d5ec52073464.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 90df0d476b

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 90df0d476b

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review commit ed885606373b565c88a1b87b2649aa140ba1e758.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: ed88560637

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: ed88560637

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current head, d526d485ccde456e253a6ce60b5ba702121c8f73, after the additive main merge. Please check that the saved source-scope and migration 34 contracts remain intact.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: d526d485cc

ℹ️ 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".

Copy link
Copy Markdown
Collaborator Author

@codex security review

Please review the current head d526d485ccde456e253a6ce60b5ba702121c8f73.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: d526d485cc

ℹ️ 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".

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review exact head cad99e064009a02ce28acb452fdc28bc021da31b, especially source-scope capture and loading, alias and replacement-ref handling, working-tree diff omission, migration 34, and the 0.1.25 to 0.1.36 cache refresh.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex security review

Please review exact head cad99e064009a02ce28acb452fdc28bc021da31b, especially whether optional excerpts remain bound to selected immutable Git objects across aliases, historical rows, replacement refs, missing objects, and working-tree diffs.

@mldangelo-oai mldangelo-oai changed the title fix(workbench): keep finding source excerpts within requested paths fix(workbench): bind finding excerpts to selected source paths Aug 22, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-22T04:07:13.944142Z cad99e0 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cad99e0640

ℹ️ 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".

if scope["kind"] == "file":
return scope["objectId"] if not suffix else None
relative = PurePosixPath(*suffix).as_posix()
entry = exact_tree_path(repository, scope["objectId"], relative)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject ambiguous descendant aliases before reading blobs

On a case-insensitive checkout, when a selected directory contains colliding Git entries such as foo.py and FOO.py, this exact lookup trusts whichever spelling the finding reports before attempting the filesystem-backed ambiguity check. Because the working tree can expose only one of those entries, the spelling does not establish which blob was scanned, so sourceExcerpt can display the sibling blob instead; route normalized collisions through the witness check or omit the excerpt.

AGENTS.md reference: sdk/typescript/AGENTS.md:L27-L27

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant