Repository navigation
feat(evals): add trusted fixture runner and execution traces (substrate only) #1909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
edelauna
wants to merge
11
commits into
main
Choose a base branch
from
feat/final-vscode-review-smoke
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
3d2f042
feat(ci): add recorded Solheim provider smoke test
edelauna 7484795
fix(smoke): keep startup timeouts in isolated controller
edelauna cd6244e
feat(evals): add trusted fixture runner and execution traces
edelauna d0af4a2
docs(evals): separate completion output from accepted completion in t…
edelauna 51dfc8f
fix(smoke): upload only validated smoke recordings
edelauna 7d26aac
test(evals): reject invalid completion_result variants before adapter…
edelauna 8050481
fix(smoke): stop the driver PID directly and publish only atomic finals
edelauna 4c73905
test(smoke): pass hung-driver paths as argv, not generated source
edelauna 8ef7b37
fix(ci): document smoke approval and test the main-only secret guard
edelauna 9dc5c7c
test(ci): replace smoke workflow source assertions with parsed YAML c…
edelauna 1ccf512
fix(smoke): address review on recorder, runner, and fixture policy
edelauna File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| name: Solheim provider smoke | ||
|
|
||
| # Project A: infrastructure validation only. No PR diff, review judgment, router, | ||
| # deterministic review rule, or GitHub posting. Only trusted main-branch code runs. | ||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: solheim-provider-smoke | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| smoke: | ||
| if: github.ref == 'refs/heads/main' | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 25 | ||
| # Retain the existing protected environment and secret names for compatibility. | ||
| # The environment requires reviewer approval, matching the deploy | ||
| # environment. The job guard above restricts runs to main, so the | ||
| # secret is released only for an approved main run. See | ||
| # scripts/solheim-smoke/README.md. | ||
| environment: final-vscode-review-smoke | ||
| steps: | ||
| - name: Checkout exact trusted main revision | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| ref: ${{ github.sha }} | ||
| persist-credentials: false | ||
|
|
||
| - name: Setup Node.js and pnpm | ||
| uses: ./.github/actions/setup-node-pnpm | ||
| with: | ||
| install-args: "--frozen-lockfile" | ||
|
|
||
| - name: Build trusted extension and webview | ||
| run: | | ||
| pnpm -w bundle | ||
| pnpm --filter @roo-code/vscode-webview build | ||
|
|
||
| - name: Install display dependencies | ||
| run: sudo apt-get update && sudo apt-get install -y xvfb ffmpeg libasound2t64 | ||
|
|
||
| - name: Run Solheim provider smoke | ||
| id: provider | ||
| timeout-minutes: 8 | ||
| env: | ||
| SOLHEIM_API_KEY: ${{ secrets.FINAL_SMOKE_OPENAI_API_KEY }} | ||
| SOLHEIM_SMOKE_OUT_DIR: ${{ runner.temp }}/solheim-provider-smoke | ||
| run: xvfb-run -a -s "-screen 0 1280x720x24 -nolisten tcp" bash scripts/solheim-smoke/record.sh | ||
|
|
||
| # The recorder publishes smoke.mp4 only through an atomic rename | ||
| # after a nonempty check and ffprobe validation, so the published | ||
| # final is the commit marker: present and nonempty means complete. | ||
| # There is no separate persisted status marker. | ||
| - name: Verify recording integrity | ||
| if: ${{ !cancelled() && (steps.provider.outcome == 'success' || steps.provider.outcome == 'failure') }} | ||
| env: | ||
| SOLHEIM_SMOKE_OUT_DIR: ${{ runner.temp }}/solheim-provider-smoke | ||
| run: | | ||
| test -s "$SOLHEIM_SMOKE_OUT_DIR/smoke.mp4" | ||
| echo "Recording published and nonempty: $SOLHEIM_SMOKE_OUT_DIR/smoke.mp4" | ||
|
|
||
| # Verdict and trace evidence must survive even when the recording | ||
| # is missing, so metadata and video are uploaded separately. | ||
| - name: Upload provider smoke verdict and trace | ||
| if: ${{ !cancelled() && (steps.provider.outcome == 'success' || steps.provider.outcome == 'failure') }} | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: solheim-provider-smoke-${{ github.sha }} | ||
| path: | | ||
| ${{ runner.temp }}/solheim-provider-smoke/verdict.json | ||
| ${{ runner.temp }}/solheim-provider-smoke/trace.json | ||
| if-no-files-found: error | ||
| retention-days: 7 | ||
|
|
||
| # Exact validated final path only; the recorder leaves no temporary | ||
| # file behind, so a failed upload here reports the missing recording. | ||
| - name: Upload provider smoke recording | ||
| if: ${{ !cancelled() && (steps.provider.outcome == 'success' || steps.provider.outcome == 'failure') }} | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: solheim-provider-smoke-recording-${{ github.sha }} | ||
| path: ${{ runner.temp }}/solheim-provider-smoke/smoke.mp4 | ||
| if-no-files-found: error | ||
| retention-days: 7 | ||
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| import assert from "node:assert/strict" | ||
| import { describe, it } from "node:test" | ||
| import { IpcMessageType, IpcOrigin, TaskCommandName, ipcMessageSchema } from "@roo-code/types" | ||
| import { IpcServer } from "../ipc-server.js" | ||
|
|
||
| function fixture() { | ||
| const logs: unknown[][] = [] | ||
| const commands: unknown[] = [] | ||
| const server = new IpcServer("/unused-test.sock", (...args) => logs.push(args)) | ||
| server.on(IpcMessageType.TaskCommand, (clientId, command) => commands.push({ clientId, command })) | ||
| return { logs, commands, receive: (data: unknown) => server["onMessage"](data) } | ||
| } | ||
| const key = "dummy-api-key-not-for-public-logging" | ||
| const command = (requestId: string) => ({ | ||
| type: IpcMessageType.TaskCommand, | ||
| origin: IpcOrigin.Client, | ||
| clientId: "client-1", | ||
| data: { | ||
| commandName: TaskCommandName.StartNewTask, | ||
| data: { requestId, text: "private prompt", configuration: { apiProvider: "openai", openAiApiKey: key } }, | ||
| }, | ||
| }) | ||
|
|
||
| describe("IPC rejection logging", () => { | ||
| it("rejects an invalid request ID without logging its key, prompt or schema issue values", () => { | ||
| const f = fixture() | ||
| f.receive(command(`invalid request containing ${key}`)) | ||
| assert.deepEqual(f.commands, []) | ||
| assert.equal(f.logs.length, 1) | ||
| assert.equal(f.logs[0]?.[0], "[server#onMessage] invalid payload") | ||
| assert.ok(!JSON.stringify(f.logs).includes(key)) | ||
| assert.ok(!JSON.stringify(f.logs).includes("private prompt")) | ||
| assert.ok(!JSON.stringify(f.logs).includes("invalid request containing")) | ||
| }) | ||
| it("does not log credential-shaped primitive input or dynamic issue paths", () => { | ||
| const f = fixture() | ||
| const valid = command("valid-id") | ||
| const malformedHeaders = { | ||
| ...valid, | ||
| data: { | ||
| ...valid.data, | ||
| data: { | ||
| ...valid.data.data, | ||
| configuration: { ...valid.data.data.configuration, openAiHeaders: { [key]: null } }, | ||
| }, | ||
| }, | ||
| } | ||
| const rejected = ipcMessageSchema.safeParse(malformedHeaders) | ||
| assert.ok(!rejected.success) | ||
| assert.ok(rejected.error.issues.some((issue) => issue.path.includes(key))) | ||
| for (const data of [key, null, { type: key }, malformedHeaders]) { | ||
| f.receive(data) | ||
| } | ||
| assert.equal(f.logs.length, 4) | ||
| assert.ok(!JSON.stringify(f.logs).includes(key)) | ||
| assert.deepEqual(f.commands, []) | ||
| }) | ||
| it("still dispatches a valid correlated command to its client without logging its settings", () => { | ||
| const f = fixture() | ||
| f.receive(command("valid-id")) | ||
| assert.equal(f.commands.length, 1) | ||
| assert.deepEqual(f.commands[0], { clientId: "client-1", command: command("valid-id").data }) | ||
| assert.deepEqual(f.logs, []) | ||
| }) | ||
| }) |
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we require main-only deployments and reviewer approval on this environment before it receives the provider secret?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah that was the plan - will update the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already set. The environment requires the Zoo-Code-Org/admins team to approve. It allows deployments from main only.