Skip to content

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

Closed
mldangelo-oai wants to merge 33 commits into
mdangelo/codex/fix-scan-budget-attributionfrom
mdangelo/codex/fix-finding-excerpt-scope-clean
Closed

fix(workbench): bind finding excerpts to selected source paths#636
mldangelo-oai wants to merge 33 commits into
mdangelo/codex/fix-scan-budget-attributionfrom
mdangelo/codex/fix-finding-excerpt-scope-clean

Conversation

@mldangelo-oai

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

Copy link
Copy Markdown
Collaborator

Summary

Show finding excerpts only from the immutable source paths selected for that scan. Preserve the selection when results are reopened instead of deriving it from the current checkout.

Changes

  • Save source paths and kinds across all scan-start paths, and bind excerpts to their captured Git tree. Omit optional excerpts when the saved scope or filesystem spelling cannot be established.
  • Honor explicitly disabled Git replacement refs. Keep active replacement-view checks so raw excerpts cannot be mistaken for a different scanned view.
  • Make migration 33 reuse an existing source-scope column from fix(workbench): bind finding excerpts to selected source paths #488 without changing historical migration rows or saved scans.
  • Merge refreshed fix: exclude same-millisecond replayed usage from scan budgets #631 and current main, preserving the stack. Advance both bundled-plugin version markers to 0.1.79.
  • Replace the mock installer with real cache upgrades and consolidate duplicate test instrumentation. Remove two functions; the two fixes and regression coverage add 11 net lines.

Testing

  • Four affected suites, seed 636: 168 passed, 12 platform skips. Both disabled-replacement regressions failed before the fix and passed after it through real cache upgrades from 0.1.60, 0.1.74 and 0.1.78.

  • The existing-column migration regression failed before the fix; predecessor and existing-column cases now pass, including repeated application and preservation of migration history.

  • Types, generated models, formatting, build, Ruff, Python 3.10 grammar and migration-prefix verification passed.

  • Fresh 282-entry npm artifact check and full installed smoke passed, including 118 plugin files, public import, NodeNext consumer, CLI, credential locking and a nested Codex worker.

  • Adjacent committed-diff suites: 102 passed and one empty-output Git probe failed; its exact isolated retry passed. Full suite, native Windows and live model execution were not rerun. Current-head CI is left for a separate pass.

  • Final main refresh (fd98a90): package 0.1.21 includes the MCP launcher-permission fix; SDK implementation and bundled payload are unchanged. Types/model generation, formatting, build, 28 focused tests, static artifact verification and full installed-package smoke passed, including MCP initialization. CI was not awaited.

Risk and rollout

No public CLI change. Excerpts remain optional and fail closed when source authority cannot be established. Keep #631 as the base; this alternative source-scope implementation overlaps #488. Active replacement views are deliberately still omitted pending a matching-view contract. Existing review discussions remain open; no approval or PR merge is included.

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.

Historical commit contact metadata and restricted links in automated comments remain, so the second attestation is unchecked. This update uses synthetic fixtures and a GitHub noreply commit identity; other authors' comments are unchanged.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 24, 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-27T09:07:50.621944Z 6fa2a11 New commits
🔒 Security Review Completed 2026-08-25T06:00:45.077627Z 8baae67 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: 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".

Comment thread sdk/typescript/_bundled_plugin/scripts/workbench_source_excerpt.py Outdated

@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: 8ff61b6145

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

Comment thread sdk/typescript/_bundled_plugin/scripts/workbench_source_excerpt.py Outdated
Comment on lines +295 to +298
if process.stdout.read(1):
if process.poll() is None:
process.kill()
return False

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 Ignore replacement refs when replacements are disabled

When a repository contains any active replacement ref—even one for an unrelated historical object—this branch suppresses every source excerpt. All subsequent object reads already pass --no-replace-objects, which Git documents as disabling replacement refs, so the refs cannot alter the tree or blob being displayed; probing for their mere presence introduces an unnecessary output regression for repositories that legitimately use git replace.

AGENTS.md reference: AGENTS.md:L19-L22

Useful? React with 👍 / 👎.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 8ff61b6145

ℹ️ 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: 8ff61b6145

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

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex security review

@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: 03af8b7137

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

Comment thread sdk/typescript/_bundled_plugin/scripts/workbench_source_excerpt.py Outdated
Comment thread sdk/typescript/_bundled_plugin/scripts/deep_scan_workbench.py Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 03af8b7137

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

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 6fd4128627

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.

@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: 6fd4128627

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

Comment thread sdk/typescript/_bundled_plugin/scripts/workbench_source_excerpt.py
Comment thread sdk/typescript/_bundled_plugin/scripts/workbench_source_excerpt.py Outdated
Comment thread sdk/typescript/_bundled_plugin/scripts/workbench_source_excerpt.py
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 8baae67d58

ℹ️ 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: 8baae67d58

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.

@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: 89207b3ca4

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

Comment on lines +554 to +556
child = node.children.get(component)
if child is None:
return kinds if authorized else None

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 Match authorized scopes using filesystem identity

On a case-insensitive checkout, a valid selected scope can use different casing or Unicode composition from Git's canonical spelling (for example, selecting SRC when the tree and finding location use src/file.py). The scope is persisted with the requested spelling, but this exact children.get(component) lookup rejects the canonical finding path before tree matching, so otherwise valid findings silently lose their source excerpts on Windows and similar filesystems. Preserve or resolve the canonical tree spelling when building the scope index, or compare scope components using the checkout's filesystem identity.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant