Skip to content

compiler: render evals results as progressive disclosure details section in step summary - #45661

Merged
pelikhan merged 11 commits into
mainfrom
copilot/update-compiler-progressive-disclosure
Jul 15, 2026
Merged

compiler: render evals results as progressive disclosure details section in step summary#45661
pelikhan merged 11 commits into
mainfrom
copilot/update-compiler-progressive-disclosure

Conversation

CopilotAI commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

The evals job wrote BinEval results directly to the step summary as a flat heading+table during the parse phase — before secret redaction, and inconsistent with how other sections (token usage, AWF reflect, observability) are rendered.

Changes

  • render_evals_summary.cjs (new) — reads the redacted evals.jsonl and renders a <details> collapsible section via buildStepSummaryDetailsSection, matching the pattern of other summary sections. Shows ID/Question/Answer (✅/❌/❓), YES/NO/UNKNOWN tallies, and model name.

  • run_evals.cjs — removes inline addHeading/addTable from parseMain(); summary rendering is now delegated to the dedicated step that runs post-redaction.

  • evals_steps.go — adds buildRenderEvalsSummaryStep() and inserts it between the existing redact step and the upload step in buildEvalsJobSteps():

    Step 9: Redact secrets in evals results
    Step 10: Render evals results to step summary ← new
    Step 11: Upload evals results
    
  • evals_steps_test.go — adds TestBuildEvalsJobStepsRenderSummary verifying step presence, render_evals_summary.cjs reference, and redact→render→upload ordering.

- Create render_evals_summary.cjs: reads redacted evals.jsonl and renders
BinEval results as a <details> progressive disclosure section using
buildStepSummaryDetailsSection (same pattern as observability/AWF reflect)
- Update run_evals.cjs parseMain(): remove inline addHeading/addTable summary
writing; rendering is now handled by the dedicated render step that runs
after secret redaction so the published summary is always clean
- Add buildRenderEvalsSummaryStep() in evals_steps.go: generates the Actions
step that calls render_evals_summary.cjs with if: always() + continue-on-error
- Update buildEvalsJobSteps(): insert render step after redact (step 10) and
before upload (step 11)
- Add TestBuildEvalsJobStepsRenderSummary: verifies step presence and ordering
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
CopilotAI changed the title compiler: add render_evals_summary step to evals job for progressive disclosure step summarycompiler: render evals results as progressive disclosure details section in step summaryJul 15, 2026
CopilotAI requested a review from pelikhanJuly 15, 2026 06:58
@pelikhan
pelikhan marked this pull request as ready for review July 15, 2026 07:03
CopilotAI review requested due to automatic review settings July 15, 2026 07:03
@github-actions

Copy link
Copy Markdown
Contributor

🤖 PR Triage

FieldValue
Categoryfeature
Riskmedium
Score52/100 (impact:25, urgency:12, quality:15)
Actionbatch_review

Renders evals results as progressive disclosure in step summary. Draft PR, good description. Batch with similar compiler output PRs for review.

Generated by 🔧 PR Triage Agent · 143.8 AIC · ⌖ 7.64 AIC · ⊞ 5.6K ·

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Moves BinEval summary rendering to a dedicated post-redaction, collapsible step.

Changes:

  • Removes inline summary rendering from eval parsing.
  • Adds a progressive-disclosure renderer and compiler step.
  • Tests redact → render → upload ordering.
Show a summary per file
FileDescription
pkg/workflow/evals_steps.goAdds the summary-rendering step.
pkg/workflow/evals_steps_test.goTests step presence and ordering.
actions/setup/js/run_evals.cjsRemoves inline summary output.
actions/setup/js/render_evals_summary.cjsParses redacted results and renders the details section.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 4/4 changed files
  • Comments generated: 3
  • Review effort level: Medium

Comment threadpkg/workflow/evals_steps.go Outdated

steps := []string{
" - name: Render evals results to step summary\n",
" if: always()\n",
Comment on lines +86 to +88
const model = results[0]?.model;
if (model) {
lines.push(`**model**: ${escapeMarkdownCell(model)}`);
* @param {Array<{id: string, question: string, answer: string, model: string, timestamp: string}>} results
* @returns {string}
*/
function buildEvalsBody(results) {
@github-actions

github-actionsBot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel completed test quality analysis.

@github-actions

github-actionsBot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

@github-actions

github-actionsBot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Design Decision Gate 🏗️ completed the design decision gate check.

No ADR enforcement needed: PR #45661 does not have the 'implementation' label and has ≤100 new lines of code in business logic directories (78 additions).

@github-actions

github-actionsBot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

PR Code Quality Reviewer completed the code quality review.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

pr-sous-chef
@copilot please run the pr-finisher skill, address these unresolved review comments, and rerun checks once finished:

Run: https://github.com/github/gh-aw/actions/runs/29397228615

Generated by 👨‍🍳 PR Sous Chef · 13.6 AIC · ⌖ 6.54 AIC · ⊞ 5.1K ·
Comment /souschef to run again

@github-actions

Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

Test Quality Score: 100/100 — Excellent

Analyzed 2 test(s): 2 design, 0 implementation, 0 violation(s).

📊 Metrics (2 tests)
MetricValue
Analyzed2 (Go: 2, JS: 0)
✅ Design2 (100%)
⚠️ Implementation0 (0%)
Edge/error coverage2 (100%)
Duplicate clusters0
InflationNo (51 test lines / 28 prod lines ≈ 1.8:1)
🚨 Violations0

| Test | File | Classification | Issues |
|---|---|---|
| TestBuildEvalsEngineStepsArcDindTopology | pkg/workflow/evals_steps_test.go | design_test / behavioral_contract / high_value | None |
| TestBuildEvalsJobStepsRenderSummary | pkg/workflow/evals_steps_test.go | design_test / behavioral_contract / high_value | None |

Verdict

Passed. 0% implementation tests (threshold: 30%). Both tests enforce design invariants with edge/negative assertions and no violations.

Build tag//go:build !integration present ✅

References:§29396120473

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • awmgmcpg

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
allowed:
- defaults
- "awmgmcpg"

See Network Configuration for more information.

🧪 Test quality analysis by Test Quality Sentinel · 23.8 AIC · ⌖ 8.53 AIC · ⊞ 6.8K ·
Comment /review to run again

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Test Quality Sentinel: 100/100. 0% implementation tests (threshold: 30%).

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

The PR correctly moves step-summary rendering to after secret redaction and uses the existing buildStepSummaryDetailsSection pattern. Three issues are worth addressing:

  1. always() condition on render step (existing comment, line 343 evals_steps.go) — if redaction fails, the published summary could still contain secrets. Consider if: success() or check that the redact step succeeded.

  2. Model source ambiguity (existing comment, line 88 render_evals_summary.cjs) — results[0].model may reflect a different model than what actually ran the evals.

  3. No JS unit tests for render_evals_summary.cjs (existing comment, line 67) — the rendering logic (escaping, tallies, empty/malformed JSONL) has no test coverage.

Additional note:EVALS_OUTPUT_PATH is duplicated between run_evals.cjs (line 40) and render_evals_summary.cjs (line 20). Extract it to a shared constants module to prevent drift.

Overall the approach is sound; the always() + redaction-failure scenario is the most actionable concern.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · 14.5 AIC · ⌖ 4.35 AIC · ⊞ 5K

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skills-Based Review 🧠

Applied /codebase-design and /tdd — no blocking issues, but the existing Copilot comments plus one new finding are worth addressing before merge.

📋 Key Themes & Highlights

Key Themes

  • Duplicated constant: EVALS_OUTPUT_PATH is defined identically in both run_evals.cjs and the new render_evals_summary.cjs — extract to a shared module.
  • always() + continue-on-error: The render step runs even when redaction failed (see existing Copilot comment on evals_steps.go:343).
  • Missing JS tests: render_evals_summary.cjs has no unit tests for JSONL parsing or edge cases (see existing comment on line 67).
  • Model attribution ambiguity: results[0].model may not reflect the actual eval model (see existing comment on line 88).

Positive Highlights

  • ✅ Clean extraction into a dedicated post-redaction step.
  • escapeMarkdownCell protects table cells from pipe injection.
  • ✅ Test verifies redact → render → upload ordering.
  • ✅ PR description accurately describes every changed file.

@copilot please address the review comments above.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · 31.5 AIC · ⌖ 4.46 AIC · ⊞ 6.7K
Comment /matt to run again

const fs = require("fs");
const { buildStepSummaryDetailsSection } = require("./log_parser_step_summary_builder.cjs");

const EVALS_OUTPUT_PATH = "/tmp/gh-aw/evals.jsonl";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/codebase-design]EVALS_OUTPUT_PATH is duplicated — it is already defined in run_evals.cjs (line 40). Two sources of truth for the same path will drift.

💡 Suggestion

Extract the constant to a shared file (e.g. evals_constants.cjs) and require it from both modules:

// evals_constants.cjsmodule.exports={EVALS_OUTPUT_PATH: "/tmp/gh-aw/evals.jsonl"};

This way a path change only needs to happen in one place.

@copilot please address this.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review summary

Two low-to-medium issues found; none are blockers, but both are worth fixing before this ships.

Findings

Answer case normalisation (medium) — record.answer is coerced to a string but never uppercased/trimmed. A value like "yes" silently falls into the UNKNOWN bucket and the YES/NO tallies undercount. One-liner fix: add .toUpperCase().trim() at coercion time.

escapeMarkdownCell incomplete (low) — \r characters and backticks are not escaped, which can produce broken table rows or unintended code spans in the step summary.

Pre-existing comments (#3585200129, #3585200160, #3585200178) on the always() redaction-ordering risk, model label accuracy, and missing JS tests remain valid and are not duplicated here.

🔎 Code quality review by PR Code Quality Reviewer · 28 AIC · ⌖ 4.52 AIC · ⊞ 5.6K
Comment /review to run again

});
}
} catch {
// skip malformed lines

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Silent mis-tallying when answer is not uppercase: answers are coerced with String(record.answer ?? 'UNKNOWN') but never normalised, so "yes" or "Yes" will not match the === 'YES' checks, will render as ❓ UNKNOWN in the table, and will contribute nothing to yesCount.

💡 Suggested fix

Apply .toUpperCase().trim() at coercion time so that any capitalisation variant is counted correctly:

answer: String(record.answer??'UNKNOWN').toUpperCase().trim(),

The writer in run_evals.cjs always produces uppercase today, but normalising defensively here means the renderer is not silently broken if that ever changes or if the JSONL is produced by a different tool.

/**
* Main entry point: reads evals results and writes the step summary section.
* @returns {Promise<void>}
*/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

escapeMarkdownCell does not escape \r or backticks: carriage returns pass through unchanged, and backtick sequences in questions/IDs can produce unintended code spans in the rendered table.

💡 Suggested fix
functionescapeMarkdownCell(text){returntext.replace(/[\r\n]/g," ").replace(/\|/g,"\\|").replace(/`/g,"\\`");}

The original .replace(/\n/g, " ") leaves \r\n endings with a trailing \r, which some Markdown renderers treat inconsistently.

CopilotAIand others added 2 commits July 15, 2026 07:36
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

CopilotAI commented Jul 15, 2026

Copy link
Copy Markdown
ContributorAuthor

pr-sous-chef
@copilot please run the pr-finisher skill, address these unresolved review comments, and rerun checks once finished:

Addressed in 3f146f2.

The follow-up fixes now fail closed on eval redaction before rendering/upload, record the resolved execution model in eval results, add render_evals_summary.test.cjs, and keep the affected .lock.yml files in sync.

Local validation passed with make fmt, make lint, make test-unit, make test, make recompile, and make agent-report-progress. GitHub checks for this new HEAD still need a maintainer re-trigger, since agent pushes here do not start workflows.

uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot refactor JavaScript into file in actions/setup/js

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 722dd63 (refactor into actions/setup/js/redact_evals_results.cjs) with follow-up coverage in 7d69971.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

🤖 PR Triage

FieldValue
Categoryfeature
Risk🟡 Medium
Priority Score58/100
Recommended Action📋 batch_review

Score breakdown: Impact 30 + Urgency 13 + Quality 15

Rationale: Adds progressive disclosure rendering for evals results in step summaries — improves UX consistency with other summary sections. Adds new render_evals_summary.cjs with tests. CI status unknown; review against evals pipeline changes.

Generated by 🔧 PR Triage Agent · 35 AIC · ⌖ 7.73 AIC · ⊞ 5.6K ·

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
setupGlobals(core, github, context, exec, io, getOctokit);
const { main } = require('${{ runner.temp }}/gh-aw/actions/redact_evals_results.cjs');
await main();
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot check dangling }

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 0f8dbb6 by removing the stray } from the eval redaction step generator and recompiling the affected .lock.yml files.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

pr-sous-chef
@copilot please run the pr-finisher skill, address unresolved review comments, and rerun checks once finished.

Run: https://github.com/github/gh-aw/actions/runs/29420425558

Generated by 👨‍🍳 PR Sous Chef · 10.2 AIC · ⌖ 4.88 AIC · ⊞ 5.1K ·
Comment /souschef to run again

CopilotAI commented Jul 15, 2026

Copy link
Copy Markdown
ContributorAuthor

pr-sous-chef
@copilot please run the pr-finisher skill, address unresolved review comments, and rerun checks once finished.
...

Current HEAD 0f8dbb6 already contains the remaining review fixes from this PR series (722dd63, 7d69971, 0f8dbb6): shared evals constants, fail-closed redaction gating before render/upload, resolved eval execution model recording, and focused JS coverage for the renderer/redaction helper.

I rechecked the unresolved threads against the current files and reran local validation on this HEAD: make fmt, make lint, make test-unit, make test, make recompile, and make agent-report-progress all passed.

GitHub checks on the agent HEAD still need a maintainer re-trigger if you want fresh remote status, since agent pushes do not start workflows.

@pelikhan
pelikhan merged commit 0fb1d69 into mainJul 15, 2026
38 checks passed
@pelikhan
pelikhan deleted the copilot/update-compiler-progressive-disclosure branch July 15, 2026 14:16
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.82.10

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@gh-aw-bot@pelikhan