Skip to content

[ARV-5 validation fixture] No-citation copy bypass - DO NOT MERGE#188

Closed
saagpatel wants to merge 1 commit into
masterfrom
codex/test/arv-5-grounding-copy-bypass
Closed

[ARV-5 validation fixture] No-citation copy bypass - DO NOT MERGE#188
saagpatel wants to merge 1 commit into
masterfrom
codex/test/arv-5-grounding-copy-bypass

Conversation

@saagpatel

Copy link
Copy Markdown
Owner

What

Synthetic validation fixture for ARV-5. DO NOT MERGE.

This PR changes the response copy gate so sourcesCount=0 is treated as having citations.

Why

We are validating whether Codex PR auto-review catches support-workflow grounding drift in AssistSupport UI code.

How

Seeded bug:

  • src/components/Draft/useResponsePanelCopy.ts now allows an answer response to copy directly when there are zero KB sources/citations.
  • This bypasses the local copy-override modal and audit reason that normally protects ungrounded/no-citation drafts.

Expected Codex finding:

  • P1: a no-citation support draft can be copied as an answer without override/audit, misleading the operator about grounding and weakening the no-citation/no-claim contract.

Expected noise to avoid:

  • Do not comment on fixture process, formatting, naming, or broad UI verification unless it is directly merge-relevant to this one-line grounding/copy-gate regression.

Testing

Expected failing proof:

pnpm vitest run src/components/Draft/useResponsePanelCopy.test.ts -t "opens the copy override modal when there are no citations"

Observed failure:

  • showCopyOverride is false when the test expects true.

Risks

Synthetic PR only. Must be closed unmerged after recording Codex review behavior.

Performance impact

None expected; one boolean condition changed for validation only.

Lockfile rationale

No lockfile changes.

Screenshots

Not applicable; this is hook-level copy-gating behavior with an existing unit test proof.

@saagpatel

Copy link
Copy Markdown
Owner Author

@codex review

Validation fixture ARV-5. Please review for merge-relevant support-workflow grounding drift: no-citation answer drafts should not bypass the copy override/audit gate. This PR is synthetic and must not merge.

@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: b4418c7460

ℹ️ 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 (!response) return;
const mode = confidenceMode ?? "answer";
const hasCitations = sourcesCount > 0;
const hasCitations = sourcesCount >= 0;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Require citations before allowing direct copy

When an answer draft has sourcesCount === 0, sourcesCount >= 0 makes hasCitations true, so handleCopy writes the draft to the clipboard instead of opening the override modal. ResponsePanel passes sources.length into this hook, so a no-source/no-citation support answer now bypasses the required reason and auditResponseCopyOverride path, weakening the grounding audit gate for ungrounded drafts.

Useful? React with 👍 / 👎.

@saagpatel

Copy link
Copy Markdown
Owner Author

ARV-5 validation result: PASS.

Codex identified the intended merge-relevant issue: changing sourcesCount > 0 to sourcesCount >= 0 makes no-source/no-citation answer drafts bypass the copy override modal and auditResponseCopyOverride path.

Noise assessment: clean. The review produced one P1 inline comment on the intended line and did not add unrelated fixture/process/style comments.

Cleanup: closing this synthetic PR unmerged and deleting the fixture branch next.

@saagpatel saagpatel closed this Jul 4, 2026
@saagpatel saagpatel deleted the codex/test/arv-5-grounding-copy-bypass branch July 4, 2026 13:02
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