fix(opencode): send conversation-scoped session headers - #3875
Draft
amitksingh1490 wants to merge 3 commits into
Draft
amitksingh1490 wants to merge 3 commits into
amitksingh1490 wants to merge 3 commits into
Conversation
Forward request-local session headers across OpenCode adapters and preserve the Go Responses endpoint. Add transport-level coverage for stable, isolated conversation IDs. Co-Authored-By: ForgeCode <noreply@forgecode.dev>
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Refs #3866.
x-opencode-sessionusing the existingContext.conversation_idfor OpenCode Go and Zen. Attach it only to the provider clone for the current chat request, never to saved/shared provider configuration. Repeated turns, retries with the same context, and resumed conversations retain their ID; unrelated conversations do not share one./v1/responses.Local verification
All Cargo commands use the debug/test profiles, with debug symbols and incremental compilation disabled to conserve disk, plus explicit local
PROTOC/OpenSSL paths.cargo test --locked -p forge_repo: 336 passed, 1 pre-existing ignored test.cargo clippy --locked -p forge_repo --all-targets -- -D warnings.cargo build --locked -p forge_main(debug).cargo insta test --accept --test-runner cargo-test -p forge_repo; no snapshot changes.rustfmt --checkandgit diff --check.forge --help, then safe noninteractive-pagainst a local HTTP/SSE fixture. Verified actual assistant output, captured nonempty session headers, same ID when resuming, and a different ID for a new conversation. Auxiliary title calls also carry nonempty session IDs. No user conversation was modified.Draft: outstanding verification
-pattempt exited 0 but printedProvider OpenCode Go is not available. Login again to configure it.There was no successful provider response; exit status alone is NOT considered a smoke-test pass. A valid subscribed OpenCode Go login is needed before this is ready for review.autofix.cisubsequently added commits2f0abbc38andfd64798ca: comment/doc reflow across 140 files, plus an equivalent boolean-return simplification and its formatting inforge_services/src/fd.rs. These automated changes were reviewed and preserved with their bot attribution; no OpenCode behavior was changed by them.fd64798ca(2026-09-16 03:35 UTC): Build and Test, Lint Fix, and Performance: zsh rprompt all passed. Release jobs are skipped as expected for the draft. After reviewing both autofix commits, localforge_repotests (336 passed, 1 ignored), debugforge_mainbuild, and the actual HTTP/SSE new/resume/new CLI smoke also passed again on this head. Only authenticated live OpenCode Go verification remains blocked; this is still a draft, not a live-provider compatibility claim.Co-Authored-By: ForgeCode noreply@forgecode.dev