Repository navigation
fix(opencode): carry #781's prompt and cassette change with truthful Anthropic provenance (Refs #772) - #785
Merged
Conversation
… (Refs #772) This commit carries the eight files of PR #781 (head e1f0268, branch arena/7845744d-silvercode) on top of the current accepted tip 897e851, with exactly one correction: the Anthropic cassette's recapture timestamp. - review.txt: Review may not author tests or scripts, make production edits, fix the implementation, or take over Code/Work; the report contract is unchanged. - efficiency.txt (new) + llm/request.ts: the shared efficiency prompt is injected in LLMRequestPrep.prepare for every agent, provider and effort level, and each system-prompt part is canonicalized to LF before the `\n`-join, so a CRLF checkout cannot change request bytes (Windows fix). - ste-lite.test.ts: assembly regression across fast/medium/thorough, the CRLF control, and the Review text contract. - specs/agent-effort.md: documents efficient work at every level. - The three native cassettes' recorded requests are refreshed for the new instructions. Recorded responses are untouched. Provenance correction (this commit's only delta from e1f0268): native-anthropic-tool-loop.json had "requestBodiesRecapturedAt": "2026-05-19T01:40:12.788Z" which is byte-identical to that file's `recordedAt`. The Anthropic recapture instant is not established, so that value was not a measurement and is removed rather than guessed. `recordedAt` keeps the original recording date and `requestBodiesRecapturedFrom: "replayed-recorded-responses"` stays, so the file claims how the requests were reproduced but no date it cannot support. The OpenAI and Zen cassettes keep their own recapture timestamps. No request/response bytes, URLs, headers, methods or interaction counts change apart from the already-reviewed request refresh; the OpenAI Responses `instructions` echo inside the recorded response bodies stays exactly as recorded. No live or paid provider call was made. Co-authored-by: arena-agent <[email protected]>
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
agenteinstinct1-max
marked this pull request as ready for review
November 1, 2026 12:24
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (8 files)
Reviewed by free · Input: 71.3K · Output: 11.4K · Cached: 91.1K |
2 of 6 tasks
agenteinstinct1-max
added a commit
that referenced
this pull request
Nov 1, 2026
…ame (Refs #780) Co-authored-by: arena-agent <[email protected]>
This was referenced Nov 1, 2026
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.
Issue for this PR
Refs #772
#772stays open: this PR targetsdev-vibecoded, and GitHub only auto-closes issues from PRs merged into the repository default branch (dev). The reference is here to satisfy the linked-issue check inpr-standards.yml, not to close the issue.This is a normal replacement for #781 (
arena/7845744d-silvercode, heade1f0268f880e83cc2dbfb15f43330e8aaa623066). It carries #781's own eight files on top of the current accepted tip897e85177c03b0dfb8618e1f3cf09250a9cbebe6, with exactly one correction: a false provenance timestamp in the Anthropic cassette. I did not touch #781 and did not close it — its branch is not mine to push to, and nothing here retires it.3130a9a95db44d298b09f313758b9893acbbb67d— 3130a9aarena/688d6534-silvercode— https://github.com/mdev34-lab/silvercode/tree/arena/688d6534-silvercode897e85177c03b0dfb8618e1f3cf09250a9cbebe6One ordinary commit directly on
897e851(git rev-list --count 897e851..3130a9a= 1), pushed as a normal fast-forward to a new branch. No rebase, no force-push, no force-lease, no history rewrite, no seeded parents, no 2-dot revert.Type of change
What does this PR do?
One commit,
3130a9a, on top of897e851: #781's eight files, plus the removal of one metadata field that claimed a date nobody can support.The eight files are the change already technically reviewed in #781 (#776's change plus the Windows canonical-text fix and the cassette request refresh):
packages/opencode/src/session/prompt/efficiency.txt(new) — fast/quick/direct at every effort level; targeted searches then batched range reads; independent read/grep/glob calls in parallel, dependent calls sequential.packages/opencode/src/session/llm/request.ts— injects that block into the system prompt of every prepared request inLLMRequestPrep.prepare, and canonicalizes each system-prompt part to LF before the\n-join, so a CRLF checkout cannot change request bytes on any platform, provider, agent or effort level.packages/opencode/src/agent/prompt/review.txt— Review may not author tests or scripts, make production edits, fix the implementation, or take over Code/Work; existing non-destructive checks stay allowed; the Assessment/verdict envelope is unchanged.packages/opencode/test/session/ste-lite.test.ts— assembly regression across fast/medium/thorough, the CRLF control, and the Review text contract.specs/agent-effort.md— documents efficient work at every level.6–8. The three native cassettes' recorded requests refreshed for the new instructions.
The correction — the only delta from
e1f0268.native-anthropic-tool-loop.jsoncarried"recordedAt": "2026-05-19T01:40:12.788Z", - "requestBodiesRecapturedAt": "2026-05-19T01:40:12.788Z", "requestBodiesRecapturedFrom": "replayed-recorded-responses",The recapture value was byte-identical to that file's own
recordedAt, i.e. it was copied from the original recording date rather than measured. The actual instant at which the Anthropic request bodies were recaptured is not established, and I did not invent one. The field is removed instead of guessed;recordedAtkeeps the original recording date andrequestBodiesRecapturedFrom: "replayed-recorded-responses"stays, so the file still says how the requests were reproduced while claiming no date it cannot support. Cassette metadata isRecord<string, unknown>(packages/http-recorder/src/schema.ts), so the absence of that key is valid, and nothing reads it (grep -rn requestBodiesRecapturedfinds no reader).The OpenAI OAuth and Zen cassettes keep their own
requestBodiesRecapturedAtvalues (2026-11-01T06:25:38.547Z,2026-11-01T06:25:39.242Z) exactly as #781 recorded them. I did not re-measure those and make no claim about them beyond "unchanged from the branch under review".git diff e1f0268 3130a9ais that one deleted line and nothing else.What is preserved, byte for byte
Mechanically checked against
897e851for all three cassettes (a script compared parsed JSON, not textual diffs):get_weather, "Paris is sunny"), the encrypted reasoning blobs and the recorded function-call arguments are untouched.897e851text, and no non-system request field changed.\rbyte in any of the three files.requestBodiesRecapturedFrom(Anthropic) andrequestBodiesRecapturedAt+requestBodiesRecapturedFrom(OpenAI, Zen);recordedAtis unchanged everywhere and no pre-existing key changed.Deliberately unchanged historical evidence: the OpenAI Responses stream echoes
instructionsinside its recorded response objects, so that echo still shows the old prompt while the adjacent recorded request carries the new one. Rewriting it would fabricate provider output, so it stays exactly as originally recorded — it is recorded evidence about the old prompt, not a claim that a provider saw the new one.Honest limits
RECORD=truerun. The requests were reproduced by the real recorder path over replayed recorded response bytes, as in fix(opencode): clarify review and efficient tool use, canonical request text for Windows (Refs #772) #781.session/native-openai-tool-loophas never existed in the repo, so the "OpenAI API key" scenario still skips rather than exercising the API-key path.dev-vibecodedfailures remain of unproven cause. This PR claims no isolation, no waiver and no exoneration for them, and it makes no causal claim about them.e1f0268and are re-stated below only as history, not as an approval of3130a9a.How did you verify your code works?
Linux sandbox, 2 vCPU / 3.9 GB RAM, Bun 1.3.14 installed outside the repo from the pinned npm binary,
bun install --frozen-lockfile --ignore-scripts.bun test test/session/llm-native-recorded.test.ts: 3 pass, 1 skip, 0 fail, 24 assertions (OpenAI OAuth, OpenCode proxy, Anthropic API key pass; the never-recorded OpenAI API-key scenario skips).bun test test/session/ste-lite.test.ts: 9 pass, 0 fail, 64 assertions, includingrequest includes efficiency guidance for every effort with provider and Review prompts,request text stays canonical LF when prompt sources use CRLF line endings, andReview preserves its report contract and evaluates without taking over.bun test --timeout 30000inpackages/opencode: 4933 pass, 25 skip, 1 todo, 0 fail across 342 files, 50 snapshots, 21338 assertions, 1436 s. Pass/skip/todo/fail counts match the qualifier'se1f0268run; the expectation counter reads 21338 here against 21340 there and I did not chase that two-count difference. No test, assertion or timeout was weakened and no new skip was added.tsc --noEmit -p packages/opencode/tsconfig.jsonwithNODE_OPTIONS=--max-old-space-size=3072: exit 0, empty output (the exit code was captured directly, not through a pipe).FIDELITY OKfor all three files, including every response object deep-equal and the Anthropic metadata delta reduced torequestBodiesRecapturedFrom.prettier --checkclean on the changed JSON/TS/spec files (the two.txtprompts have no parser, which is expected);git diff --checkclean;git statusclean apart from the commit itself.CI on this head
3130a9a95db44d298b09f313758b9893acbbb67d— runs 41297710105, 41297710074, 41297710088:unit (linux)— pass, 22m 1sunit (windows)— pass, 41m 50s (the platform the canonical-LF fix exists for)typecheck— pass, 1m 59scheck-standards,check-compliance,add-contributor-label— passThat is CI for this exact head; nothing above is inferred from #781's green run.
Review trail (history, not an approval of this head)
01a19635-4f98-780e-b202-0fc42988b459one1f0268: CRLF controls and cassette fidelity, native 3 pass / 1 skip,bun test test/session867 pass / 8 skip / 1 todo — APPROVE.01a1966c-93e0-75c7-b45c-bb67bda0eadbone1f0268: fresh sequential full run 4933 pass / 25 skip / 1 todo / 0 fail in 1168 s — its sole remaining block was the provenance line this PR removes.Screenshots / recordings
Not a UI change, and no provider was contacted.
Checklist