From 951d713efec1aeea9f0df672a1c79fbb4de47ec0 Mon Sep 17 00:00:00 2001 From: pelikhan <4175913+pelikhan@users.noreply.github.com> Date: Tue, 24 Nov 2026 04:58:11 +0000 Subject: [PATCH 1/2] Initial plan From 00690b39cb058f6905ce0941121ed32995a34d39 Mon Sep 17 00:00:00 2001 From: pelikhan <4175913+pelikhan@users.noreply.github.com> Date: Tue, 24 Nov 2026 05:05:14 +0000 Subject: [PATCH 2/2] Apply remaining changes Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> --- .../daily-rig-decomposition-bench.lock.yml | 10 ++++++- .../daily-rig-decomposition-bench.md | 19 ++++++++++-- src/decomposition-bench-workflow.test.ts | 29 +++++++++++++++++++ 3 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 src/decomposition-bench-workflow.test.ts diff --git a/.github/workflows/daily-rig-decomposition-bench.lock.yml b/.github/workflows/daily-rig-decomposition-bench.lock.yml index 7c67c78..62bf621 100644 --- a/.github/workflows/daily-rig-decomposition-bench.lock.yml +++ b/.github/workflows/daily-rig-decomposition-bench.lock.yml @@ -1,4 +1,4 @@ -# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"c0939f0ad5ae5e8cba4f16695bb56366aca2f388ce2d1c49d99af42f49413afd","body_hash":"6304c8370967c6d3c1cbd51b93a744bbfdf6cb4f40c5635701fd6ccebe7ceec6","compiler_version":"v1.4.0","strict":true,"agent_id":"copilot","engine_versions":{"copilot":"1.0.113","copilot-sdk":"2.0.0"}} +# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"2c14664a2b7f8a2b604ea91377e521a083ecfe964b11d24edb7a5aab2e95b7af","body_hash":"07a50108d2d2ed0a9dc6cc686c5f060ed57368667202f00b06a7dee8fc55900c","compiler_version":"v1.4.0","strict":true,"agent_id":"copilot","engine_versions":{"copilot":"1.0.113","copilot-sdk":"2.0.0"}} # gh-aw-manifest: {"version":1,"secrets":["GH_AW_DEFAULT_OTLP_ENDPOINT","GH_AW_DEFAULT_OTLP_HEADERS","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"3d3c42e5aac5ba805825da76410c181273ba90b1","version":"v7.0.1"},{"repo":"actions/download-artifact","sha":"9000827ccba6bdab643e8b6fd33ac0654aef8333","version":"v8.0.2"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"949feb2413d6458794dcd2491c4babbbce0c15c1","version":"v7.1.0"},{"repo":"actions/upload-artifact","sha":"cf430e030ddbb5b0abf93d22962f4752f3646cd9","version":"v7.0.2"},{"repo":"github/gh-aw-actions/setup","sha":"b907753c079ddd7d6829a0d8c24e02e818b4b45f","version":"v1.4.0"}],"skills":["githubnext/rig/skills/rig@0cf43bec9424276137fc101983033039d4e0e592"],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.29.20@sha256:b9cd8d7d1a9c2693e5d91db035a678fb1ea8d87ce691e08ec091b327e5e8ba75"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.29.20@sha256:fc6c1eff686514d26ff90ae1398e0f6e3dcad8d2e43d11b16df312c1e72c0ace"},{"image":"ghcr.io/github/gh-aw-firewall/router:0.29.20@sha256:732c3741e866099c6c2095aad7c84a18266486563deb51d7cce723f9bfc48721"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.29.20@sha256:1c4a4a12fcea206a81d656cb1f73847420a2c041d02ab51235364079a1e31d71"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.5.14","digest":"sha256:716b41d53a20660e945c351c08140380430d65d98d3263596e45114c29fa7a43","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.5.14@sha256:716b41d53a20660e945c351c08140380430d65d98d3263596e45114c29fa7a43"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:a8082161d7dceda14b68f32eb39d0eaa96b825d07f5895b096afab9d9e0c7748","pinned_image":"ghcr.io/github/gh-aw-node@sha256:a8082161d7dceda14b68f32eb39d0eaa96b825d07f5895b096afab9d9e0c7748"},{"image":"ghcr.io/github/github-mcp-server:v2.2.0","digest":"sha256:040c4e99810076035eb1d9beb4b4a96fcf589c43cefed6ff51a46a553eb4e174","pinned_image":"ghcr.io/github/github-mcp-server:v2.2.0@sha256:040c4e99810076035eb1d9beb4b4a96fcf589c43cefed6ff51a46a553eb4e174"}],"mcp_servers":[{"name":"github","tools":["get_commit","get_file_contents","get_latest_release","get_me","get_pull_request","get_pull_request_comments","get_pull_request_diff","get_pull_request_files","get_pull_request_review_comments","get_pull_request_reviews","get_pull_request_status","get_release_by_tag","get_tag","issue_read","list_branches","list_commits","list_issue_types","list_issues","list_pull_requests","list_releases","list_starred_repositories","list_tags","pull_request_read","search_code","search_issues","search_pull_requests","search_repositories"]},{"name":"safeoutputs","tools":["create_issue","noop","report_incomplete","report_missing_data","report_missing_tool"]}],"threat_detection":{"mode":"enabled"},"admission":false,"agent_metadata":{"03cbf8931deff21d5116":{"name":"Agentic Workflows"}}} # This file was automatically generated by gh-aw (v1.4.0). DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md # @@ -645,6 +645,11 @@ jobs: evidence_tmp="/tmp/gh-aw/agent_execution.json.tmp" printf '{"version":1,"component":"agent","run_id":%s,"run_attempt":%s,"state":"not_started"}\n' "$GITHUB_RUN_ID" "$GITHUB_RUN_ATTEMPT" > "$evidence_tmp" mv "$evidence_tmp" "/tmp/gh-aw/agent_execution.json" + - name: Setup Node.js + uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version: '24' + package-manager-cache: false - name: Create gh-aw temp directory run: bash "${RUNNER_TEMP}/gh-aw/actions/create_gh_aw_tmp_dir.sh" - name: Configure gh CLI for GitHub Enterprise @@ -656,6 +661,9 @@ jobs: with: name: activation path: /tmp/gh-aw + - name: Install benchmark dependencies + run: npm install --prefix /tmp/gh-aw/.github/skills/rig --no-save --ignore-scripts --registry=https://registry.npmjs.org/ typescript@5.9.3 + - name: Install GitHub Copilot CLI run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.113 --checksums-sha256 854036b59b745d4f4b44a169327ffc0eab007f39e74b3dc3670f4d609a6c1072 --cooldown-days 0 env: diff --git a/.github/workflows/daily-rig-decomposition-bench.md b/.github/workflows/daily-rig-decomposition-bench.md index ff7d4f6..1816af7 100644 --- a/.github/workflows/daily-rig-decomposition-bench.md +++ b/.github/workflows/daily-rig-decomposition-bench.md @@ -30,6 +30,9 @@ timeout-minutes: 55 checkout: false skills: - githubnext/rig/skills/rig@0cf43bec9424276137fc101983033039d4e0e592 +steps: + - name: Install benchmark dependencies + run: npm install --prefix /tmp/gh-aw/.github/skills/rig --no-save --ignore-scripts --registry=https://registry.npmjs.org/ typescript@5.9.3 tools: bash: ["*"] network: @@ -48,8 +51,9 @@ Each run of this workflow is itself a test of the rig skill: **you** write the b program from the specification below, then run it, then report what happened. This workflow runs **without checking out the repository**. The `rig` skill is installed -directly from GitHub via the frontmatter `skills:` field only — nothing beyond that -install is prepared: the skill itself ships its own `package.json` (`"name": "rig"`, with +directly from GitHub via the frontmatter `skills:` field. The setup step installs its +dependencies and TypeScript before the agent firewall starts. The skill ships its own +`package.json` (`"name": "rig"`, with `exports` pointing at its own `rig.ts`/`globals.ts`) and `tsconfig.json`, so generated programs importing `from "rig"` resolve correctly both at typecheck time and at runtime as long as the rig CLI subprocess is run with its working directory set to the installed @@ -70,6 +74,9 @@ CLI, run from the skill directory so Node's package self-reference resolves the cd .github/skills/rig && cat /tmp/gh-aw/agent/bench.ts | node rig.ts --typecheck ``` +If typechecking fails, do not execute the benchmark. Report the exact typecheck error +and that no comparison was produced. + ### Hard requirements These exist because violating them has previously made this workflow exceed its job @@ -100,7 +107,13 @@ timeout. Treat them as non-negotiable: from run to run. It returns a title, a domain, a description, and 3-6 concrete, checkable success criteria. Import and add `repair()` to this task-picker agent with `maxTurns: 2`, so a malformed structured response gets one corrective retry instead of - terminating the benchmark with a null result. + terminating the benchmark with a null result. If it still returns `null`, use this + explicit fallback task and mark it as a fallback in the report: design a one-day + tabletop incident-response exercise for a fictional small online store hit by a + ransomware attack. The solution must provide (1) a timeline of at least five injects, + (2) roles and decisions for engineering, communications, and leadership, (3) a + recovery and customer-communication plan, and (4) measurable evaluation criteria. + The fallback is a task description, not a substitute for either solution or grading. 2. **Solve it in one call.** A `medium` agent limited to a single turn solves the whole task by itself, addressing every success criterion, with no delegation and no tools. diff --git a/src/decomposition-bench-workflow.test.ts b/src/decomposition-bench-workflow.test.ts new file mode 100644 index 0000000..58226e1 --- /dev/null +++ b/src/decomposition-bench-workflow.test.ts @@ -0,0 +1,29 @@ +import { readFileSync } from "node:fs"; +import { describe, expect, it } from "vitest"; + +const markdown = readFileSync(new URL("../.github/workflows/daily-rig-decomposition-bench.md", import.meta.url), "utf8"); +const lock = readFileSync(new URL("../.github/workflows/daily-rig-decomposition-bench.lock.yml", import.meta.url), "utf8"); + +describe("Daily Rig Decomposition Benchmark workflow", () => { + it("installs the pinned skill dependencies and compiler before restoring the skill and starting the agent", () => { + const command = "npm install --prefix /tmp/gh-aw/.github/skills/rig --no-save --ignore-scripts --registry=https://registry.npmjs.org/ typescript@5.9.3"; + expect(markdown).toContain(`run: ${command}`); + const download = lock.indexOf("name: Download activation artifact"); + const installation = lock.indexOf("name: Install benchmark dependencies"); + const restoration = lock.indexOf("name: Restore inline skills from activation artifact"); + const execution = lock.indexOf("name: Execute GitHub Copilot CLI"); + expect(download).toBeGreaterThan(-1); + expect(installation).toBeGreaterThan(download); + expect(restoration).toBeGreaterThan(installation); + expect(execution).toBeGreaterThan(restoration); + expect(lock.slice(installation, restoration)).toContain(`run: ${command}`); + expect(markdown).toContain("strict: true"); + expect(markdown).not.toMatch(/strict-ssl|NODE_TLS_REJECT_UNAUTHORIZED/); + }); + + it("does not run untypechecked programs and uses a clearly marked fallback task", () => { + expect(markdown).toContain("If typechecking fails, do not execute the benchmark."); + expect(markdown).toContain("mark it as a fallback in the report"); + expect(markdown).toContain("The fallback is a task description, not a substitute for either solution or grading."); + }); +});