[ARV-5 validation fixture] No-citation copy bypass - DO NOT MERGE#188
[ARV-5 validation fixture] No-citation copy bypass - DO NOT MERGE#188saagpatel wants to merge 1 commit into
Conversation
|
@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. |
There was a problem hiding this comment.
💡 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; |
There was a problem hiding this comment.
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 👍 / 👎.
|
ARV-5 validation result: PASS. Codex identified the intended merge-relevant issue: changing 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. |
What
Synthetic validation fixture for ARV-5. DO NOT MERGE.
This PR changes the response copy gate so
sourcesCount=0is 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.tsnow allows ananswerresponse to copy directly when there are zero KB sources/citations.Expected Codex finding:
Expected noise to avoid:
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:
showCopyOverrideisfalsewhen the test expectstrue.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.