-
Notifications
You must be signed in to change notification settings - Fork 14
test: PPT quality eval baseline with svg-pptx route and machine gates (#1273) #1490
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
daef159
test: add office route eval baseline
Astro-Han 6fcfa63
test: add ppt quality eval baseline
Astro-Han 0037885
test: add svg-pptx eval route from vendored ppt-master converter
Astro-Han d3c433e
fix: keep ppt eval prompt out of array-typed --file flag
Astro-Han 95cdd11
test: gate svg-pptx text overflow before conversion
Astro-Han 7e1c8e7
docs: record deepseek flash 2-round ppt eval matrix results
Astro-Han a92e516
fix: judge zip reader dropped binary entries so media checks always f…
Astro-Han d92ab15
test: add pptx package asset gate to native route skills
Astro-Han 1015a88
test: gate artifact-summary presence and make package check the final…
Astro-Han 88a31f8
fix: decode xml ampersand entity last to avoid double-unescaping
Astro-Han 920e037
Merge branch 'dev' into codex/i1273-office-eval-baseline
Astro-Han 6bc96b6
chore: default eval model to deepseek flash per weak-model policy
Astro-Han 95f30f4
fix: apply review findings from codex and glm second opinions
Astro-Han 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,9 @@ target | |
| .scripts | ||
| .direnv/ | ||
|
|
||
| __pycache__/ | ||
| *.pyc | ||
|
|
||
| # Local dev files | ||
| opencode-dev | ||
| UPCOMING_CHANGELOG.md | ||
|
|
||
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,55 @@ | ||
| # Office Route Eval Baseline | ||
|
|
||
| Local baseline for issue #1273. It compares the current OfficeCLI route with a | ||
| Python + uv + skills route across three real office tasks: | ||
|
|
||
| - `xlsx-dashboard`: CSV to Excel dashboard. | ||
| - `docx-board-memo`: notes to Word board memo. | ||
| - `pptx-pitch-deck`: brief to pitch deck. | ||
|
|
||
| The judge never uses LibreOffice. It inspects OOXML zip contents, the raw | ||
| opencode JSON event stream, command audit logs, artifact hashes, and route | ||
| metadata. | ||
|
|
||
| ## Routes | ||
|
|
||
| `officecli` means the current PawWork OfficeCLI skill route. The route must call | ||
| `officecli` for the delivered Office artifact. Lightweight preprocessing is | ||
| allowed only when it does not create the final `.xlsx`, `.docx`, or `.pptx` | ||
| through Python Office libraries. | ||
|
|
||
| `python` means Python + uv + local route skill. It must call `uv` and must not | ||
| call `officecli`. | ||
|
|
||
| Both routes fail if they call `libreoffice`, `soffice`, `lowriter`, `localc`, or | ||
| `loffice`. | ||
|
|
||
| ## Run | ||
|
|
||
| From `packages/opencode`: | ||
|
|
||
| ```bash | ||
| bun run office:eval calibrate --model openai/gpt-5.4-mini --variant low | ||
| bun run office:eval full --model openai/gpt-5.4-mini --variant low --rounds 3 | ||
| bun run office:eval report | ||
| ``` | ||
|
|
||
| `calibrate` runs `3 tasks x 2 routes x 1 round`. `full` runs all tasks and both | ||
| routes for the requested rounds. Output lands in `script/office-route-eval/runs/` | ||
| and is ignored by git. | ||
|
|
||
| Each run contains: | ||
|
|
||
| - `prompt.md` | ||
| - `events.jsonl` | ||
| - `stderr.log` | ||
| - `run-summary.json` | ||
| - `judge.json` | ||
| - `artifacts/` | ||
|
|
||
| ## Replacement Bar | ||
|
|
||
| This eval pack is enough to open a formal replacement PR only if the Python | ||
| route passes all three task families in at least two of three rounds, has zero | ||
| route-policy failures, and does not need more repair steps than the OfficeCLI | ||
| route on the same tasks. | ||
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,46 @@ | ||
| import { describe, expect, test } from "bun:test" | ||
|
|
||
| import { commandPolicyFailures, extractCommandsFromJsonl } from "./eval" | ||
|
|
||
| describe("office route eval harness", () => { | ||
| test("extracts shell commands from opencode json events", () => { | ||
| const jsonl = [ | ||
| JSON.stringify({ | ||
| type: "tool_use", | ||
| part: { | ||
| tool: "bash", | ||
| state: { | ||
| status: "completed", | ||
| input: { command: "officecli create artifacts/out.xlsx", description: "create workbook" }, | ||
| }, | ||
| }, | ||
| }), | ||
| JSON.stringify({ type: "text", part: { text: "done" } }), | ||
| ].join("\n") | ||
|
|
||
| const audit = extractCommandsFromJsonl(jsonl) | ||
| expect(audit.commands).toEqual([ | ||
| { | ||
| tool: "bash", | ||
| command: "officecli create artifacts/out.xlsx", | ||
| description: "create workbook", | ||
| status: "completed", | ||
| }, | ||
| ]) | ||
| expect(audit.eventCounts.tool_use).toBe(1) | ||
| }) | ||
|
|
||
| test("enforces python route tool boundary", () => { | ||
| expect(commandPolicyFailures("python", [{ tool: "bash", command: "uv run python build.py" }])).toEqual([]) | ||
| expect(commandPolicyFailures("python", [{ tool: "bash", command: "officecli create out.xlsx" }])).toContain( | ||
| "Python route did not call uv.", | ||
| ) | ||
| }) | ||
|
|
||
| test("enforces officecli route tool boundary", () => { | ||
| expect(commandPolicyFailures("officecli", [{ tool: "bash", command: "officecli create out.docx" }])).toEqual([]) | ||
| expect(commandPolicyFailures("officecli", [{ tool: "bash", command: "uv run python build.py" }])).toContain( | ||
| "OfficeCLI route did not call officecli.", | ||
| ) | ||
| }) | ||
| }) |
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.
Uh oh!
There was an error while loading. Please reload this page.