Skip to content

fix(chatgpt-review): upload context instead of pasting, in every mode - #659

Merged
BorisTyshkevich merged 1 commit into
mainfrom
chore/chatgpt-review-upload-context
Aug 9, 2026
Merged

fix(chatgpt-review): upload context instead of pasting, in every mode#659
BorisTyshkevich merged 1 commit into
mainfrom
chore/chatgpt-review-upload-context

Conversation

@BorisTyshkevich

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to PR #656/#657/#658. Generalizes #658's plan-author-only fix to
every chatgpt-review mode.

  • Every mode (pr/issue/plan/plan-author/local) now uploads its
    --question-file (the coordinator's delivery contract/context) as an
    attachment instead of pasting it into the composer.
    • Removes real, quantified duplication: every mode's prompt already tells
      ChatGPT to browse the live GitHub issue/PR, while separately pasting much
      of the same content again; and chatgpt-plan-author-loop.workflow.mjs
      regenerated a revision context file each pass by copying the ENTIRE prior
      contract and appending to it (confirmed 231 → 297 lines after one pass,
      all 231 original lines carried forward verbatim), growing conversation
      content unboundedly across passes.
  • browser.mjs's upload() now accepts one or more paths — ChatGPT's file
    input supports multiple attachments in one message (confirmed live via
    setInputFiles([...]), both files individually confirmed as chips).
    chatgpt-review.mjs uploads a mode's own primary artifact (plan file /
    local diff, when one exists) together with --question-file in one
    message, each renamed per-pass to avoid ChatGPT's own upload-UI
    collision-renaming.
  • plan-author revisions keep a small, genuinely-new --revision-note-file
    pasted alongside the always-uploaded, never-regenerated contract — a
    revision's findings are small and not duplicative, unlike the contract.
  • chatgpt-plan-author-loop.workflow.mjs's "Prepare" step no longer copies
    the full delivery contract into a growing file each pass; it writes only a
    small findings-only note, and every pass re-uploads the same unchanged
    original contextFile.
  • plan-review-loop.workflow.mjs and code-review-pass.workflow.mjs needed
    no changes — they already pass one stable --question-file per pass with
    no growing/copying logic, so they transparently benefit from the new
    upload-not-paste behavior.

Test plan

  • node --test skills/chatgpt-review/tests/*.test.mjs — 61/61 pass
  • node --test skills/ship/tests/*.test.mjs — 8/8 pass
  • Multi-file setInputFiles attach behavior confirmed live against the
    real ChatGPT UI in the prior investigation round (this PR's remaining
    changes are deterministic plumbing already covered by the unit suite)

🤖 Generated with Claude Code

https://claude.ai/code/session_01LwFPT465eDJqYcRa8HGNLz

Every chatgpt-review mode (pr/issue/plan/plan-author/local) now uploads its
--question-file as an attachment instead of pasting its full text into the
composer. This removes two real, quantified duplication problems observed on
#585/#630: (1) every mode's prompt already told ChatGPT to browse the live
GitHub issue/PR, while separately pasting much of the same content again;
(2) chatgpt-plan-author-loop.workflow.mjs regenerated a revision context file
each pass by copying the ENTIRE prior contract and appending to it (confirmed
231 lines -> 297 lines after one pass, all 231 original lines carried
forward verbatim), so conversation content grew unboundedly across passes.

ChatGPT's file input accepts multiple files in one message (confirmed live
via setInputFiles([...]) attaching two separately-confirmable chips), so
browser.mjs's upload() now normalizes to an array and loop-confirms each
file; chatgpt-review.mjs uploads the mode's own primary artifact (plan file /
local diff, when one exists) together with the --question-file context in
one message, each renamed per-pass to avoid ChatGPT's own upload-UI
collision-renaming. plan-author's revision passes keep a small, genuinely-new
--revision-note-file pasted alongside the always-uploaded, never-regenerated
contract, since a revision's findings are small and not duplicative the way
the contract was.

chatgpt-plan-author-loop.workflow.mjs's "Prepare" step no longer copies the
full delivery contract into a growing file each pass; it now writes only a
small findings-only note and the loop always re-uploads the same, unchanged
original contextFile via --question-file.

61/61 chatgpt-review unit tests and 8/8 ship workflow-contract tests pass.
@BorisTyshkevich
BorisTyshkevich merged commit 80a8537 into main Aug 9, 2026
8 checks passed
@BorisTyshkevich
BorisTyshkevich deleted the chore/chatgpt-review-upload-context branch August 9, 2026 16:01
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