GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — feat(compaction): clearer summary prompt structure for smaller models by sepo-eng · Pull Request #58 · Draugur-AI/opencode ConversationIssue for this PRCloses # Type of change
What does this PR do?Hand-merged from Conflict 1 — TKT-379. The compaction summary prompt must not hide that context was compacted: TKT-379 (diary 2610) measured that hiding it drops Conflict 2 — our fork's What I took, and what I didn'tTaken — the actual "clearer to smaller models" improvement:
Not taken, deliberately:
Not touched at all, flagged to feedback instead (anomalyco#227): How did you verify your code works?EXPECTATION: the new prompt structure wraps conversation content in EXPECTATION: the compaction prompt still requires the compaction marker to stay visible — i.e., we did NOT take upstream's opposite instruction. EXPECTATION: the tag rename doesn't silently break the second, buildPrompt-sharing compaction pipeline. EXPECTATION: nothing else in the compaction/anchor/history-search area regressed. EXPECTATION: typecheck clean. Screenshots / recordingsNot applicable — prompt/text-only change, no UI. Checklist
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsHand-merged from anomalyco/opencode@dab2637217 ("fix(compaction): adjust instructions and structure to be more clear to smaller models like dsv4 flash", anomalyco#42045). Their patch didn't cherry-pick cleanly -- it conflicts with TKT-379 (the compaction summary must NOT hide that context was compacted; hiding it measurably drops history_search's call rate from 100% to 20%) and with our own splitPrefix/splitSuffix/ retainedCount extension to select(). Reapplied by hand, taking the genuinely good parts and explicitly not the rest: TAKEN: - New SUMMARY_UPDATE_INSTRUCTIONS block: explicit guidance for combining a <prior-summary> with new <conversation> content (carry forward objectives/constraints/decisions, conversation wins on conflict, move Active->Completed, update Objective/Next Move). - buildPrompt() restructured to wrap the actual conversation content in explicit <conversation> tags up front, before the instructions, instead of spreading context items loose at the end of the prompt array. This is the actual "clearer to smaller models" improvement. - Tag renamed <previous-summary> -> <prior-summary> to match. Fixed every place that tag name is asserted or referenced, including in the SECOND compaction pipeline (packages/opencode/src/session/ compaction.ts) that turns out to share this same buildPrompt() -- and its own agent system prompt (packages/core/src/plugin/agent.ts PROMPT_COMPACTION / packages/opencode/src/agent/prompt/ compaction.txt), which told the model to look for the old tag name. NOT TAKEN, deliberately (Sean: "don't take their side"): - Upstream's version of this same instruction says "Do not mention the summary process or that context was compacted" -- the exact opposite of TKT-379's fix. Kept our version unchanged. Added a test pinning this so a future upstream sync can't silently reintroduce it via a cleaner-looking cherry-pick. - Upstream's select() also drops splitPrefix/splitSuffix (character- level splitting of a message straddling the retention boundary) in favor of whole-message-only slicing. Our fork extended that same logic with retainedCount (feeds SessionEvent.Compaction.Ended.retainedTailMessages) -- left entirely untouched. NOT TOUCHED, flagged to feedback instead (anomalyco#227): PROMPT_COMPACTION's own "do not mention... compacting" sentence (a second, separate instance of the same class of bug TKT-379 fixed) and the packages/core/src/v1/config/config.ts tail_turns docstring clarity change -- both belong to the second compaction pipeline, whose liveness relative to the first is TKT-377's still-open question, not something to resolve as a side effect of this hand-merge. Co-Authored-By: Claude <[email protected]> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pull request overviewCopilot reviewed 6 out of 6 changed files in this pull request and generated no new comments. Suppressed comments (2)packages/opencode/test/session/compaction.test.ts:1491
packages/core/src/session/compaction.ts:266
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reviewers
Copilot code review
Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Uh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |