Multi-tier framework for evaluating AI agent skills and plugins with quality gates, security scanning, harness compatibility checks, semantic overlap detection, synthetic evaluation dataset generation, and live agent evaluation that measures how skills affect agent behavior. Ships reusable CI templates that bring every check to any repository.
Python agent-evaluationagent-pluginsagent-securityagent-skillsagentic-aibenchmarkci-templatesclaude-codecodexevaluateevaluationharnesspluginplugin-evaluationsecurity-scannerskill-evalskill-evaluationskill-evaluatorskill-gap-analysisskills
Restore native NVIDIA report presentation and reduce clutter (#560)
Narendran Raghavan186134b13a37
diff --git a/.github/workflows/report-browser.yml b/.github/workflows/report-browser.ymlnew file mode 100644index 00000000..e14c163b--- /dev/null+++ b/.github/workflows/report-browser.yml@@ -0,0 +1,75 @@+name: HTML report browser checks++on:+ pull_request:+ paths:+ - "src/skillevaluator/reporting/**"+ - "src/skillevaluator/evaluation/tier3_report.py"+ - "tests/reporting/**"+ - "pyproject.toml"+ - "uv.lock"+ - ".github/workflows/report-browser.yml"+ push:+ branches: [main]+ paths:+ - "src/skillevaluator/reporting/**"+ - "src/skillevaluator/evaluation/tier3_report.py"+ - "tests/reporting/**"+ - "pyproject.toml"+ - "uv.lock"+ - ".github/workflows/report-browser.yml"++permissions:+ contents: read++concurrency:+ group: report-browser-${{ github.event.pull_request.number || github.run_id }}+ cancel-in-progress: true++jobs:+ chromium:+ name: Offline report behavior from installed wheel+ runs-on: ubuntu-latest+ timeout-minutes: 15+ steps:+ - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0+ with:+ persist-credentials: false+ - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0+ with:+ python-version: "3.12"+ - uses: astral-sh/setup-uv@d31148d669074a8d0a63714ba94f3201e7020bc3 # v8.3.0+ with:+ version: "0.11.27"+ - name: Build and install the public wheel+ shell: bash+ run: |+ set -euo pipefail+ uv sync --extra dev --locked --python 3.12+ uv build --wheel --python 3.12 --no-sources+ uv venv "$RUNNER_TEMP/report-wheel" --python 3.12+ uv pip install --python "$RUNNER_TEMP/report-wheel/bin/python" \+ dist/skillevaluator-*.whl pytest playwright==1.65.2+ - name: Install Chromium+ run: |+ "$RUNNER_TEMP/report-wheel/bin/python" -m playwright install --with-deps chromium+ - name: Exercise installed reports without network+ shell: bash+ env:+ SKILLEVALUATOR_BROWSER_TESTS: "1"+ SKILLEVALUATOR_REQUIRE_INSTALLED_REPORT: "1"+ SKILLEVALUATOR_BROWSER_SCREENSHOTS: ${{ runner.temp }}/report-browser-screenshots+ run: |+ set -euo pipefail+ unset PYTHONPATH+ cd "$RUNNER_TEMP"+ "$RUNNER_TEMP/report-wheel/bin/python" -m pytest \+ "$GITHUB_WORKSPACE/tests/reporting/test_report_browser.py" \+ --basetemp="$RUNNER_TEMP/report-browser-pytest" -q+ - name: Retain synthetic browser screenshots+ if: ${{ always() }}+ uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2+ with:+ name: report-browser-screenshots+ path: ${{ runner.temp }}/report-browser-screenshots+ if-no-files-found: ignorediff --git a/CHANGELOG.md b/CHANGELOG.mdindex 7c9532a2..18ad0f4a 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -259,6 +259,61 @@ All notable changes to SkillEvaluator are documented in this file.the half blocks of the two-row one, so they get the plain title at 60-75columns.+- Standalone HTML reports use one NVIDIA presentation across all three tiers,+ with consistent typography, a green header, numbered Insights cards, and+ plugin evidence inside the relevant tier. Clickable tier cards replace the+ left sidebar and sticky mobile tier bar. Reports containing Tier 3 default+ to dark and other reports to light, instead of following the device theme;+ saved Light, Dark and System choices still take precedence. The renderer+ gives saved incomplete runs concise coverage and actions, with full errors+ in Diagnostics. Newly saved failed-run conclusions and recommendations+ keep their existing raw error text.+ Agents with diagnostic-only trial evidence are excluded from lift panels;+ their trial rows and canonical exports remain available.+ Overview links to complete Insights instead of repeating its cards; passive+ evidence and routine run provenance stay folded. Recorded native token and+ latency breakdowns are available under Trials without rerunning evaluations.+ The native header scale and visible tool versions, consolidated baseline+ comparison with Overall and partial-comparison details, clickable agent+ scorecards, and Harbor results/analysis actions are retained. Empty primary+ viewer metadata no longer hides usable recorded summary links.+ Full Tier 3 downloads preserve the recorded canonical payload; HTML JSON+ snapshots add supplied plugin evidence. CLI JSON validator rows now include+ a recorded boolean `optional_skip`, which the retained JSON reader+ round-trips without changing gate policy. Shared plugin composition supplies+ static and retained runtime evidence before the HTML template renders.+ Recorded Harbor upload links survive saved-run regeneration. The renderer+ version sits beside SkillEvaluator, scanner versions appear in Tier 1, and+ the aligned desktop report is slightly wider. Long scanner versions wrap+ within mobile tiles. Tier verdict chips and status badges keep at least 4.5:1+ text contrast in the light and dark themes.+- HTML Overview combines execution status, scored/unscored coverage and the+ recorded next action. The baseline comparison stays open with its scores,+ lift and Overall visible; signals and reasoning use adjacent disclosures.+ Compact Definition disclosures beneath each dimension name explain the metric,+ including unavailable scores and no-JavaScript viewing, without repeating its+ definition in a separate guide or the Reasoning column.+ Native agent cards, versions and typography remain. Dataset diagnostics+ share exact structured explanations within an attempt and status while+ retaining every assertion, requirement and evidence association. Missing+ pass@k case outcomes show N/A alongside retained attempt counts; measured+ zero success remains 0%. Harbor actions use concise recorded labels and+ retain exact job identities in Diagnostics.+- HTML can display optional retained native dependency completeness,+ composition/ablation, Harbor delivery status, provider refusal/mixed-model+ comparison basis, and recovery notes. Active warnings stay visible; routine+ evidence is folded in the relevant view with local omission and shortening+ notices. These are passive display fields, not new backend coverage;+ hook/canary runtime summaries still need separate producer integration.+ Public recovery, MCP and comparison projections remain. No scoring, gate,+ CLI, canonical payload or newly produced insight behavior changes.+- Embedded HTML JSON uses compact whitespace and charts receive only their+ consumed data. Charts initialize for visible views after applying the theme,+ reuse instances, and prepare closed views synchronously for print. Print+ includes retained Dataset cases hidden by screen filters and restores the+ screen's disclosure and filter state afterward. Downloads preserve the+ retained snapshot and existing safety bounds.+### Documentation- The agent skill guide explicitly installs the CLI before the first check,diff --git a/docs/developer-guide.mdx b/docs/developer-guide.mdxindex 337ae215..d3b43da4 100644--- a/docs/developer-guide.mdx+++ b/docs/developer-guide.mdx@@ -94,15 +94,24 @@ pytest -n auto### Check the HTML report in a browser-`tests/reporting/browser_navigation_checks.py` opens the HTML report in a headless browser and checks navigation, focus, themes, print view and layout at three screen widths. pytest doesn't collect it, and it needs Playwright:+The development extra includes Playwright. The dedicated browser suite checks+all three tiers, Tier 3 subtabs, keyboard navigation, themes, JSON downloads,+offline charts, print, and narrow layouts using synthetic reports. Regular+pytest runs skip browser checks unless explicitly enabled:```bash title="Run the HTML report browser checks"-pip install playwrightpython -m playwright install chromium-python tests/reporting/browser_navigation_checks.py browser-checks+SKILLEVALUATOR_BROWSER_TESTS=1 pytest tests/reporting/test_report_browser.py -q```-The script renders its own fixture reports, then writes screenshots and `navigation-results.json` to `browser-checks/`. To use an installed Chrome instead of Playwright's Chromium, set `SKILLEVALUATOR_TEST_BROWSER` to the browser's executable or pass `--browser`.+Set `SKILLEVALUATOR_BROWSER_SCREENSHOTS` to a directory to retain screenshots.+To use an installed Chrome instead of Playwright's Chromium, set+`SKILLEVALUATOR_TEST_BROWSER` to its executable. The convenience command+`python tests/reporting/browser_navigation_checks.py browser-checks` runs the+same suite and retains screenshots plus a test-result XML file. The dedicated+HTML browser CI job builds a wheel and runs the suite outside the checkout+against that installed wheel, so missing packaged templates and chart assets+fail the same checks.## Documentation and starter changesdiff --git a/docs/report-presentation-port.json b/docs/report-presentation-port.jsonnew file mode 100644index 00000000..17a63e98--- /dev/null+++ b/docs/report-presentation-port.json@@ -0,0 +1,61 @@+{+ "schema_version": 1,+ "template": "src/skillevaluator/reporting/templates/report.html.j2",+ "style_snapshot_scope": "Comment-free digests of the unchanged base and Tier 3 inline style blocks in this repository template; shared report_ui.css.j2 presentation adaptations are listed separately and are not covered by these two baseline hashes.",+ "native_styles": [+ {+ "block": "base",+ "comment_free_sha256": "e09704d0a4a030b3fd7de5e063a5247c0770733ad8c5b380a24e194829c0364e"+ },+ {+ "block": "tier3",+ "comment_free_sha256": "2f7d5555e6ff116aa4f95c0e3a4b620a549267c9ec38c95a7dd3a30fd9a04bc6"+ }+ ],+ "intentional_adaptations": [+ "Public scores, gates, applicability, source identity and publication assessments remain authoritative.",+ "Chart.js 4.5.1 and its existing MIT notices remain pinned.",+ "Canonical retained exports are separate from bounded, sanitized display projections.",+ "CLI JSON validator rows add a recorded boolean optional_skip, and the retained reader round-trips it; the retained Tier 3 object remains unchanged.",+ "Clickable tier cards replace the previous left sidebar and sticky mobile tier bar.",+ "Reports containing Tier 3 default to dark and other reports to light, replacing the device-theme default; saved Light, Dark and System choices take precedence.",+ "Typed passive plugin evidence is routed into tier sections before rendering.",+ "Overview summarizes recorded outcomes/actions; full Insights cards render once.",+ "Concise failed-run summaries are a renderer-only projection; newly persisted failure conclusions and recommendations keep their existing raw error text.",+ "Routine metadata, passive evidence and resource methods use closed disclosures.",+ "Recorded token/latency adapters support native-shaped and current public evidence without collection or rescoring.",+ "Accessible active-control contrast, wrapped mobile controls, keyboard navigation, search, deep links, no-JS and print behavior are retained.",+ "Collection similarity counts use public validator identities.",+ "Canonical public product branding is SkillEvaluator.",+ "The full-size native header scrolls on narrow screens so it does not obscure report evidence.",+ "Configured standard metrics remain explicitly unavailable in incomplete comparison tables; custom-only runs use their recorded metric names and values.",+ "Harbor viewer fallback selects a usable sanitized primary or recorded summary without combining unrelated jobs or inferring URLs.",+ "Renderer version sits beside the brand, with recorded SkillSpector versions in the Tier 1 tile; aligned screen content widens to 1280px while native typography and print sizing remain intact.",+ "Recorded Harbor upload URLs survive shared display projection and directory regeneration, with live metadata taking precedence for the same job URL.",+ "Overview combines recorded execution status, scored/unscored coverage and a next action; full diagnostics and authored Insights remain accessible in their owning views.",+ "The native baseline comparison stays open with scores, baseline, lift, Overall and agent context visible; signal lists, definitions and detailed reasoning use closed adjacent disclosures.",+ "A baseline aggregate missing after execution is labeled baseline quality unavailable; baseline not run requires a recorded skipped arm.",+ "Native agent cards, renderer/scanner version placement and existing body, header and metric type scales are preserved; compact mobile changes adjust arrangement and spacing.",+ "Dataset diagnostics group identical structured causes only within the same attempt and status, retaining all assertion IDs, requirement text, rubric checks and evidence associations within existing preview bounds.",+ "Absent, null and empty pass-at-k case outcomes display N/A with retained attempt counts; explicit recorded zero outcomes remain zero without recomputing scores or denominators.",+ "Concise Harbor labels use recorded agent and condition associations; exact job identifiers remain in Diagnostics and URLs are never inferred.",+ "Optional recorded native plugin completeness, composition, delivery, refusal/comparison basis and recovery notes use bounded typed display adapters; only active warnings appear in Overview and routine detail stays closed in Agent Details, Trials or Diagnostics.",+ "Native compatibility does not add backend execution, collection, scoring, gate policy or public producer coverage; hook census and canary runtime summaries remain a separate producer integration gap.",+ "MCP failed-call and connected-unused interpretations require explicit recorded counts/status; missing measurements never become zero.",+ "Scope-level catalog skip reasons and repeated passive evidence qualifications have one owner, while local row/note omissions and shortened text remain disclosed.",+ "Embedded report JSON is compact and chart literals contain only consumed fields; canonical download reconstruction and escaping remain unchanged.",+ "Charts initialize after theme selection when visible, reuse instances, and prepare all print charts synchronously; print reveals retained Dataset cases hidden by screen filters and restores screen disclosure/filter state.",+ "Bounded native agent identities retain attribution after content-budget exhaustion; unused composition components retain their recorded kind and disclose omitted kind groups."+ ],+ "drift_checks": [+ "tests/reporting/test_report_redesign.py::test_report_style_blocks_match_recorded_digests",+ "tests/reporting/test_telemetry_view.py",+ "tests/reporting/test_report_browser.py",+ "tests/reporting/test_report_readability.py",+ "tests/reporting/test_diagnostic_view.py",+ "tests/reporting/test_native_evidence.py",+ "tests/reporting/test_report_efficiency.py",+ "tests/reporting/test_report_efficiency_browser.py"+ ],+ "reference_reports_or_private_datasets_included": false+}diff --git a/docs/reports.mdx b/docs/reports.mdxindex 39cdf925..db17759d 100644--- a/docs/reports.mdx+++ b/docs/reports.mdx@@ -86,6 +86,14 @@ no-color, redirected, and string-rendered output retains readable paths.| `markdown` | Markdown for PR comments | You want the result posted on a pull request || `sarif` | SARIF 2.1.0 JSON | GitHub Code Scanning or other SARIF consumers need inline annotations |+HTML reports use a shared NVIDIA presentation across all three tiers, with+numbered Insights cards, expandable findings, and tables alongside charts.+Without a saved theme choice, reports containing Tier 3 open in dark mode and+other reports open in light mode, replacing the previous device-theme default.+Saved Light, Dark and System choices take precedence when browser storage is+available; System follows changes to the device preference.+Reports, including charts, work without a network connection.+```bash title="One run, four report files"skillevaluator validate ./my-skill -r json,html,markdown,sarif -o reports```@@ -94,7 +102,7 @@ For gating a pipeline on the JSON output, see [Gate Your CI](/skills/skillevalua## Reading the final status-The compact terminal summary, full terminal report, and HTML header describe the+The compact terminal summary, full terminal report, and HTML hero describe thesame command outcome: **Passed required checks**, **Changes required**, or**Incomplete**. A confirmed failure takes precedence over missing evidence.Advisory tiers retain their own findings and execution status without changing@@ -160,8 +168,8 @@ full rows remain in each trial's `reward.json`.### Tier 2 comparison scopes and evidence-The HTML Tier 2 view separates **Within this skill** (redundant content among-its files) from **Across skills** (catalog or collection comparisons). Each+The HTML Tier 2 view separates **Intra-Skill** (redundant content among+its files) from **Inter-Skill** (catalog or collection comparisons). Eachscope shows Checks completed, Duplicate findings, Affected files or skills,and Catalog entries compared. Completion uses recorded comparisonevidence; a completed check can still fail its gate because it found duplicates.@@ -177,17 +185,119 @@ so equal display names do not merge distinct skills. Token or context savingsare not estimated from duplicate counts.HTML, terminal, and Markdown reports link every recorded Harbor job to its-**Results** and available **Analysis**, using the job's recorded name or-`Job N` when no name is available. Legacy single-job and analysis-only links-remain usable. Job names do not establish which agent or condition produced a-job. Links use the existing URL validation and output escaping.--HTML disclosures show recorded scanner versions and LLM provenance, plus+**Results** and available **Analysis**. HTML uses concise labels from the+recorded agent and condition when available, keeping exact job identities in+Diagnostics. Otherwise it uses the recorded job name or `Job N`. Legacy+single-job and analysis-only links remain usable. Job names alone do not+establish agent or condition ownership.+Links use the existing URL validation and output escaping.+HTML shows these actions in both the Tier 3 tile and Overview when published+URLs are recorded. Keeping local Harbor jobs does not publish them to a hosted+viewer. Saved upload records and persisted run metadata retain their links+when reports are regenerated.++The HTML header shows the SkillEvaluator renderer version independently of the+generation timestamp, beside the product name. The Tier 1 tile shows the+recorded SkillSpector scanner versions. A regenerated report identifies its+current renderer; it does not imply the saved evaluation used that version.+The header retains its native type scale and aligns with the slightly wider+desktop report. On narrow screens it scrolls with the page so that report+navigation and evidence retain usable space.++HTML disclosures show scanner and LLM provenance, plussanitized model, evaluator, dataset digest, and evaluated source metadata underTier 3 Diagnostics. Missing values remain unavailable. These views use existingreport data and do not read the source tree or contact providers while rendering.-Full downloads and preview omission counts remain available; with-skill token-charts are labeled separately from the resource table's two-arm comparisons.+Full downloads and preview omission counts remain available. Recorded native+token and latency details are available in Trials disclosures, alongside the+current resource comparison tables. Both-condition token charts distinguish+cached and uncached prompt tokens without counting cached reads twice.++### Insights, diagnostics, and JSON downloads++Overview combines execution status, scored-attempt coverage and one recorded+next action in a compact summary. Coverage distinguishes scored and unscored+attempts. The native comparison stays open by default, with dimension scores,+the no-skill baseline, recorded lift, Overall and other agents visible. Signal+lists, definitions and detailed reasoning are folded beside those numbers;+partial-comparison labels remain visible. A baseline that ran without an+aggregate score is **baseline quality unavailable**; **baseline not run** is+reserved for a recorded skipped arm. Configured standard dimensions remain+visible with unavailable cells when a run has no measurements; custom-only runs+show their recorded custom metrics. Missing scores never become zero.+Clickable native agent scorecards still open the corresponding Agent Details.+Recorded Harbor Results and Analysis actions remain in the Tier 3 tile and+Overview; missing viewer URLs stay explicitly unavailable. The header, renderer+and scanner version placement, and native body and metric type scales are+preserved.++Insights owns the complete conclusion and recommendation cards, with+their source, verification and evidence links. For saved failed runs, the+renderer replaces recognized repeated error summaries with concise coverage+and actions; authored advice stays verbatim and full errors remain in+Diagnostics. Newly saved failed-run conclusions and recommendations retain+their existing raw error text. Routine configuration and provenance stay in the+closed **Run details & provenance** footer; important execution or comparison+limitations remain visible beside affected results. Rendering a saved run does+not invoke a judge or change its scores.++**Download Full Tier 3 Payload** returns the retained Tier 3 object, including+unavailable values and its recorded verdict. The visible validation outcome+can be stricter because it also accounts for execution failures and required+checks. Presentation defaults do not replace the retained object. Embedded+report JSON uses compact whitespace while preserving the reconstructed snapshot+and its existing escaping and download behavior.++The HTML header's JSON export is a report snapshot, with supplied plugin+static/runtime projections included. Its envelope differs from the CLI's+`-r json` format. A CI report configured with a canonical JSON artifact links+directly to that retained file instead of embedding another report snapshot.+CLI JSON validator rows now include `optional_skip` when recorded as a boolean.+The retained JSON reader round-trips this additive field so an advisory skip+keeps its recorded policy; this does not alter the Tier 3 payload or gate rules.++Plugin evidence appears within its relevant tier. Routine empty observations+share a closed disclosure, and a catalog comparison's skip reason appears once+for its scope. Bounds notices stay with the evidence they qualify and distinguish+omitted rows from shortened text. A shortened historical snapshot cannot+recover the original text; use recorded evidence artifacts when available.++Dataset expectation diagnostics group an identical structured cause only within+the same case attempt and status. Each assertion keeps its requirement ID and+text, recorded status, rubric-check details and evidence excerpts. Members link+to their shared explanation and next diagnostic step; grouping does not remove+assertions or merge different attempts. Shared run errors link to Diagnostics.+Existing preview bounds and omission notices still apply.++### Optional retained native evidence++When a saved Tier 3 payload contains compatible native fields, the HTML report+can display these additional recorded observations:++| Retained evidence | Report location |+| --- | --- |+| Plugin dependency completeness, including recorded MCP resolution detail | Closed disclosures in Agent Details |+| Plugin composition or ablation arm values, uncertainty and any recorded reason | Closed disclosures in Trials |+| Harbor upload or delivery status, errors and retained archive references | Closed disclosure in Diagnostics |+| Per-agent provider safety refusals, mixed-model attempts and comparison basis | Closed disclosures in Agent Details |+| Per-agent recovery notes | Closed disclosures in Diagnostics |++Recorded partial or unreadable plugin coverage, incomplete Harbor delivery, and+provider refusal or mixed-model evidence also receive short visible notices in+Overview, linked to those details. Routine completeness, composition and recovery+evidence stays folded. Display bounds disclose omitted rows or notes and+shortened text. A retained archive reference becomes a link only when an exact,+safe HTTP or HTTPS URL was supplied; paths remain readable references.++These fields appear only when recorded and accepted by the existing safe report+boundary. Their display does not add backend coverage, execute an ablation,+resolve an endpoint, infer a private URL, or change scoring, gates, exclusions+or comparison denominators. Existing public recovery, MCP and plugin comparison+evidence remains available. An MCP warning needs recorded failed-call counts;+a connected-but-unused interpretation needs a recorded connected status and an+explicit zero call count. Missing or null measurements are unavailable, rather+than zero. Hook census and canary runtime summaries still need separate producer+integration and are not supplied by this display compatibility.### Dataset generation provenance@@ -233,25 +343,29 @@ and never clobbers the previous run.The HTML report is one self-contained file. It opens on the answer and putsthe evidence below it:-- **Header.** The skill name is the page title. The header shows one verdict,- the date and version, and **Download JSON**.-- **Summary.** The verdict with a one-line reason, four numbers (checks passed,- findings, blocking critical and high findings, quality score with its- minimum), and **Fix first**: up to five places to fix, most severe first,- each linking to its evidence. When a required scanner did not finish, it is- listed first with the scanner's own reason, such as a timeout. Two scanners- reporting the same file and line take one entry.+- **Header and summary.** Branding, one Theme control and **Download JSON**+ sit above the target name and required-validation result. Publication+ eligibility stays separate, with its reasons available on demand. One set+ of tier cards opens the detailed evidence.+- **Tier summaries.** Each tier shows its own completion and findings.+ Tier 3 keeps available quality metrics in compact tiles; execution status,+ coverage and a recorded next action share the Overview summary. An incomplete+ run with unavailable quality measurements shows that state directly. Full+ Insights cards appear once in Insights; Overview links to them.- **Findings and evidence.** Every check with its findings and suggested fixes.Failed checks come first. Checks that report a raw ID, such as`SCRIPT_LINT`, show a plain name with the ID beside it. Scanner diagnosticsand gate failures are always shown and printed; raw scanner lines that onlyrepeat a finding are folded away.-- **Run details.** Scope, the target path, provenance and the gate policy.+- **Run details.** A closed footer holds routine identity, configuration,+ target paths and provenance. Passive plugin inventories and source details+ also stay folded, with recorded omissions and limitations disclosed.-Use the sidebar or tier tiles to open a tier. A comprehensive `validate` report+Clickable tier cards replace the previous left sidebar and sticky mobile tier+bar. Use the tier cards to open a tier. A comprehensive `validate` reportkeeps all three tiers visible, including **Not run** and **Not run (not requested)**when evidence is absent. Targeted reports keep their narrower scope. On small-screens, a sticky tier bar keeps navigation available while reading long evidence.+screens, navigation and controls wrap within the viewport.Tier 3 retains Overview, Insights, Agent Details, Trials, Dataset and Diagnostics.For its tabs, Left/Right and Home/End move focus; Enter or Space opens the focusedview. Finding links clear incompatible filters, open their evidence and move focus@@ -262,19 +376,24 @@ The **Theme** control offers System, Light and Dark. System follows live devicechanges; an explicit choice persists until System is selected again. Reports usenative theme-aware scrollbars and respect reduced motion. Without JavaScript,all tier and agent evidence remains readable. Printing exposes supporting evidence-and then restores disclosure and filter state when returning to the screen.+and all retained Dataset case cards, including cases hidden by a screen filter.+It prepares charts synchronously for print and restores disclosure and filter+state when returning to the screen. Existing report preview limits still apply.-Reports use 14-pixel body text with relaxed line spacing, distinct label/value+Reports use 16-pixel body text with relaxed line spacing, distinct label/valuegaps, and consistent space between cards, findings and table rows. Tier 3 viewtabs wrap on narrow screens; wide evidence tables keep their own horizontalscroll area. The same reading rhythm applies in Light and Dark themes.Tier 3 charts include Chart.js 4.5.1 inside the HTML file and work offline;-they make no CDN or source-map requests. Each chart describes its measurements-and links to the underlying data table. If JavaScript or canvas initialization-is unavailable, a visible message points readers to the data. Theme changes and-printing redraw the charts. **Chart software notices** retains the full MIT-licenses for Chart.js and its bundled color library. Tier 1 reports do not+they make no CDN or source-map requests. Charts initialize when their view or+disclosure becomes visible, after the selected theme is applied, and reuse their+instances across tab and theme changes. Chart data contains only the fields the+charts consume. Each chart describes its measurements and links to the underlying+data table. If JavaScript or canvas initialization is unavailable, a visible+message points readers to the data. Printing prepares all charts, including+those in previously closed disclosures. **Chart software notices** retains the+full MIT licenses for Chart.js and its bundled color library. Tier 1 reports do notload or embed these chart resources.A finding is one problem a check reports, with a severity. The same problem@@ -299,8 +418,9 @@ when it fails, because it does not require changes. Publication eligibility isshown separately from the command result. Summary reasons count required andadvisory checks individually, including when a tier contains both. Eligibility isshown next to the verdict, because a report can pass its checks and still not-be eligible for publication. The report follows the system light or dark theme-until you pick one, and always prints dark text on white paper.+be eligible for publication. Tier 3 reports default to dark and other reports to+light; selecting System follows the device preference. Reports always print+dark text on white paper.## BENCHMARK.md@@ -324,7 +444,7 @@ successful agent but produced no with-skill score, the dimension reads `Notscored with the skill — baseline 50.0%; uplift unavailable` (or `Not scored — asignal this dimension needs produced no score` without a baseline). A dimensionwhose signals had nothing to judge in any eval case reads `Not applicable`; it-has no score, so the agent's verdict stays NEUTRAL and cannot PASS. A+has no score, so the agent cannot PASS. Abaseline-only run shows `Baseline 67.0% — baseline-only run; no with-skill scoreor uplift`.@@ -984,15 +1104,19 @@ plain-language meaning and evidence source beside its score. For a successfulbest agent, a standard dimension whose signals were active but produced no scoreis listed as N/A with a **not scored with the skill** note and **No verdict**.A dimension whose signals had nothing to judge reads **Not applicable**; it has-no score, so the agent's verdict stays NEUTRAL and cannot PASS. A+no score, so the agent cannot PASS. Acollapsed **What each number means** panel under the Tier 3 overview cardsseparates the verdict, Overall Score, Skill Lift, pass@k, the Tier 1 QualityScore, and publication eligibility.When the HTML report has no lift for an agent or dimension, its label says-why. **no baseline** means that row has no baseline score, for example after-`--skip-baseline`, or after a baseline arm that ran but failed; the-**Agent coverage notes** described below tell the two apart.+why. A recorded skipped baseline, for example after `--skip-baseline`, keeps+**no baseline** in Agent Details. **Overall baseline unavailable** means the+baseline arm ran or failed, or retained baseline evidence exists, but its+aggregate quality score is missing. Its score subtitle remains `baseline N/A`.+Dimension tables similarly distinguish **baseline quality unavailable** from a+recorded arm that was not run. **Agent coverage notes** retain the execution+details described below.**comparison unavailable** means a baseline score was recorded but cannot becompared with the with-skill score, for example because the arms useddifferent score policies or no case kept matching judge models.@@ -1007,8 +1131,10 @@ comparisons. A reported lift can therefore differ from subtracting the twodisplayed arm scores, even reversing their apparent direction. When no completecomparison with matching judge models remains, the affected metric, dimension,and overall lift are unavailable rather than zero. The HTML report's evaluator-card says how many cases its lift left out, or, when it has no lift, that no-comparable result remains, and its per-trial evidence labels those cases+card says how many cases its lift left out. When it has no lift, the card says+that no comparable result remains if its `comparison_basis` records+`contributing_attempts` as 0, and otherwise that the loaded results cannot+confirm the comparison. Its per-trial evidence labels those cases**Left out of lift: different judge models**. In the canonical JSON theevaluator records that count in `lift_excluded_cases`. Its card's`comparison_basis` lists in `case_ids` the lift's keys for the cases the loaded@@ -1068,11 +1194,11 @@ entry per failed arm:- `failure`: the first Harbor exception type in words, or `null`.- `message`: the sentence the reports show.-The HTML report lists each message under **Agent coverage notes** at the top-of the Tier 3 section. Its agent details label an agent whose baseline arm-failed the way they label a skipped baseline, for example **no baseline** and-`baseline N/A`, so the callout is what tells the two apart. The full terminal-report, from `validate --verbose` or an explicit `-r cli`, prints the notes+The HTML report keeps a short coverage cue near the Tier 3 result and retains+the complete per-agent/arm messages in Agent Details. An agent with baseline+execution evidence but no aggregate baseline score shows **Overall baseline+unavailable** with `baseline N/A`; a recorded skipped arm keeps **no baseline**.+The full terminal report, from `validate --verbose` or an explicit `-r cli`, prints the notesunder **Agent coverage notes** in the Tier 3 block, also when Tier 3 isnon-blocking (the default). The compact default view of `validate` does notprint them and leaves them to the HTML and JSON reports and `BENCHMARK.md`.@@ -1409,6 +1535,10 @@ Retained run artifacts remain the source for details omitted by either limit.pass@k and its pass-rate difference are supporting reliability, not the headlineclaim. The report labels the pass@k delta column **Pass-rate difference**.+In HTML, an absent, null or empty case-outcome collection leaves the pass rate+**N/A**, while recorded attempt counts remain available. A nonempty collection+that records no passed cases still shows the measured **0%**. This display rule+does not change pass@k eligibility, scoring or case denominators.With `--n-attempts k`, each eval case runs k times per arm, and a casecounts as passed when at least one attempt clears the `--pass-threshold`score using the same overall formula above. A scored `goal_accuracy` must also@@ -1491,9 +1621,9 @@ agent is the successful agent with the highest with-skill score; an agent thatnever activated the skill is chosen only when no other successful agent has ascore.-- The HTML Tier 3 hero shows that agent's score and the warning- **Completed-agent result. Other execution failures need attention**. The- overview's score card reads **Completed Agent Score**.+- The HTML Overview combines that agent's name and score in **Completed Agent+ Score**, beside **Skill Lift** and **Coverage**. The warning remains+ **Completed-agent result; other execution failures need attention**.- `tier3-benchmark.md` names the agent and gives its score and, when itsbaseline is comparable, its lift, followed by **Needs attention: otherexecution failures remain**. In a `validate` run, `BENCHMARK.md` shows the@@ -1506,11 +1636,21 @@ score.scored. The HTML report and `tier3-benchmark.md` also give this count whenevery agent finished.-In a standalone report, the **Tier 3 quality** chip and the **Quality Verdict**-card follow the run's verdict. A failed run keeps `neutral`, which the HTML-labels **Changes required**, even when the completed agent's own dimension-verdict passes. The completed-agent details still describe that agent, and-the command status in the same hero also reads **Changes required**.+In a standalone report, the **Tier 3 quality** status follows the run's verdict.+HTML displays a failed run as **Changes required**, even when the completed+agent's own dimension verdict passes. This also applies to+`validate --block-on-agent-eval`. In a default `validate --tier3` report, Tier 3+is advisory and reads **Failed (advisory)**; the command status follows the+required tiers and reads **Passed required checks** when they pass. A successful+run with a `neutral` verdict reads **Neutral**.++The JSON report's `tier3` object and **Download Full Tier 3 Payload** preserve+the recorded verdict, which can be `neutral` when a failed agent's collected+results record the failure. An execution error reported after every agent+scored can instead leave the recorded score-based verdict as `pass` or `fail`.+HTML still displays the failed execution as a failure. Its stricter display+does not rewrite the retained payload; completed-agent details describe that+agent's evidence.The evidence is complete when the agent succeeded with no execution errors, hasa with-skill score from 0 to 1, and scored every expected attempt of every case@@ -1522,11 +1662,11 @@ example because every agent failed or the agents were scored on differentmetric sets, no completed-agent score is shown. The benchmark's leadingcallout reads **Tier 3: No complete agent result** when no agent qualifies.-When the run has a best agent, the HTML report names it as **Best performing-agent**, and its **Skill Lift** card and the **Best-agent lift** line under+When the run has a best agent, the HTML report names it with the score,+and its **Skill Lift** card and the **Best-agent lift** line under**Run details & provenance** show that agent's lift when it has one, even when-its evidence is incomplete. The payload keeps this lift in-`summary.overall_lift` and records the failed run's `verdict` as `neutral`.+its evidence is incomplete. The JSON report's `tier3` object and full Tier 3+download both keep this lift in `summary.overall_lift`.The lift is diagnostic evidence for one agent, not a whole-run lift.To get a whole-run result, fix the failed agent and rerun the evaluation withdiff --git a/docs/superpowers/plans/2026-11-13-report-parity-implementation.md b/docs/superpowers/plans/2026-11-13-report-parity-implementation.mdnew file mode 100644index 00000000..349e4151--- /dev/null+++ b/docs/superpowers/plans/2026-11-13-report-parity-implementation.md@@ -0,0 +1,58 @@+# Report presentation parity implementation plan++Approved specification: the report presentation plan for this branch. This file records its implementation boundaries and task interfaces.++**Goal:** reuse the verified native report presentation, with all three tiers and all six Tier 3 tabs, while preserving public result, gate, safety, and retained-evidence contracts.++**Base:** public main f5bf6c1f3666699fd145612a2e9162e9721db3f9. Worktree is isolated from the user's dirty checkout. The presentation reference and private reports remain outside committed fixtures; source provenance belongs in the local audit manifest.++**Final scope clarification:** the implementation supersedes the producer-write and source-pin instructions below: concise failed-run summaries are renderer-only, CLI JSON adds and round-trips recorded boolean `optional_skip`, and the public manifest snapshots two current-template style blocks.++## Global constraints++- One HTMLReporter and one authoritative presentation; no alternate renderer or competing layout stylesheet.+- Preserve public scores, gates, applicability, custom-only neutrality, failed-arm suppression, source identity, bounded previews, redaction, escaped JSON, safe URLs, surrogate handling and atomic outputs.+- Rendering saved evidence makes zero provider calls, performs no rescoring, and does not reopen evaluated source paths.+- Keep existing Chart.js 4.5.1 and its licenses. Use copied chart configuration without downgrading assets.+- Keep existing call sites and CLI contracts working; public plugin CLI dispatch remains on its independent PR track.+- No private benchmark material, private URLs, credentials, or reference report payloads in committed fixtures or public-facing documentation.++## Task 1: concise, evidence-backed Insights++Own evaluation/tier3_report.py, a new reporting/insights_view.py module and focused tests. Do not edit reporting/html.py or templates, which Task 2 owns.++Implement and export `build_insights_view(payload: dict) -> dict` returning `conclusions`, `recommendations`, `next_steps`, and `execution_errors`. Conclusion/recommendation items retain the template's established title/message/severity/source/category/metric/evidence fields. Preserve healthy persisted feedback verbatim. For failed retained runs, consume structured condition coverage and next_steps to produce concise execution summaries and actions, never split arbitrary semicolon prose. Deduplicate only identified copies of the same failure, retaining case/agent/evidence association. Full original errors remain accessible separately. Both Overview and Insights will consume this projection.++For new failed evaluations replace error concatenation with concise coverage/conclusion/action messages, retaining complete execution_errors. Preserve all scoring/guard semantics. Tests must catch duplicate blobs, unavailable coverage, separate case/agent errors, retained-payload mutation, healthy text rewriting, and provider calls during rendering.++## Task 2: exact native presentation and canonical exports++Own reporting/html.py, templates/report.html.j2, report_ui.css.j2/report_ui.js.j2, and presentation-focused tests. Reuse the pinned source template's header, hero, fonts, palette, tables, cards, badges, disclosure layout, chart configuration and footer; adapt fields at the context boundary. Replace the sidebar and layout override system. Preserve search/filters, a11y, deep links, mobile, print, no-JS, CI metadata and safe rendering with narrow enhancements. Default to dark with Tier3 and light otherwise, respecting explicit saved themes.++Integrate Task 1's `build_insights_view`. Render the same cards in Overview and Insights, and retain full errors in Diagnostics. Use native Dataset case cards with per-case disclosures and reference shared run errors once. Make all Tier1/2/3 summaries truthful; include Similarity Check in Tier2 mapping. Comprehensive validation shows all3 tiers including explicit not-run states; standalone Tier3 stays Tier3-only. Measurements absent in retained evidence remain unavailable, never zeros or invented quality data.++Add optional keyword-only `plugin_static` / `plugin_runtime` inputs to HTMLReporter's render_all, default None, accepting existing typed report projections or validated snapshots as agreed with Task3. Project them through Task3's view helper and pass the resulting `plugin_evidence` to template slots at tier1, tier2, overview, agents, trials, provenance. Each detailed section appears once.++Keep validated canonical Tier3 separate from display shaping, and embed/export the retained object unchanged (including neutral vs forced display-fail, null and empty fields). Preserve base64/script-safe encoding and preview limits. Keep existing HTML report_data envelope, adding supplied plugin projections; do not replace it with JSONReporter's schema. Keep CI canonical_json_url direct-link behavior and embedding suppression.++## Task 3: integrate passive plugin projections and retained metadata++Own reporting/plugin_static_render.py, plugin_runtime_render.py, a new reporting/plugin_evidence.py, plugin templates, reporting/retained.py, json_reporter.py and focused plugin/round-trip tests. Do not edit html.py or main template.++Implement `build_plugin_evidence(static: object = None, runtime: object = None) -> dict` with keys tier1, tier2, overview, agents, trials, provenance, each a list of existing bounded section dictionaries. Accept existing StaticPluginReport/RuntimePluginReport via payload() and validated dictionaries; never inspect source trees or invoke a runtime. Preserve snapshots exactly for export (return payload snapshots separately under static/runtime or supply a helper).++Static inventories/dependencies/MCP/hooks/privileges go Tier1; catalog similarity goes Tier2. Runtime eligibility/arm coverage goes Overview; loading/activation/behavior/MCP goes Agent Details; paired comparisons/context/cost goes Trials; source/limitations/exclusions goes Diagnostics. Include source labels/ownership and truncation notices. Distinguish omitted rows and shortened text; do not promise to recover already-clipped values.++Replace post-render HTML string insertion with pre-render context through existing private composition functions; retain non-HTML behavior. Coordinate the render_all keyword interface with Task2; no automatic public plugin dispatch. Preserve optional_skip typed metadata in retained reader and JSON round-trip without changing gate policy.++## Task 4: regression, browser and distribution acceptance++Root owns dev-only Playwright/Chromium integration, CI job, package checks, documentation/changelog and local regeneration deliverables. Use synthetic sanitized fixtures shaped like the two successful two-agent references, both incomplete plugin reports, mixed-agent/custom-only/missing baseline and telemetry/skipped Tier3, single-tier and complete reports, and nonzero collection similarity.++Exercise all tiers/subtabs/agent/dedup views, themes, desktop/mobile, keyboard, filters, details, copy/downloads, chart fallback/offline behavior, no-JS and print with no page-wide overflow or console errors. Compare actual style/geometry using same browser/data/viewport/theme; keep before/after screenshots outside tracked code. Add installed-wheel render smoke outside the checkout.++Regenerate the two supplied reports from retained artifacts outside the repository. Record source hashes, renderer revision, raw Tier3 equality, result/projection preservation, optional_skip metadata, coverage 28/36 and12/20, no provider calls/rescoring, screenshots and test results. Audit manifest records source pin, copied fragments and intentional adaptations without placing private source references in distributable docs.++## Review and completion++Review each independent task against the approved requirements and code quality, then review the integrated branch. Run focused regressions, project lint/build and relevant existing report suites. Resolve material failures; report unrelated suite failures precisely. Deliver isolated branch/worktree plus regenerated reports, screenshots, provenance and verification results. No push, merge or publishing is part of this implementation request.diff --git a/docs/superpowers/plans/2026-11-14-native-feature-restoration.md b/docs/superpowers/plans/2026-11-14-native-feature-restoration.mdnew file mode 100644index 00000000..7d17b498--- /dev/null+++ b/docs/superpowers/plans/2026-11-14-native-feature-restoration.md@@ -0,0 +1,38 @@+# Native report feature restoration++> **For agentic workers:** use superpowers:subagent-driven-development; record task evidence in the ignored execution ledger.++**Goal:** address the user's PR #560 follow-up by restoring visible native report features, then update the same branch and PR.++**Design:** the native report template remains the presentation baseline. Keep its header scale, version identification, consolidated human-readable dimension/baseline comparison, partial comparison annotations, clickable agent scorecards and Harbor actions. Retain the earlier concise Insights and closed routine provenance; reducing clutter must not remove useful native views or actions. The user's explicit follow-up supersedes the compact header and removed scorecards in the previous revision.++**Architecture:** existing assessed display data feeds the single HTML template. Add only bounded, typed display projections for unavailable configured dimensions and custom metric comparisons. Repair Harbor fallback in the existing URL-normalization helper. The retained Tier 3 object, scores, gates, supported backends and CLI behavior stay unchanged. CLI JSON validator rows add the recorded boolean `optional_skip`, and the retained reader round-trips it.++**Manifest:** `docs/report-presentation-port.json` records two style digests from this repository's template and the intentional adaptations. Its checks cover those style snapshots and named regression tests.++**Intentional changes from the prior public layout:** clickable tier cards replace the left sidebar and sticky mobile tier bar. Reports containing Tier 3 default to dark and others to light instead of following the device theme; saved Light, Dark and System choices take precedence. Concise failed-run Insights are renderer-only; newly persisted failure text remains unchanged.++## Constraints and review focus++- Restore the native consolidated comparison and Overall row, using recorded public score/lift authorities. Never recompute scores or substitute a different scoring formula.+- Incomplete runs show configured standard dimensions with unavailable values. Custom-only evaluations show their recorded metrics, never a fabricated five-dimension score grid.+- Preserve missing/zero/not-applicable, partial comparison explanations, failed-agent scopes, source rejection, activation limits and baseline eligibility.+- Show the renderer's SkillEvaluator version even without a timestamp, and only recorded SkillSpector versions. Keep model IDs, paths and routine provenance quiet.+- Harbor actions use existing validated URLs, preserve all recorded jobs/run analysis, work by keyboard inside tier cards and never infer private viewer URLs.+- Keep native CSS declarations intact; remove compact overrides and retain only necessary responsive/accessibility additions. Allow the larger header without hiding report content behind sticky chrome.+- Keep escaping/redaction, finite numbers, URL validation, bounds, exact retained downloads, offline assets, no-JS, print, search and deep links intact.+- No fresh providers, evaluations or rescoring; private source reports and screenshots remain ignored.++## Implementation tasks++- [ ] Add failing display-adapter tests, then restore unavailable standard rows, typed partial comparisons and recorded custom metric comparison rows in `reporting/html.py`.+- [ ] Add failing Harbor helper tests, then repair empty/unsafe primary viewer masking a usable recorded summary viewer; preserve valid primary precedence and canonical immutability.+- [ ] Add presentation tests, then restore native header/version labels, tier-card and Overview Harbor actions, consolidated dimension/Overall/other-agent table and native scorecards. Restore generic Dataset/plugin labels. Preserve the old consolidated-view deep link.+- [ ] Audit the remaining native capabilities across every tier and Tier 3 tab; fix supported presentation regressions and document contract-specific adaptations.+- [ ] Extend installed-wheel Chromium acceptance for actual visibility, baseline cells, partial annotations, native header scale, versions, nested link keyboard behavior and mobile/print geometry. Inspect the existing PR CI failure and fix any branch regression.+- [ ] Run relevant tests, lint, package/source equality and OSS checks; replay retained inputs offline; regenerate both supplied reports and comparable screenshots in a new ignored audit directory.+- [ ] Independently review the final diff, commit with sign-offs, push the same branch and update PR #560's structured BEFORE/AFTER description and evidence. Do not merge.++## Verification++Use synthetic fixtures for tests. Exercise successful two-agent, incomplete, mixed, custom-only, missing-baseline, missing-telemetry and skipped shapes; malformed comparison numbers and viewer URLs; single/multiple/summary-only viewer links. Run every pytest invocation with a fresh explicit basetemp. Verify installed wheel outside the checkout. Preserve the two supplied coverage totals of 28/36 and 12/20 and exact canonical downloads.diff --git a/docs/superpowers/plans/2026-11-14-report-clarity-implementation.md b/docs/superpowers/plans/2026-11-14-report-clarity-implementation.mdnew file mode 100644index 00000000..16b0f6bd--- /dev/null+++ b/docs/superpowers/plans/2026-11-14-report-clarity-implementation.md@@ -0,0 +1,81 @@+# Report Clarity Implementation Plan++> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.++**Goal:** consolidate duplicate report information and quietly retain complete native features/evidence, then open a structured before/after PR on the existing branch.++**Architecture:** keep the existing renderer and canonical/display boundary. Independent bounded telemetry and plugin presentation helpers feed the single native template; a concise summary projection supplies Overview without duplicating full Insights. Routine metadata lives in the closed footer.++**Tech Stack:** Python 3.12+, Jinja2, embedded Chart.js 4.5.1, development-only Playwright/Chromium.++**Spec:** `docs/superpowers/specs/2026-11-14-report-clarity-design.md` (user approved).++## Global Constraints++- One renderer, unchanged scoring/gates/CLI/exports and canonical Tier 3 object; preserve all existing output safety and bounds.+- Native typography/palette, 16px body and Chart.js 4.5.1 remain. All tiers, six subtabs, evidence and controls stay accessible.+- At most three primary Overview metric tiles: Score including agent, Lift, Coverage; all-missing quality uses one unavailable state plus coverage/action.+- One full Insights owner. No arbitrary prose splitting/paraphrasing, lost trace associations or provider calls during rendering.+- Passive plugin sections default closed, preserve stable IDs and snapshots, distinguish omitted rows/display shortening/pre-retention clipping.+- Keep validation, quality, execution, publication and completed-agent scopes distinct, with visible blockers and comparison limitations.+- Preserve deep links/search/keyboard/print/no-JS/offline/mobile behavior, CI direct canonical artifact links and installed-wheel packaging.+- Synthetic committed fixtures only; private reports/artifacts remain ignored. No fresh evaluations or rescoring.+- Same feature branch as the earlier report work; sign off commits; push feature branch and create PR only after local review/verification. No merge.++## Review Focus++- Mixed completed/failed agents, source-preflight and skipped scopes must not become a whole-run pass or fabricated quality score.+- Folded empty/plugin/evaluator evidence must remain searchable and reachable by existing deep links, including static-only reports.+- Legacy native and current telemetry schemas must preserve partial/unknown versus zero, cached accounting and unavailable deltas.+- Fewer visible tiles must retain every metric family, full authored text and per-agent/arm/case association.+- Metadata compression must not hide comparability, provisional data, source rejection or bounded-evidence qualifications.++---++### Task 1: Bounded recorded telemetry presentation++**Files:** create `src/skillevaluator/reporting/telemetry_view.py`, `templates/telemetry.html.j2`, `tests/reporting/test_telemetry_view.py`.++**Interfaces:** produce `build_telemetry_view(payload: object) -> dict` with `token_sections`, `latency_sections`, `token_chart` (labels and three bounded datasets, or null), `has_tokens`, `has_latency`. Produce Jinja macro `render_telemetry(view)`. Task 3 supplies the helper with full assessed display data before the existing preview drops token detail; full retained raw data may be read only through validated bounded projections. Do not edit `html.py` or the main template.++- [ ] Write failing tests for native dataset/agent/case token breakdowns and latency, both arms, zero, unknown, partial coverage, unavailable delta reasons, malicious strings/nonfinite values and bounds.+- [ ] Run focused tests with a fresh explicit basetemp; capture the expected failure.+- [ ] Implement the pure read-only helper and native disclosure/table partial. Preserve recorded values, coverage and reason codes; no collection or recomputed timings. Support long-key native telemetry while retaining the existing public resources path.+- [ ] Expose IDs `tier3-token-usage`, `tier3-latency-metrics`; a legacy token canvas uses `tier3-recorded-token-chart`, leaving the current chart path intact. Chart data consists of labels for agent/condition groups and uncached/cached/completion datasets; no cached double count.+- [ ] Verify focused tests, no input mutation and bounded payloads; write a report. Controller reviews and commits explicit owned paths.++### Task 2: Quiet plugin evidence with stable ownership++**Files:** modify `reporting/plugin_evidence.py`, `templates/plugin_evidence.html.j2`, `tests/reporting/test_plugin_evidence_report.py`.++**Interfaces:** preserve `build_plugin_evidence()` canonical `static`/`runtime` values, slots and macro `render_plugin_evidence(evidence, slot)`. Add display-only summaries/default-open metadata if useful; all existing section IDs remain.++- [ ] Add failing tests for closed passive/empty panels, compact owner/source qualification and retained section anchors, plus exact canonical exports/omission distinctions.+- [ ] Capture red, implement compact closed sections/grouped empty states, verify green with explicit basetemp.+- [ ] Keep status/limitation cues visible and complete notes reachable. Remove repeated run ID and generic prose ahead of each section; routine metadata stays in accessible details.+- [ ] Verify static-only/runtime-only, omission and ownership fixtures without source reads/provider calls. Write report; controller reviews/commits owned paths.++### Task 3: Single-owner report hierarchy and summary integration++**Files:** `reporting/html.py`, optional focused `summary_view.py`, `templates/report.html.j2`, `report_ui.css.j2`, `report_ui.js.j2`, and presentation/unit tests. Do not edit Task 1/2 owned files or browser suite (controller owns browser acceptance).++**Interfaces:** consume `build_telemetry_view()` and `render_telemetry()` plus unchanged plugin macro. Template context `tier3_telemetry`; token-chart series enter the existing chart lifecycle with safe JSON serialization, theme/print refresh and accessible fallback. Keep all current canonical/publication assessment boundaries.++- [ ] Add failing ownership/shape tests for one full Insights instance, <=3 primary metrics, one empty quality state, one tier navigation, closed Run Details and native telemetry inclusion. Cover complete/incomplete/mixed/custom/baseline-only/skipped/source-rejected states.+- [ ] Capture red, implement header/hero/navigation simplification, one theme control retaining System/Light/Dark, compact publication reasons, concise Tier1/2 summaries.+- [ ] Put result/coverage and one structured recorded action first in Overview; remove full card copies and scorecard echoes. Preserve authored text/action/check/evidence in Insights. Secondary outcome families use a compact table when recorded.+- [ ] Replace shared paragraph coverage preamble with a short scoped cue; full agent/arm coverage belongs in Agent Details and full errors in Diagnostics. Keep important qualifiers at affected results.+- [ ] Move plugin inventories below useful native content; consolidate routine metadata in closed Run Details; human-readable Agent/Condition artifact labels keep exact paths/IDs in Diagnostics.+- [ ] Collapse method prose and nested case attempt diagnostics, preserving native Dataset cards. Preserve IDs, search and deep-link ancestor reveal, print restoration and no-JS.+- [ ] Integrate Task 1 helper/partial/chart while keeping current public resource and chart behavior. Verify focused report/CI regressions and write report; controller reviews/commits.++### Task 4: Browser acceptance, retained replay, packaging and PR++**Files:** existing `tests/reporting/test_report_browser.py` and fixtures, reporting docs/CHANGELOG, local ignored audit scripts/results, PR body.++- [ ] Extend synthetic browser coverage for no duplicate cards/navigation, folded evidence/deep links/search, <=96px scrolled mobile header and first-viewport result/action, legacy telemetry and chart fallback.+- [ ] Run report/security/retention and current browser checks once relevant changes are integrated; preserve meaningful old assertions while adapting obsolete layout selectors.+- [ ] Run lint, OSS source/wheel/sdist scan, package build and installed-wheel Chromium outside checkout; validate docs with pinned Fern.+- [ ] Replay retained actual/native samples offline with no rescoring; preserve rows, canonical/projections and 28/36,12/20. Capture new before/after desktop/mobile views and word/disclosure metrics against the approved audit baseline.+- [ ] Final independent review; one scoped fix wave if needed. Record final verification and any pre-existing full-suite limitations honestly.+- [ ] Verify sign-offs/clean tracked tree, push feature branch and open a PR with repository-template verification, BEFORE/AFTER table, safety/data preservation and test evidence. Do not include private data, private URLs or local file links in the public PR. Do not merge.diff --git a/docs/superpowers/specs/2026-11-14-report-clarity-design.md b/docs/superpowers/specs/2026-11-14-report-clarity-design.mdnew file mode 100644index 00000000..72c9655d--- /dev/null+++ b/docs/superpowers/specs/2026-11-14-report-clarity-design.md@@ -0,0 +1,49 @@+# Report clarity and complete recorded telemetry++User-approved design: retain the native three-tier report presentation and its features, consolidate repetitive tiles and prose, and keep routine Run Details and provenance quietly available. This extends the report-parity work on the same branch.++Intentional public layout changes: tier cards replace the left sidebar and sticky mobile tier bar. Reports containing Tier 3 default to dark and others to light instead of the device theme; saved Light, Dark and System choices take precedence. CLI JSON adds the recorded boolean `optional_skip` to validator rows and round-trips it through retained reports; the retained Tier 3 object stays unchanged. Concise failed-run Insights are renderer-only, preserving newly persisted failure text.++## Content ownership++| Surface | Visible first | Detail owner |+| --- | --- | --- |+| Header / hero | Brand, target name, one required-validation outcome, short reason, separate publication state | Routine target path/profile/version/configuration in closed Run Details; publication reasons in a disclosure |+| Tier navigation | One set of clickable native tier cards with status and one useful headline | Preserve old anchors, keyboard navigation and explicit not-run scopes |+| Tier 1 | Completion, severity hierarchy, actionable findings and native views | Passive inventory and scanner provenance in disclosures |+| Tier 2 | Native Intra/Inter tabs, completion and findings | Catalog metadata and distinct skipped/incomplete records; no unavailable-value tile grid |+| Overview | Short scoped status, Score including agent, Lift, Coverage, one recorded action | Full conclusions and recommendations in Insights; comparisons and agent evidence remain reachable |+| Insights | Complete native cards, source/severity, action, verification and evidence | Long recorded text remains intact; explanatory legend can collapse |+| Agent Details | Selected-agent coverage, dimensions and evaluator evidence | Passive loading/component/MCP details in disclosures |+| Trials | Trial/reliability results and recorded resources | Full token accounting, latency, cost, charts and methods in native disclosures |+| Dataset | Native filterable case cards, prompts and expectations | Per-case attempt diagnostics closed; shared failures referenced once |+| Diagnostics | Compact diagnostic navigation and downloads | Full errors, paths/copy controls, raw data, source evidence and limitations |+| Run Details | One closed footer disclosure | Routine identity/environment/models/digests/CI/gate metadata |++Keep verdict, score, best-agent and lift capabilities: verdict becomes a scoped status, score and best agent share one tile. At most three primary Overview metric tiles: Score, Lift, Coverage. If all quality measurements are absent, use one explicit unavailable state plus coverage/action rather than empty Score/Lift tiles. Secondary goals/checks/security outcomes remain available as a compact comparison table when recorded.++Passive plugin sections keep their ownership, content and anchors. Default closed; empty observations may share a compact group, with each retained section addressable. Keep a visible limitation cue for omitted rows, shortened display text and unrecoverable pre-retention clipping; exports do not recover previously missing text.++## Recorded telemetry compatibility++Canonical native-shaped `token_usage` and `latency_metrics` remain retained but are not fully presented by the current totals-only/native-trial adapters. Restore readable dataset/agent/case and with-skill/baseline tables, prompt/cached/uncached/completion/total/efficiency tokens, deltas/reasons/coverage, timing sources, LLM/tool seconds, ms/token and arm runtime. Preserve the newer public `agents[*].resources` path.++Use a bounded read-only display adapter; no collector calls, source reopening, rescoring, canonical mutation, computed replacement timing or relaxed comparability gates. Native token charts compare both conditions using uncached prompt + cached prompt + completion without double counting cached reads. Unknown/partial counters remain unknown/partial. Recorded unavailable comparison reasons remain visible next to their values.++## Acceptance++- One full Insights card per recorded insight; Overview has a concise summary/action and native links.+- No default-open empty plugin panels, duplicate tier navigation, repeated hero score block or empty quality tile wall.+- Required validation, live quality, completed-agent scope, publication and execution status remain distinct. Keep source rejection, incomplete arms, never-activated skills, provisional evidence, historical baselines and invalid comparisons visible at the affected result.+- Opening Tier 3 Overview at 390 x 1000 exposes status, scored/planned coverage and recorded next action before routine metadata. The full-size header scrolls with the page; retain the 16px native body scale.+- Target at least 40% fewer default Overview explanatory words on the audited incomplete and successful shapes. Never clip authored evidence or hide a necessary qualification to meet the target.+- Routine Run Details stays closed; methods, run IDs, digests and paths do not precede primary results. A short, approximately 15-word shared attention cue links to complete scope-specific reasons.+- All native features, filters, disclosures, links/copy/download actions and six Tier 3 tabs remain usable. Deep links reveal owning tabs and closed ancestors; search exposes folded matches. Preserve print state restoration, no-JS, offline charts, both themes and mobile overflow handling.+- Preserve scores, gates, canonical payload/download equality, source rows/projections, retained optional-skip metadata, CI canonical artifact links, bounds, escaping, redaction, safe URLs, surrogate handling and atomic output protections.+- Replay retained reports with zero provider calls/rescored trials; preserve coverage 28/36 and 12/20. Commit synthetic fixtures only. Verify installed-wheel behavior outside the checkout and report unrelated baseline failures honestly.++## Chosen approach++Use one main home for each fact with concise summaries and native disclosures. Wording-only changes leave structural duplication intact; a separate compact/detailed mode adds redundant UI and maintenance. Keep one renderer, pinned Chart.js 4.5.1 and the native typography/palette, with narrow accessibility/layout adaptations.++The [presentation manifest](../../report-presentation-port.json) records two style digests from this repository's template, named regression checks and intentional adaptations without including report data.diff --git a/pyproject.toml b/pyproject.tomlindex 68340047..36d9c4a5 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -106,6 +106,8 @@ dev = ["pytest-cov>=6.2.0",# pytest-xdist carried over for parallel test execution (-n auto)."pytest-xdist>=3.6.0",+ # Dedicated offline HTML browser checks; never needed by the installed reporter.+ "playwright==1.65.2",# Ruff 0.16 enables new rules that require a dedicated repository-wide cleanup."ruff>=0.15.4,<0.16",]diff --git a/src/skillevaluator/evaluation/tier3_report.py b/src/skillevaluator/evaluation/tier3_report.pyindex 7f6bfbc3..76fa3912 100644--- a/src/skillevaluator/evaluation/tier3_report.py+++ b/src/skillevaluator/evaluation/tier3_report.py@@ -543,9 +543,10 @@ def agent_eval_result_from_directory(persisted_skill_name if isinstance(persisted_skill_name, str) and persisted_skill_name else skill_path.name)run_config = _read_run_config(run_dir)- result_truth = engine_result if isinstance(engine_result, dict) else _persisted_run_result(run_dir)+ persisted_result = _persisted_run_result(run_dir)+ result_truth = engine_result if isinstance(engine_result, dict) else persisted_resultif not isinstance(result_truth, dict) or not isinstance(result_truth.get("budget"), dict):- result_truth = _persisted_run_result(run_dir)+ result_truth = persisted_resultif isinstance(result_truth, dict) and isinstance(result_truth.get("budget"), dict):run_config = {**(run_config or {}), "budget": result_truth["budget"]}payload = build_agent_eval_payload(@@ -557,7 +558,10 @@ def agent_eval_result_from_directory(run_config=run_config,env_mode=env_mode,runtime_seconds=_runtime_seconds(engine_result),- harbor_viewer=_harbor_viewer_from_engine_result(engine_result),+ harbor_viewer=_merge_harbor_viewer_summaries(+ _harbor_viewer_from_engine_result(engine_result),+ _harbor_viewer_from_engine_result(persisted_result),+ ),run_dir=run_dir,comparison=_read_comparison(run_dir),evaluated_at=evaluated_at or _evaluated_at_from_run(run_dir, engine_result),@@ -573,7 +577,7 @@ def agent_eval_result_from_directory(use_llm_judge=use_llm_judge,enforce_embedded_size=enforce_embedded_size,)- _apply_engine_failure(payload, engine_result if isinstance(engine_result, dict) else _persisted_run_result(run_dir))+ _apply_engine_failure(payload, engine_result if isinstance(engine_result, dict) else persisted_result)with contextlib.suppress(Exception):source = json.loads((run_dir / "result.json").read_text(encoding="utf-8"))if isinstance(source, dict) and isinstance(source.get("agents"), dict):@@ -3871,21 +3875,14 @@ def _harbor_viewer_from_engine_result(engine_result: dict[str, Any] | None) -> ddef _normalize_harbor_upload_summary(raw: object) -> dict[str, Any]:if not isinstance(raw, dict):return {}+ from skillevaluator.reporting.harbor_viewer import _normalize_harbor_upload_jobsjobs: list[dict[str, str]] = []seen: set[str] = set()- for upload in raw.get("uploads") or []:- if not isinstance(upload, dict):- continue- job_url = _safe_harbor_viewer_url(upload.get("viewer_url") or upload.get("job_url"))- if not job_url or job_url in seen:- continue+ for job in _normalize_harbor_upload_jobs(raw.get("uploads")):+ job_url = job["url"]seen.add(job_url)- analysis_url = _safe_harbor_viewer_url(upload.get("analysis_url")) or _build_job_analysis_url(job_url)- job: dict[str, str] = {"url": job_url, "analysis_url": analysis_url}- name = upload.get("uploaded_job_name") or upload.get("job_name") or upload.get("original_job_name")- if isinstance(name, str) and name.strip():- job["name"] = name.strip()+ job["analysis_url"] = job.get("analysis_url") or _build_job_analysis_url(job_url)jobs.append(job)job_url = _safe_harbor_viewer_url(raw.get("job_url"))diff --git a/src/skillevaluator/reporting/diagnostic_view.py b/src/skillevaluator/reporting/diagnostic_view.pynew file mode 100644index 00000000..b9bf1978--- /dev/null+++ b/src/skillevaluator/reporting/diagnostic_view.py@@ -0,0 +1,64 @@+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0+"""Read-only display groups for persisted dataset expectation diagnostics."""++from __future__ import annotations++from copy import deepcopy+from typing import Any++__all__ = ["build_dataset_diagnostics_view"]++_STATUS_ORDER = ("unmet", "not_checked", "unscored", "not_applicable", "met")+_MEMBER_FIELDS = {"expectation_id", "evidence", "unmet_checks", "inapplicable_checks"}+++def _records(value: object) -> list[dict[str, Any]]:+ return [item for item in value if isinstance(item, dict)] if isinstance(value, list) else []+++def _status_groups(judgments: list[dict[str, Any]]) -> list[dict[str, Any]]:+ statuses = list(_STATUS_ORDER)+ for judgment in judgments:+ if judgment.get("status") not in statuses:+ statuses.append(judgment.get("status"))++ result = []+ for status in statuses:+ members = [judgment for judgment in judgments if judgment.get("status") == status]+ if not members:+ continue+ groups: list[dict[str, Any]] = []+ causes: list[dict[str, Any]] = []+ for judgment in members:+ # Compare complete structured causes, never fragments of prose. The+ # requirement, excerpts and rubric checks stay on their own member;+ # any other differing association prevents a shared explanation.+ cause = {key: value for key, value in judgment.items() if key not in _MEMBER_FIELDS}+ if cause in causes:+ groups[causes.index(cause)]["judgments"].append(judgment)+ else:+ causes.append(cause)+ groups.append(+ {+ "reason": judgment.get("reason"),+ "next_step": judgment.get("next_step"),+ "judgments": [judgment],+ }+ )+ result.append({"status": status, "count": len(members), "groups": groups})+ return result+++def build_dataset_diagnostics_view(case_diagnostics: object) -> list[dict[str, Any]]:+ """Add exact explanation groups inside each retained attempt and status.++ No records are scored, combined across attempts, or newly bounded here.+ Original fields, member associations and omission counts are copied intact;+ canonical report data is never mutated or replaced by the display groups.+ """+ cases = deepcopy(_records(case_diagnostics))+ for case in cases:+ for attempt in _records(case.get("attempts")):+ attempt["status_groups"] = _status_groups(_records(attempt.get("judgments")))+ return casesdiff --git a/src/skillevaluator/reporting/harbor_viewer.py b/src/skillevaluator/reporting/harbor_viewer.pyindex 46690733..45b36eb2 100644--- a/src/skillevaluator/reporting/harbor_viewer.py+++ b/src/skillevaluator/reporting/harbor_viewer.py@@ -11,10 +11,37 @@ from urllib.parse import parse_qsl, urlsplitdef normalize_harbor_viewer_for_display(agent_eval: dict[str, Any]) -> dict[str, Any]:"""Return display-safe Harbor links from a canonical Tier 3 payload."""- raw = agent_eval.get("harbor_viewer")- if not isinstance(raw, dict):- summary = agent_eval.get("summary")- raw = summary.get("harbor_viewer") if isinstance(summary, dict) else {}+ primary = _normalize_harbor_viewer(agent_eval.get("harbor_viewer"))+ if primary:+ return primary+ summary = agent_eval.get("summary")+ return _normalize_harbor_viewer(summary.get("harbor_viewer") if isinstance(summary, dict) else None)+++def _normalize_harbor_upload_jobs(raw: object) -> list[dict[str, str]]:+ """Project recorded upload URLs without deriving links or changing source data."""+ jobs: list[dict[str, str]] = []+ seen: set[str] = set()+ for upload in raw if isinstance(raw, list) else []:+ if not isinstance(upload, dict):+ continue+ url = safe_url(upload.get("viewer_url") or upload.get("job_url"))+ if not url or url in seen:+ continue+ seen.add(url)+ job = {"url": url}+ analysis = safe_url(upload.get("analysis_url"))+ if analysis:+ job["analysis_url"] = analysis+ name = upload.get("uploaded_job_name") or upload.get("job_name") or upload.get("original_job_name")+ if isinstance(name, str) and name.strip():+ job["name"] = name.strip()+ jobs.append(job)+ return jobs+++def _normalize_harbor_viewer(raw: object) -> dict[str, Any]:+ """Normalize one source before choosing primary or legacy summary evidence."""if not isinstance(raw, dict):return {}@@ -43,6 +70,16 @@ def normalize_harbor_viewer_for_display(agent_eval: dict[str, Any]) -> dict[str,if item.get("name"):job["name"] = str(item["name"])jobs.append(job)+ by_url = {job["url"]: job for job in jobs}+ for uploaded in _normalize_harbor_upload_jobs(raw.get("uploads")):+ retained = by_url.get(uploaded["url"])+ if retained is None:+ jobs.append(uploaded)+ by_url[uploaded["url"]] = uploaded+ else:+ # Canonical metadata wins; enrich only the same validated job URL.+ for key, value in uploaded.items():+ retained.setdefault(key, value)if jobs:out["jobs"] = jobsout.setdefault("job_url", jobs[0]["url"])@@ -96,6 +133,49 @@ def harbor_job_links(agent_eval: dict[str, Any]) -> list[dict[str, str]]:return jobs+def harbor_job_display_links(agent_eval: dict[str, Any]) -> list[dict[str, str]]:+ """Use exact recorded job associations for concise labels, retaining identifiers."""+ labels: dict[str, list[str]] = {}++ def record(trial: object, name: object, condition: str) -> None:+ if not isinstance(name, str) or not name:+ return+ viewer = trial.get("harbor_viewer") if isinstance(trial, dict) else None+ url = safe_url(viewer.get("job_url")) if isinstance(viewer, dict) else None+ if url:+ associated = labels.setdefault(url, [])+ label = f"{name} · {condition}"+ if label not in associated:+ associated.append(label)++ trials = agent_eval.get("trials")+ if isinstance(trials, list):+ for trial in trials:+ if isinstance(trial, dict):+ record(+ trial,+ trial.get("agent"),+ "Without skill" if agent_eval.get("mode") == "baseline_only" else "With skill",+ )+ agents = agent_eval.get("agents")+ if isinstance(agents, dict):+ for name, agent in agents.items():+ if not isinstance(agent, dict):+ continue+ for key, condition in (("trials", "With skill"), ("trials_baseline", "Without skill")):+ trials = agent.get(key)+ if not isinstance(trials, list):+ continue+ for trial in trials:+ record(trial, name, condition)+ jobs = harbor_job_links(agent_eval)+ for index, job in enumerate(jobs, 1):+ job["display_label"] = "; ".join(labels.get(job.get("url", ""), [])) or (+ "Run analysis" if job.get("name") == "Run analysis" else f"Job {index}"+ )+ return jobs++def normalize_agent_eval_harbor_links(agent_eval: dict[str, Any]) -> dict[str, Any]:"""Return a shallow copy with display-safe Harbor links in nested fields."""normalized = dict(agent_eval)diff --git a/src/skillevaluator/reporting/html.py b/src/skillevaluator/reporting/html.pyindex 65104f02..7ac12090 100644--- a/src/skillevaluator/reporting/html.py+++ b/src/skillevaluator/reporting/html.py@@ -87,6 +87,7 @@ from skillevaluator.reporting.declarative_coverage import (coverage_summary,declarative_coverage_groups,)+from skillevaluator.reporting.diagnostic_view import build_dataset_diagnostics_viewfrom skillevaluator.reporting.finding_summary import (describe_issue_counts,finding_counts,@@ -95,7 +96,10 @@ from skillevaluator.reporting.finding_summary import (total_issue_count,)from skillevaluator.reporting.finding_verification import finding_verification-from skillevaluator.reporting.harbor_viewer import harbor_job_links, normalize_agent_eval_harbor_links+from skillevaluator.reporting.harbor_viewer import harbor_job_display_links, normalize_agent_eval_harbor_links+from skillevaluator.reporting.insights_view import build_insights_view+from skillevaluator.reporting.native_evidence import build_native_evidence+from skillevaluator.reporting.plugin_evidence import build_plugin_evidencefrom skillevaluator.reporting.presentation import (FinalRenderContext,TierPresentation,@@ -104,6 +108,7 @@ from skillevaluator.reporting.presentation import (success_is_not_applicable,)from skillevaluator.reporting.run_status import Status, result_status, result_tier+from skillevaluator.reporting.telemetry_view import build_telemetry_viewfrom skillevaluator.reporting.tier2_views import tier2_scope_viewsfrom skillevaluator.reporting.tier3_scope import (completed_agent_result,@@ -545,7 +550,75 @@ def _tier3_text_mapping(value: object) -> dict[str, str]:return labels-def _sanitize_tier3_dimension(value: dict[str, Any]) -> dict[str, Any]:+def _tier3_comparison_block_reason(value: dict[str, Any]) -> str:+ """Keep cached comparison evidence from restoring an explicitly unavailable skill arm."""+ summary = value.get("summary") if isinstance(value.get("summary"), dict) else {}+ if value.get("mode") == "baseline_only" or summary.get("mode") == "baseline_only":+ return "baseline_only"+ conditions = value.get("conditions") if isinstance(value.get("conditions"), dict) else {}+ with_skill = conditions.get("with_skill")+ if isinstance(with_skill, dict) and any(+ isinstance(status := with_skill.get(key), str) and status.strip().casefold() == "skipped"+ for key in ("execution_status", "status")+ ):+ return "with_skill_skipped"+ activation = value.get("skill_activation")+ if isinstance(activation, dict) and activation.get("status") == "never_activated":+ return "never_activated"+ return ""+++def _sanitize_tier3_dimension_comparison(+ value: object, *, allow_lift: bool = True, block_reason: str = ""+) -> dict[str, Any]:+ """Project recorded native comparisons without recomputing or trusting shaped values."""+ if not isinstance(value, dict):+ return {}+ raw_status = value.get("status")+ status = raw_status.strip().casefold() if isinstance(raw_status, str) else ""+ known_status = status in {"comparable", "partial", "not_applicable", "unavailable", "inconclusive"}+ comparison: dict[str, Any] = {"status": status if known_status else "unavailable"}+ for key in ("label", "reason", "reason_code"):+ text = _json_safe_tier3_text(value[key]) if isinstance(value.get(key), str) else ""+ comparison[key] = (+ text[:_TIER3_HTML_PREVIEW_STRING_CHARS] + _TIER3_PREVIEW_MARKER+ if len(text) > _TIER3_HTML_PREVIEW_STRING_CHARS+ else text+ )+ comparison["sources"] = _tier3_identifier_list(value.get("sources"))+ for key in ("with_skill", "baseline", "lift"):+ comparison[key] = (+ _finite_number(value.get(key), minimum=-1.0 if key == "lift" else 0.0, maximum=1.0)+ if status in {"comparable", "partial"} and allow_lift and not block_reason+ else None+ )+ raw_measured = value.get("measured") if isinstance(value.get("measured"), dict) else {}+ comparison["measured"] = {}+ for arm in ("with_skill", "baseline"):+ measured = raw_measured.get(arm)+ if isinstance(measured, dict):+ comparison["measured"][arm] = {+ "score": _finite_number(measured.get("score"), minimum=0.0, maximum=1.0) if known_status else None,+ "sources": _tier3_identifier_list(measured.get("sources")),+ }+ if block_reason or not allow_lift:+ reason_code = block_reason or "never_activated"+ explanations = {+ "baseline_only": "Baseline-only run; the with-skill arm was not run, so no skill comparison is available.",+ "with_skill_skipped": "The with-skill arm was explicitly skipped; no skill comparison is available.",+ "never_activated": "Skill never activated; scores are diagnostic only and no skill comparison is available.",+ }+ comparison.update(+ status="inconclusive" if reason_code == "never_activated" else "unavailable",+ reason_code=reason_code,+ reason=explanations[reason_code],+ )+ return comparison+++def _sanitize_tier3_dimension(+ value: dict[str, Any], *, allow_comparison_lift: bool = True, comparison_block_reason: str = ""+) -> dict[str, Any]:dimension = dict(value)for key in ("baseline", "with_skill", "score"):dimension[key] = _finite_number(dimension.get(key), minimum=0.0, maximum=1.0)@@ -560,6 +633,16 @@ def _sanitize_tier3_dimension(value: dict[str, Any]) -> dict[str, Any]:dimension["verdict"] = None if raw_verdict is None else _tier3_display_identifier(raw_verdict)dimension["evaluators"] = _tier3_identifier_list(dimension.get("evaluators"))dimension["reasoning_bullets"] = _string_list(dimension.get("reasoning_bullets"))+ if "partial" in dimension:+ dimension["partial"] = dimension["partial"] is True+ if "comparison" in dimension:+ comparison = _sanitize_tier3_dimension_comparison(+ dimension["comparison"], allow_lift=allow_comparison_lift, block_reason=comparison_block_reason+ )+ if comparison:+ dimension["comparison"] = comparison+ else:+ dimension.pop("comparison", None)return dimension@@ -912,7 +995,7 @@ def _sanitize_tier3_evaluator_card(return card-def _sanitize_tier3_agent(value: dict[str, Any]) -> dict[str, Any]:+def _sanitize_tier3_agent(value: dict[str, Any], *, comparison_block_reason: str = "") -> dict[str, Any]:agent = dict(value)activation = agent.get("skill_activation")agent["skill_activation"] = dict(activation) if isinstance(activation, dict) else {}@@ -935,7 +1018,11 @@ def _sanitize_tier3_agent(value: dict[str, Any]) -> dict[str, Any]:agent["num_trials_baseline"] = _nonnegative_count(agent.get("num_trials_baseline"))agent["expected_attempts"] = _nonnegative_count(agent.get("expected_attempts"))agent["scored_attempts"] = _nonnegative_count(agent.get("scored_attempts"))- agent["dimensions"] = [_sanitize_tier3_dimension(item) for item in _dict_list(agent.get("dimensions"))]+ comparison_block_reason = comparison_block_reason or _tier3_comparison_block_reason(agent)+ agent["dimensions"] = [+ _sanitize_tier3_dimension(item, comparison_block_reason=comparison_block_reason)+ for item in _dict_list(agent.get("dimensions"))+ ]agent["evaluator_cards"] = [cardfor item in _dict_list(agent.get("evaluator_cards"))@@ -954,7 +1041,7 @@ def _sanitize_tier3_agent(value: dict[str, Any]) -> dict[str, Any]:def _tier3_html_dimensions(payload: dict[str, Any] | None) -> list[dict[str, Any]]:- """Add display-only missing-signal rows for a successful best agent."""+ """Keep recorded dimensions and configured-but-unmeasured public dimensions visible."""if not isinstance(payload, dict):return []dimensions = [dict(item) for item in _dict_list(payload.get("dimensions"))]@@ -965,9 +1052,14 @@ def _tier3_html_dimensions(payload: dict[str, Any] | None) -> list[dict[str, Anysummary = summary if isinstance(summary, dict) else {}best_name = payload.get("best_agent") or summary.get("best_agent")best = agents.get(best_name) if isinstance(agents, dict) and isinstance(best_name, str) else None- if not isinstance(best, dict) or best.get("execution_status") != "succeeded":+ successful_best = isinstance(best, dict) and best.get("execution_status") == "succeeded"+ active_metrics = (+ set(_tier3_identifier_list(best.get("metrics_with_skill")))+ if successful_best+ else set(_tier3_configured_metrics(payload))+ )+ if payload.get("execution_status") == "skipped":return dimensions- active_metrics = set(_tier3_identifier_list(best.get("metrics_with_skill")))for dimension_id, config in DIMENSION_MAPPING.items():if dimension_id in dimension_ids:continue@@ -984,13 +1076,116 @@ def _tier3_html_dimensions(payload: dict[str, Any] | None) -> list[dict[str, Any"lift": None,"verdict": None,"evaluators": active_signals,- "reasoning_bullets": ["A signal this dimension needs produced no score."],+ "reasoning_bullets": [+ "A signal this dimension needs produced no score."+ if successful_best+ else "The evaluation did not complete; no authoritative dimension measurement is available."+ if payload.get("execution_status") in {"failed", "incomplete"}+ else "No authoritative dimension measurement was recorded."+ ],+ "measurement_unavailable": True,})dimension_ids.add(dimension_id)return dimensions+def _tier3_configured_metrics(payload: dict[str, Any]) -> list[str]:+ """Read retained metric identities; never substitute the template's default metric set."""+ metrics = _tier3_identifier_list(payload.get("metric_ids"))+ for _name, agent in _tier3_agent_entries(payload.get("agents")):+ for key in ("metrics_with_skill", "metrics_without_skill"):+ metrics.extend(_tier3_identifier_list(agent.get(key)))+ if isinstance(payload.get("evaluators"), dict):+ metrics.extend(_tier3_identifier_list(list(payload["evaluators"])))+ return list(dict.fromkeys(metrics))+++def _tier3_metric_comparison_view(payload: object) -> dict[str, Any]:+ """Bound a custom-only Overview table to already assessed recorded metric values."""+ empty: dict[str, Any] = {"rows": [], "omitted": 0}+ if not isinstance(payload, dict) or payload.get("execution_status") == "skipped":+ return empty+ standard_metrics = {+ metric+ for config in DIMENSION_MAPPING.values()+ for key in ("evaluators", "fallback_evaluators")+ for metric in config.get(key, [])+ }+ if any(metric in standard_metrics for metric in _tier3_configured_metrics(payload)) or any(+ item.get("id") in DIMENSION_MAPPING for item in _dict_list(payload.get("dimensions"))+ ):+ return empty+ labels = _tier3_text_mapping(payload.get("metric_labels"))+ candidates: dict[str, dict[str, Any]] = {}+ seen: set[str] = set()+ evaluators = payload.get("evaluators") if isinstance(payload.get("evaluators"), dict) else {}+ for raw_id, scores in evaluators.items():+ identifier = _tier3_display_identifier(raw_id)+ if not identifier or not isinstance(scores, dict) or identifier.casefold() in seen:+ return empty+ seen.add(identifier.casefold())+ candidates[identifier] = {**scores, "label": labels.get(identifier, identifier)}+ card_ids: set[str] = set()+ for card in _dict_list(payload.get("evaluator_cards")):+ identifier = _tier3_display_identifier(card.get("id") or card.get("evaluator"))+ identity = identifier.casefold()+ if not identifier or identity in card_ids:+ return empty+ card_ids.add(identity)+ if identifier not in candidates:+ if identity in seen:+ return empty+ seen.add(identity)+ candidates[identifier] = card+ for identifier in _tier3_identifier_list(payload.get("metric_ids")):+ if identifier not in candidates:+ if identifier.casefold() in seen:+ return empty+ seen.add(identifier.casefold())+ candidates[identifier] = {}+ agents = dict(_tier3_agent_entries(payload.get("agents")))+ summary = payload.get("summary") if isinstance(payload.get("summary"), dict) else {}+ best_name = _tier3_display_identifier(payload.get("best_agent") or summary.get("best_agent"))+ best = agents.get(best_name, {})+ comparison_block_reason = _tier3_comparison_block_reason(payload) or _tier3_comparison_block_reason(best)+ incomplete = (+ payload.get("execution_status") in {"failed", "incomplete"} and best.get("execution_status") != "succeeded"+ )+ rows = []+ for identifier, candidate in candidates.items():+ score = _finite_number(candidate.get("with_skill"), minimum=0.0, maximum=1.0)+ baseline = _finite_number(candidate.get("baseline"), minimum=0.0, maximum=1.0)+ lift = _finite_number(candidate.get("lift"), minimum=-1.0, maximum=1.0)+ reason = ""+ if incomplete:+ score = baseline = lift = None+ reason = "The evaluation did not complete; no authoritative comparison is available."+ elif comparison_block_reason == "baseline_only":+ score = lift = None+ reason = "Baseline-only run; the with-skill arm was not run."+ elif comparison_block_reason == "with_skill_skipped":+ score = lift = None+ reason = "The with-skill arm was explicitly skipped; no skill comparison is available."+ elif comparison_block_reason == "never_activated":+ lift = None+ reason = "Skill never activated; scores are diagnostic only."+ elif score is None:+ lift = None+ reason = "No with-skill measurement was recorded."+ elif baseline is None:+ lift = None+ reason = "No baseline measurement was recorded."+ elif lift is None:+ reason = "No comparable lift was recorded."+ if len(rows) < _TIER3_HTML_PREVIEW_COLLECTION_ITEMS:+ label = _tier3_display_identifier(candidate.get("label")) or labels.get(identifier) or identifier+ rows.append(+ {"id": identifier, "label": label, "score": score, "baseline": baseline, "lift": lift, "reason": reason}+ )+ return {"rows": rows, "omitted": max(0, len(candidates) - len(rows))}++def _scrub_untrusted_tier3_agents(value: object) -> dict[str, dict[str, Any]]:"""Retain agent identity/coverage while removing untrusted score evidence."""agents: dict[str, dict[str, Any]] = {}@@ -1183,8 +1378,15 @@ def _sanitize_tier3_display_payload(value: dict[str, Any]) -> dict[str, Any]:else:payload.pop("evidence_volume", None)payload["summary"] = payload.get("summary") if isinstance(payload.get("summary"), dict) else {}+ global_comparison_block = _tier3_comparison_block_reason(payload)payload["agents"] = {- identifier: _sanitize_tier3_agent(agent) for identifier, agent in _tier3_agent_entries(payload.get("agents"))+ identifier: _sanitize_tier3_agent(+ agent,+ comparison_block_reason=global_comparison_block+ if global_comparison_block in {"baseline_only", "with_skill_skipped"}+ else "",+ )+ for identifier, agent in _tier3_agent_entries(payload.get("agents"))}for container in (payload, payload["summary"]):for key in ("skill_name", "evaluator_version", "environment"):@@ -1276,12 +1478,16 @@ def _sanitize_tier3_display_payload(value: dict[str, Any]) -> dict[str, Any]:if (card := _sanitize_tier3_evaluator_card(item)) is not None]payload["cases"] = _dict_list(payload.get("cases"))+ best_name = _tier3_display_identifier(payload.get("best_agent") or payload["summary"].get("best_agent"))+ best_agent = payload["agents"].get(best_name, {})+ comparison_block_reason = global_comparison_block or _tier3_comparison_block_reason(best_agent)# Unscored dimensions stay listed so the report can explain them.payload["dimensions"] = [dimensionfor item in _dict_list(payload.get("dimensions"))if any(- (dimension := _sanitize_tier3_dimension(item)).get(key) is not None+ (dimension := _sanitize_tier3_dimension(item, comparison_block_reason=comparison_block_reason)).get(key)+ is not Nonefor key in ("score", "with_skill", "baseline"))]@@ -1298,6 +1504,11 @@ def _sanitize_tier3_display_payload(value: dict[str, Any]) -> dict[str, Any]:key: str(step.get(key) or "")for key in ("kind", "target", "problem", "evidence", "action", "check", "strength")}+ | {+ key: _tier3_display_identifier(step[key])+ for key in ("agent", "case", "case_id", "condition")+ if isinstance(step.get(key), str)+ }for step in _dict_list(payload.get("next_steps"))]payload["dataset"] = [_sanitize_tier3_dataset_case(item) for item in _dict_list(payload.get("dataset"))]@@ -1398,6 +1609,31 @@ def _script_safe_json(value: object) -> str:)+def _unrepresented_insight_steps(view: dict[str, Any], *, failed: bool) -> list[dict[str, Any]]:+ """Keep next steps unless a failed-run card already displays all their evidence."""+ steps = [step for step in view.get("next_steps", []) if isinstance(step, dict)]+ if not failed:+ return steps+ actions = [+ item+ for item in view.get("recommendations", [])+ if isinstance(item, dict) and item.get("insight_kind") == "execution_action"+ ]++ def represented(step: dict[str, Any], card: dict[str, Any]) -> bool:+ if not step.get("action") or step["action"] != card.get("message"):+ return False+ target = step.get("target") or "agent_eval"+ if target != card.get("metric"):+ return False+ for field in ("problem", "check", "strength", "agent", "case", "case_id", "condition"):+ if (step.get(field) or "") != (card.get(field) or ""):+ return False+ return (step.get("evidence") or "") == (card.get("evidence_text") or card.get("evidence") or "")++ return [step for step in steps if not any(represented(step, card) for card in actions)]++def _canonical_tier3_embed(payload: dict[str, Any] | None) -> tuple[str, str]:"""Return one safe canonical Tier 3 copy and its browser decoding mode."""if not payload:@@ -1476,6 +1712,38 @@ def _capped_tier3_trial_rows(payload: dict[str, Any]) -> int:return omitted+def _tier3_chart_projection(payload: dict[str, Any] | None) -> dict[str, Any]:+ """Keep only measurements consumed by the native dimension/token charts.++ Derive this from the same bounded display preview as the tables. The full+ retained evidence is embedded separately for JSON downloads.+ """+ data = payload or {}+ return {+ "dimensions": [{"id": row.get("id")} for row in (data.get("dimensions") or [])],+ "agents": {+ name: {+ "dimensions": [+ {key: row[key] for key in ("id", "score", "with_skill") if key in row}+ for row in (agent.get("dimensions") or [])+ ]+ }+ for name, agent in (data.get("agents") or {}).items()+ },+ "trials": [+ {+ "agent": trial.get("agent"),+ "tokens": {+ key: value+ for key, value in (trial.get("tokens") or {}).items()+ if key in ("prompt", "completion", "cached")+ },+ }+ for trial in (data.get("trials") or [])+ ],+ }++def _bounded_tier3_preview(payload: dict[str, Any] | None) -> tuple[dict[str, Any] | None, dict[str, int]]:"""Return a presentation-only projection plus visible omission counts.@@ -3164,12 +3432,26 @@ class HTMLReporter(ReporterBase):def render(self, result: ValidationResult) -> str:return self.render_all([result])- def render_all(self, results: list[ValidationResult]) -> str:+ def render_all(+ self,+ results: list[ValidationResult],+ *,+ plugin_static: object = None,+ plugin_runtime: object = None,+ ) -> str:+ plugin_evidence = build_plugin_evidence(static=plugin_static, runtime=plugin_runtime)validate_report_scope(self.report_scope, results)tier1_results, tier2_results, tier3_results = self._split_results_by_tier(results)selected = select_agent_eval_candidate(tier3_results)raw_payload = selected[1] if selected is not None else Nonetier3_data = self._tier3_report_data(tier3_results, selected=selected)+ # Export valid retained evidence exactly; display shaping below is deliberately+ # conservative and must never rewrite the downloadable object.+ canonical_tier3 = (+ raw_payload+ if raw_payload is not None and agent_eval_report_serialization_issue(raw_payload) is None+ else tier3_data+ )completed_agent = completed_agent_result(tier3_data)# Preserve the raw policy/provenance assessment, then let the emitted# payload make the decision only more conservative. Display shaping@@ -3282,13 +3564,63 @@ class HTMLReporter(ReporterBase):or dataset_source == "unavailable"):tier3_dataset_sufficiency = None+ # Runtime-only plugin projections expose passive evidence in the native+ # tabs without inventing an AGENT_EVAL result or canonical Tier 3 payload.+ if tier3_data is None and any(plugin_evidence[slot] for slot in ("overview", "agents", "trials", "provenance")):+ tier3_data = {+ "skill_name": (plugin_evidence["runtime"] or plugin_evidence["static"] or {}).get(+ "name", "Plugin evidence"+ ),+ "overall_score": None,+ "overall_lift": None,+ "best_agent": None,+ "verdict": "incomplete",+ "execution_status": "incomplete",+ "agents": {},+ "summary": {},+ }+ tier3_telemetry = build_telemetry_view(tier3_data)+ # Failed-arm trials remain diagnostic evidence, including scored rewards.+ # Determine comparison eligibility before preview bounds can omit those rows.+ tier3_diagnostic_comparison_agents = {+ trial.get("agent") or "(default)"+ for trial in _dict_list((tier3_data or {}).get("trials"))+ if trial.get("diagnostic_only") is True+ }+ tier3_diagnostic_comparison_agents.update(+ name+ for name, agent in ((tier3_data or {}).get("agents") or {}).items()+ if isinstance(agent, dict)+ if any(+ trial.get("diagnostic_only") is True+ for key in ("trials", "trials_baseline")+ for trial in _dict_list(agent.get(key))+ )+ )tier3_preview, tier3_preview_notice = _bounded_tier3_preview(tier3_data)+ tier3_metric_comparison = _tier3_metric_comparison_view(tier3_preview)+ insights_view = build_insights_view(tier3_preview or {})+ insights_case_fix_count = len(insights_view.get("recommendations") or [])+ # Older retained source checks and healthy runs may only have suggestions.+ # Give those the same native cards in Overview and Insights.+ if not insights_view.get("recommendations"):+ insights_view = {+ **insights_view,+ "recommendations": [+ {"message": suggestion, "title": "", "category": "Action", "source": "deterministic"}+ for suggestion in (tier3_preview or {}).get("suggestions", [])+ if isinstance(suggestion, str) and suggestion+ ],+ }+ remaining_insight_steps = _unrepresented_insight_steps(+ insights_view, failed=(tier3_preview or {}).get("execution_status") == "failed"+ )if isinstance(tier3_preview, dict) and isinstance(tier3_preview.get("evidence_volume"), dict):tier3_preview["evidence_volume"]["display"] = format_evidence_volume(tier3_preview["evidence_volume"]) or ""tier3_dataset_provenance_line, tier3_dataset_provenance_warning = dataset_provenance_display(tier3_data.get("dataset_provenance") if isinstance(tier3_data, dict) else None)- tier3_canonical_data, tier3_canonical_encoding = _canonical_tier3_embed(tier3_data)+ tier3_canonical_data, tier3_canonical_encoding = _canonical_tier3_embed(canonical_tier3)tier3_truncation = tier3_data.get("report_truncation", {}) if isinstance(tier3_data, dict) else {}# Keep the Tier 1 dashboard scoped to Tier 1. Tier 2 and Tier 3 have@@ -3519,7 +3851,7 @@ class HTMLReporter(ReporterBase):# Tier 3 is embedded once in ``#tier3-full``. The export helper# resolves this reference at download time, avoiding a second full# copy inside ``#report-data``.- "tier3": {"$ref": "#tier3-full"} if tier3_data else None,+ "tier3": {"$ref": "#tier3-full"} if canonical_tier3 else None,"gating": gating,"publication": {"status": publication.status,@@ -3534,12 +3866,16 @@ class HTMLReporter(ReporterBase):"skillspector_versions": tier1_skillspector_versions,"skillspector_provenance": tier1_skillspector_provenance,}+ if plugin_evidence["static"] is not None:+ report_data["plugin_static"] = plugin_evidence["static"]+ if plugin_evidence["runtime"] is not None:+ report_data["plugin_runtime"] = plugin_evidence["runtime"]# CI-native pages link Download JSON to the retained canonical file, so# nothing on them reads an embedded copy. Only standalone reports embed it.report_json = Noneif not self.ci_context.get("canonical_json_url"):report_json = (- json.dumps(report_data, indent=2, allow_nan=False)+ json.dumps(report_data, separators=(",", ":"), allow_nan=False).replace("<", "\\u003c").replace(">", "\\u003e").replace("&", "\\u0026")@@ -3563,6 +3899,13 @@ class HTMLReporter(ReporterBase):if agent_eval_only and tier3_data:active_tabs = [t for t in active_tabs if t["id"] != "tier1"]+ for tier_number in (1, 2):+ tier_id = f"tier{tier_number}"+ if plugin_evidence[tier_id] and not any(tab["id"] == tier_id for tab in active_tabs):+ active_tabs.append(+ {"id": tier_id, "label": f"Tier {tier_number}", "empty": True, "number": tier_number}+ )+ active_tabs.sort(key=lambda tab: tab["id"])template = self._env.get_template("report.html.j2")cl = self.content_labelreturn template.render(@@ -3628,7 +3971,17 @@ class HTMLReporter(ReporterBase):content_label_plural=cl + "s",quality_scores=quality_scores_by_skill,tier3=tier3_preview,+ tier3_diagnostic_comparison_agents=tier3_diagnostic_comparison_agents,+ tier3_chart_data=_tier3_chart_projection(tier3_preview),+ insights_view=insights_view,+ dataset_diagnostics_view=build_dataset_diagnostics_view((tier3_preview or {}).get("case_diagnostics")),+ native_evidence=build_native_evidence(tier3_data),+ remaining_insight_steps=remaining_insight_steps,+ insights_case_fix_count=insights_case_fix_count,+ plugin_evidence=plugin_evidence,tier3_display_dimensions=_tier3_html_dimensions(tier3_data),+ tier3_metric_comparison_rows=tier3_metric_comparison["rows"],+ tier3_metric_comparison_omitted=tier3_metric_comparison["omitted"],tier3_dataset_provenance_line=tier3_dataset_provenance_line,tier3_dataset_provenance_warning=tier3_dataset_provenance_warning,chart_assets=_load_chart_assets,@@ -3637,6 +3990,7 @@ class HTMLReporter(ReporterBase):tier3_truncation=tier3_truncation,tier3_dataset_sufficiency=tier3_dataset_sufficiency,tier3_preview_notice=tier3_preview_notice,+ tier3_telemetry=tier3_telemetry,declarative_coverage_groups=declarative_coverage_groups(tier3_data.get("agents") if isinstance(tier3_data, dict) else {}),@@ -3667,7 +4021,7 @@ class HTMLReporter(ReporterBase):tier1_display_summary=tier1_display_summary,tier2_results=tier2_results,tier2_scopes=tier2_scope_views(tier2_results),- harbor_jobs=harbor_job_links(tier3_data or {}),+ harbor_jobs=harbor_job_display_links(tier3_data or {}),dataset_provenance=agent_eval_publication_dataset_provenance(tier3_data),evaluated_source=recorded_evaluated_source(result.metadata for result in results),tier3_lift_pass_threshold=TIER3_LIFT_PASS_THRESHOLD,diff --git a/src/skillevaluator/reporting/insights_view.py b/src/skillevaluator/reporting/insights_view.pynew file mode 100644index 00000000..cdd37d22--- /dev/null+++ b/src/skillevaluator/reporting/insights_view.py@@ -0,0 +1,245 @@+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0+"""Read-only, provider-free presentation of persisted Tier 3 insights."""++from __future__ import annotations++from copy import deepcopy+from typing import Any++from skillevaluator.reporting.tier3_coverage import incomplete_arms++__all__ = ["build_insights_view"]++_FIELDS = ("conclusions", "recommendations", "next_steps", "execution_errors")+++def _records(value: Any) -> list[dict[str, Any]]:+ return [item for item in value if isinstance(item, dict)] if isinstance(value, list) else []+++def _coverage(record: dict[str, Any]) -> tuple[int, int] | None:+ scored, expected = record.get("scored_attempts"), record.get("expected_attempts")+ if type(scored) is int and type(expected) is int and 0 <= scored <= expected and expected > 0:+ return scored, expected+ return None+++def _run_coverage(payload: dict, summary: dict, agents: dict) -> tuple[int, int] | None:+ fallback = _coverage(payload) or _coverage(summary)+ if not agents:+ return fallback+ totals = []+ mode = payload.get("mode")+ arms = {+ "with_skill_only": ("with_skill",),+ "baseline_only": ("without_skill",),+ }.get(mode if isinstance(mode, str) else None, ("with_skill", "without_skill"))+ for agent in agents.values():+ if not isinstance(agent, dict):+ return fallback+ conditions = agent.get("conditions")+ condition_counts = []+ if isinstance(conditions, dict):+ # Explicit retained arm evidence takes precedence over an older mode.+ agent_arms = [arm for arm in ("with_skill", "without_skill") if arm in conditions or arm in arms]+ for arm in agent_arms:+ record = conditions.get(arm)+ if isinstance(record, dict) and record.get("execution_status") == "skipped":+ continue+ counts = _coverage(record) if isinstance(record, dict) else None+ if counts is None:+ condition_counts = []+ break+ condition_counts.append(counts)+ if condition_counts:+ totals.append((sum(s for s, _ in condition_counts), sum(e for _, e in condition_counts)))+ elif counts := _coverage(agent):+ totals.append(counts)+ else:+ return fallback+ expected = sum(expected for _, expected in totals)+ return (sum(scored for scored, _ in totals), expected) if expected else fallback+++def _unique(items: list[dict[str, Any]]) -> list[dict[str, Any]]:+ # Compare the whole record: identical prose is not identical evidence.+ result: list[dict[str, Any]] = []+ for item in items:+ if item not in result:+ result.append(item)+ return result+++def _matches_error_sequence(message: object, errors: object) -> bool:+ """Match whole structured errors, including a prefix saved before later errors.++ Delimiters inside an error are its original prose, never new error records.+ """+ if not isinstance(message, str) or not isinstance(errors, list) or not errors:+ return False+ offset = 0+ for index, error in enumerate(errors):+ if not isinstance(error, str):+ return False+ piece = ("; " if index else "") + error+ if not message.startswith(piece, offset):+ return False+ offset += len(piece)+ if offset == len(message):+ return True+ return False+++def build_insights_view(payload: dict) -> dict:+ """Project concise failed-run cards, retaining original diagnostics separately.++ Healthy feedback is copied verbatim. Failed runs replace only recognized+ deterministic error-blob copies; authored prose is never split or rewritten.+ This function reads only the supplied object and never opens artifacts,+ invokes an insights provider, or changes canonical evaluation evidence.+ """+ summary = payload.get("summary") if isinstance(payload.get("summary"), dict) else {}+ view = {key: deepcopy(payload.get(key, [])) for key in _FIELDS}+ if not isinstance(view["execution_errors"], list):+ view["execution_errors"] = []+ if "execution_errors" not in payload:+ view["execution_errors"] = deepcopy(summary.get("execution_errors") or [])+ if payload.get("execution_status", summary.get("execution_status")) != "failed":+ return view+ provenance = payload.get("provenance") if isinstance(payload.get("provenance"), dict) else {}+ if (+ payload.get("reason_code", summary.get("reason_code")) == "eval_dataset_required"+ or provenance.get("source") == "tier3_source_preflight"+ ):+ # A blocking source check fails publication before any agent runs.+ return view++ agents = payload.get("agents") if isinstance(payload.get("agents"), dict) else {}+ error_sources = [+ view["execution_errors"],+ *[agent.get("execution_errors") for agent in agents.values() if isinstance(agent, dict)],+ ]++ def is_blob(item: dict[str, Any], *, conclusion: bool) -> bool:+ if any(item.get(key) for key in ("agent", "case", "case_id", "condition", "metric")):+ return False+ if item.get("source") not in (None, "deterministic"):+ return False+ if not any(_matches_error_sequence(item.get("message"), errors) for errors in error_sources):+ return False+ return not conclusion or item.get("title") == "Evaluation incomplete"++ old_conclusions = _records(view["conclusions"])+ failed_arms = [(name, arm) for name, agent in agents.items() for arm in incomplete_arms(agent)]++ def refreshed_coverage(item: dict[str, Any]) -> bool:+ return item.get("insight_kind") == "execution_coverage" and any(+ item.get("agent") == name and item.get("condition") == arm.condition for name, arm in failed_arms+ )++ retained_conclusions = [+ item+ for item in old_conclusions+ if not is_blob(item, conclusion=True)+ and item.get("insight_kind") != "execution_summary"+ and not refreshed_coverage(item)+ ]+ counts = _run_coverage(payload, summary, agents)+ count_text = (+ f"{counts[0]} of {counts[1]} attempts scored; {counts[1] - counts[0]} of {counts[1]} attempts remain unscored."+ if counts+ else "Attempt coverage is unavailable."+ )+ headline = {+ "title": "Evaluation incomplete",+ "message": f"Tier 3 execution failed. {count_text}",+ "severity": "fail",+ "source": "deterministic",+ "category": "Execution",+ "metric": "agent_eval",+ "insight_kind": "execution_summary",+ }+ # Retain every distinct trace association, including on repeated projection.+ conclusions = []+ for item in old_conclusions:+ if (is_blob(item, conclusion=True) or item.get("insight_kind") == "execution_summary") and item.get("evidence"):+ conclusions.append({**headline, "evidence": item["evidence"]})+ if not conclusions:+ conclusions.append(headline)+ for name, arm in failed_arms:+ coverage = {+ "title": f"{name} · {'With skill' if arm.condition == 'with_skill' else 'Baseline'}",+ "message": f"{name}: {arm}.",+ "severity": "fail",+ "source": "deterministic",+ "category": "Execution",+ "metric": "agent_eval",+ "agent": name,+ "condition": arm.condition,+ "insight_kind": "execution_coverage",+ }+ matches = [+ item+ for item in old_conclusions+ if refreshed_coverage(item) and item.get("agent") == name and item.get("condition") == arm.condition+ ]+ if matches:+ conclusions.extend(+ {**coverage, **item, "title": coverage["title"], "message": coverage["message"]} for item in matches+ )+ else:+ conclusions.append(coverage)+ view["conclusions"] = _unique([*conclusions, *retained_conclusions])+ steps = [+ step for step in _records(view["next_steps"]) if isinstance(step.get("action"), str) and step["action"].strip()+ ]+ fallback_action = "Check the agent and judge logs, fix execution failures, then rerun the evaluation."+ recommendations = []+ for item in _records(view["recommendations"]):+ if is_blob(item, conclusion=False):+ if item.get("evidence"):+ recommendations.append(+ {+ **item,+ "title": "Restore complete execution",+ "message": fallback_action,+ "insight_kind": "execution_action",+ }+ )+ elif not (steps and item.get("insight_kind") == "execution_fallback"):+ recommendations.append(item)+ for step in steps:+ recommendation = {+ "title": step.get("kind") or "Next step",+ "message": step["action"],+ "severity": "warn",+ "source": "deterministic",+ "category": "Action",+ "metric": step.get("target") or "agent_eval",+ "insight_kind": "execution_action",+ }+ for key in ("problem", "agent", "case", "case_id", "condition", "check", "strength"):+ if key in step:+ recommendation[key] = step[key]+ if _matches_error_sequence(step.get("problem"), view["execution_errors"]):+ # Keep the exact problem in card identity, with its prose owned by Diagnostics.+ recommendation["problem_in_diagnostics"] = True+ if step.get("evidence"):+ key = "evidence" if isinstance(step["evidence"], dict) else "evidence_text"+ recommendation[key] = step["evidence"]+ recommendations.append(recommendation)+ if not recommendations:+ recommendations.append(+ {+ "title": "Restore complete execution",+ "category": "Fix",+ "severity": "warn",+ "source": "deterministic",+ "message": fallback_action,+ "metric": "agent_eval",+ "insight_kind": "execution_fallback",+ }+ )+ view["recommendations"] = _unique(recommendations)+ return viewdiff --git a/src/skillevaluator/reporting/json_reporter.py b/src/skillevaluator/reporting/json_reporter.pyindex ea8f6f80..0c1b6361 100644--- a/src/skillevaluator/reporting/json_reporter.py+++ b/src/skillevaluator/reporting/json_reporter.py@@ -411,6 +411,10 @@ class JSONReporter(ReporterBase):if result.metadata.get("confirmed_failure") is True:data["confirmed_failure"] = True+ optional_skip = result.metadata.get("optional_skip")+ if type(optional_skip) is bool:+ data["optional_skip"] = optional_skip+for key in (TIER1_REQUIRED_CHECKS_KEY, TIER1_UNSCANNED_PATHS_KEY):if key in result.metadata:data[key] = _tier1_scope_strings(result.metadata[key], key)diff --git a/src/skillevaluator/reporting/native_evidence.py b/src/skillevaluator/reporting/native_evidence.pynew file mode 100644index 00000000..4f0fd6a8--- /dev/null+++ b/src/skillevaluator/reporting/native_evidence.py@@ -0,0 +1,481 @@+# SPDX-License-Identifier: Apache-2.0+"""Bounded passive presentation of optional retained native Tier 3 fields.++This compatibility adapter consumes sanitized canonical report data. It never+loads sidecars, resolves endpoints, executes comparisons, changes scores or+certifies native policy claims. Unknown fields (including runtime hook/canary+censuses without a public producer) are deliberately not traversed.+"""++from __future__ import annotations++from dataclasses import dataclass, field+from itertools import islice++from skillevaluator.reporting.harbor_viewer import safe_url+from skillevaluator.reporting.plugin_static import _clean_text, _count, _number++_MAX_ROWS = 64+_MAX_TOTAL_ROWS = 256+_MAX_AGENTS = 32+_MAX_NOTES = 8+_MAX_TEXT_BYTES = 48 * 1024+_MAX_AGENT_LABEL_BYTES = 128+# Two attributed sections per agent must remain identifiable after other native+# evidence consumes its allowance. Reserve within the existing aggregate bound.+_AGENT_IDENTITY_BYTES = _MAX_AGENTS * 2 * _MAX_AGENT_LABEL_BYTES+_ACTIVE_DELIVERY = frozenset({"failed", "error", "partial", "incomplete", "indeterminate", "degraded", "upload_failed"})+_CONNECTED = frozenset({"reachable-in-agent", "reachable-host"})+++@dataclass(frozen=True)+class NativeCell:+ text: str+ url: str | None = None+++@dataclass(frozen=True)+class NativeSection:+ key: str+ title: str+ columns: tuple[str, ...]+ rows: tuple[tuple[NativeCell, ...], ...]+ notes: tuple[str, ...]+ omitted_rows: int = 0+ omitted_notes: int = 0+ text_shortened: bool = False+ omitted_groups: int = 0+++@dataclass(frozen=True)+class NativeNotice:+ title: str+ message: str+ target: str+++@dataclass(frozen=True)+class NativeEvidence:+ warnings: tuple[NativeNotice, ...] = ()+ agents: tuple[NativeSection, ...] = ()+ trials: tuple[NativeSection, ...] = ()+ provenance: tuple[NativeSection, ...] = ()+ omitted_agents: int = 0+++def _mapping(value: object) -> dict:+ return value if isinstance(value, dict) else {}+++def _present(value: object) -> bool:+ return (isinstance(value, str) and bool(value.strip())) or type(value) is bool or _number(value) is not None+++def _agent_label(name: object, index: int) -> tuple[str, bool]:+ prefix = f"Agent {index + 1} · "+ text, shortened = _clean_text(name) if isinstance(name, str) else ("unavailable", False)+ encoded = text.encode("utf-8")+ remaining = _MAX_AGENT_LABEL_BYTES - len(prefix.encode("utf-8"))+ if len(encoded) > remaining:+ text = encoded[: remaining - 3].decode("utf-8", "ignore") + "…"+ shortened = True+ return prefix + text, shortened+++@dataclass+class _Budget:+ rows: int = _MAX_TOTAL_ROWS+ text: int = _MAX_TEXT_BYTES - _AGENT_IDENTITY_BYTES+++@dataclass+class _Section:+ key: str+ title: str+ columns: tuple[str, ...]+ budget: _Budget+ rows: list[tuple[NativeCell, ...]] = field(default_factory=list)+ notes: list[str] = field(default_factory=list)+ omitted_rows: int = 0+ omitted_notes: int = 0+ shortened: bool = False+ omitted_groups: int = 0++ def text(self, value: object) -> str:+ if isinstance(value, str):+ text, cut = _clean_text(value)+ self.shortened |= cut+ elif type(value) is bool:+ text = "yes" if value else "no"+ elif _number(value) is not None:+ text = str(value)+ else:+ return "—"+ encoded = text.encode("utf-8")+ if len(encoded) > self.budget.text:+ text = encoded[: self.budget.text].decode("utf-8", "ignore")+ self.shortened = True+ self.budget.text -= len(text.encode("utf-8"))+ return text++ def row(self, *values: object, archive: bool = False) -> None:+ if len(self.rows) >= _MAX_ROWS or self.budget.rows <= 0 or self.budget.text <= 0:+ self.omitted_rows += 1+ self.shortened |= self.budget.text <= 0+ return+ self.budget.rows -= 1+ cells = []+ for index, value in enumerate(values):+ text = self.text(value)+ # Link only a whole, unmodified, explicitly supplied safe URL. Paths+ # remain literal references; no artifact or private URL is inferred.+ url = safe_url(value) if archive and index == len(values) - 1 else None+ cells.append(NativeCell(text, url if url == text else None))+ self.rows.append(tuple(cells))++ def note(self, value: object) -> None:+ if not isinstance(value, str) or not value.strip():+ return+ if len(self.notes) >= _MAX_NOTES:+ self.omitted_notes += 1+ return+ text = self.text(value)+ if text:+ self.notes.append(text)+ else:+ self.omitted_notes += 1++ def values(self, label: str, value: object) -> None:+ if _present(value):+ self.row(label, value)++ def listing(self, label: str, raw: object) -> None:+ if not isinstance(raw, (list, tuple)):+ return+ # Inspect at most the rows that can be shown. Count the rest without+ # traversing their content, including malformed oversized collections.+ limit = min(_MAX_ROWS - len(self.rows), self.budget.rows)+ for value in islice(raw, limit):+ if _present(value):+ self.row(label, value)+ self.omitted_rows += max(0, len(raw) - limit)++ def finish(self) -> NativeSection | None:+ if not (self.rows or self.notes or self.omitted_rows or self.omitted_notes or self.omitted_groups):+ return None+ return NativeSection(+ self.key,+ self.title,+ self.columns,+ tuple(self.rows),+ tuple(self.notes),+ self.omitted_rows,+ self.omitted_notes,+ self.shortened,+ self.omitted_groups,+ )+++def _mcp_rows(section: _Section, raw: object, *, nested: bool) -> None:+ if not isinstance(raw, (list, tuple)):+ return+ limit = min(_MAX_ROWS - len(section.rows), section.budget.rows)+ for item in islice(raw, limit):+ record = _mapping(item)+ if not record:+ continue+ usage = _mapping(record.get("tool_usage")) if nested else record+ calls, failed = _count(usage.get("calls")), _count(usage.get("failed"))+ status = record.get("status")+ interpretation = None+ if failed is not None and failed > 0:+ interpretation = "Recorded tool calls failed; successful MCP-backed behavior is not established (advisory)."+ elif calls == 0 and isinstance(status, str) and status in _CONNECTED:+ interpretation = (+ "Recorded connected, no recorded calls; MCP-backed behavior was not demonstrated (advisory)."+ )+ tools = usage.get("tools")+ if isinstance(tools, (list, tuple)) and len(tools) > 16:+ section.note(f"{len(tools) - 16} tool entries omitted for {section.text(record.get('name'))}.")+ values = (record.get("name"), status, calls, failed, _joined(tools), interpretation)+ if nested:+ values += (+ _count(record.get("tool_count")),+ record.get("url") or _mapping(record.get("endpoint")).get("url"),+ record.get("reason"),+ record.get("remediation"),+ )+ section.row(*values)+ section.omitted_rows += max(0, len(raw) - limit)+++def _joined(raw: object) -> str | None:+ """Bound a list before joining; the section's text cleaner bounds the cell."""+ if not isinstance(raw, (list, tuple)):+ return None+ texts = [value for value in islice(raw, 16) if isinstance(value, str) and len(value) <= 16384]+ if not texts:+ return None+ return ", ".join(texts) + (f" (+{len(raw) - 16} entries omitted)" if len(raw) > 16 else "")+++def _plugin(payload: dict, budget: _Budget, warnings: list[NativeNotice]) -> list[NativeSection]:+ record = _mapping(payload.get("plugin_provenance"))+ section = _Section(+ "plugin-completeness", "Recorded plugin dependency completeness", ("Recorded field", "Value"), budget+ )+ if type(record.get("partial")) is bool:+ section.values("Partial coverage", record["partial"])+ section.values("Sidecar error", record.get("sidecar_error"))+ for key, label in (+ ("evaluated_member_skills", "Resolved skill"),+ ("staged_rules", "Resolved rule"),+ ("unresolved_skill_refs", "Unresolved skill"),+ ("unresolved_rule_refs", "Unresolved rule"),+ ("runnable_mcp_servers", "Runnable MCP server"),+ ("provider_only_mcp_servers", "Provider-only MCP server"),+ ("mcp_unresolved_servers", "Unresolved MCP server"),+ ):+ section.listing(label, record.get(key))+ if record.get("partial") is True or (+ isinstance(record.get("sidecar_error"), str) and record["sidecar_error"].strip()+ ):+ warnings.append(+ NativeNotice(+ "Plugin dependency coverage",+ "Recorded native evidence reports partial or unreadable dependency coverage.",+ section.key,+ )+ )+ result = [finished] if (finished := section.finish()) else []+ mcp = _Section(+ "plugin-mcp",+ "Recorded native MCP evidence",+ (+ "Server",+ "Status",+ "Calls",+ "Failed",+ "Tools",+ "Interpretation",+ "Available tools",+ "Recorded endpoint",+ "Reason",+ "Remediation",+ ),+ budget,+ )+ _mcp_rows(mcp, record.get("mcp_resolutions"), nested=True)+ if finished := mcp.finish():+ result.append(finished)+ configs = _Section(+ "plugin-mcp-configs", "Recorded native MCP configuration exclusions", ("Path", "Entries"), budget+ )+ untrusted = record.get("mcp_untrusted_configs")+ if isinstance(untrusted, (list, tuple)):+ for item in islice(untrusted, _MAX_ROWS):+ config = _mapping(item)+ if config:+ configs.row(config.get("path"), _count(config.get("entries")))+ configs.omitted_rows += max(0, len(untrusted) - _MAX_ROWS)+ if finished := configs.finish():+ result.append(finished)+ return result+++def _composition(payload: dict, budget: _Budget) -> list[NativeSection]:+ record = _mapping(payload.get("integration"))+ section = _Section("integration", "Plugin composition · recorded ablation", ("Recorded field", "Value"), budget)+ for key, label in (+ ("with_plugin", "Coordinated plugin"),+ ("sum_of_parts", "Sum-of-parts baseline"),+ ("integration_lift", "Integration lift"),+ ("verdict", "Recorded verdict"),+ ("point_verdict", "Recorded point verdict"),+ ("requested_lift_mode", "Requested lift mode"),+ ("effective_lift_mode", "Effective lift mode"),+ ("complete", "Complete arm coverage"),+ ):+ value = record.get(key)+ if key in {"with_plugin", "sum_of_parts", "integration_lift"}:+ value = _number(value)+ elif key == "complete" and type(value) is not bool:+ value = None+ section.values(label, value)+ for key in ("reason", "interpretation"):+ section.note(record.get(key))+ uncertainty = _mapping(record.get("lift_uncertainty"))+ for key, label in (+ ("ci_low", "Interval lower bound"),+ ("ci_high", "Interval upper bound"),+ ("n_cases", "Paired cases"),+ ("precision", "Recorded precision"),+ ):+ value = uncertainty.get(key)+ if key in {"ci_low", "ci_high"}:+ value = _number(value)+ elif key == "n_cases":+ value = _count(value)+ section.values(label, value)+ section.listing("Member component", record.get("components"))+ completeness = _mapping(record.get("completeness"))+ section.listing("Missing from sum-of-parts arm", completeness.get("missing_sum_of_parts"))+ section.listing("Missing from plugin arm", completeness.get("missing_with_plugin"))+ signals = _mapping(record.get("component_signals"))+ section.values("Recorded multi-component rate", _number(signals.get("multi_component_rate")))+ unused = _mapping(signals.get("unused_declared"))+ for kind in islice(unused, 16):+ section.listing(f"Declared but unused · {section.text(kind)}", unused[kind])+ section.omitted_groups += max(0, len(unused) - 16)+ unavailable = signals.get("runtime_unavailable")+ if isinstance(unavailable, (list, tuple)):+ section.listing(+ "Unavailable at runtime",+ [_mapping(item).get("name") or _mapping(item).get("type") for item in islice(unavailable, _MAX_ROWS)],+ )+ section.omitted_rows += max(0, len(unavailable) - _MAX_ROWS)+ section.note(signals.get("convention_note"))+ mcp = _mapping(record.get("mcp"))+ for key, label in (+ ("declared", "MCP declared"),+ ("connected_in_agent", "MCP connected in agent"),+ ("used", "MCP servers used"),+ ("failed_calls", "MCP failed calls"),+ ):+ if _count(mcp.get(key)) is not None:+ section.values(label, mcp[key])+ if type(mcp.get("exercised")) is bool:+ section.values("Recorded MCP exercised", mcp["exercised"])+ result = []+ if section.rows or section.notes or section.omitted_rows or section.omitted_groups:+ section.note("Recorded native composition evidence is advisory; public scores and gates are unchanged.")+ result.append(section.finish())+ servers = _Section(+ "integration-mcp",+ "Composition · recorded MCP evidence",+ ("Server", "Status", "Calls", "Failed", "Tools", "Interpretation"),+ budget,+ )+ _mcp_rows(servers, mcp.get("servers"), nested=False)+ if finished := servers.finish():+ result.append(finished)+ return result+++def _delivery(payload: dict, budget: _Budget, warnings: list[NativeNotice]) -> list[NativeSection]:+ record = _mapping(payload.get("harbor_viewer_delivery"))+ section = _Section(+ "viewer-delivery", "Recorded Harbor delivery", ("Job", "Status", "Error", "Retained archive"), budget+ )+ status = record.get("viewer_status")+ if isinstance(status, str) and status.strip():+ section.note(f"Recorded upload status: {status}")+ active = isinstance(status, str) and status in _ACTIVE_DELIVERY+ uploads = record.get("uploads")+ if isinstance(uploads, (list, tuple)):+ for item in islice(uploads, _MAX_ROWS):+ upload = _mapping(item)+ if not upload:+ continue+ upload_status = upload.get("status")+ active |= isinstance(upload_status, str) and upload_status in _ACTIVE_DELIVERY+ section.row(+ upload.get("job_name"),+ upload_status,+ upload.get("error"),+ upload.get("diagnostic_archive"),+ archive=True,+ )+ section.omitted_rows += max(0, len(uploads) - _MAX_ROWS)+ if active:+ warnings.append(+ NativeNotice(+ "Harbor delivery incomplete",+ "A recorded upload failed or remains incomplete. Evaluation evidence is separate from delivery status.",+ section.key,+ )+ )+ return [finished] if (finished := section.finish()) else []+++def _agent(+ name: object, raw: object, index: int, budget: _Budget, warnings: list[NativeNotice]+) -> tuple[list[NativeSection], list[NativeSection]]:+ record = _mapping(raw)+ agent_label, label_shortened = _agent_label(name, index)+ basis = _Section(+ f"refusal-basis-{index}",+ f"Recorded refusal comparison basis · {agent_label}",+ ("Recorded field", "Value"),+ budget,+ )+ basis.shortened = label_shortened+ refusal = _mapping(record.get("safety_refusals"))+ lift = _mapping(_mapping(record.get("pass_at_k")).get("lift"))+ attempts, mixed = _count(refusal.get("attempts")), _count(refusal.get("model_mixed_attempts"))+ for label, value in (("Provider refusal attempts", attempts), ("Mixed-model attempts", mixed)):+ if value is not None:+ basis.values(label, value)+ for key, label in (("categories", "Provider categories"), ("cases", "Recorded refusal case")):+ basis.listing(label, refusal.get(key))+ basis.listing("Recorded excluded comparison case", lift.get("safety_refusal_cases"))+ if isinstance(lift.get("safety_refusal_cases"), (list, tuple)) and lift["safety_refusal_cases"]:+ basis.values("Recorded comparison rate with skill", _number(lift.get("with_skill")))+ basis.values("Recorded comparison rate without skill", _number(lift.get("without_skill")))+ agents = []+ if basis.rows or basis.omitted_rows:+ basis.note(+ "Recorded native refusal and comparison basis; public pass rates, exclusions and denominators are unchanged."+ )+ agents.append(basis.finish())+ cases = refusal.get("cases")+ active = (+ (attempts is not None and attempts > 0)+ or (mixed is not None and mixed > 0)+ or (+ isinstance(cases, (list, tuple))+ and any(isinstance(case, str) and case.strip() for case in islice(cases, _MAX_ROWS))+ )+ )+ # One concise aggregate warning avoids one repeated Overview tile per agent.+ if active and not any(notice.title == "Provider safety notice" for notice in warnings):+ warnings.append(+ NativeNotice(+ "Provider safety notice",+ "Recorded provider refusals or mixed-model attempts are present; inspect the recorded comparison basis.",+ basis.key,+ )+ )+ recovery = _Section(f"recovery-notes-{index}", f"Recorded recovery notes · {agent_label}", (), budget)+ recovery.shortened = label_shortened+ notes = record.get("recovery_notes")+ if isinstance(notes, (list, tuple)):+ for note in islice(notes, _MAX_NOTES):+ recovery.note(note)+ recovery.omitted_notes += max(0, len(notes) - _MAX_NOTES)+ diagnostics = []+ if recovery.notes or recovery.omitted_notes:+ diagnostics.append(recovery.finish())+ return agents, diagnostics+++def build_native_evidence(payload: object = None) -> NativeEvidence:+ """Return independent typed display sections from known native fields only.++ Missing, null and malformed values are omitted rather than interpreted as+ zero, successful, complete or inconclusive. The supplied canonical payload+ is never mutated or copied into this view, and may contain unknown cycles.+ """+ record, budget = _mapping(payload), _Budget()+ warnings: list[NativeNotice] = []+ agents = _plugin(record, budget, warnings)+ trials = _composition(record, budget)+ provenance = _delivery(record, budget, warnings)+ raw_agents = _mapping(record.get("agents"))+ for index, (name, agent) in enumerate(islice(raw_agents.items(), _MAX_AGENTS)):+ agent_sections, diagnostic_sections = _agent(name, agent, index, budget, warnings)+ agents.extend(agent_sections)+ provenance.extend(diagnostic_sections)+ return NativeEvidence(+ tuple(warnings), tuple(agents), tuple(trials), tuple(provenance), max(0, len(raw_agents) - _MAX_AGENTS)+ )diff --git a/src/skillevaluator/reporting/plugin_evidence.py b/src/skillevaluator/reporting/plugin_evidence.pynew file mode 100644index 00000000..fdc45a99--- /dev/null+++ b/src/skillevaluator/reporting/plugin_evidence.py@@ -0,0 +1,203 @@+# SPDX-License-Identifier: Apache-2.0+"""Route bounded, retained plugin observations into the native report tabs.++This module consumes display snapshots only. It never discovers a plugin,+opens its source, runs an agent, or recomputes an observation. Canonical+snapshots and sanitized display sections have independent ownership.+"""++from __future__ import annotations++import copy+import json+import re++from skillevaluator.reporting.plugin_static import (+ MAX_FIELD_INPUT,+ MAX_OUTPUT_BYTES,+ MAX_SECTION_ROWS,+ MAX_TOTAL_ROWS,+ _clean_text,+ _count,+ _number,+)++_SLOTS = ("tier1", "tier2", "overview", "agents", "trials", "provenance")+_STATIC_SLOTS = {+ "catalog_skills": "tier2",+ "catalog_plugins": "tier2",+}+_RUNTIME_SLOTS = {+ "eligibility": "overview",+ "conditions": "overview",+ "loading": "agents",+ "coverage": "agents",+ "signals": "agents",+ "mcp": "agents",+ "mcp_calls": "agents",+ "comparisons": "trials",+ "comparison": "trials", # Compatibility with early retained private views.+ "context": "trials",+ "cost": "trials",+}+_SECTION_FIELDS = {"key", "title", "columns", "rows", "total", "omitted", "notes"}+++def _require(condition: bool, detail: str) -> None:+ if not condition:+ raise ValueError(f"Invalid plugin evidence: {detail}")+++def _snapshot(value: object, owner: str) -> dict | None:+ if value is None:+ return None+ if not isinstance(value, dict):+ payload = getattr(value, "payload", None)+ _require(callable(payload), "expected a snapshot or report with payload()")+ value = payload()+ _require(isinstance(value, dict), "expected a snapshot object")+ text_remaining = MAX_OUTPUT_BYTES++ def text(value: object) -> None:+ nonlocal text_remaining+ _require(isinstance(value, str) and len(value) <= MAX_FIELD_INPUT, "text bound or type")+ text_remaining -= len(value)+ _require(text_remaining >= 0, "aggregate text bound")++ fields = {"schema_version", "name", "status", "truncated", "sections"}+ if owner == "runtime":+ fields |= {"run_id", "execution_status", "evidence_complete", "source"}+ _require(value.keys() == fields, "snapshot fields")+ _require(type(value["schema_version"]) is int and value["schema_version"] == 1, "schema version")+ for field in ("name", "status"):+ text(value[field])+ _require(type(value["truncated"]) is bool, "truncated must be boolean")+ if owner == "runtime":+ for field in ("run_id", "execution_status"):+ text(value[field])+ _require(type(value["evidence_complete"]) is bool, "evidence completeness must be boolean")+ _require(value["status"] in {"complete", "incomplete"}, "runtime status")+ _require(value["evidence_complete"] is (value["status"] == "complete"), "runtime completeness")+ source = value["source"]+ _require(+ isinstance(source, dict) and source.keys() <= {"manifest", "manifest_sha256", "source_tree_sha256"},+ "runtime source",+ )+ for label in source.values():+ text(label)+ else:+ _require(value["status"] in {"passed", "failed", "incomplete"}, "static status")+ sections = value["sections"]+ _require(isinstance(sections, list) and len(sections) <= 32, "section bound or type")+ seen, row_count = set(), 0+ for section in sections:+ _require(isinstance(section, dict) and section.keys() == _SECTION_FIELDS, "section fields")+ key = section["key"]+ _require(isinstance(key, str) and re.fullmatch(r"[a-z][a-z0-9_]{0,63}", key) is not None, "section key")+ _require(key not in seen, "duplicate section")+ seen.add(key)+ text(section["title"])+ columns, rows, notes = section["columns"], section["rows"], section["notes"]+ _require(isinstance(columns, list) and 0 < len(columns) <= 32, "column bound or type")+ _require(isinstance(rows, list) and len(rows) <= MAX_SECTION_ROWS, "row bound or type")+ _require(isinstance(notes, list) and len(notes) <= 8, "note bound or type")+ for label in [*columns, *notes]:+ if label is not None: # Static projections may retain an unavailable note.+ text(label)+ _require(all(isinstance(column, str) for column in columns), "column type")+ for row in rows:+ _require(isinstance(row, list) and len(row) == len(columns), "row width")+ for cell in row:+ if isinstance(cell, str):+ text(cell)+ else:+ _require(cell is None or _number(cell) is not None, "cell type or number")+ total, omitted = section["total"], section["omitted"]+ _require(_count(total) is not None and _count(omitted) is not None, "omission count type")+ _require(total == len(rows) + omitted, "omission counts")+ row_count += len(rows)+ _require(row_count <= MAX_TOTAL_ROWS, "total row bound")+ # The shape is now shallow, acyclic and scalar-only; serialization cannot+ # traverse arbitrary caller objects or unbounded nested structures.+ serialized = json.dumps(value, ensure_ascii=True, allow_nan=False)+ _require(len(serialized.encode("utf-8")) <= MAX_OUTPUT_BYTES, "snapshot byte bound")+ return copy.deepcopy(value)+++def build_plugin_evidence(static: object = None, runtime: object = None) -> dict:+ """Accept existing reports or bounded snapshots, retaining their exact data.++ The six tab values contain independent display sections. ``static`` and+ ``runtime`` contain canonical snapshots for the existing HTML export+ envelope; they are never annotated or shortened for presentation. Footer+ ``metadata`` contains independent sanitized values even without sections.+ """+ view = {slot: [] for slot in _SLOTS}+ view["metadata"] = {"static": None, "runtime": None}+ for owner, supplied in (("static", static), ("runtime", runtime)):+ snapshot = _snapshot(supplied, owner)+ view[owner] = snapshot+ if snapshot is None:+ continue+ metadata = {}+ metadata_shortened = False+ fields = ("name", "status", "execution_status", "run_id") if owner == "runtime" else ("name", "status")+ for field in fields:+ metadata[field], cut = _clean_text(snapshot[field])+ metadata_shortened |= cut+ if owner == "runtime":+ metadata["source"] = {}+ for field, value in snapshot["source"].items():+ metadata["source"][field], cut = _clean_text(value)+ metadata_shortened |= cut+ metadata.update(+ truncated=snapshot["truncated"],+ text_shortened=metadata_shortened,+ notice=(+ "Some metadata text was shortened for display; the export preserves the retained snapshot."+ if metadata_shortened+ else None+ ),+ )+ view["metadata"][owner] = metadata+ destinations = _STATIC_SLOTS if owner == "static" else _RUNTIME_SLOTS+ for raw in snapshot["sections"]:+ section = copy.deepcopy(raw)+ shortened = False++ def clean(value: object) -> object:+ nonlocal shortened+ if not isinstance(value, str):+ return value+ text, cut = _clean_text(value)+ shortened |= cut+ return text++ section["title"] = clean(section["title"])+ section["columns"] = [clean(column) for column in section["columns"]]+ section["rows"] = [[clean(cell) for cell in row] for row in section["rows"]]+ section["notes"] = [clean(note) for note in section["notes"]]+ section.update(+ owner=owner,+ source_label=f"Plugin {owner} evidence",+ name=clean(snapshot["name"]),+ status=clean(snapshot["status"]),+ truncated=snapshot["truncated"],+ run_id=clean(snapshot.get("run_id")),+ execution_status=clean(snapshot.get("execution_status")),+ text_shortened=shortened,+ # Only known neutral absences share an empty-state disclosure.+ # Scope/limitation notes keep their own section summary.+ empty_observation=(+ section["total"] == 0+ and not shortened+ and all(note in (None, "No retained observations for this section.") for note in raw["notes"])+ ),+ first=False,+ )+ destination = destinations.get(section["key"], "tier1" if owner == "static" else "provenance")+ view[destination].append(section)+ first = next((section for slot in _SLOTS for section in view[slot] if section["owner"] == owner), None)+ if first is not None:+ first["first"] = True+ return viewdiff --git a/src/skillevaluator/reporting/plugin_reports.py b/src/skillevaluator/reporting/plugin_reports.pynew file mode 100644index 00000000..1636d6d8--- /dev/null+++ b/src/skillevaluator/reporting/plugin_reports.py@@ -0,0 +1,102 @@+# SPDX-License-Identifier: Apache-2.0+"""Public reporting hooks over the shared passive plugin projections."""++from __future__ import annotations++from typing import TYPE_CHECKING++from skillevaluator.reporting.plugin_runtime_io import runtime_report_from_payload+from skillevaluator.reporting.plugin_runtime_render import _augment as _augment_runtime+from skillevaluator.reporting.plugin_static import project_plugin_static+from skillevaluator.reporting.plugin_static_render import _augment as _augment_static++if TYPE_CHECKING:+ from pathlib import Path++ from skillevaluator.models.result import ValidationResult+ from skillevaluator.reporting.base import ReporterBase+ from skillevaluator.reporting.plugin_runtime import RuntimePluginReport+++def mark_incomplete_plugin_package(result: ValidationResult, engine_result: object) -> None:+ """Mark the result incomplete when the prepared plugin package was incomplete.++ The package's incomplete reasons, such as skill or rule references that were+ not staged, keep this from being a complete plugin evaluation. Scores stay visible.+ """+ provenance = engine_result.get("plugin_provenance") if isinstance(engine_result, dict) else None+ if isinstance(provenance, dict) and provenance.get("complete") is False:+ result.mark_scan_incomplete("plugin-components")+++def attach_saved_plugin_evidence(result: ValidationResult, run_dir: Path, engine_result: dict | None) -> None:+ """Attach passive evidence without changing the canonical score payload.++ The result is also marked incomplete when the prepared plugin package was incomplete.+ """+ from skillevaluator.reporting.plugin_runtime_io import RUNTIME_REPORT_FILENAME, load_plugin_runtime_report++ mark_incomplete_plugin_package(result, engine_result)+ live = None+ if isinstance(engine_result, dict):+ inventory = engine_result.get("plugin_inventory")+ if isinstance(inventory, dict):+ result.metadata["plugin"] = inventory+ live = engine_result.get("plugin_runtime_report")+ try:+ try:+ (run_dir / RUNTIME_REPORT_FILENAME).lstat()+ except FileNotFoundError:+ if live is None:+ return+ report = runtime_report_from_payload(live)+ else:+ report = load_plugin_runtime_report(run_dir)+ result.metadata["plugin_runtime_report"] = report.payload()+ except (OSError, ValueError):+ result.metadata["plugin_runtime_report_error"] = "Saved plugin runtime evidence is unavailable"+ result.add_warning("Saved plugin runtime evidence is unavailable")+++def runtime_report_for_results(results: list[ValidationResult]) -> RuntimePluginReport | None:+ """Read a validated display snapshot without opening a source or run directory."""+ snapshots = [+ result.metadata["plugin_runtime_report"] for result in results if "plugin_runtime_report" in result.metadata+ ]+ if not snapshots:+ return None+ report = runtime_report_from_payload(snapshots[0])+ # A combined report must never silently choose between conflicting runs.+ for payload in snapshots[1:]:+ if runtime_report_from_payload(payload) != report:+ raise ValueError("Conflicting plugin runtime report snapshots")+ return report+++def render_plugin_report(reporter: ReporterBase, results: list[ValidationResult]) -> str:+ """Compose the existing format with bounded static and retained runtime views."""+ return augment_plugin_report(reporter, None, results)+++def augment_plugin_report(reporter: ReporterBase, document: str | None, results: list[ValidationResult]) -> str:+ """Compose passive evidence with a document or CLI stream.++ HTML needs both snapshots before its single native template render. Other+ formats retain their existing document augmentation; ``None`` asks this+ hook to render the base document after validating the retained snapshot.+ """+ projection = project_plugin_static(results)+ report = runtime_report_for_results(results)+ if reporter.name == "html" and (document is None or projection is not None or report is not None):+ return reporter.render_all(+ results,+ plugin_static=projection.payload() if projection is not None else None,+ plugin_runtime=report.payload() if report is not None else None,+ )+ if document is None:+ document = reporter.render_all(results)+ if projection is not None:+ document = _augment_static(reporter, document, results, projection, projection.payload())+ if reporter.name == "benchmark" and (projection is not None or report is not None):+ document = document.replace("# Skill Benchmark:", "# Plugin Benchmark:", 1)+ return _augment_runtime(reporter, document, report.payload()) if report is not None else documentdiff --git a/src/skillevaluator/reporting/plugin_runtime_io.py b/src/skillevaluator/reporting/plugin_runtime_io.pyindex ef301538..148619fd 100644--- a/src/skillevaluator/reporting/plugin_runtime_io.py+++ b/src/skillevaluator/reporting/plugin_runtime_io.py@@ -130,6 +130,19 @@ def _validate(payload: object) -> RuntimePluginReport:return RuntimePluginReport(serialized)+def runtime_report_from_payload(payload: object) -> RuntimePluginReport:+ """Validate a bounded, detached snapshot supplied by an in-process caller."""+ chunks = []+ size = 0+ for chunk in json.JSONEncoder(ensure_ascii=True, allow_nan=False).iterencode(payload):+ size += len(chunk)+ if size > MAX_OUTPUT_BYTES:+ raise ValueError("Runtime report exceeds its publication bound")+ chunks.append(chunk)+ detached = load_bounded_json("".join(chunks), max_nodes=50_000, max_tokens=50_000, max_collection_items=4096)+ return _validate(detached)++def save_plugin_runtime_report(report: RuntimePluginReport, run_dir: Path) -> None:"""Atomically retain one bounded sanitized snapshot in the selected run directory."""# Writing needs the tier3 output helpers; replay stays free of tier3 imports.diff --git a/src/skillevaluator/reporting/plugin_runtime_render.py b/src/skillevaluator/reporting/plugin_runtime_render.pyindex 30d4574f..4fef6ef7 100644--- a/src/skillevaluator/reporting/plugin_runtime_render.py+++ b/src/skillevaluator/reporting/plugin_runtime_render.py@@ -6,7 +6,15 @@ from __future__ import annotationsimport jsonfrom typing import TYPE_CHECKING-from skillevaluator.reporting.plugin_static_render import _cli, _markdown, render_plugin_static_reports+from skillevaluator.reporting.plugin_static import project_plugin_static+from skillevaluator.reporting.plugin_static_render import (+ _augment as _augment_static,+)+from skillevaluator.reporting.plugin_static_render import (+ _cli,+ _markdown,+ render_plugin_static_reports,+)if TYPE_CHECKING:from collections.abc import Iterable@@ -30,10 +38,7 @@ def _augment(reporter: ReporterBase, document: str, payload: dict) -> str:data["runs"][0].setdefault("properties", {})["pluginRuntime"] = payloadreturn json.dumps(data, indent=reporter.indent, ensure_ascii=True, allow_nan=False)if reporter.name == "html":- fragment = reporter._env.get_template("plugin_runtime_sections.html.j2").render(plugin_runtime=payload)- if "</main>" not in document:- raise ValueError("The HTML reporter did not provide its main content boundary")- return document.replace("</main>", fragment + "\n</main>", 1)+ raise ValueError("HTML runtime evidence must be supplied to render_all before rendering")options = {"title": _TITLE,"notice": _NOTICE,@@ -52,7 +57,7 @@ def _augment(reporter: ReporterBase, document: str, payload: dict) -> str:def render_plugin_runtime_reports(results: list[ValidationResult],*,- report: RuntimePluginReport | None,+ report: RuntimePluginReport | dict | None,reporters: Iterable[ReporterBase],) -> dict[str, str]:"""Compose static and runtime evidence without collecting or changing results.@@ -61,8 +66,18 @@ def render_plugin_runtime_reports(does not add public dispatch or require an optional execution dependency."""selected = tuple(reporters)- rendered = render_plugin_static_reports(results, reporters=selected)if report is None:- return rendered- payload = report.payload()- return {reporter.name: _augment(reporter, rendered[reporter.name], payload) for reporter in selected}+ return render_plugin_static_reports(results, reporters=selected)+ projection = project_plugin_static(results)+ static = projection.payload() if projection is not None else None+ payload = report if isinstance(report, dict) else report.payload()+ rendered = {}+ for reporter in selected:+ if reporter.name == "html":+ rendered[reporter.name] = reporter.render_all(results, plugin_static=static, plugin_runtime=payload)+ continue+ document = reporter.render_all(results)+ if projection is not None:+ document = _augment_static(reporter, document, results, projection, static)+ rendered[reporter.name] = _augment(reporter, document, payload)+ return rendereddiff --git a/src/skillevaluator/reporting/plugin_static_render.py b/src/skillevaluator/reporting/plugin_static_render.pyindex 5a731f75..a729fb37 100644--- a/src/skillevaluator/reporting/plugin_static_render.py+++ b/src/skillevaluator/reporting/plugin_static_render.py@@ -126,10 +126,7 @@ def _augment(row.setdefault("properties", {})["pluginComponent"] = componentreturn json.dumps(data, indent=reporter.indent, ensure_ascii=True, allow_nan=False)if reporter.name == "html":- fragment = reporter._env.get_template("plugin_static_sections.html.j2").render(plugin_static=payload)- if "</main>" not in document:- raise ValueError("The HTML reporter did not provide its main content boundary")- return document.replace("</main>", fragment + "\n</main>", 1)+ return reporter.render_all(results, plugin_static=payload)if reporter.name in {"markdown", "benchmark"}:return document.rstrip() + "\n\n" + _markdown(payload, publication=reporter.name == "benchmark").rstrip() + "\n"if reporter.name == "cli":@@ -150,8 +147,11 @@ def render_plugin_static_reports(payload = projection.payload() if projection is not None else Nonerendered = {}for reporter in reporters:- document = reporter.render_all(results)- rendered[reporter.name] = (- _augment(reporter, document, results, projection, payload) if projection is not None else document- )+ if reporter.name == "html" and projection is not None:+ rendered[reporter.name] = reporter.render_all(results, plugin_static=payload)+ else:+ document = reporter.render_all(results)+ rendered[reporter.name] = (+ _augment(reporter, document, results, projection, payload) if projection is not None else document+ )return rendereddiff --git a/src/skillevaluator/reporting/retained.py b/src/skillevaluator/reporting/retained.pyindex 4d29ce35..97801d80 100644--- a/src/skillevaluator/reporting/retained.py+++ b/src/skillevaluator/reporting/retained.py@@ -306,6 +306,9 @@ def retained_results(if "skipped" in row:_require(type(row["skipped"]) is bool, "skipped must be boolean")metadata["skipped"] = row["skipped"]+ if "optional_skip" in row:+ _require(type(row["optional_skip"]) is bool, "optional_skip must be boolean")+ metadata["optional_skip"] = row["optional_skip"]if "confirmed_failure" in row:_require(type(row["confirmed_failure"]) is bool, "confirmed_failure must be boolean")metadata["confirmed_failure"] = row["confirmed_failure"]diff --git a/src/skillevaluator/reporting/telemetry_view.py b/src/skillevaluator/reporting/telemetry_view.pynew file mode 100644index 00000000..e206643c--- /dev/null+++ b/src/skillevaluator/reporting/telemetry_view.py@@ -0,0 +1,301 @@+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0+"""Bounded, read-only presentation of recorded native Tier 3 telemetry.++This adapter reads only named accounting fields. It does not walk trials, sum+counters, calculate timing, or decide whether two conditions are comparable.+The canonical payload and the newer public resources presentation stay separate.+"""++from __future__ import annotations++import json+import math+import unicodedata+from collections.abc import Mapping+from html import escape+from itertools import islice+from typing import Any++from skillevaluator.utils.redaction import redact_sensitive_text+from skillevaluator.utils.rich_markup import strip_terminal_controls++_MAX_AGENTS = 32+_MAX_CASES_PER_AGENT = 64+_MAX_SCOPES = 128+_MAX_TEXT_CHARS = 240+_MAX_TEXT_INPUT_CHARS = 16384+_MAX_TEXT_ITEMS = 8+_SECTION_BYTES = 100 * 1024+_FAMILY_BYTES = 92 * 1024+_CHART_LABEL_CHARS = 80+_MAX_NUMBER = 2**53 - 1+_TOKEN_FIELDS = (+ "prompt_tokens",+ "cached_tokens",+ "uncached_prompt_tokens",+ "completion_tokens",+ "total_tokens",+ "efficiency_tokens",+)+_LATENCY_FIELDS = ("llm_s", "tool_exec_s", "llm_ms_per_token")+_CONDITIONS = (("with_skill", "With skill"), ("baseline", "Without skill"))+_TIMING_NAMES = {"atif": "native (ATIF)", "step_timestamps": "inferred (timestamps)"}+++def _mapping(value: object) -> Mapping:+ return value if isinstance(value, Mapping) else {}+++def _number(value: object, *, signed: bool = False, integer: bool = False) -> int | float | None:+ if type(value) not in (int, float) or (integer and type(value) is not int):+ return None+ # Compare before converting: even a maliciously large Python int is bounded.+ if not -_MAX_NUMBER <= value <= _MAX_NUMBER or (not signed and value < 0):+ return None+ return value if math.isfinite(value) else None+++def _display(value: object, *, signed: bool = False, integer: bool = False) -> str:+ number = _number(value, signed=signed, integer=integer)+ if number is None:+ return "N/A"+ return format(number, "+," if signed else ",")+++class _Text:+ """Limit copied text before encoding; never stringify arbitrary objects."""++ def __init__(self) -> None:+ self.shortened = False++ def __call__(self, value: object, default: str = "") -> str:+ if not isinstance(value, str):+ return default+ if len(value) > _MAX_TEXT_INPUT_CHARS:+ self.shortened = True+ return "[text exceeds inspection bound]"+ # Inspect the complete bounded field before shortening: a cut API key+ # or authorization header may no longer match its redaction pattern.+ value = redact_sensitive_text(strip_terminal_controls(value))+ value = "".join(+ "\ufffd"+ if unicodedata.category(char) == "Cs"+ else f"\\u{ord(char):04x}"+ if unicodedata.category(char) == "Cf"+ else char+ for char in value+ )+ if len(value) > _MAX_TEXT_CHARS:+ self.shortened = True+ return value[:_MAX_TEXT_CHARS] + ("…" if len(value) > _MAX_TEXT_CHARS else "")++ def items(self, value: object) -> list[str]:+ if not isinstance(value, list):+ return []+ items = [self(item) for item in value[:_MAX_TEXT_ITEMS] if isinstance(item, str)]+ if len(value) > _MAX_TEXT_ITEMS:+ self.shortened = True+ items.append("Additional recorded items omitted; see JSON.")+ return items+++def _coverage(raw: object, text: _Text) -> tuple[str, list[str]]:+ coverage = _mapping(raw)+ status = text(coverage.get("status"), "unknown")+ counts = [_number(coverage.get(key), integer=True) for key in ("measured_attempts", "expected_attempts")]+ summary = f"{counts[0] if counts[0] is not None else '?'}/{counts[1] if counts[1] is not None else '?'} · {status}"+ notes = []+ for key, label in (+ ("observed_attempts", "observed"),+ ("partial_attempts", "partial"),+ ("unscored_attempts", "unscored"),+ ):+ if (value := _number(coverage.get(key), integer=True)) is not None:+ notes.append(f"{value:,} {label}")+ notes.extend(text.items(coverage.get("reason_codes")))+ return summary, notes+++def _scope_rows(scope: Mapping, *, case: str, latency: bool, runtime: Mapping, text: _Text) -> list[dict]:+ fields = _LATENCY_FIELDS if latency else _TOKEN_FIELDS+ rows = []+ for condition, label in _CONDITIONS:+ arm = _mapping(scope.get(condition))+ totals = _mapping(arm.get("totals"))+ coverage = _mapping(arm.get("coverage"))+ # Native token totals need positive measured coverage. Missing coverage+ # never turns an aggregate default zero into an observed measurement.+ measured = _number(coverage.get("measured_attempts"), integer=True)+ has_counts = latency or (measured is not None and measured > 0 and coverage.get("status") != "not_run")+ values = [_display(totals.get(key) if has_counts else None, integer=not latency) for key in fields]+ if latency:+ sources = text.items(coverage.get("llm_timing_sources"))+ values.append(", ".join(_TIMING_NAMES.get(source, source) for source in sources) or "—")+ arm_runtime = _mapping(runtime.get("with_skill" if condition == "with_skill" else "without_skill"))+ values.append(_display(arm_runtime.get("duration_ms")) if runtime else "—")+ summary, notes = _coverage(coverage, text)+ rows.append({"case": case, "condition": label, "values": values, "coverage": summary, "notes": notes})++ delta = _mapping(scope.get("delta"))+ status = text(delta.get("status"), "unknown")+ # Native 'partial' may record an absolute change with no percent (zero+ # baseline), or a tool-only change. Preserve it without creating a value.+ comparable = status in ("available", "partial")+ values = []+ percentages = {+ "total_tokens": "total_tokens_change_percent",+ "llm_s": "llm_s_change_percent",+ "llm_ms_per_token": "llm_ms_per_token_change_percent",+ }+ for key in fields:+ value = delta.get(key) if comparable else None+ cell = _display(value, signed=True, integer=not latency)+ percent = _number(delta.get(percentages.get(key, "")), signed=True) if comparable else None+ if cell != "N/A" and percent is not None:+ cell += f" ({percent:+.2f}%)"+ values.append(cell)+ if latency:+ values.extend(("—", "—"))+ notes = [text(delta.get("reason"))] if delta.get("reason") else []+ notes.extend(text.items(delta.get("reason_codes")))+ rows.append(+ {"case": case, "condition": "Change (with - without)", "values": values, "coverage": status, "notes": notes}+ )+ return rows+++def _sections(raw: object, *, latency: bool) -> list[dict[str, Any]]:+ usage = _mapping(raw)+ text = _Text()+ sections: list[dict[str, Any]] = []+ scopes = 0+ byte_count = 0+ omitted = 0++ def append(scope: Mapping, case: str, section: dict, runtime: Mapping | None = None) -> bool:+ nonlocal scopes, byte_count+ if scopes >= _MAX_SCOPES:+ return False+ rows = _scope_rows(scope, case=case, latency=latency, runtime=runtime or {}, text=text)+ # Charge escaped text as well: a '<' costs four bytes in the table,+ # while its JSON string needs only one. This also bounds HTML output.+ size = len(escape(json.dumps(rows, ensure_ascii=True)).encode("utf-8"))+ if byte_count + size > _SECTION_BYTES:+ return False+ scopes += 1+ byte_count += size+ section["rows"].extend(rows)+ return True++ dataset = usage.get("dataset")+ if isinstance(dataset, Mapping) and dataset:+ section = {"label": "Dataset", "rows": [], "notes": []}+ append(dataset, "All cases", section)+ sections.append(section)++ agents = _mapping(usage.get("agents"))+ for name, agent in islice(agents.items(), _MAX_AGENTS):+ if not isinstance(name, str) or not isinstance(agent, Mapping):+ continue+ section = {"label": text(name), "rows": [], "notes": []}+ cases = agent.get("cases")+ cases = cases if isinstance(cases, list) else []+ if not append(agent, "All cases", section, _mapping(agent.get("arm_runtime_ms"))):+ omitted += 1 + len(cases)+ continue+ for index, case in enumerate(cases[:_MAX_CASES_PER_AGENT]):+ if not isinstance(case, Mapping):+ continue+ label = text(case.get("entry_id"), "unknown")+ if case.get("case_id_in_dataset") is False:+ label += " (unverified case ID)"+ section["notes"] = ["Unverified case IDs are measured attempts, not verified dataset coverage."]+ if not append(case, label, section):+ omitted += min(len(cases), _MAX_CASES_PER_AGENT) - index+ break+ omitted += max(0, len(cases) - _MAX_CASES_PER_AGENT)+ sections.append(section)+ if not sections:+ return []+ omitted_agents = max(0, len(agents) - _MAX_AGENTS)+ first = sections[0]+ first["source"] = text(usage.get("source"), "unknown")+ first["schema_version"] = text(usage.get("schema_version"), "unknown")+ if omitted:+ first["notes"].append(f"{omitted:,} scope/case row group(s) omitted by display limits; see JSON.")+ if omitted_agents:+ first["notes"].append(f"{omitted_agents:,} agent(s) omitted by display limits; see JSON.")+ if dropped := _number(usage.get("case_rows_omitted"), integer=True):+ first["notes"].append(+ f"{dropped:,} case row(s) omitted before this display projection; retained JSON may also be incomplete."+ )+ if usage.get("baseline_reused") is True:+ first["notes"].append("Historical baseline: baseline measurements were recorded in an earlier run.")+ if text.shortened:+ first["notes"].append(+ "Display text shortened or recorded list items omitted; see retained JSON for full recorded text."+ )+ # Include labels, provenance and omission notes in the family byte bound,+ # not just row values. Astral Unicode takes twelve bytes in ASCII JSON.+ if len(json.dumps(sections).encode("utf-8")) > _FAMILY_BYTES:+ first["notes"].append("Additional scope/case row groups omitted by display byte limits; see JSON.")+ while len(json.dumps(sections).encode("utf-8")) > _FAMILY_BYTES:+ if len(sections[-1]["rows"]) > 3:+ del sections[-1]["rows"][-3:]+ elif len(sections) > 1:+ sections.pop()+ else:+ # Even a maximal single scope is smaller than the budget;+ # retain the qualification if malformed input ever reaches it.+ first["rows"].clear()+ break+ return sections+++def _token_chart(raw: object) -> dict[str, Any] | None:+ agents = _mapping(_mapping(raw).get("agents"))+ labels: list[str] = []+ fields = ("uncached_prompt_tokens", "cached_tokens", "completion_tokens")+ datasets: list[dict[str, Any]] = [+ {"label": label, "data": []} for label in ("Uncached prompt", "Cached prompt", "Completion")+ ]+ text = _Text()+ for name, agent in islice(agents.items(), _MAX_AGENTS):+ if not isinstance(name, str) or not isinstance(agent, Mapping):+ continue+ for condition, label in _CONDITIONS:+ arm = _mapping(agent.get(condition))+ coverage = _mapping(arm.get("coverage"))+ measured = _number(coverage.get("measured_attempts"), integer=True)+ if measured is None or measured == 0 or coverage.get("status") == "not_run":+ continue+ totals = _mapping(arm.get("totals"))+ values = [_number(totals.get(key), integer=True) for key in fields]+ if all(value is None for value in values):+ continue+ name_label = text(name)[:_CHART_LABEL_CHARS] + ("…" if len(name) > _CHART_LABEL_CHARS else "")+ labels.append(f"{name_label} · {label}" + (" (partial)" if coverage.get("status") != "complete" else ""))+ for dataset, value in zip(datasets, values, strict=True):+ dataset["data"].append(value)+ return {"labels": labels, "datasets": datasets} if labels else None+++def build_telemetry_view(payload: object) -> dict[str, Any]:+ """Project native recorded telemetry with bounded traversal, text and bytes.++ At most 32 agents, 64 cases/agent and 128 scope groups per metric family+ are considered. Each family (including metadata) is capped at 92 KiB+ encoded JSON; metadata/chart bounds keep the complete view below 256 KiB. Unknown+ measurements stay unavailable, and all chart/table lists are newly owned.+ """+ payload = _mapping(payload)+ tokens = _sections(payload.get("token_usage"), latency=False)+ latency = _sections(payload.get("latency_metrics"), latency=True)+ return {+ "token_sections": tokens,+ "latency_sections": latency,+ "token_chart": _token_chart(payload.get("token_usage")),+ "has_tokens": bool(tokens),+ "has_latency": bool(latency),+ }diff --git a/src/skillevaluator/reporting/templates/dataset_diagnostics.html.j2 b/src/skillevaluator/reporting/templates/dataset_diagnostics.html.j2new file mode 100644index 00000000..76cff863--- /dev/null+++ b/src/skillevaluator/reporting/templates/dataset_diagnostics.html.j2@@ -0,0 +1,52 @@+{# Presentation of retained judgments; group only exact explanations within an attempt/status. #}+{% macro render_case_diagnostics(diagnostics, case_id, shared_errors, case_index=0) %}+{% for diagnostic in diagnostics if diagnostic.entry_id == case_id %}+{% set diagnostic_index = loop.index0 %}+<div class="t3-ds-field">+ <span class="t3-ds-label">Expectation diagnostics</span>+ {% for attempt in diagnostic.attempts %}+ {% set attempt_index = loop.index0 %}+ <details class="t3-details">+ <summary>{{ attempt.agent }} · {{ 'With skill' if attempt.condition == 'with_skill' else 'Without skill' }} · {{ attempt.trial_id or 'No matched trial' }}</summary>+ <div class="t3-details-body">+ {% set shared = namespace(present=false) %}+ {% for error in attempt.errors %}+ {% if error in shared_errors %}{% set shared.present = true %}{% else %}<p>{{ error }}</p>{% endif %}+ {% endfor %}+ {% if shared.present %}<p><a href="#tier3-execution-errors">Shared run execution errors in Diagnostics</a></p>{% endif %}+ {% if attempt.judge_note %}<p>{{ attempt.judge_note }}</p>{% endif %}+ {% for status_group in attempt.status_groups %}+ {% set status_index = loop.index0 %}+ <h4>{{ status_group.status | replace('_', ' ') | title }} ({{ status_group.count }})</h4>+ {% for group in status_group.groups %}+ {% set explanation_number = loop.index %}+ {% set explanation_id = 'tier3-diagnostic-' ~ case_index ~ '-' ~ diagnostic_index ~ '-' ~ attempt_index ~ '-' ~ status_index ~ '-' ~ loop.index0 %}+ <div id="{{ explanation_id }}">+ <p><b>Explanation {{ explanation_number }}</b> · {{ group.judgments | length }} requirement{{ 's' if group.judgments | length != 1 else '' }}</p>+ <div>{{ group.reason }}</div>+ {% if status_group.status != 'met' %}<div>Next diagnostic step: {{ group.next_step }}</div>{% endif %}+ </div>+ <ul class="t3-ds-diagnostics">+ {% for judgment in group.judgments %}+ <li>+ {% set matched = namespace(present=false) %}+ {% for requirement in diagnostic.requirements if requirement.expectation_id == judgment.expectation_id %}+ {% set matched.present = true %}+ <div><b>{{ requirement.expectation_id }}</b>: <span style="white-space:pre-wrap;">{{ requirement.requirement }}</span></div>+ {% endfor %}+ {% if not matched.present %}<div><b>{{ judgment.expectation_id }}</b></div>{% endif %}+ <div><a href="#{{ explanation_id }}">Explanation {{ explanation_number }}</a></div>+ {% if judgment.unmet_checks %}<div>Unmet rubric checks: {{ judgment.unmet_checks | join(', ') }}</div>{% endif %}+ {% if judgment.inapplicable_checks %}<div>Inapplicable rubric checks: {{ judgment.inapplicable_checks | join(', ') }}</div>{% endif %}+ {% for excerpt in judgment.evidence %}<div><code>{{ excerpt }}</code></div>{% endfor %}+ </li>+ {% endfor %}+ </ul>+ {% endfor %}+ {% endfor %}+ </div>+ </details>+ {% endfor %}+</div>+{% endfor %}+{% endmacro %}diff --git a/src/skillevaluator/reporting/templates/native_evidence.html.j2 b/src/skillevaluator/reporting/templates/native_evidence.html.j2new file mode 100644index 00000000..c84f2be8--- /dev/null+++ b/src/skillevaluator/reporting/templates/native_evidence.html.j2@@ -0,0 +1,34 @@+{# Optional native fields use the same disclosures and tables as public evidence. #}+{% macro render_native_warnings(evidence) -%}+{% if evidence.warnings %}+<div class="t3-other-agent-notes" id="tier3-native-notices" role="status">+ {% for notice in evidence.warnings %}<p><strong>{{ notice.title }}.</strong> {{ notice.message }} <a href="#native-{{ notice.target }}">Recorded details</a></p>{% endfor %}+</div>+{% endif %}+{%- endmacro %}++{% macro render_native_section(section) -%}+<details class="t3-details" id="native-{{ section.key }}">+ <summary>{{ section.title }}{% if section.omitted_rows %} · {{ section.omitted_rows }} rows omitted{% endif %}{% if section.omitted_notes %} · {{ section.omitted_notes }} notes omitted{% endif %}{% if section.omitted_groups %} · {{ section.omitted_groups }} component groups omitted{% endif %}{% if section.text_shortened %} · text shortened{% endif %}</summary>+ <div class="t3-details-body">+ {% for note in section.notes %}<p>{{ note }}</p>{% endfor %}+ {% if section.rows %}+ <div class="table-scroll" tabindex="0" role="region" aria-label="{{ section.title }}">+ <table class="summary-table">+ <thead><tr>{% for column in section.columns %}<th scope="col">{{ column }}</th>{% endfor %}</tr></thead>+ <tbody>{% for row in section.rows %}<tr>{% for cell in row %}<td>{% if cell.url %}<a href="{{ cell.url }}" target="_blank" rel="noopener noreferrer">{{ cell.text }}</a>{% else %}{{ cell.text }}{% endif %}</td>{% endfor %}</tr>{% endfor %}</tbody>+ </table>+ </div>+ {% endif %}+ {% if section.omitted_rows %}<p>{{ section.omitted_rows }} rows omitted from this display.</p>{% endif %}+ {% if section.omitted_notes %}<p>{{ section.omitted_notes }} notes omitted from this display.</p>{% endif %}+ {% if section.omitted_groups %}<p>{{ section.omitted_groups }} component groups omitted from this display.</p>{% endif %}+ {% if section.text_shortened %}<p>Some text shortened for display; the canonical export retains the recorded evidence.</p>{% endif %}+ </div>+</details>+{%- endmacro %}++{% macro render_native_evidence(evidence, slot) -%}+{% for section in evidence[slot] %}{{ render_native_section(section) }}{% endfor %}+{% if slot == 'provenance' and evidence.omitted_agents %}<p>{{ evidence.omitted_agents }} agents omitted from optional native evidence display; consult the canonical export.</p>{% endif %}+{%- endmacro %}diff --git a/src/skillevaluator/reporting/templates/plugin_evidence.html.j2 b/src/skillevaluator/reporting/templates/plugin_evidence.html.j2new file mode 100644index 00000000..68691469--- /dev/null+++ b/src/skillevaluator/reporting/templates/plugin_evidence.html.j2@@ -0,0 +1,50 @@+{# Bounded retained evidence shares the report's native disclosure and table styles. #}+{% macro render_section(section) -%}+<details class="t3-details" id="plugin-{{ section.owner }}-{{ section.key }}">+ <summary>{{ section.title }}{% if section.omitted %} · {{ section.omitted }} rows omitted{% endif %}{% if section.text_shortened %} · text shortened{% endif %}</summary>+ {% for note in section.notes %}{% if note is not none %}<p>{{ note }}</p>{% endif %}{% endfor %}+ {% if section.rows %}+ <div class="table-scroll" tabindex="0" role="region" aria-label="{{ section.title }}">+ <table class="contributor-table plugin-{{ section.owner }}-table">+ <thead><tr>{% for column in section.columns %}<th scope="col">{{ column }}</th>{% endfor %}</tr></thead>+ <tbody>{% for row in section.rows %}<tr>{% for cell in row %}<td>{{ 'unknown' if cell is none else cell }}</td>{% endfor %}</tr>{% endfor %}</tbody>+ </table>+ </div>+ {% endif %}+ {% if section.omitted %}<p>{{ section.omitted }} more rows omitted ({{ section.total }} total).</p>{% endif %}+ {% if section.text_shortened %}<p>Some text was shortened for display. The export preserves the retained snapshot; values shortened before retention cannot be recovered.</p>{% endif %}+</details>+{%- endmacro %}++{% macro render_plugin_evidence(evidence, slot) -%}+{% for owner in ['static', 'runtime'] %}+{% set sections = evidence[slot] | selectattr('owner', 'equalto', owner) | list %}+{% if sections %}+{% set source = sections[0] %}+<section{% if sections | selectattr('first') | list %} id="plugin-{{ owner }}-evidence"{% endif %} aria-label="{{ source.source_label }}">+ <p class="plugin-evidence-source"><strong>{{ source.source_label }} · {{ source.name }}</strong> · {% if owner == 'runtime' %}Evidence {{ source.status }} · execution {{ source.execution_status }} · advisory snapshot; scores and validation gates unchanged.{% else %}Static snapshot · {{ source.status }}; does not demonstrate runtime loading or behavior.{% endif %}</p>+ {% if source.truncated %}<p class="t3-dim-hint"><a href="#report-retention-limits">Retained evidence limits</a></p>{% endif %}+ {% for section in sections if not section.empty_observation %}+ {{ render_section(section) }}+ {% endfor %}+ {% set empty = sections | selectattr('empty_observation') | list %}+ {% if empty %}+ <details class="t3-details" id="plugin-{{ owner }}-empty-{{ slot }}">+ <summary>{{ empty | length }} empty observation{{ '' if empty | length == 1 else 's' }}</summary>+ {% for section in empty %}{{ render_section(section) }}{% endfor %}+ </details>+ {% endif %}+</section>+{% endif %}+{% endfor %}+{%- endmacro %}++{% macro render_retention_limits(evidence) -%}+{% if (evidence.metadata.static and evidence.metadata.static.truncated) or (evidence.metadata.runtime and evidence.metadata.runtime.truncated) %}+<details class="t3-details" id="report-retention-limits">+ <summary>Retained evidence limits</summary>+ <p>Retained snapshot is bounded. Values shortened before retention cannot be recovered. Section summaries identify omitted rows and display shortening.</p>+ <p>Exports preserve the recorded snapshot. Detailed sections identify their own row omissions and shortened display cells.</p>+</details>+{% endif %}+{%- endmacro %}diff --git a/src/skillevaluator/reporting/templates/plugin_runtime_sections.html.j2 b/src/skillevaluator/reporting/templates/plugin_runtime_sections.html.j2deleted file mode 100644index 8a90176f..00000000--- a/src/skillevaluator/reporting/templates/plugin_runtime_sections.html.j2+++ /dev/null@@ -1,20 +0,0 @@-<section class="table-section" id="plugin-runtime-evidence" aria-label="Plugin runtime evidence">- <h2>Plugin runtime evidence: {{ plugin_runtime.name }}</h2>- <p>Evidence status: {{ plugin_runtime.status }}. Execution status: {{ plugin_runtime.execution_status }}.</p>- <p>Run: {{ 'unknown' if plugin_runtime.run_id is none else plugin_runtime.run_id }}</p>- <p>Advisory observations do not change scores or validation gates.</p>- {% if plugin_runtime.truncated %}<p>Some runtime evidence was omitted by report bounds; see section counts.</p>{% endif %}- {% for section in plugin_runtime.sections %}- <section aria-label="{{ section.title }}">- <h3>{{ section.title }}</h3>- {% for note in section.notes %}{% if note is not none %}<p>{{ note }}</p>{% endif %}{% endfor %}- {% if section.rows %}- <div class="table-scroll" tabindex="0" role="region" aria-label="{{ section.title }}"><table class="contributor-table plugin-runtime-table">- <thead><tr>{% for column in section.columns %}<th scope="col">{{ column }}</th>{% endfor %}</tr></thead>- <tbody>{% for row in section.rows %}<tr>{% for cell in row %}<td>{{ 'unknown' if cell is none else cell }}</td>{% endfor %}</tr>{% endfor %}</tbody>- </table></div>- {% endif %}- {% if section.omitted %}<p>{{ section.omitted }} more rows omitted ({{ section.total }} total).</p>{% endif %}- </section>- {% endfor %}-</section>diff --git a/src/skillevaluator/reporting/templates/plugin_static_sections.html.j2 b/src/skillevaluator/reporting/templates/plugin_static_sections.html.j2deleted file mode 100644index bba30fec..00000000--- a/src/skillevaluator/reporting/templates/plugin_static_sections.html.j2+++ /dev/null@@ -1,18 +0,0 @@-<section class="table-section" id="plugin-static-evidence" aria-label="Plugin static evidence">- <h2>Plugin static evidence: {{ plugin_static.name }}</h2>- <p>Status: {{ plugin_static.status }}. Static evidence does not demonstrate runtime loading or behavior.</p>- {% if plugin_static.truncated %}<p>Some static evidence was omitted by report bounds; see section counts.</p>{% endif %}- {% for section in plugin_static.sections %}- <section aria-label="{{ section.title }}">- <h3>{{ section.title }}</h3>- {% for note in section.notes %}{% if note is not none %}<p>{{ note }}</p>{% endif %}{% endfor %}- {% if section.rows %}- <div class="table-scroll" tabindex="0" role="region" aria-label="{{ section.title }}"><table class="contributor-table plugin-static-table">- <thead><tr>{% for column in section.columns %}<th scope="col">{{ column }}</th>{% endfor %}</tr></thead>- <tbody>{% for row in section.rows %}<tr>{% for cell in row %}<td>{{ 'unknown' if cell is none else cell }}</td>{% endfor %}</tr>{% endfor %}</tbody>- </table></div>- {% endif %}- {% if section.omitted %}<p>{{ section.omitted }} more rows omitted ({{ section.total }} total).</p>{% endif %}- </section>- {% endfor %}-</section>diff --git a/src/skillevaluator/reporting/templates/report.html.j2 b/src/skillevaluator/reporting/templates/report.html.j2index 6ed5ddef..f814a7ae 100644--- a/src/skillevaluator/reporting/templates/report.html.j2+++ b/src/skillevaluator/reporting/templates/report.html.j2@@ -9,7 +9,116 @@</div>{% endif %}{%- endmacro %}-{% from "logo.svg.j2" import se_logo %}<html lang="en">+{% from "telemetry.html.j2" import render_telemetry %}+{% from "dataset_diagnostics.html.j2" import render_case_diagnostics with context %}+{% from "native_evidence.html.j2" import render_native_warnings, render_native_evidence %}+{% from "plugin_evidence.html.j2" import render_plugin_evidence, render_retention_limits %}{% macro insight_plain_evidence(value) -%}+{% if value %}+{% if value | string | length > 240 %}+<details class="t3-eval-evidence"><summary>Evidence</summary><p class="t3-dim-hint">{{ value }}</p></details>+{% else %}<p class="t3-dim-hint">Evidence: {{ value }}</p>{% endif %}+{% endif %}+{%- endmacro %}+{% macro insight_cards(items, mode='recommendation') -%}+<div class="t3-sug-stack">+{% if mode == 'conclusion' %}+ {% for conclusion in items %}+ {% set sev = conclusion.severity or 'warn' %}+ {% set sev_class = 'severity-pass' if sev in ('pass','ok') else ('severity-fail' if sev in ('fail','critical','high') else 'severity-warn') %}+ {% set sev_pill = 'ok' if sev in ('pass','ok') else ('critical' if sev in ('fail','critical','high') else 'warning') %}+ {% set source = (conclusion.source or 'deterministic') %}+ <div class="t3-sug-card {{ sev_class }}">+ <span class="t3-sug-num">{{ loop.index }}</span>+ <div>+ <div class="t3-sug-title">+ {{ conclusion.title }}+ <span class="t3-pill {{ sev_pill }}">{{ sev }}</span>+ <span class="t3-insight-source insight-source-{{ source }}">{{ source }}</span>+ </div>+ <div class="t3-sug-body">{{ conclusion.message }}</div>+ {% if conclusion.check %}<p class="t3-dim-hint">Check: {{ conclusion.check }}</p>{% endif %}+ {{ insight_plain_evidence(conclusion.evidence_text) }}+ {% if conclusion.evidence and conclusion.evidence.url %}<a class="t3-evidence-link" href="{{ conclusion.evidence.url }}" target="_blank" rel="noopener">View {{ conclusion.evidence.label or 'evidence' }}</a>{% endif %}+ </div>+ <div class="t3-sug-actions">+ <button class="t3-copy-btn" data-report-action="copy" data-copy-text="{{ conclusion.title ~ ': ' ~ conclusion.message }}">Copy</button>+ </div>+ </div>+ {% endfor %}+{% else %}+ {% for reco in items %}+ {% set sev = reco.severity or 'warn' %}+ {% set sev_class = 'severity-pass' if sev in ('pass','ok') else ('severity-fail' if sev in ('fail','critical','high') else 'severity-warn') %}+ {% set source = (reco.source or 'deterministic') %}+ <div class="t3-sug-card {{ sev_class }}">+ <span class="t3-sug-num">{{ loop.index }}</span>+ <div>+ <div class="t3-sug-title">+ <span class="t3-sug-cat">{{ reco.category or 'Action' }}</span>+ {% if reco.title %}<span style="font-weight:700;">{{ reco.title }}</span>{% endif %}+ <span class="t3-insight-source insight-source-{{ source }}">{{ source }}</span>+ </div>+ <div class="t3-sug-body">{{ reco.message }}</div>+ {% if reco.problem %}+ {% if reco.problem_in_diagnostics %}<a class="t3-evidence-link" href="#tier3-execution-errors">Recorded problem in Diagnostics</a>+ {% else %}<details class="t3-eval-evidence"><summary>Recorded problem</summary><p class="t3-dim-hint">{{ reco.problem }}</p></details>{% endif %}+ {% endif %}+ {% if reco.check %}<p class="t3-dim-hint">Check: {{ reco.check }}</p>{% endif %}+ {% if reco.insight_kind == 'execution_action' %}<p class="t3-dim-hint">Scope: {{ reco.metric or 'evaluation' }}{% if reco.agent %} · Agent: {{ reco.agent }}{% endif %}{% if reco.case_id or reco.case %} · Case: {{ reco.case_id or reco.case }}{% endif %}{% if reco.condition %} · Condition: {{ reco.condition }}{% endif %}{% if reco.strength %} · Strength: {{ reco.strength }}{% endif %}</p>{% endif %}+ {{ insight_plain_evidence(reco.evidence_text) }}+ {% if reco.evidence and reco.evidence.url %}+ <a class="t3-evidence-link" href="{{ reco.evidence.url }}" target="_blank" rel="noopener">View {{ reco.evidence.label or 'evidence' }}</a>+ {% endif %}+ </div>+ <div class="t3-sug-actions">+ <button class="t3-copy-btn" data-report-action="copy" data-copy-text="{{ reco.message }}">Copy</button>+ </div>+ </div>+ {% endfor %}+{% endif %}+</div>+{%- endmacro %}+{% macro insight_next_steps(steps) -%}+{% if steps %}+<p class="t3-next-steps-conclusion">Next steps for the run:</p>+<ol class="t3-next-steps-list">+{% for step in steps %}<li><strong>{{ step.problem }}</strong> [{{ step.target }}{% if step.strength and step.strength != 'supported' %} · {{ step.strength }}{% endif %}]: {{ step.action }} Check: {{ step.check }}{% if step.evidence and step.evidence | string | length <= 240 %} Evidence: {{ step.evidence }}{% endif %}{% if step.evidence and step.evidence | string | length > 240 %}{{ insight_plain_evidence(step.evidence) }}{% endif %}</li>{% endfor %}+</ol>+{% endif %}+{%- endmacro %}+{% macro unavailable_lift(score, baseline, activation) -%}+{%- if activation.get('status') == 'never_activated' -%}inconclusive: skill never activated+{%- elif score is none and baseline is not none -%}with-skill unavailable+{%- elif score is none -%}N/A lift+{%- elif baseline is not none -%}comparison unavailable+{%- else -%}no baseline lift{%- endif -%}+{%- endmacro %}+{% macro other_dimension_cell(dimension, agent) -%}+ <td>{% if dimension %}+ {% set other_score = dimension.score if dimension.score is not none else dimension.with_skill %}+ {% set other_color = 'var(--text-secondary)' if other_score is none else ('var(--success-color)' if other_score >= 0.7 else ('var(--warning-color)' if other_score >= 0.4 else 'var(--danger-color)')) %}+ <div class="t3-mad-cell">+ <div class="t3-mad-score-row"><span class="t3-mad-score" style="color:{{ other_color }};">{{ "%.2f" | format(other_score) if other_score is not none else 'N/A' }}</span>{% if other_score is not none %}<div class="t3-mad-bar"><span style="width:{{ (other_score * 100) | round(0) }}%;background:{{ other_color }};"></span></div>{% endif %}</div>+ <span class="t3-mad-lift">{% if dimension.lift is not none and agent.get('skill_activation', {}).get('status') != 'never_activated' %}{{ "%+.2f" | format(dimension.lift) }} lift{% else %}{{ unavailable_lift(other_score, dimension.baseline, agent.get('skill_activation', {})) }}{% endif %}</span>+ {% if dimension.partial %}<span class="t3-pill warning">partial</span>{% endif %}+ {% if dimension.comparison and dimension.comparison.status != 'comparable' %}<span class="t3-dim-hint">{{ dimension.comparison.label }}{% if dimension.comparison.with_skill is number and dimension.comparison.baseline is number and dimension.comparison.lift is number %}: {{ "%.2f" | format(dimension.comparison.baseline) }} → {{ "%.2f" | format(dimension.comparison.with_skill) }} ({{ "%+.2f" | format(dimension.comparison.lift) }}){% endif %}{% if dimension.comparison.reason %} · {{ dimension.comparison.reason }}{% endif %}</span>{% endif %}+ </div>+ {% else %}N/A{% endif %}</td>+{%- endmacro %}+{% macro harbor_job_actions(jobs, tile=false) -%}+<div class="{{ 'tier-card-jobs' if tile else 't3-harbor-jobs' }}"{% if tile %} onclick="event.stopPropagation()"{% endif %}>+{% for job in jobs %}+ <div class="{{ 'tier-card-job' if tile else 't3-harbor-job' }}">+ {% if jobs | length > 1 %}<span class="{{ 'tier-card-job-label' if tile else 't3-harbor-job-label' }}">{{ job.display_label or ('Job ' ~ loop.index) }}</span>{% endif %}+ <div class="{{ 'tier-card-links' if tile else 't3-harbor-actions' }}">+ {% if job.url %}<a class="{{ 'tier-card-link' if tile else 't3-harbor-link' }}" href="{{ job.url }}" aria-label="Harbor logs · {{ job.display_label or ('Job ' ~ loop.index) }}" target="_blank" rel="noopener noreferrer">{{ 'Harbor logs' if tile else 'Logs' }}</a>{% endif %}+ {% if job.analysis_url %}<a class="{{ 'tier-card-link' if tile else 't3-harbor-link' }}" href="{{ job.analysis_url }}" aria-label="Harbor analysis · {{ job.display_label or ('Job ' ~ loop.index) }}" target="_blank" rel="noopener noreferrer">{{ 'Harbor analysis' if tile else 'Analysis' }}</a>{% endif %}+ </div>+ </div>+{% endfor %}+</div>+{%- endmacro %}+<html lang="en" data-default-theme="{{ 'dark' if tier3 else 'light' }}" data-theme="{{ 'dark' if tier3 else 'light' }}"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">@@ -51,7 +160,6 @@--badge-fail-bg: #fee2e2;--badge-fail-tx: #991b1b;}- @media screen {[data-theme="dark"] {--primary-color: #0c111b;--secondary-color: #76b900;@@ -86,7 +194,6 @@--badge-fail-bg: #7f1d1d;--badge-fail-tx: #fecaca;}- }* { box-sizing: border-box; margin: 0; padding: 0; }html { scroll-behavior: smooth; }body {@@ -119,7 +226,8 @@/* Brand block. Sized to mirror the hero panel one row down so thepage reads as a single visual hierarchy rather than two competingtype scales (hero title is 1.8rem/800; brand sits a hair larger to- keep "SkillEvaluator" as the top-level identifier). */+ keep "SkillEvaluator" as the top-level identifier). Public branding uses+ the canonical name; the native style declarations are unchanged. */.header-title {font-size: 2rem;font-weight: 800;@@ -199,9 +307,8 @@}.header-status-badge.pass { background: rgba(255,255,255,0.95); color: var(--success-color); }.header-status-badge.fail { background: #fecaca; color: #991b1b; border: 1px solid #fca5a5; }- .header-status-badge.warn { background: #fef3c7; color: #92400e; border: 1px solid #f59e0b; }- @media screen { [data-theme="dark"] .header-status-badge.fail { background: #450a0a; color: #fca5a5; border-color: #991b1b; } }- @media screen { [data-theme="dark"] .header-status-badge.warn { background: #451a03; color: #fcd34d; border-color: #92400e; } }+ .header-status-badge.warn { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }+ [data-theme="dark"] .header-status-badge.fail { background: #450a0a; color: #fca5a5; border-color: #991b1b; }.container { max-width: 1200px; margin: 0 auto; padding: 2rem; }.nav-tabs { display: flex; gap: 0.5rem; margin: 1.5rem 0; flex-wrap: wrap; }.nav-tab {@@ -216,7 +323,7 @@transition: all 0.2s ease;}.nav-tab:hover { border-color: var(--secondary-color); color: var(--secondary-color); }- .nav-tab.active { background: var(--secondary-color); color: var(--on-accent); border-color: var(--secondary-color); }+ .nav-tab.active { background: var(--secondary-color); color: white; border-color: var(--secondary-color); }.tab-content { display: none; }.tab-content.active { display: block; }.dashboard {@@ -271,9 +378,9 @@.status-badge.pass { background: #dcfce7; color: #166534; }.status-badge.fail { background: #fee2e2; color: #991b1b; }.status-badge.warn { background: #fef3c7; color: #92400e; }- @media screen { [data-theme="dark"] .status-badge.pass { background: #14532d; color: #86efac; } }- @media screen { [data-theme="dark"] .status-badge.fail { background: #450a0a; color: #fca5a5; } }- @media screen { [data-theme="dark"] .status-badge.warn { background: #451a03; color: #fcd34d; } }+ [data-theme="dark"] .status-badge.pass { background: #14532d; color: #86efac; }+ [data-theme="dark"] .status-badge.fail { background: #450a0a; color: #fca5a5; }+ [data-theme="dark"] .status-badge.warn { background: #451a03; color: #fcd34d; }.section-header {color: var(--dark-text);font-weight: 600;@@ -299,9 +406,10 @@transition: all 0.2s ease;}.filter-btn:hover { border-color: var(--secondary-color); }- .filter-btn.active { background: var(--secondary-color); color: var(--on-accent); border-color: var(--secondary-color); }+ .filter-btn.active { background: var(--secondary-color); color: white; border-color: var(--secondary-color); }.filter-btn.success.active { background: var(--success-color); border-color: var(--success-color); }.filter-btn.danger.active { background: var(--danger-color); border-color: var(--danger-color); }+ .filter-btn.warning.active { background: var(--warning-color); border-color: var(--warning-color); }.table-section { margin: 1.25rem 0; }.table-toggle {background: var(--bg);@@ -372,7 +480,7 @@.validator-collapsible:hover { background: var(--bg-secondary); }.validator-collapsible.active {background: var(--secondary-color);- color: var(--on-accent);+ color: white;border-color: var(--secondary-color);border-radius: 8px 8px 0 0;}@@ -385,7 +493,6 @@.collapsible-header .status-indicator.warn { background: var(--warning-color); }.validator-collapsible.active .status-indicator.pass { background: #86efac; }.validator-collapsible.active .status-indicator.fail { background: #fca5a5; }- .validator-collapsible.active .status-indicator.warn { background: #fcd34d; }.validator-content {max-height: 0;overflow: hidden;@@ -423,10 +530,10 @@.severity-medium { background: #fef3c7; color: #92400e; }.severity-low { background: #f3f4f6; color: #4b5563; }.severity-info { background: #dbeafe; color: #1e40af; }- @media screen { [data-theme="dark"] .severity-critical, [data-theme="dark"] .severity-high { background: #450a0a; color: #fca5a5; } }- @media screen { [data-theme="dark"] .severity-medium { background: #451a03; color: #fcd34d; } }- @media screen { [data-theme="dark"] .severity-low { background: #374151; color: #9ca3af; } }- @media screen { [data-theme="dark"] .severity-info { background: #1e3a8a; color: #93c5fd; } }+ [data-theme="dark"] .severity-critical, [data-theme="dark"] .severity-high { background: #450a0a; color: #fca5a5; }+ [data-theme="dark"] .severity-medium { background: #451a03; color: #fcd34d; }+ [data-theme="dark"] .severity-low { background: #374151; color: #9ca3af; }+ [data-theme="dark"] .severity-info { background: #1e3a8a; color: #93c5fd; }.finding-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; color: var(--text-secondary); font-size: 0.8rem; margin-top: 0.375rem; }.finding-meta span { display: flex; align-items: center; gap: 0.25rem; }.llm-verification { margin-top: 0.625rem; padding: 0.5rem 0.75rem; border: 1px solid var(--border-color); border-radius: 6px; font-size: 0.8rem; overflow-wrap: anywhere; }@@ -452,7 +559,7 @@border-left: 3px solid var(--success-color);color: #166534;}- @media screen { [data-theme="dark"] .suggestion { background: #14532d; color: #bbf7d0; } }+ [data-theme="dark"] .suggestion { background: #14532d; color: #bbf7d0; }footer {margin-top: 2rem;padding: 1.25rem 2rem;@@ -469,7 +576,7 @@padding: 0.5rem 0.75rem;border-radius: 6px;background: var(--secondary-color);- color: var(--on-accent);+ color: white;border: none;cursor: pointer;font-size: 0.75rem;@@ -530,6 +637,7 @@}.skill-name .status-dot.pass { background: var(--success-color); }.skill-name .status-dot.fail { background: var(--danger-color); }+ .skill-name .status-dot.warn { background: var(--warning-color); }.skill-checks-summary {display: flex;align-items: center;@@ -595,7 +703,7 @@font-size: 0.75rem;color: #166534;}- @media screen { [data-theme="dark"] .check-finding .finding-suggestion { background: #14532d; color: #bbf7d0; } }+ [data-theme="dark"] .check-finding .finding-suggestion { background: #14532d; color: #bbf7d0; }.metadata-tag {display: inline-block;background: var(--bg-secondary);@@ -624,7 +732,7 @@transition: all 0.2s ease;}.view-toggle-btn:hover { border-color: var(--secondary-color); }- .view-toggle-btn.active { background: var(--secondary-color); color: var(--on-accent); border-color: var(--secondary-color); }+ .view-toggle-btn.active { background: var(--secondary-color); color: white; border-color: var(--secondary-color); }.results-view { display: none; }.results-view.active { display: block; }.skills-summary-bar {@@ -714,7 +822,7 @@cursor: pointer;transition: all 0.15s ease;}- .skill-pill:hover { background: var(--secondary-color); color: var(--on-accent); }+ .skill-pill:hover { background: var(--secondary-color); color: white; }/* Pair the skill pill (jumps to finding) with a small quality-scorelink so the two destinations stay distinct: the issue lives in themain pill, the quality score lives in the trailing ``Q`` chip. */@@ -744,7 +852,7 @@transition: all 0.15s ease;border-left: 1px solid var(--border-color);}- .quality-pill:hover { background: var(--warning-color); color: var(--on-warning); }+ .quality-pill:hover { background: var(--warning-color); color: white; }.top-issues-active-row { background: var(--bg-secondary) !important; outline: 2px solid var(--secondary-color); outline-offset: -2px; }/* Contributor Summary */@@ -813,8 +921,10 @@}.contributor-item-pill.pass { background: #dcfce7; color: #166534; }.contributor-item-pill.fail { background: #fee2e2; color: #991b1b; }- @media screen { [data-theme="dark"] .contributor-item-pill.pass { background: #14532d; color: #86efac; } }- @media screen { [data-theme="dark"] .contributor-item-pill.fail { background: #450a0a; color: #fca5a5; } }+ .contributor-item-pill.warn { background: #fef3c7; color: #92400e; }+ [data-theme="dark"] .contributor-item-pill.pass { background: #14532d; color: #86efac; }+ [data-theme="dark"] .contributor-item-pill.fail { background: #450a0a; color: #fca5a5; }+ [data-theme="dark"] .contributor-item-pill.warn { background: #451a03; color: #fcd34d; }.contributor-item-pill:hover { opacity: 0.8; }.skill-filter-banner {@@ -830,7 +940,7 @@color: #1e40af;position: sticky; top: 8rem; z-index: 49;}- @media screen { [data-theme="dark"] .skill-filter-banner { background: #1e3a5f; border-color: #2563eb; color: #93c5fd; } }+ [data-theme="dark"] .skill-filter-banner { background: #1e3a5f; border-color: #2563eb; color: #93c5fd; }.skill-filter-banner.visible { display: flex; }.skill-filter-banner .clear-filter {margin-left: auto;@@ -844,11 +954,11 @@font-size: 0.8rem;}.skill-filter-banner .clear-filter:hover { background: rgba(0,0,0,0.08); }- @media screen { [data-theme="dark"] .skill-filter-banner .clear-filter:hover { background: rgba(255,255,255,0.1); } }+ [data-theme="dark"] .skill-filter-banner .clear-filter:hover { background: rgba(255,255,255,0.1); }.count-badge {display: inline-block;background: var(--danger-color);- color: var(--on-danger);+ color: white;padding: 0.125rem 0.5rem;border-radius: 10px;font-size: 0.7rem;@@ -878,7 +988,7 @@transition: all 0.2s ease;}.severity-filter-btn:hover { border-color: var(--secondary-color); }- .severity-filter-btn.active { background: var(--secondary-color); color: var(--on-accent); border-color: var(--secondary-color); }+ .severity-filter-btn.active { background: var(--secondary-color); color: white; border-color: var(--secondary-color); }.severity-filter-btn.active.critical-btn { background: var(--critical-color); border-color: var(--critical-color); }.severity-filter-btn.active.high-btn { background: var(--high-color); border-color: var(--high-color); }@@ -896,9 +1006,9 @@.confidence-badge.high-conf { background: #fee2e2; color: #991b1b; }.confidence-badge.medium-conf { background: #fef3c7; color: #92400e; }.confidence-badge.low-conf { background: #f3f4f6; color: #6b7280; border: 1px dashed #d1d5db; }- @media screen { [data-theme="dark"] .confidence-badge.high-conf { background: #450a0a; color: #fca5a5; } }- @media screen { [data-theme="dark"] .confidence-badge.medium-conf { background: #451a03; color: #fcd34d; } }- @media screen { [data-theme="dark"] .confidence-badge.low-conf { background: #374151; color: #9ca3af; border-color: #4b5563; } }+ [data-theme="dark"] .confidence-badge.high-conf { background: #450a0a; color: #fca5a5; }+ [data-theme="dark"] .confidence-badge.medium-conf { background: #451a03; color: #fcd34d; }+ [data-theme="dark"] .confidence-badge.low-conf { background: #374151; color: #9ca3af; border-color: #4b5563; }/* Low-confidence finding styling */.check-finding.low-confidence {@@ -943,7 +1053,7 @@font-weight: 600;color: var(--secondary-color);}- @media screen { [data-theme="dark"] .finding-suggestion.truncatable::after { background: #14532d; } }+ [data-theme="dark"] .finding-suggestion.truncatable::after { background: #14532d; }.finding-suggestion.truncatable.expanded {max-height: none;}@@ -986,9 +1096,10 @@.severity-breakdown-item.sev-high { background: #fee2e2; color: #991b1b; }.severity-breakdown-item.sev-medium { background: #fef3c7; color: #92400e; }.severity-breakdown-item.sev-low { background: #f3f4f6; color: #4b5563; }- @media screen { [data-theme="dark"] .severity-breakdown-item.sev-critical, [data-theme="dark"] .severity-breakdown-item.sev-high { background: #450a0a; color: #fca5a5; } }- @media screen { [data-theme="dark"] .severity-breakdown-item.sev-medium { background: #451a03; color: #fcd34d; } }- @media screen { [data-theme="dark"] .severity-breakdown-item.sev-low { background: #374151; color: #9ca3af; } }+ [data-theme="dark"] .severity-breakdown-item.sev-critical,+ [data-theme="dark"] .severity-breakdown-item.sev-high { background: #450a0a; color: #fca5a5; }+ [data-theme="dark"] .severity-breakdown-item.sev-medium { background: #451a03; color: #fcd34d; }+ [data-theme="dark"] .severity-breakdown-item.sev-low { background: #374151; color: #9ca3af; }.severity-breakdown-label {font-size: 0.65rem;font-weight: 700;@@ -998,7 +1109,7 @@margin-top: 0.5rem;}.severity-breakdown-label.advisory { color: #92400e; }- @media screen { [data-theme="dark"] .severity-breakdown-label.advisory { color: #fcd34d; } }+ [data-theme="dark"] .severity-breakdown-label.advisory { color: #fcd34d; }.advisory-note {font-size: 0.65rem;font-style: italic;@@ -1015,8 +1126,8 @@/* Dedup finding collapsible cards */.dedup-finding-high { border: 1px solid #fca5a5; background: #fef2f2; }.dedup-finding-medium { border: 1px solid #fde68a; background: #fffbeb; }- @media screen { [data-theme="dark"] .dedup-finding-high { border-color: #991b1b; background: #450a0a; } }- @media screen { [data-theme="dark"] .dedup-finding-medium { border-color: #92400e; background: #451a03; } }+ [data-theme="dark"] .dedup-finding-high { border-color: #991b1b; background: #450a0a; }+ [data-theme="dark"] .dedup-finding-medium { border-color: #92400e; background: #451a03; }.dedup-recommendation {margin-top: 0.75rem; padding: 0.75rem;background: var(--bg-secondary); border-radius: 6px;@@ -1131,6 +1242,7 @@.tier-card.fail::before { background: var(--danger-color); }.tier-card.warn { background: linear-gradient(135deg, rgba(187, 128, 9, 0.10) 0%, var(--bg) 70%); }.tier-card.warn::before { background: var(--warning-color); }+ .tier-card.skipped { opacity: 0.7; }.tier-card.skipped::before { background: var(--text-secondary); }.tier-card-head {display: flex;@@ -1152,9 +1264,9 @@border-radius: 999px;letter-spacing: 0.05em;}- .tier-card.pass .tier-card-verdict { background: var(--badge-pass-bg); color: var(--badge-pass-tx); border: 1px solid currentColor; }- .tier-card.fail .tier-card-verdict { background: var(--badge-fail-bg); color: var(--badge-fail-tx); border: 1px solid currentColor; }- .tier-card.warn .tier-card-verdict { background: var(--badge-warn-bg); color: var(--badge-warn-tx); border: 1px solid currentColor; }+ .tier-card.pass .tier-card-verdict { background: var(--success-color); color: white; }+ .tier-card.fail .tier-card-verdict { background: var(--danger-color); color: white; }+ .tier-card.warn .tier-card-verdict { background: var(--warning-color); color: white; }.tier-card.skipped .tier-card-verdict { background: var(--bg-tertiary); color: var(--text-secondary); }.tier-card-title {font-size: 1.05rem;@@ -1192,6 +1304,9 @@text-decoration: none;}.tier-card-link:hover { border-color: var(--secondary-color); background: var(--bg-secondary); }+ .tier-card-jobs { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.2rem; width: 100%; }+ .tier-card-job { display: flex; flex-direction: column; gap: 0.15rem; }+ .tier-card-job-label { font-size: 0.72rem; font-weight: 700; color: var(--dark-text); }.tier-card-sev {display: flex;flex-wrap: wrap;@@ -1207,7 +1322,7 @@background: var(--bg);}.tier-card-sev-pill.crit { color: var(--danger-color); border-color: var(--danger-color); }- .tier-card-sev-pill.high { color: var(--high-color); border-color: var(--high-color); }+ .tier-card-sev-pill.high { color: #d29922; border-color: #d29922; }.tier-card-sev-pill.med { color: var(--warning-color); border-color: var(--warning-color); }.tier-card-sev-pill.low { color: var(--text-secondary); }.chart-grid {@@ -1224,8 +1339,6 @@box-shadow: var(--shadow);}.chart-card h3 { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 0.75rem; }- .chart-description,.chart-fallback { font-size: 0.82rem; color: var(--text-secondary); }- .chart-notices pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.75rem; }.table-scroll { max-width: 100%; overflow-x: auto; margin: 1rem 0; border-radius: 10px; border: 1px solid var(--border-color); -webkit-overflow-scrolling: touch; }.table-scroll .summary-table { margin: 0; }.pass-at-k-table { min-width: 720px; }@@ -1239,267 +1352,532 @@.tier-cards { grid-template-columns: 1fr; }}</style>-<style>{% include "report_ui.css.j2" %}</style>-<noscript><style>.t3-page,.t3-agent-panel,.table-container,.tab-content,.results-view,.skill-content,.validator-content,.top-issues-content,.contributor-content{display:block!important;max-height:none!important;overflow:visible!important}.filter-group,.view-toggle-section,.report-searchbar,.header-controls{display:none!important}.table-container,.top-issues-content,.summary-table-container,.contributor-content{overflow-x:auto!important}</style></noscript>-</head>-<body>- {% set ci = ci_context | default({}, true) %}- <a class="skip-link" href="#report-workspace">Skip to report</a>- {% set has_tier3 = tier3 is defined and tier3 %}- {% set tier3_summary_data = (tier3.get('summary') or {}) if has_tier3 else {} %}- {% set tier3_provenance_data = (tier3.get('provenance') or {}) if has_tier3 else {} %}- {% set tier3_execution_status = (tier3.get('execution_status') or tier3_summary_data.get('execution_status')) if has_tier3 else none %}- {% set tier3_is_skipped = tier3_execution_status == 'skipped' or (tier3_provenance_data.get('advisory') and tier3_provenance_data.get('reason') == 'skipped') %}- {% set tier3_skip_message = tier3_provenance_data.get('message') or 'Live evaluation did not run.' %}- {% set tier3_verdict = (tier3_effective_status or tier3.get('verdict') or 'unknown') | lower if has_tier3 else 'unknown' %}- {% if has_tier3 and tier3.budget and tier3.budget.not_run %}{% set tier3_verdict = 'incomplete' %}{% endif %}- {#- A failing tier whose gate does not block is "Failed (advisory)", never "Changes required". -#}- {% set tier3_advisory_fail = tier3_verdict == 'fail' and 'tier3' in nonblocking_tiers %}- {% set has_t12_tab = tabs | selectattr('id', 'in', ['tier1', 'tier2']) | list | length > 0 %}- {% set verdict_key = (tier3_verdict if tier3_verdict in ['pass', 'fail', 'neutral', 'inconclusive'] else 'incomplete') if report_scope == 'tier3' else {'passed': 'pass', 'failed': 'fail'}.get(presentation.command_status.value, 'incomplete') %}- {% set verdict_class = {'pass': 'pass', 'fail': 'fail'}.get(verdict_key, 'warn') %}- {% set verdict_label = (verdict_key | title) if report_scope == 'tier3' else presentation.command_label %}- {% set check_words = {'pass': 'Passed', 'fail': 'Failed', 'incomplete': 'Incomplete', 'skipped': 'Skipped', 'not_applicable': 'N/A'} %}- <header class="main-header">- <div class="header-content">- <div class="header-brand">- {{ se_logo("se-logo-header", 28, "") }}- <div>- <p class="header-title">SkillEvaluator</p>- <p class="header-subtitle">{% if timestamp %}Generated <time>{{ timestamp }}</time> · {% endif %}Version {{ version }}</p>- </div>- </div>- <div class="header-meta">- <span class="header-status-badge verdict-badge {{ verdict_class }}" data-verdict="{{ verdict_key }}"><span class="verdict-dot" aria-hidden="true"></span><span class="sr-only">Verdict: </span>{% if report_scope == 'tier3' and tier3_verdict == 'fail' %}FAIL{% else %}{{ verdict_label }}{% endif %}{% if report_scope == 'tier3' and tier3_verdict == 'fail' and tier3.get('verdict_reason') %} — {{ tier3.get('verdict_reason') }}{% endif %}</span>- <div class="header-controls">- <label class="theme-control" for="report-theme">Theme <select id="report-theme" onchange="setReportTheme(this.value)"><option value="system">System</option><option value="light">Light</option><option value="dark">Dark</option></select></label>- {% if ci.get('canonical_json_url') %}<a class="export-btn" href="{{ ci.canonical_json_url }}" download="skillevaluator-report.json">↓ Download JSON</a>{% else %}- <button type="button" class="export-btn" onclick="exportJSON()" title="Export report as JSON">- <span aria-hidden="true">↓</span><span>Download JSON</span>- </button>{% endif %}- </div>- </div>- </div>- </header>- <aside class="report-sidebar" aria-label="Report navigation">- <a class="sidebar-brand" href="#report-workspace">{{ se_logo("se-logo-sidebar", 28, "") }}<span class="sidebar-brand-text">SkillEvaluator<small>Evaluation report</small></span></a>- <span class="sidebar-label">THIS REPORT</span>- <a href="#report-workspace" data-report-section="report-workspace" class="sidebar-current" aria-current="location">Summary</a>- {% for number, tier in presentation.tiers.items() if tier.displayed or (tabs | selectattr('id', 'equalto', 'tier' ~ number) | list) %}- <a href="#tab-tier{{ number }}" data-report-tier="tier{{ number }}">Tier {{ number }}</a>- {% endfor %}- <a href="#run-metadata" data-report-section="run-metadata">Run details</a>- {% if ci.get('report_index_url') %}<a class="sidebar-index-link" href="{{ ci.report_index_url }}">← All skills</a>{% endif %}- <div class="sidebar-footer">Evidence you can inspect.<br>Self-contained report.</div>- </aside>- <main class="container" id="report-workspace" tabindex="-1">- {% if ci.get('report_index_url') %}<nav class="report-breadcrumb" aria-label="Breadcrumb"><a href="{{ ci.report_index_url }}">All skills</a> / <span aria-current="page">{{ content_label | default('Skill') }} report</span></nav>{% endif %}- {% set has_tier1 = tabs | selectattr('id', 'equalto', 'tier1') | list | length > 0 %}- {% set has_tier2 = tabs | selectattr('id', 'equalto', 'tier2') | list | length > 0 %}- {% set ui_t1 = tier1_execution_summary | default({}) %}- {% set ui_t1_pass = ui_t1.get('pass', tier1_summary.passed_count if has_tier1 else 0) %}- {% set ui_t1_na = ui_t1.get('not_applicable', 0) %}- {% set ui_t1_executed = ui_t1_pass + ui_t1.get('fail', tier1_summary.failed_count if has_tier1 else 0) + ui_t1.get('incomplete', 0) %}- {#-- Hero title: prefer the friendly ``skills/<name>`` label over the- full repo / filesystem path so reviewers can scan the report at a- glance. Falls back to Tier 3's stored skill_name (used by the- standalone ``agent-eval`` command), then ``target_display`` (which- collapses repository URLs to ``repo / skills/<name>``), then the raw- title — every step is opportunistic so the hero never goes blank.- -#}- {% set hero_title = explicit_skill_name | default(none) or friendly_label or (tier3.skill_name if has_tier3 and tier3.skill_name else (target_display or title)) %}- {% set hero_score = completed_agent.score if completed_agent else (tier3.overall_score if has_tier3 and tier3.overall_score is not none else none) %}- {% set hero_trials = presentation.coverage.text %}- {% set hero_metric_count = ((tier3.metric_ids or tier3.evaluators or {}) | length) if has_tier3 else 0 %}- {% set hero_harbor = (tier3.get('harbor_viewer') or tier3.get('summary', {}).get('harbor_viewer') or {}) if has_tier3 else {} %}- {% set hero_harbor_job_url = hero_harbor.get('job_url') %}- {% set hero_harbor_analysis_url = hero_harbor.get('analysis_url') %}- <section class="agent-hero" aria-labelledby="report-title">- <div class="agent-hero-top">- <div class="agent-hero-title-block">- <span class="agent-hero-eyebrow">{{ content_label }} evaluation</span>- <h1 class="agent-hero-title" id="report-title">{{ hero_title }}</h1>- <p class="hero-command-status verdict-chip {{ 'warn' if has_tier3 and tier3.budget and tier3.budget.not_run and report_scope == 'tier3' else verdict_class }}">{{ 'Incomplete' if has_tier3 and tier3.budget and tier3.budget.not_run and report_scope == 'tier3' else presentation.command_label }}</p>- {% if presentation.required_failed or presentation.required_incomplete %}<p class="hero-decision-reason">{{ presentation.required_failed }} failed · {{ presentation.required_incomplete }} incomplete required check(s). See tier evidence for reasons.</p>{% endif %}- {% if presentation.advisory_unfavorable %}<p class="hero-decision-reason">{{ presentation.advisory_unfavorable }} advisory check(s) failed or incomplete; advisory checks do not change the required result.</p>{% endif %}- {#-- Show the *full* path/URL only when it actually adds- information (i.e. it differs from the friendly label).- For users running ``skillevaluator validate skills/foo`` from- the repo root the two strings are identical and the- subtitle becomes noise.- -#}- {% if target_path and target_path.startswith('https://') and target_path != hero_title and target_display != hero_title %}- <div class="agent-hero-subtitle">- <a href="{{ target_path }}" target="_blank" rel="noopener noreferrer" title="{{ target_path }}">{{ target_display or target_path }}</a>- </div>- {% endif %}- {#- In a folder scan this is the only sign that some skills were not reported. -#}- {% if has_tier1 or has_tier2 %}<p class="hero-skills">{{ content_label_plural }}: {{ passed_skills }} of {{ total_skills }} passed</p>{% endif %}- </div>- {#-- Right-side block: the Tier 3 verdict and score when Tier 3- ran, and publication eligibility for every report, kept- next to the verdict.- -#}- {% set publication_class = {'pass': 'pass', 'fail': 'fail'}.get(publication_status, 'warn') %}- <div class="hero-side">- {% if has_tier3 %}- {% set tier3_environment = (tier3.summary.environment if tier3.summary is defined and tier3.summary else None) or tier3.environment %}- {% if tier3_is_skipped %}- <span class="verdict-chip warn">Tier 3 quality: {{ verdict_words['skipped'] }}</span>- <div class="agent-hero-detail">- <div><strong>Reason:</strong> {{ tier3_skip_message }}</div>- <div>Tier 3 is advisory and does not block required validation.</div>- </div>- {% else %}- {% set t3_key = tier3_verdict if tier3_verdict in ['pass', 'fail', 'neutral'] else 'incomplete' %}- {% if tier3.budget and tier3.budget.not_run %}{% set t3_key = 'incomplete' %}{% endif %}- <span class="verdict-chip {{ {'pass': 'pass', 'fail': 'fail'}.get(t3_key, 'warn') }}">Tier 3 quality: {{ advisory_fail_word if tier3_advisory_fail else verdict_words[t3_key] }}</span>- {% if t3_key == 'incomplete' and tier3_status_reason %}<p class="hero-reason">{{ tier3.verdict_reason if tier3.budget and tier3.budget.not_run else tier3_status_reason }}</p>{% endif %}- <div class="agent-hero-score {{ 'score-pass' if hero_score is not none and hero_score >= 0.8 else ('score-warn' if hero_score is not none and hero_score >= 0.6 else 'score-fail') }}">{{ "%.2f" | format(hero_score) if hero_score is not none else "N/A" }}<span class="hero-score-label">{{ presentation.score_scope }}{{ ' (baseline)' if tier3.get('mode') == 'baseline_only' else '' }}</span></div>- <div class="agent-hero-detail">- <div><strong>Best performing agent:</strong> {{ tier3.best_agent or 'N/A' }}</div>- {% if tier3.get('mode') == 'baseline_only' %}<div>Baseline-only run (<code>--skip-with-skill</code>): no with-skill arm, so no skill lift was measured.</div>{% endif %}- {% if completed_agent and completed_agent.needs_attention %}<div class="score-warn">Completed-agent result. Other execution failures need attention; see agent details.</div>{% endif %}- </div>- {% endif %}- {% endif %}- {% if report_scope == 'tier3' %}- <p class="publication-line" data-publication-status="not-assessed"><span class="publication-label">Publication eligibility</span> <span class="status-badge warn">Not assessed (Tier 3 only)</span></p>- {% else %}- <p class="publication-line" data-publication-status="{{ publication_status }}"><span class="publication-label">Publication eligibility</span> <span class="status-badge {{ publication_class }}">{{ publication_words.get(publication_status, publication_status | title) }}</span>{% if publication_reasons %} <span class="publication-reasons">{{ publication_reasons | join(' ') }}</span>{% endif %}</p>- {% endif %}- </div>- </div>- {# Tiles retain populated tier summaries; presentation scope also exposes absent tiers truthfully. #}- {% set initial_tab = tabs[0].id if tabs else 'tier1' %}- {#- With one tier, the executive summary below carries the numbers. -#}- {% set single_tier = tabs | length < 2 and presentation.tiers.values() | selectattr('displayed') | list | length < 2 %}-{% macro absent_tier_tile(number, tier) %}- <div class="tier-card skipped" role="button" tabindex="0" data-target-tab="tier{{ number }}" aria-controls="tab-tier{{ number }}" aria-pressed="false"- data-report-tier-tile="true">- <div class="tier-card-head"><span class="tier-card-label">Tier {{ number }}</span><span class="tier-card-verdict">{{ tier.summary }}</span></div>- <p class="tier-card-title">{{ {1:'Security & Static Validation',2:'Deduplication',3:'Live Agent Evaluation'}[number] }}</p>- </div>-{% endmacro %}- <div class="tier-cards{{ ' single-tier' if single_tier else '' }}{{ ' tier-line' if single_tier and has_tier1 else '' }}">- {% if has_tier1 %}- {% set t1_class = 'fail' if tier1_summary.failed_count else ('warn' if tier1_summary.incomplete_count else ('skipped' if tier1_summary.executed_count == 0 else 'pass')) %}- <div class="tier-card {{ t1_class }}{% if initial_tab == 'tier1' %} active{% endif %}"- role="button"- tabindex="0"- data-target-tab="tier1"- aria-controls="tab-tier1"- aria-pressed="{{ 'true' if initial_tab == 'tier1' else 'false' }}"- onclick="showTab('tier1')"- onkeydown="if(event.key==='Enter'||event.key===' '){event.preventDefault();showTab('tier1');}"- aria-label="Open Tier 1: Security and Static Validation"- title="Open Tier 1: Security and Static Validation">- <div class="tier-card-head">- <span class="tier-card-label">Tier 1</span>- {% if not single_tier %}<span class="tier-card-verdict">{{ 'N/A' if presentation.tiers[1].display_status == 'not_applicable' else verdict_words[{'pass': 'pass', 'fail': 'fail', 'warn': 'incomplete'}.get(t1_class, 'skipped')] }}</span>{% endif %}- </div>- <p class="tier-card-title">Security & Static Validation</p>- <div class="tier-card-stats">- {% if not single_tier %}- <span><strong>{{ ui_t1_pass }}</strong> of {{ ui_t1_executed }} checks passed</span>{% if ui_t1_na %}<span><strong>{{ ui_t1_na }}</strong> not applicable</span>{% endif %}- {% if tier1_summary.skipped_count %}<span><strong>{{ tier1_summary.skipped_count }}</strong> skipped</span>{% endif %}- {% if tier1_summary.issue_count %}<span><strong>{{ tier1_summary.issue_count }}</strong> finding{{ 's' if tier1_summary.issue_count != 1 else '' }}</span>{% endif %}- {% endif %}- {% if skillspector_versions %}<span title="SkillSpector version that ran the Tier 1 security scan">SkillSpector <strong>v{{ skillspector_versions | join(', v') }}</strong></span>{% endif %}- </div>- {% if not single_tier and (tier1_summary.critical or tier1_summary.high or tier1_summary.medium or tier1_summary.low) %}- <div class="tier-card-sev">- {% if tier1_summary.critical %}<span class="tier-card-sev-pill crit">{{ tier1_summary.critical }} critical</span>{% endif %}- {% if tier1_summary.high %}<span class="tier-card-sev-pill high">{{ tier1_summary.high }} high</span>{% endif %}- {% if tier1_summary.medium %}<span class="tier-card-sev-pill med">{{ tier1_summary.medium }} medium</span>{% endif %}- {% if tier1_summary.low %}<span class="tier-card-sev-pill low">{{ tier1_summary.low }} low</span>{% endif %}- </div>- {% endif %}- </div>- {% elif presentation.tiers[1].displayed %}{{ absent_tier_tile(1, presentation.tiers[1]) }}- {% endif %}- {% if has_tier2 %}- {% set t2_class = 'fail' if tier2_summary.failed_count else ('warn' if tier2_summary.incomplete_count else ('skipped' if tier2_summary.executed_count == 0 else 'pass')) %}- <div class="tier-card {{ t2_class }}{% if initial_tab == 'tier2' %} active{% endif %}"- role="button"- tabindex="0"- data-target-tab="tier2"- aria-controls="tab-tier2"- aria-pressed="{{ 'true' if initial_tab == 'tier2' else 'false' }}"- onclick="showTab('tier2')"- onkeydown="if(event.key==='Enter'||event.key===' '){event.preventDefault();showTab('tier2');}"- aria-label="Open Tier 2: Deduplication"- title="Open Tier 2: Deduplication">- <div class="tier-card-head">- <span class="tier-card-label">Tier 2</span>- <span class="tier-card-verdict">{{ 'N/A' if presentation.tiers[2].display_status == 'not_applicable' else (advisory_fail_word if t2_class == 'fail' and 'tier2' in nonblocking_tiers else verdict_words[{'pass': 'pass', 'fail': 'fail', 'warn': 'incomplete'}.get(t2_class, 'skipped')]) }}</span>- </div>- <p class="tier-card-title">Deduplication</p>- <div class="tier-card-stats">- <span><strong>{{ tier2_summary.passed_count }}</strong> of {{ tier2_summary.executed_count }} checks passed</span>- {% if tier2_summary.not_applicable_count %}<span><strong>{{ tier2_summary.not_applicable_count }}</strong> not applicable</span>{% endif %}- {% if tier2_summary.skipped_count %}<span><strong>{{ tier2_summary.skipped_count }}</strong> skipped</span>{% endif %}- {% if tier2_summary.issue_count %}<span><strong>{{ tier2_summary.issue_count }}</strong> finding(s)</span>{% endif %}- </div>- </div>- {% elif presentation.tiers[2].displayed %}{{ absent_tier_tile(2, presentation.tiers[2]) }}- {% endif %}- {% if has_tier3 %}- {% set t3_tile_verdict = presentation.tiers[3].assessment_status or 'incomplete' %}- {% set tier3_display_verdict = verdict_words['skipped'] if tier3_is_skipped else (advisory_fail_word if t3_tile_verdict == 'fail' and 'tier3' in nonblocking_tiers else verdict_words[t3_tile_verdict if t3_tile_verdict in ['pass', 'fail', 'neutral'] else 'incomplete']) %}- {% set t3_class = 'fail' if t3_tile_verdict == 'fail' else ('skipped' if tier3_is_skipped else ('warn' if completed_agent and completed_agent.needs_attention else ('pass' if t3_tile_verdict == 'pass' else 'warn'))) %}- <div class="tier-card {{ t3_class }}{% if initial_tab == 'tier3' %} active{% endif %}"- role="button"- tabindex="0"- data-target-tab="tier3"- aria-controls="tab-tier3"- aria-pressed="{{ 'true' if initial_tab == 'tier3' else 'false' }}"- onclick="showTab('tier3')"- onkeydown="if(event.key==='Enter'||event.key===' '){event.preventDefault();showTab('tier3');}"- aria-label="Open Tier 3: Live Agent Evaluation"- title="Open Tier 3: Live Agent Evaluation">- <div class="tier-card-head">- <span class="tier-card-label">Tier 3</span>- <span class="tier-card-verdict">{{ tier3_display_verdict }}</span>- </div>- <p class="tier-card-title">Live Agent Evaluation</p>- <div class="tier-card-stats">- {% if tier3_is_skipped %}- <span>{{ tier3_skip_message }}</span>- {% else %}- <span>Best agent score <strong>{{ "%.2f" | format(hero_score) if hero_score is not none else "N/A" }}</strong></span>- {% if tier3.get('overall_lift') is not none %}<span>lift <strong>{{ "%+.2f" | format(tier3.get('overall_lift')) }}</strong></span>{% endif %}- <span class="trial-coverage">{{ hero_trials }}</span>- {% endif %}- </div>- {% if hero_harbor_job_url or hero_harbor_analysis_url %}- <div class="tier-card-links" onclick="event.stopPropagation()">- {% if hero_harbor_job_url %}<a class="tier-card-link" href="{{ hero_harbor_job_url }}" target="_blank" rel="noopener">Harbor logs</a>{% endif %}- {% if hero_harbor_analysis_url %}<a class="tier-card-link" href="{{ hero_harbor_analysis_url }}" target="_blank" rel="noopener">Harbor analysis</a>{% endif %}- </div>- {% endif %}- </div>- {% elif presentation.tiers[3].displayed %}{{ absent_tier_tile(3, presentation.tiers[3]) }}- {% endif %}-- </div>- </section>- <nav class="mobile-tier-nav" aria-label="Tier navigation">- {% for number, tier in presentation.tiers.items() if tier.displayed or (tabs | selectattr('id', 'equalto', 'tier' ~ number) | list) %}<a href="#tab-tier{{ number }}" data-report-tier="tier{{ number }}">Tier {{ number }}</a>{% endfor %}- </nav>- <div id="report-evidence" class="workspace-heading" tabindex="-1"><h2>Findings & evidence</h2><p>Each check with its results and the evidence behind them.</p></div>- {% set workspace_tabs = [] %}- {% for number, tier in presentation.tiers.items() %}- {% set existing_tab = tabs | selectattr('id', 'equalto', 'tier' ~ number) | list %}- {% if existing_tab %}{% set _ = workspace_tabs.append(existing_tab[0]) %}- {% elif tier.displayed %}{% set _ = workspace_tabs.append({'id':'tier' ~ number,'label':'Tier ' ~ number,'empty':true,'number':number}) %}{% endif %}- {% endfor %}- {% for tab in workspace_tabs %}- <div id="tab-{{ tab.id }}" class="tab-content {{ 'active' if tab.id == initial_tab else '' }}" tabindex="-1" aria-label="{{ tab.label }}">+ <style>+ .t3-subtabs { display:flex; gap:0.25rem; background:var(--bg); border-radius:10px; padding:0.25rem; margin-bottom:1.25rem; overflow-x:auto; border:1px solid var(--border-color); }+ .t3-subtab { padding:0.65rem 1rem; cursor:pointer; border:none; background:transparent; color:var(--text-secondary); font-weight:600; font-size:0.9rem; border-radius:8px; white-space:nowrap; }+ .t3-subtab:hover { background:var(--bg-secondary); color:var(--dark-text); }+ .t3-subtab.active { color:var(--dark-text); background:var(--bg-secondary); box-shadow:var(--shadow); }+ .t3-page { display:none; }+ .t3-page.active { display:block; }+ .t3-agent-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:1rem; margin-top:1rem; }+ .t3-agent-card { background:var(--bg); border:1px solid var(--border-color); border-radius:10px; padding:1rem; border-top:3px solid var(--accent-color); box-shadow:var(--shadow); }+ .t3-agent-name { font-weight:700; }+ .t3-agent-score { font-size:1.75rem; font-weight:700; margin:0.25rem 0; }+ .t3-mini-bar { height:7px; background:var(--bg-tertiary); border-radius:999px; overflow:hidden; margin-top:0.5rem; }+ .t3-mini-bar > span { display:block; height:100%; background:var(--accent-color); }+ .t3-finding-card { background:var(--bg); border:1px solid var(--border-color); border-radius:10px; padding:1rem; margin:0.5rem 0; box-shadow:var(--shadow); }+ .t3-finding-card.ok { border-left:4px solid var(--success-color); }+ .t3-finding-card.warning { border-left:4px solid var(--warning-color); }+ .t3-finding-card.critical { border-left:4px solid var(--danger-color); }+ .t3-checks { list-style:none; margin:0.6rem 0 0; padding:0; }+ .t3-checks li { margin:0; padding:0.3rem 0; color:var(--text-secondary); font-size:0.85rem; border-bottom:1px solid var(--bg-tertiary); }+ .t3-checks li:last-child { border-bottom:none; }+ .t3-pill { display:inline-block; padding:0.15rem 0.5rem; border-radius:4px; font-size:0.7rem; font-weight:700; text-transform:uppercase; }+ .t3-pill.ok, .t3-pill.pass { background:var(--badge-pass-bg); color:var(--badge-pass-tx); }+ .t3-pill.warning, .t3-pill.warn, .t3-pill.neutral { background:var(--badge-warn-bg); color:var(--badge-warn-tx); }+ .t3-pill.critical, .t3-pill.fail { background:var(--badge-fail-bg); color:var(--badge-fail-tx); }+ .t3-pill.unavailable { background:var(--bg-tertiary); color:var(--text-secondary); }+ .t3-collapsed { background:var(--bg); border:1px solid var(--border-color); border-radius:10px; padding:0.75rem 1rem; margin-top:1rem; box-shadow:var(--shadow); }+ .t3-section { margin-top:1.5rem; }+ .t3-pre { background:var(--bg); border:1px solid var(--border-color); border-radius:6px; padding:0.75rem; overflow:auto; font-size:0.78rem; max-height:280px; }+ .t3-section h3 { margin-bottom:0.75rem; }+ .t3-details { background:var(--bg); border:1px solid var(--border-color); border-radius:12px; box-shadow:var(--shadow); margin-top:1rem; overflow:hidden; }+ .t3-details > summary { cursor:pointer; list-style:none; display:flex; justify-content:space-between; align-items:center; gap:0.75rem; padding:0.9rem 1rem; font-weight:800; color:var(--dark-text); }+ .t3-details > summary::-webkit-details-marker { display:none; }+ .t3-details > summary::after { content:'▼'; color:var(--text-secondary); font-size:0.9rem; font-weight:800; transition:transform 0.2s ease; }+ .t3-details[open] > summary::after { content:'▲'; }+ .t3-details-body { border-top:1px solid var(--border-color); padding:1rem; }+ .t3-details-body > .t3-section:first-child { margin-top:0; }+ /* INCOMPLETE plugin-run callout (organized summary of unresolved deps) */+ .t3-incomplete-callout { background:linear-gradient(180deg, rgba(220,38,38,0.08), var(--bg)); border:1px solid var(--danger-color); border-left:5px solid var(--danger-color); border-radius:12px; padding:1rem 1.15rem; margin:0 0 1rem; box-shadow:var(--shadow); }+ .t3-incomplete-head { display:flex; align-items:center; gap:0.6rem; margin-bottom:0.5rem; flex-wrap:wrap; }+ .t3-incomplete-badge { background:var(--danger-color); color:#fff; font-weight:800; font-size:0.72rem; letter-spacing:0.06em; padding:0.22rem 0.6rem; border-radius:6px; }+ .t3-incomplete-title { font-weight:800; color:var(--dark-text); }+ .t3-incomplete-body { margin:0 0 0.8rem; color:var(--text-secondary); font-size:0.9rem; line-height:1.5; }+ .t3-incomplete-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(118px, 1fr)); gap:0.55rem; margin-bottom:0.8rem; }+ .t3-incomplete-grid > div { background:var(--bg); border:1px solid var(--border-color); border-radius:8px; padding:0.5rem 0.65rem; display:flex; flex-direction:column; gap:0.15rem; }+ .t3-incomplete-num { font-size:1.35rem; font-weight:800; line-height:1; }+ .t3-incomplete-num.ok { color:var(--success-color); }+ .t3-incomplete-num.bad { color:var(--danger-color); }+ .t3-incomplete-env { font-size:1rem; font-weight:800; color:var(--dark-text); font-family:monospace; }+ .t3-incomplete-grid > div span:last-child { font-size:0.7rem; color:var(--text-secondary); text-transform:uppercase; letter-spacing:0.03em; }+ .t3-incomplete-link { display:inline-block; font-weight:700; color:var(--danger-color); text-decoration:none; font-size:0.85rem; }+ .t3-incomplete-link:hover { text-decoration:underline; }+ .t3-dataset-card { border-left:4px solid var(--secondary-color); }+ .t3-dataset-hero { background:var(--bg); border:1px solid var(--border-color); border-radius:12px; padding:1.25rem; box-shadow:var(--shadow); margin-bottom:1rem; }+ .t3-dataset-hero h2 { margin:0; color:var(--secondary-color); font-size:1.3rem; }+ .t3-dataset-list { display:grid; grid-template-columns:1fr; gap:1rem; }+ .t3-ds-card { background:var(--bg); border:1px solid var(--border-color); border-left:4px solid var(--secondary-color); border-radius:12px; padding:1.1rem 1.2rem; box-shadow:var(--shadow); }+ details.t3-ds-card { padding:0; overflow:hidden; }+ details.t3-ds-card > summary { cursor:pointer; list-style:none; padding:1rem 1.2rem; display:flex; align-items:center; gap:0.75rem; }+ details.t3-ds-card > summary::-webkit-details-marker { display:none; }+ details.t3-ds-card > summary::after { content:'▼'; color:var(--text-secondary); font-size:0.9rem; font-weight:800; margin-left:auto; flex-shrink:0; }+ details.t3-ds-card[open] > summary::after { content:'▲'; }+ details.t3-ds-card > .t3-ds-body { border-top:1px solid var(--border-color); padding:0 1.2rem 1rem; }+ .t3-ds-head { display:flex; align-items:center; justify-content:space-between; gap:0.75rem; flex-wrap:wrap; margin-bottom:0.85rem; }+ .t3-ds-id { color:var(--secondary-color); font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; font-weight:800; font-size:1rem; }+ .t3-ds-meta { display:flex; gap:0.5rem; flex-wrap:wrap; color:var(--text-secondary); font-size:0.8rem; }+ .t3-ds-chip { background:var(--bg-secondary); border:1px solid var(--border-color); border-radius:999px; padding:0.18rem 0.6rem; }+ .t3-ds-field { margin:0.8rem 0; }+ .t3-ds-label { display:block; color:var(--text-secondary); font-size:0.72rem; font-weight:800; letter-spacing:0.05em; text-transform:uppercase; margin-bottom:0.2rem; }+ .t3-ds-value { font-size:0.92rem; line-height:1.55; white-space:pre-wrap; }+ .t3-ds-gt { color:var(--text-secondary); font-style:italic; }+ .t3-ds-behaviors { counter-reset:behavior; list-style:none; margin:0.45rem 0 0; padding:0; display:grid; gap:0.35rem; }+ .t3-ds-behaviors li { counter-increment:behavior; display:grid; grid-template-columns:1.7rem 1fr; gap:0.5rem; align-items:start; color:var(--dark-text); font-size:0.87rem; line-height:1.45; }+ .t3-ds-behaviors li::before { content:counter(behavior); display:inline-flex; align-items:center; justify-content:center; width:1.35rem; height:1.35rem; border-radius:999px; background:var(--bg-secondary); color:var(--secondary-color); font-weight:800; font-size:0.72rem; border:1px solid var(--border-color); }+ .t3-conclusion { border-left:4px solid var(--warning-color); }+ .t3-conclusion.pass { border-left-color:var(--success-color); }+ .t3-conclusion.fail { border-left-color:var(--danger-color); }+ .t3-agent-scorecards-row { display:grid; grid-template-columns:minmax(220px,0.85fr) repeat(2,minmax(260px,1fr)); gap:1.25rem; align-items:stretch; margin-top:0.75rem; }+ .t3-agent-scorecard-list { display:grid; gap:1rem; align-content:start; }+ .t3-overview-lead { background:linear-gradient(135deg,var(--bg),var(--bg-secondary)); border:1px solid var(--border-color); border-left:4px solid var(--secondary-color); border-radius:12px; padding:1rem 1.15rem; box-shadow:var(--shadow); color:var(--dark-text); line-height:1.55; margin:0 0 1rem; }+ .t3-other-agent-notes { background:var(--bg); border:1px solid var(--border-color); border-left:4px solid var(--warning-color); border-radius:12px; padding:0.95rem 1.1rem; box-shadow:var(--shadow); margin:0 0 1rem; }+ #tier3-viewer-delivery-warning { overflow-wrap:anywhere; }+ .t3-other-agent-notes strong { color:var(--dark-text); }+ .t3-other-agent-notes ul { margin:0.45rem 0 0; padding-left:1.15rem; color:var(--dark-text); display:grid; gap:0.25rem; }+ .t3-other-agent-notes li { line-height:1.45; }+ .t3-harbor-panel { background:var(--bg); border:1px solid var(--border-color); border-left:4px solid var(--secondary-color); border-radius:12px; padding:0.95rem 1.1rem; box-shadow:var(--shadow); margin:0 0 1rem; display:flex; gap:1rem; justify-content:space-between; align-items:center; flex-wrap:wrap; }+ .t3-harbor-panel strong { color:var(--dark-text); }+ .t3-harbor-panel p { color:var(--text-secondary); margin:0.2rem 0 0; font-size:0.85rem; line-height:1.45; }+ .t3-harbor-actions { display:flex; gap:0.45rem; flex-wrap:wrap; }+ .t3-harbor-link, .t3-evidence-link { display:inline-flex; align-items:center; gap:0.3rem; border:1px solid var(--border-color); border-radius:7px; background:var(--bg-secondary); color:var(--secondary-color); text-decoration:none; font-weight:800; }+ .t3-harbor-link { padding:0.42rem 0.75rem; font-size:0.8rem; }+ .t3-harbor-panel-multi { flex-direction:column; align-items:stretch; }+ .t3-harbor-jobs { display:flex; flex-direction:column; gap:0.55rem; width:100%; }+ .t3-harbor-job { display:flex; justify-content:space-between; align-items:center; gap:0.75rem; flex-wrap:wrap; }+ .t3-harbor-job-label { color:var(--dark-text); font-weight:700; font-size:0.85rem; }+ .t3-evidence-link { padding:0.22rem 0.55rem; font-size:0.76rem; margin-top:0.45rem; }+ .t3-harbor-link:hover, .t3-evidence-link:hover { border-color:var(--secondary-color); background:var(--bg); color:var(--accent-color); }+ .t3-next-steps { background:var(--bg); border:1px solid var(--border-color); border-radius:12px; padding:1rem 1.15rem; box-shadow:var(--shadow); margin:0 0 1rem; }+ .t3-next-steps-head { display:flex; justify-content:space-between; gap:0.75rem; align-items:center; flex-wrap:wrap; margin-bottom:0.7rem; }+ .t3-next-steps-head h3 { margin:0; color:var(--dark-text); font-size:1rem; }+ .t3-next-steps-conclusion { margin:0 0 0.65rem; color:var(--dark-text); line-height:1.5; }+ .t3-next-steps-list { margin:0; padding-left:1.15rem; color:var(--dark-text); display:grid; gap:0.35rem; }+ .t3-link-btn { background:var(--secondary-color); border:1px solid var(--secondary-color); color:white; border-radius:7px; padding:0.38rem 0.75rem; font-size:0.78rem; font-weight:800; cursor:pointer; }+ .t3-link-btn:hover { filter:brightness(0.95); }+ .t3-agent-link { background:transparent; border:0; color:var(--secondary-color); font:inherit; font-weight:800; padding:0; cursor:pointer; text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:2px; }+ .t3-agent-link:hover { color:var(--accent-color); }+ .t3-agent-deeplink { cursor:pointer; transition:transform 0.15s ease, border-color 0.15s ease; }+ .t3-agent-deeplink:hover, .t3-agent-deeplink:focus { border-color:var(--secondary-color); transform:translateY(-1px); outline:none; }+ /* Invisible scroll target inside each agent panel. ``scroll-margin-top``+ keeps the anchor below the sticky Tier 3 sub-tab nav when jumped to. */+ .t3-agent-anchor { display:block; width:0; height:0; overflow:hidden; scroll-margin-top:80px; }+ @media(max-width:1100px){.t3-agent-scorecards-row{grid-template-columns:1fr}.t3-agent-scorecard-list{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));}}++ /* Sticky Tier 3 sub-tab nav */+ .t3-subtabs { position:sticky; top:0; z-index:5; }++ /* Score chip (reusable 0-1 score badge) */+ .t3-score-chip { display:inline-flex; align-items:center; gap:0.35rem; padding:0.18rem 0.55rem; border-radius:6px; font-weight:700; font-size:0.85rem; font-variant-numeric:tabular-nums; border:1px solid transparent; }+ .t3-score-chip.ok { background:var(--badge-pass-bg); color:var(--badge-pass-tx); }+ .t3-score-chip.warn { background:var(--badge-warn-bg); color:var(--badge-warn-tx); }+ .t3-score-chip.fail { background:var(--badge-fail-bg); color:var(--badge-fail-tx); }+ .t3-score-chip.neutral { background:var(--bg-secondary); color:var(--text-secondary); border-color:var(--border-color); }+ .t3-delta { font-weight:700; font-size:0.78rem; padding:0.1rem 0.4rem; border-radius:4px; font-variant-numeric:tabular-nums; }+ .t3-delta.up { color:var(--success-color); background:rgba(34,197,94,0.12); }+ .t3-delta.down { color:var(--danger-color); background:rgba(239,68,68,0.12); }+ .t3-delta.flat { color:var(--text-secondary); background:var(--bg-tertiary); }++ /* Agent tabs (horizontal pill bar inside Agent Details) */+ .t3-agent-tabs { display:flex; gap:0.25rem; flex-wrap:wrap; padding:0.3rem; background:var(--bg-secondary); border-radius:10px; border:1px solid var(--border-color); margin-bottom:1rem; }+ .t3-agent-tab-btn { background:transparent; border:none; color:var(--text-secondary); font-weight:700; font-size:0.88rem; padding:0.55rem 1rem; border-radius:8px; cursor:pointer; display:inline-flex; align-items:center; gap:0.5rem; white-space:nowrap; transition:background 0.15s, color 0.15s; }+ .t3-agent-tab-btn:hover { color:var(--dark-text); background:var(--bg); }+ .t3-agent-tab-btn .t3-tab-dot { width:0.6rem; height:0.6rem; border-radius:50%; background:var(--accent); display:inline-block; }+ .t3-agent-tab-btn .t3-tab-score { font-size:0.75rem; font-weight:600; color:var(--text-secondary); padding-left:0.25rem; }+ .t3-agent-tab-btn.active { background:var(--bg); color:var(--dark-text); box-shadow:var(--shadow); border-bottom:3px solid var(--accent); border-radius:8px 8px 4px 4px; }+ .t3-agent-tab-btn.active .t3-tab-score { color:var(--dark-text); }+ .t3-agent-panel { display:none; }+ .t3-agent-panel.active { display:block; }++ /* Agent KPI strip */+ .t3-kpi-strip { display:grid; grid-template-columns:repeat(auto-fit, minmax(160px, 1fr)); gap:0.75rem; margin-bottom:1rem; }+ .t3-kpi-card { background:var(--bg); border:1px solid var(--border-color); border-radius:10px; padding:0.85rem 1rem; box-shadow:var(--shadow); }+ .t3-kpi-card .t3-kpi-label { font-size:0.7rem; font-weight:700; color:var(--text-secondary); text-transform:uppercase; letter-spacing:0.05em; }+ .t3-kpi-card .t3-kpi-value { font-size:1.5rem; font-weight:800; line-height:1.2; margin-top:0.2rem; font-variant-numeric:tabular-nums; }+ .t3-kpi-card .t3-kpi-sub { font-size:0.78rem; color:var(--text-secondary); margin-top:0.15rem; }++ /* Dimension pill strip (compact horizontal mapping) */+ .t3-dim-strip { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:0.5rem; margin:0.75rem 0 1rem; padding:0.75rem; background:var(--bg-secondary); border:1px solid var(--border-color); border-radius:10px; }+ .t3-dim-pill { background:var(--bg); border:1px solid var(--border-color); border-radius:8px; padding:0.55rem 0.75rem; display:flex; flex-direction:column; gap:0.15rem; }+ .t3-dim-pill .t3-dim-name { font-size:0.72rem; font-weight:800; text-transform:uppercase; color:var(--text-secondary); letter-spacing:0.04em; }+ .t3-dim-pill .t3-dim-score { font-size:1.1rem; font-weight:800; font-variant-numeric:tabular-nums; }+ .t3-dim-pill .t3-dim-lift { font-size:0.72rem; font-weight:600; }++ /* Vertical evaluator card stack */+ .t3-eval-stack { display:flex; flex-direction:column; gap:0.85rem; }+ .t3-eval-card { background:var(--bg); border:1px solid var(--border-color); border-radius:12px; padding:1rem 1.1rem; box-shadow:var(--shadow); border-left:4px solid var(--border-color); }+ .t3-eval-card.ok { border-left-color:var(--success-color); }+ .t3-eval-card.warn, .t3-eval-card.warning { border-left-color:var(--warning-color); }+ .t3-eval-card.fail, .t3-eval-card.critical { border-left-color:var(--danger-color); }+ .t3-eval-card.unavailable { border-left-color:var(--text-secondary); }+ .t3-eval-head { display:grid; grid-template-columns:1fr auto auto; gap:1rem; align-items:center; }+ @media(max-width:720px){.t3-eval-head{grid-template-columns:1fr;gap:0.5rem;}}+ .t3-eval-title { font-weight:800; font-size:1rem; color:var(--dark-text); }+ .t3-eval-desc { display:block; font-size:0.78rem; font-weight:500; color:var(--text-secondary); margin-top:0.15rem; }+ .t3-eval-gauge { position:relative; width:64px; height:64px; flex-shrink:0; }+ .t3-eval-gauge svg { width:100%; height:100%; transform:rotate(-90deg); }+ .t3-eval-gauge .t3-gauge-track { fill:none; stroke:var(--bg-tertiary); stroke-width:8; }+ .t3-eval-gauge .t3-gauge-arc { fill:none; stroke-width:8; stroke-linecap:round; transition:stroke-dashoffset 0.6s ease; }+ .t3-eval-gauge .t3-gauge-text { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:0.9rem; font-variant-numeric:tabular-nums; }+ .t3-eval-bars { margin-top:0.75rem; display:grid; grid-template-columns:80px 1fr auto; gap:0.5rem 0.75rem; align-items:center; font-size:0.82rem; }+ .t3-eval-bars .t3-bar-label { color:var(--text-secondary); font-weight:600; }+ .t3-eval-bars .t3-bar-track { height:8px; background:var(--bg-tertiary); border-radius:999px; overflow:hidden; position:relative; }+ .t3-eval-bars .t3-bar-fill { height:100%; border-radius:999px; }+ .t3-eval-bars .t3-bar-value { font-weight:700; font-variant-numeric:tabular-nums; min-width:2.5rem; text-align:right; }+ .t3-eval-evidence { margin-top:0.85rem; }+ .t3-eval-evidence > summary { cursor:pointer; list-style:none; color:var(--text-secondary); font-size:0.82rem; font-weight:600; padding:0.35rem 0; }+ .t3-eval-evidence > summary::-webkit-details-marker { display:none; }+ .t3-eval-evidence > summary::before { content:'▸'; display:inline-block; margin-right:0.4rem; transition:transform 0.15s ease; }+ .t3-eval-evidence[open] > summary::before { transform:rotate(90deg); }+ .t3-eval-evidence ul { list-style:none; margin:0.45rem 0 0; padding:0; display:grid; gap:0.3rem; }+ .t3-eval-evidence li { display:grid; grid-template-columns:auto 1fr auto auto; gap:0.5rem; align-items:center; padding:0.35rem 0.55rem; background:var(--bg-secondary); border-radius:6px; font-size:0.82rem; }+ .t3-eval-evidence li .t3-ev-id { font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; font-weight:700; color:var(--secondary-color); }+ .t3-eval-evidence li .t3-ev-count { font-size:0.7rem; color:var(--text-secondary); font-weight:700; padding:0.1rem 0.4rem; border-radius:4px; background:var(--bg-tertiary); }+ .t3-eval-evidence li .t3-ev-notes { color:var(--text-secondary); font-size:0.78rem; }+ .t3-eval-evidence li .t3-ev-detail { grid-column:1 / -1; display:flex; flex-wrap:wrap; align-items:center; gap:0.5rem; }+ .t3-eval-evidence li .t3-ev-detail .t3-evidence-link { margin-top:0; }+ .t3-ev-excerpt { font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; font-size:0.76rem; padding:0.15rem 0.4rem; border-radius:4px; background:var(--bg-tertiary); color:var(--text-secondary); overflow-wrap:anywhere; }+ .t3-score-reason { border-bottom:1px dotted currentColor; cursor:help; }++ /* Attempt Details: ACES-style chip table for per-case attempt scores */+ .t3-attempt-list { display:flex; flex-wrap:wrap; gap:6px; min-width:180px; }+ .t3-attempt-chip { display:inline-block; padding:3px 8px; border-radius:4px; font-size:0.76rem; font-weight:600; white-space:nowrap; font-variant-numeric:tabular-nums; }+ a.t3-attempt-chip { text-decoration:none; }+ a.t3-attempt-chip:hover { outline:1px solid currentColor; }+ .t3-attempt-chip.pass { background:rgba(34,197,94,0.18); color:var(--success-color); }+ .t3-attempt-chip.warn { background:rgba(234,179,8,0.18); color:var(--warning-color); }+ .t3-attempt-chip.fail { background:rgba(239,68,68,0.18); color:var(--danger-color); }+ .t3-attempt-chip.muted { background:var(--bg-secondary); color:var(--text-secondary); border:1px dashed var(--border-color); }+ a.t3-attempt-case-link { color:inherit; text-decoration:underline; text-underline-offset:2px; }+ a.t3-attempt-case-link:hover { color:var(--accent-color); }++ /* Lift split-bar visual */+ .t3-lift-row { display:grid; grid-template-columns:140px 1fr; gap:0.85rem; align-items:center; padding:0.45rem 0; border-bottom:1px dashed var(--border-color); }+ .t3-lift-row:last-child { border-bottom:none; }+ .t3-lift-row .t3-lift-label { font-size:0.82rem; color:var(--text-secondary); font-weight:600; }+ .t3-lift-bar { position:relative; height:18px; background:var(--bg-tertiary); border-radius:999px; overflow:hidden; }+ .t3-lift-bar .t3-lift-base { position:absolute; left:0; top:0; bottom:0; background:var(--text-secondary); opacity:0.45; }+ .t3-lift-bar .t3-lift-with { position:absolute; left:0; top:0; bottom:0; }+ .t3-lift-bar .t3-lift-with.up { background:var(--success-color); }+ .t3-lift-bar .t3-lift-with.down { background:var(--danger-color); }+ .t3-lift-bar .t3-lift-with.flat { background:var(--secondary-color); }+ .t3-lift-bar .t3-lift-text { position:absolute; inset:0; display:flex; align-items:center; justify-content:flex-end; padding:0 0.6rem; font-size:0.72rem; font-weight:700; color:var(--dark-text); mix-blend-mode:plus-lighter; gap:0.4rem; }+ .t3-lift-agent-block { background:var(--bg); border:1px solid var(--border-color); border-radius:10px; padding:0.6rem 0.9rem 0.85rem; margin-bottom:0.75rem; box-shadow:var(--shadow); }+ .t3-lift-agent-block > h4 { display:flex; gap:0.5rem; align-items:center; margin:0 0 0.5rem; font-size:0.95rem; font-weight:800; }+ .t3-lift-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); gap:0.5rem 1.1rem; }+ .t3-lift-case-block { padding:0.35rem 0; }+ .t3-lift-case-id { font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; font-weight:700; font-size:0.82rem; color:var(--secondary-color); margin-bottom:0.25rem; display:flex; flex-wrap:wrap; align-items:center; gap:0.45rem 0.75rem; }+ .t3-lift-trial-links { display:flex; flex-wrap:wrap; gap:0.4rem; font-family:inherit; font-weight:700; }+ .t3-lift-trial-links .t3-evidence-link { margin-top:0; }++ /* Suggestions stacked cards & category chips */+ .t3-sug-stack { display:flex; flex-direction:column; gap:0.7rem; }+ .t3-sug-card { background:var(--bg); border:1px solid var(--border-color); border-radius:10px; padding:0.9rem 1rem; box-shadow:var(--shadow); border-left:4px solid var(--secondary-color); display:grid; grid-template-columns:auto 1fr auto; gap:0.75rem; align-items:start; }+ .t3-sug-card.severity-pass { border-left-color:var(--success-color); }+ .t3-sug-card.severity-warn { border-left-color:var(--warning-color); }+ .t3-sug-card.severity-fail { border-left-color:var(--danger-color); }+ .t3-sug-num { display:inline-flex; align-items:center; justify-content:center; width:1.7rem; height:1.7rem; border-radius:50%; background:var(--bg-secondary); border:1px solid var(--border-color); font-weight:800; font-size:0.78rem; color:var(--secondary-color); }+ .t3-sug-body { font-size:0.92rem; line-height:1.55; color:var(--dark-text); }+ .t3-sug-title { font-weight:800; color:var(--dark-text); display:flex; gap:0.55rem; align-items:center; flex-wrap:wrap; }+ .t3-sug-cat { display:inline-block; padding:0.1rem 0.45rem; border-radius:4px; font-size:0.68rem; font-weight:800; text-transform:uppercase; letter-spacing:0.04em; background:var(--bg-secondary); color:var(--secondary-color); border:1px solid var(--border-color); }+ .t3-sug-actions { display:flex; gap:0.35rem; }+ .t3-copy-btn { background:var(--bg-secondary); border:1px solid var(--border-color); border-radius:6px; padding:0.25rem 0.55rem; font-size:0.72rem; font-weight:700; color:var(--text-secondary); cursor:pointer; }+ .t3-copy-btn:hover { color:var(--dark-text); background:var(--bg); }+ .t3-copy-btn.copied { color:var(--success-color); border-color:var(--success-color); }++ /* Provenance key-value grid */+ .t3-prov-grid { display:grid; grid-template-columns:minmax(140px, 0.3fr) 1fr auto; gap:0.4rem 0.85rem; align-items:center; padding:0.25rem 0; }+ .t3-prov-grid .t3-prov-label { font-weight:700; color:var(--dark-text); font-size:0.85rem; padding:0.4rem 0; }+ .t3-prov-grid .t3-prov-value { font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; font-size:0.8rem; color:var(--text-secondary); background:var(--bg-secondary); padding:0.45rem 0.65rem; border-radius:6px; word-break:break-all; }+ .t3-prov-grid .t3-prov-action { display:flex; gap:0.4rem; }+ .t3-download-grid { display:flex; flex-wrap:wrap; gap:0.5rem; }+ .t3-download-grid .t3-copy-btn { padding:0.4rem 0.85rem; font-size:0.78rem; }+ /* Insight source tag (deterministic vs LLM) */+ .t3-insight-source { display:inline-block; padding:0.05rem 0.4rem; border-radius:4px; font-size:0.65rem; font-weight:800; text-transform:uppercase; letter-spacing:0.04em; vertical-align:middle; margin-left:0.35rem; }+ .insight-source-deterministic { background:var(--bg-secondary); color:var(--text-secondary); border:1px solid var(--border-color); }+ .insight-source-llm { background:rgba(139,92,246,0.18); color:#8b5cf6; border:1px solid rgba(139,92,246,0.4); }+ /* Reasoning column wraps at a comfortable width */+ .t3-reasoning { font-size:0.85rem; color:var(--dark-text); max-width:520px; line-height:1.45; white-space:normal; }+ .t3-reasoning-list { margin:0; padding-left:1.05rem; }+ .t3-reasoning-list li { margin-bottom:0.2rem; }+ .t3-reasoning-list li:last-child { margin-bottom:0; }+ /* One-liner hint shown beneath a dimension name in tables */+ .t3-dim-hint { color:var(--text-secondary); font-size:0.78rem; font-weight:400; margin-top:0.15rem; line-height:1.35; }+ /* Reusable section hint paragraph used above several Tier 3 tables */+ .t3-section-hint { color:var(--text-secondary); font-size:0.85rem; margin:0 0 0.75rem; }+ /* Per-agent score+lift cell used in the consolidated dimension table */+ .t3-mad-cell { display:flex; flex-direction:column; align-items:flex-start; gap:0.2rem; min-width:84px; }+ .t3-mad-score-row { display:flex; align-items:center; gap:0.45rem; width:100%; }+ .t3-mad-score { font-weight:700; font-variant-numeric:tabular-nums; }+ .t3-mad-bar { flex:1; height:6px; min-width:48px; background:var(--bg-tertiary); border-radius:999px; overflow:hidden; }+ .t3-mad-bar > span { display:block; height:100%; border-radius:999px; }+ .t3-mad-lift { font-size:0.74rem; font-weight:700; font-variant-numeric:tabular-nums; }+ /* Integration (plugin composition). Deliberately NOT table-shaped: it is a+ 2-arm ablation, not another dimension lift row, and the visual language+ has to say so at a glance. */+ .t3-details.t3-integration { border-left:4px solid #8b5cf6; }+ .t3-integ-compare { display:flex; flex-wrap:wrap; align-items:stretch; gap:0.75rem; margin:0.25rem 0 0.25rem; }+ .t3-integ-arm, .t3-integ-delta { flex:1 1 190px; background:var(--bg-secondary); border:1px solid var(--border-color); border-radius:10px; padding:0.75rem 0.9rem; }+ .t3-integ-delta { border-style:dashed; border-color:#8b5cf6; background:rgba(139,92,246,0.08); }+ .t3-integ-arm-label { font-size:0.72rem; font-weight:800; text-transform:uppercase; letter-spacing:0.04em; color:var(--text-secondary); }+ .t3-integ-arm-score { font-size:1.7rem; font-weight:700; font-variant-numeric:tabular-nums; margin:0.15rem 0; color:var(--dark-text); }+ .t3-integ-arm-note { font-size:0.76rem; color:var(--text-secondary); line-height:1.35; }+ .t3-integ-vs { align-self:center; font-weight:800; color:var(--text-secondary); font-size:0.9rem; }+ .t3-integ-callout { background:var(--bg-secondary); border:1px dashed var(--warning-color); border-radius:10px; padding:0.85rem 1rem; color:var(--dark-text); font-size:0.88rem; }+ .t3-integ-callout-title { font-weight:700; color:var(--warning-color); }+ .t3-integ-evidence { margin-top:0.85rem; padding-top:0.75rem; border-top:1px solid var(--border-color); }+ .t3-integ-evidence-title { font-weight:700; font-size:0.85rem; margin-bottom:0.4rem; }+ .t3-integ-chips { display:flex; flex-wrap:wrap; gap:0.4rem; }+ .t3-integ-chip { background:var(--bg-secondary); border:1px solid var(--border-color); border-radius:999px; padding:0.18rem 0.6rem; font-size:0.76rem; color:var(--text-secondary); }+ .t3-integ-chip strong { color:var(--dark-text); }+ .t3-integ-chip.good { border-color:var(--success-color); color:var(--success-color); }+ .t3-integ-chip.bad { border-color:var(--warning-color); color:var(--warning-color); }+ /* Tier summary chip strip on the global hero */+ .agent-hero-tiers { display:flex; flex-wrap:wrap; gap:0.5rem; margin-top:0.65rem; }+ .agent-hero-tier-chip { background:var(--bg-secondary); border:1px solid var(--border-color); border-radius:999px; padding:0.2rem 0.65rem; font-size:0.78rem; color:var(--text-secondary); }+ .agent-hero-tier-chip strong { color:var(--dark-text); }+ .agent-hero-tier-chip.pass strong { color:var(--success-color); }+ .agent-hero-tier-chip.fail strong { color:var(--danger-color); }+ .agent-hero-tier-chip.warn strong { color:var(--warning-color); }++ /* Search/filter input */+ .t3-filter-bar { display:flex; gap:0.5rem; align-items:center; margin:0 0 0.85rem; flex-wrap:wrap; }+ .t3-filter-input { flex:1; min-width:220px; padding:0.5rem 0.75rem; border:1px solid var(--border-color); border-radius:8px; background:var(--bg); color:var(--dark-text); font-size:0.88rem; }+ .t3-filter-input:focus { outline:none; border-color:var(--secondary-color); box-shadow:0 0 0 2px rgba(118,185,0,0.15); }+ .t3-filter-count { font-size:0.78rem; color:var(--text-secondary); font-weight:600; }++ /* Print-friendly */+ @media print {+ .t3-subtabs, .t3-agent-tabs, .t3-copy-btn, .t3-filter-bar { display:none !important; }+ .t3-page, .t3-agent-panel { display:block !important; page-break-inside:avoid; }+ .t3-eval-card, .t3-sug-card, .t3-kpi-card, .t3-pivot-wrap, .t3-lift-agent-block { page-break-inside:avoid; box-shadow:none; }+ .t3-details { box-shadow:none; }+ .t3-details > summary::after { display:none; }+ .t3-eval-evidence { display:block; }+ .t3-eval-evidence > summary { display:none; }+ }+ </style>+<style>{% include "report_ui.css.j2" %}</style>+<noscript><style>.dedup-subtab,.t3-page,.t3-agent-panel,.table-container,.tab-content,.results-view,.skill-content,.validator-content,.top-issues-content,.contributor-content{display:block!important;max-height:none!important;overflow:visible!important}.filter-group,.view-toggle-section,.report-searchbar,.header-controls{display:none!important}.table-container,.top-issues-content,.summary-table-container,.contributor-content{overflow-x:auto!important}</style></noscript>+</head>+<body>+ {% set ci = ci_context | default({}, true) %}+ <a class="skip-link" href="#report-workspace">Skip to report</a>+ {% set has_tier3 = tier3 is defined and tier3 %}+ {% set tier3_summary_data = (tier3.get('summary') or {}) if has_tier3 else {} %}+ {% set tier3_provenance_data = (tier3.get('provenance') or {}) if has_tier3 else {} %}+ {% set tier3_execution_status = (tier3.get('execution_status') or tier3_summary_data.get('execution_status')) if has_tier3 else none %}+ {% set tier3_is_skipped = tier3_execution_status == 'skipped' or (tier3_provenance_data.get('advisory') and tier3_provenance_data.get('reason') == 'skipped') %}+ {% set tier3_skip_message = tier3_provenance_data.get('message') or 'Live evaluation did not run.' %}+ {% set tier3_verdict = (tier3_effective_status or tier3.get('verdict') or 'unknown') | lower if has_tier3 else 'unknown' %}+ {% if has_tier3 and tier3.budget and tier3.budget.not_run %}{% set tier3_verdict = 'incomplete' %}{% endif %}+ {#- A failing tier whose gate does not block is "Failed (advisory)", never "Changes required". -#}+ {% set tier3_advisory_fail = tier3_verdict == 'fail' and 'tier3' in nonblocking_tiers %}+ {% set has_t12_tab = tabs | selectattr('id', 'in', ['tier1', 'tier2']) | list | length > 0 %}+ {% set verdict_key = (tier3_verdict if tier3_verdict in ['pass', 'fail', 'neutral', 'inconclusive'] else 'incomplete') if report_scope == 'tier3' else {'passed': 'pass', 'failed': 'fail'}.get(presentation.command_status.value, 'incomplete') %}+ {% set verdict_class = {'pass': 'pass', 'fail': 'fail'}.get(verdict_key, 'warn') %}+ {% set verdict_label = (verdict_key | title) if report_scope == 'tier3' else presentation.command_label %}+ {% set check_words = {'pass': 'Passed', 'fail': 'Failed', 'incomplete': 'Incomplete', 'skipped': 'Skipped', 'not_applicable': 'N/A'} %}+ <header class="main-header">+ <div class="header-content">+ <div class="logo-section">+ <div class="header-brand-row">+ <p class="header-title">SkillEvaluator</p>+ {% if version %}<span class="header-version" title="SkillEvaluator report renderer version">v{{ version }}</span>{% endif %}+ </div>+ <div class="header-subtitle-row"><p class="header-subtitle">NVIDIA Benchmark for Agent Skills Evaluation</p></div>+ </div>+ <div class="header-meta">+ <div class="header-controls">+ <label class="theme-control" for="report-theme">Theme <select id="report-theme" onchange="setReportTheme(this.value)"><option value="system">System</option><option value="light">Light</option><option value="dark">Dark</option></select></label>+ {% if ci.get('canonical_json_url') %}<a class="export-btn" href="{{ ci.canonical_json_url }}" download="skillevaluator-report.json">↓ Download JSON</a>{% else %}+ <button type="button" class="export-btn" onclick="exportJSON()" title="Export report as JSON">+ <span aria-hidden="true">↓</span><span>Download JSON</span>+ </button>{% endif %}+ </div>+ </div>+ </div>+ </header>+ <main class="container" id="report-workspace" tabindex="-1">+ {% if ci.get('report_index_url') %}<nav class="report-breadcrumb" aria-label="Breadcrumb"><a href="{{ ci.report_index_url }}">All skills</a> / <span aria-current="page">{{ content_label | default('Skill') }} report</span></nav>{% endif %}+ {% set has_tier1 = tabs | selectattr('id', 'equalto', 'tier1') | list | length > 0 %}+ {% set has_tier2 = tabs | selectattr('id', 'equalto', 'tier2') | list | length > 0 %}+ {% set ui_t1 = tier1_execution_summary | default({}) %}+ {% set ui_t1_pass = ui_t1.get('pass', tier1_summary.passed_count if has_tier1 else 0) %}+ {% set ui_t1_na = ui_t1.get('not_applicable', 0) %}+ {% set ui_t1_executed = ui_t1_pass + ui_t1.get('fail', tier1_summary.failed_count if has_tier1 else 0) + ui_t1.get('incomplete', 0) %}+ {#-+ Hero title: prefer the friendly ``skills/<name>`` label over the+ full repo / filesystem path so reviewers can scan the report at a+ glance. Falls back to Tier 3's stored skill_name (used by the+ standalone ``agent-eval`` command), then ``target_display`` (which+ collapses repository URLs to ``repo / skills/<name>``), then the raw+ title — every step is opportunistic so the hero never goes blank.+ -#}+ {% set hero_title = explicit_skill_name | default(none) or friendly_label or (tier3.skill_name if has_tier3 and tier3.skill_name else (target_display or title)) %}+ {% set hero_score = completed_agent.score if completed_agent else (tier3.overall_score if has_tier3 and tier3.overall_score is not none else none) %}+ {% set hero_trials = presentation.coverage.text %}+ {% set overview_coverage = namespace(known=true, scored=0, expected=0) %}+ {% for arm in [presentation.coverage.with_skill, presentation.coverage.baseline] %}+ {% if arm.status != 'skipped' %}+ {% if arm.scored is none or arm.expected is none %}{% set overview_coverage.known = false %}+ {% else %}{% set overview_coverage.scored = overview_coverage.scored + arm.scored %}{% set overview_coverage.expected = overview_coverage.expected + arm.expected %}{% endif %}+ {% endif %}+ {% endfor %}+ {% set hero_metric_count = ((tier3.metric_ids or tier3.evaluators or {}) | length) if has_tier3 else 0 %}+ <section class="agent-hero" aria-labelledby="report-title" data-verdict="{{ verdict_key }}">+ <div class="agent-hero-top">+ <div class="agent-hero-title-block">+ <span class="agent-hero-eyebrow">{{ content_label }} evaluation</span>+ <h1 class="agent-hero-title" id="report-title">{{ hero_title }}</h1>+ <p class="hero-command-status verdict-chip {{ 'warn' if has_tier3 and tier3.budget and tier3.budget.not_run and report_scope == 'tier3' else verdict_class }}">{{ 'Incomplete' if has_tier3 and tier3.budget and tier3.budget.not_run and report_scope == 'tier3' else presentation.command_label }}</p>+ {% if presentation.required_failed or presentation.required_incomplete %}<p class="hero-decision-reason">{{ presentation.required_failed }} failed · {{ presentation.required_incomplete }} incomplete required check(s). See tier evidence for reasons.</p>{% endif %}+ {% if presentation.advisory_unfavorable %}<p class="hero-decision-reason">{{ presentation.advisory_unfavorable }} advisory check(s) failed or incomplete; advisory checks do not change the required result.</p>{% endif %}+ {#- In a folder scan this is the only sign that some skills were not reported. -#}+ {% if has_tier1 or has_tier2 %}<p class="hero-skills">{{ content_label_plural }}: {{ passed_skills }} of {{ total_skills }} passed</p>{% endif %}+ </div>+ {#-+ Right-side block: the Tier 3 verdict and score when Tier 3+ ran, and publication eligibility for every report, kept+ next to the verdict.+ -#}+ {% set publication_class = {'pass': 'pass', 'fail': 'fail'}.get(publication_status, 'warn') %}+ <div class="hero-side">+ {% if has_tier3 %}+ {% set tier3_environment = (tier3.summary.environment if tier3.summary is defined and tier3.summary else None) or tier3.environment %}+ {% if tier3_is_skipped %}+ <span class="verdict-chip warn">Tier 3 quality: {{ verdict_words['skipped'] }}</span>+ <div class="agent-hero-detail">+ <div><strong>Reason:</strong> {{ tier3_skip_message }}</div>+ <div>Tier 3 is advisory and does not block required validation.</div>+ </div>+ {% else %}+ {% set t3_key = tier3_verdict if tier3_verdict in ['pass', 'fail', 'neutral'] else 'incomplete' %}+ {% if tier3.budget and tier3.budget.not_run %}{% set t3_key = 'incomplete' %}{% endif %}+ <span class="verdict-chip {{ {'pass': 'pass', 'fail': 'fail'}.get(t3_key, 'warn') }}">Tier 3 quality: {{ advisory_fail_word if tier3_advisory_fail else verdict_words[t3_key] }}</span>+ {% if t3_key == 'incomplete' and tier3_status_reason %}<p class="hero-reason">{{ tier3.verdict_reason if tier3.budget and tier3.budget.not_run else tier3_status_reason }}</p>{% endif %}+ {% if tier3.get('mode') == 'baseline_only' %}<p class="hero-reason">Baseline-only calibration; no skill lift measured.</p>{% endif %}+ {% if completed_agent and completed_agent.needs_attention %}<p class="hero-reason">Completed-agent result; other execution failures need attention.</p>{% endif %}+ {% endif %}+ {% endif %}+ {% if report_scope == 'tier3' %}+ <p class="publication-line" data-publication-status="not-assessed"><span class="publication-label">Publication eligibility</span> <span class="status-badge warn">Not assessed (Tier 3 only)</span></p>+ {% else %}+ <p class="publication-line" data-publication-status="{{ publication_status }}"><span class="publication-label">Publication eligibility</span> <span class="status-badge {{ publication_class }}">{{ publication_words.get(publication_status, publication_status | title) }}</span></p>{% if publication_reasons %}<details class="publication-reasons"><summary>Eligibility reasons</summary><ul>{% for reason in publication_reasons %}<li>{{ reason }}</li>{% endfor %}</ul></details>{% endif %}+ {% endif %}+ </div>+ </div>+ {# Tiles retain populated tier summaries; presentation scope also exposes absent tiers truthfully. #}+ {% set initial_tab = tabs[0].id if tabs else 'tier1' %}+ {#- With one tier, the executive summary below carries the numbers. -#}+ {% set single_tier = tabs | length < 2 and presentation.tiers.values() | selectattr('displayed') | list | length < 2 %}+{% macro absent_tier_tile(number, tier) %}+ <div class="tier-card skipped" role="button" tabindex="0" data-target-tab="tier{{ number }}" aria-controls="tab-tier{{ number }}" aria-pressed="false"+ data-report-tier-tile="true">+ <div class="tier-card-head"><span class="tier-card-label">Tier {{ number }}</span><span class="tier-card-verdict">{{ tier.summary }}</span></div>+ <p class="tier-card-title">{{ {1:'Security & Static Validation',2:'Deduplication',3:'Live Agent Evaluation'}[number] }}</p>+ </div>+{% endmacro %}+ <nav aria-label="Tier navigation" class="tier-cards{{ ' single-tier' if single_tier else '' }}{{ ' tier-line' if single_tier and has_tier1 else '' }}">+ {% if has_tier1 %}+ {% set t1_class = 'fail' if tier1_summary.failed_count else ('warn' if tier1_summary.incomplete_count else ('skipped' if tier1_summary.executed_count == 0 else 'pass')) %}+ <div class="tier-card {{ t1_class }}{% if initial_tab == 'tier1' %} active{% endif %}"+ role="button"+ tabindex="0"+ data-target-tab="tier1"+ aria-controls="tab-tier1"+ aria-pressed="{{ 'true' if initial_tab == 'tier1' else 'false' }}"+ onclick="showTab('tier1')"+ onkeydown="if(event.key==='Enter'||event.key===' '){event.preventDefault();showTab('tier1');}"+ aria-label="Open Tier 1: Security and Static Validation"+ title="Open Tier 1: Security and Static Validation">+ <div class="tier-card-head">+ <span class="tier-card-label">Tier 1</span>+ {% if not single_tier %}<span class="tier-card-verdict">{{ 'N/A' if presentation.tiers[1].display_status == 'not_applicable' else verdict_words[{'pass': 'pass', 'fail': 'fail', 'warn': 'incomplete'}.get(t1_class, 'skipped')] }}</span>{% endif %}+ </div>+ <p class="tier-card-title">Security & Static Validation</p>+ <div class="tier-card-stats">+ {% if not single_tier %}+ {% if tier1_summary.issue_count %}<span><strong>{{ tier1_summary.issue_count }}</strong> finding{{ 's' if tier1_summary.issue_count != 1 else '' }}</span>+ {% elif ui_t1_executed %}<span><strong>{{ ui_t1_pass }}</strong> of {{ ui_t1_executed }} checks passed</span>+ {% elif ui_t1_na %}<span><strong>{{ ui_t1_na }}</strong> not applicable</span>+ {% else %}<span>No checks ran</span>{% endif %}+ {% endif %}+ {% if skillspector_versions %}<span class="tier-card-scanner-version" title="SkillSpector version that ran the Tier 1 security scan">SkillSpector <strong>v{{ skillspector_versions | join(', v') }}</strong></span>{% endif %}+ </div>+ </div>+ {% elif presentation.tiers[1].displayed %}{{ absent_tier_tile(1, presentation.tiers[1]) }}+ {% endif %}+ {% if has_tier2 %}+ {% set t2_class = 'fail' if tier2_summary.failed_count else ('warn' if tier2_summary.incomplete_count else ('skipped' if tier2_summary.executed_count == 0 else 'pass')) %}+ <div class="tier-card {{ t2_class }}{% if initial_tab == 'tier2' %} active{% endif %}"+ role="button"+ tabindex="0"+ data-target-tab="tier2"+ aria-controls="tab-tier2"+ aria-pressed="{{ 'true' if initial_tab == 'tier2' else 'false' }}"+ onclick="showTab('tier2')"+ onkeydown="if(event.key==='Enter'||event.key===' '){event.preventDefault();showTab('tier2');}"+ aria-label="Open Tier 2: Deduplication"+ title="Open Tier 2: Deduplication">+ <div class="tier-card-head">+ <span class="tier-card-label">Tier 2</span>+ <span class="tier-card-verdict">{{ 'N/A' if presentation.tiers[2].display_status == 'not_applicable' else (advisory_fail_word if t2_class == 'fail' and 'tier2' in nonblocking_tiers else verdict_words[{'pass': 'pass', 'fail': 'fail', 'warn': 'incomplete'}.get(t2_class, 'skipped')]) }}</span>+ </div>+ <p class="tier-card-title">Deduplication</p>+ <div class="tier-card-stats">+ {% if tier2_summary.issue_count %}<span><strong>{{ tier2_summary.issue_count }}</strong> finding(s)</span>+ {% elif tier2_summary.executed_count %}<span><strong>{{ tier2_summary.passed_count }}</strong> of {{ tier2_summary.executed_count }} checks passed</span>+ {% elif tier2_summary.not_applicable_count %}<span><strong>{{ tier2_summary.not_applicable_count }}</strong> not applicable</span>+ {% else %}<span>No checks ran</span>{% endif %}+ </div>+ </div>+ {% elif presentation.tiers[2].displayed %}{{ absent_tier_tile(2, presentation.tiers[2]) }}+ {% endif %}+ {% if has_tier3 %}+ {% set t3_tile_verdict = presentation.tiers[3].assessment_status or 'incomplete' %}+ {% set tier3_display_verdict = verdict_words['skipped'] if tier3_is_skipped else (advisory_fail_word if t3_tile_verdict == 'fail' and 'tier3' in nonblocking_tiers else verdict_words[t3_tile_verdict if t3_tile_verdict in ['pass', 'fail', 'neutral'] else 'incomplete']) %}+ {% set t3_class = 'fail' if t3_tile_verdict == 'fail' else ('skipped' if tier3_is_skipped else ('warn' if completed_agent and completed_agent.needs_attention else ('pass' if t3_tile_verdict == 'pass' else 'warn'))) %}+ <div class="tier-card {{ t3_class }}{% if initial_tab == 'tier3' %} active{% endif %}"+ role="button"+ tabindex="0"+ data-target-tab="tier3"+ aria-controls="tab-tier3"+ aria-pressed="{{ 'true' if initial_tab == 'tier3' else 'false' }}"+ onclick="showTab('tier3')"+ onkeydown="if(event.target===this&&(event.key==='Enter'||event.key===' ')){event.preventDefault();showTab('tier3');}"+ aria-label="Open Tier 3: Live Agent Evaluation"+ title="Open Tier 3: Live Agent Evaluation">+ <div class="tier-card-head">+ <span class="tier-card-label">Tier 3</span>+ <span class="tier-card-verdict">{{ tier3_display_verdict }}</span>+ </div>+ <p class="tier-card-title">Live Agent Evaluation</p>+ <div class="tier-card-stats">+ {% if tier3_is_skipped %}+ <span>{{ tier3_skip_message }}</span>+ {% else %}+ <span class="trial-coverage">{% if overview_coverage.known %}<strong>{{ overview_coverage.scored }}</strong> of {{ overview_coverage.expected }} attempts scored{% else %}{{ hero_trials }}{% endif %}</span>+ {% endif %}+ </div>+ {% if harbor_jobs %}{{ harbor_job_actions(harbor_jobs, tile=true) }}{% endif %}+ </div>+ {% elif presentation.tiers[3].displayed %}{{ absent_tier_tile(3, presentation.tiers[3]) }}+ {% endif %}++ </nav>+ </section>+ <div id="report-evidence" class="workspace-heading" tabindex="-1"><h2>Findings & evidence</h2></div>+ {% set workspace_tabs = [] %}+ {% for number, tier in presentation.tiers.items() %}+ {% set existing_tab = tabs | selectattr('id', 'equalto', 'tier' ~ number) | list %}+ {% if existing_tab %}{% set _ = workspace_tabs.append(existing_tab[0]) %}+ {% elif tier.displayed %}{% set _ = workspace_tabs.append({'id':'tier' ~ number,'label':'Tier ' ~ number,'empty':true,'number':number}) %}{% endif %}+ {% endfor %}+ {% for tab in workspace_tabs %}+ <div id="tab-{{ tab.id }}" class="tab-content {{ 'active' if tab.id == initial_tab else '' }}" tabindex="-1" aria-label="{{ tab.label }}">{% if tab.empty | default(false) %}+ {{ render_plugin_evidence(plugin_evidence, tab.id) }}<section class="tier-empty"><h2>{{ tab.label }} · {{ presentation.tiers[tab.number].summary }}</h2><p>No check evidence was recorded for this tier.</p></section>{% elif tab.id == 'tier1' %}{% set results = tier1_display_results %}@@ -1522,6 +1900,13 @@{% set t1_class = {'pass': 'pass', 'fail': 'fail'}.get(t1_key, 'warn') %}{% set t1_all_checks = total_validators + ui_t1_na + (skipped_count or 0) %}{% set qualities = skills.values() | selectattr('quality', 'defined') | map(attribute='quality') | selectattr('overall_score', 'defined') | list %}+ <div class="dashboard tier1-statistics">+ <div class="dashboard-card"><h3 class="dashboard-card-title">Validators Run</h3><p class="dashboard-card-value">{{ total_validators }}</p><p class="dashboard-card-subtitle">{{ skipped_count }} skipped · {{ ui_t1_na }} not applicable</p></div>+ <div class="dashboard-card success"><h3 class="dashboard-card-title">Passed</h3><p class="dashboard-card-value">{{ passed_count }}</p><p class="dashboard-card-subtitle">{{ pass_percentage ~ '% success rate' if total_validators else 'No executed checks' }}</p></div>+ <div class="dashboard-card{{ ' danger' if failed_count else '' }}"><h3 class="dashboard-card-title">Failed</h3><p class="dashboard-card-value">{{ failed_count }}</p><p class="dashboard-card-subtitle">{{ incomplete_count }} incomplete</p></div>+ <div class="dashboard-card"><h3 class="dashboard-card-title">Findings</h3><p class="dashboard-card-value">{{ tier1_summary.issue_count or 0 }}</p><p class="dashboard-card-subtitle">{% set severity_separator = joiner(' · ') %}{% for level in ['critical', 'high', 'medium', 'low'] %}{% if tier1_summary[level] %}{{ severity_separator() }}{{ tier1_summary[level] }} {{ level }}{% endif %}{% endfor %}{% if not tier1_summary.issue_count %}None reported{% endif %}</p></div>+ </div>+ <details class="t3-details"><summary>Tier 1 result and next steps</summary><section class="exec-summary {{ t1_class }}" aria-labelledby="exec-summary-title"><div class="exec-verdict"><h2 id="exec-summary-title" class="exec-title"><span class="sr-only">Tier 1 result: </span><span class="verdict-chip {{ t1_class }}">{{ verdict_words[t1_key] }}</span></h2>@@ -1591,6 +1976,8 @@{% endif %}</section>+ </details>+{# ==================== FINDING TYPES ==================== #}{% if top_issues %}<div class="top-issues-section {{ 'advisory-findings' if all_passed and not has_incomplete else '' }}">@@ -2031,458 +2418,214 @@<div class="validator-summary">{% if result.summary.files_scanned > 0 %}<span class="summary-stat">{{ icons.file | safe }} {{ result.summary.files_scanned }} files scanned</span>{% endif %}{% if result.summary.checks_performed > 0 %}<span class="summary-stat">{{ icons.checkmark | safe }} {{ result.summary.checks_performed }} checks performed</span>{% endif %}- {% if result.summary.errors > 0 %}<span class="summary-stat error">{{ result.summary.errors }} errors{% if result.summary.critical_count > 0 or result.summary.high_count > 0 %} ({% if result.summary.critical_count > 0 %}{{ result.summary.critical_count }} critical{% endif %}{% if result.summary.critical_count > 0 and result.summary.high_count > 0 %}, {% endif %}{% if result.summary.high_count > 0 %}{{ result.summary.high_count }} high{% endif %}){% endif %}</span>{% endif %}- {% if result.summary.warnings > 0 %}<span class="summary-stat warning">{{ result.summary.warnings }} warnings</span>{% endif %}- </div>- {% endif %}- {% if result.is_incomplete %}- <div class="suggestion" style="border-color:var(--warning-color);">- <strong>Incomplete scanner evidence:</strong> {{ result.incomplete_scans | join(', ') }} did not produce a trustworthy report. Restore the scanner and rerun validation before publication.- </div>- {% endif %}- {% if result_is_skipped %}- <div class="suggestion" style="border-color:var(--warning-color);">- <strong>Skip reason:</strong> {{ result | skip_reason }}- </div>- {% elif result.passed %}- <ul class="success-list">- {% if result.success_details %}{% for detail in result.success_details %}<li class="success-item">{{ icons.checkmark | safe }}<span>{{ detail.check_name }}: {{ detail.message }}{% if detail.metadata %} ({% for k, v in detail.metadata.items() %}{{ k }}={{ v }}{% if not loop.last %}, {% endif %}{% endfor %}){% endif %}</span></li>{% endfor %}- {% elif result.messages %}{% for msg in result.messages %}<li class="success-item">{{ icons.checkmark | safe }}<span>{{ msg }}</span></li>{% endfor %}- {% else %}<li class="success-item">{{ icons.checkmark | safe }}<span>All checks passed</span></li>{% endif %}- </ul>- {% if result.findings %}- <div style="margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border-color);">- <div style="font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.5rem;">{{ result.findings | length }} advisory finding(s) — not blocking:</div>- <div class="findings-list">- {% for finding in result.findings %}- <div class="finding {{ finding.severity.value }}" style="opacity: 0.8;">- <div class="finding-header">- <span class="finding-message">{{ finding.message }}</span>- <span class="severity-tag severity-{{ finding.severity.value }}">{{ finding.severity.value | upper }}</span>- </div>- <div class="finding-meta">- <span>{{ icons.file | safe }} {{ finding.location }}</span>- <span>{{ icons.search | safe }} {{ finding.check_name }}</span>- </div>- {% if finding.suggestion %}<div class="suggestion"><strong>Suggestion:</strong> {{ finding.suggestion }}</div>{% endif %}- {{ verification_detail(finding) }}- </div>- {% endfor %}- </div>- </div>- {% endif %}- {% else %}- <div class="findings-list">- {% for error in result | additional_errors %}- <div class="finding high"><div class="finding-header"><span class="finding-message">{{ error }}</span></div></div>- {% endfor %}- {% if result.findings %}{% for finding in result.findings %}- <div class="finding {{ finding.severity.value }}">- <div class="finding-header">- <span class="finding-message">{{ finding.message }}</span>- <span class="severity-tag severity-{{ finding.severity.value }}">{{ finding.severity.value | upper }}</span>- </div>- <div class="finding-meta">- <span>{{ icons.file | safe }} {{ finding.location }}</span>- <span>{{ icons.search | safe }} {{ finding.check_name }}</span>- </div>- {% if finding.line_content %}<div class="code-snippet">{{ finding.line_content | truncate(200) }}</div>{% endif %}- {% if finding.suggestion %}<div class="suggestion"><strong>Suggestion:</strong> {{ finding.suggestion }}</div>{% endif %}- {{ verification_detail(finding) }}- </div>- {% endfor %}{% endif %}- </div>- {% endif %}- </div>- </div>- {% endfor %}- </div>{# End of results-by-validator #}- {% elif tab.id == 'tier2' %}- {# ==================== TIER 2: SEMANTIC OVERLAP ==================== #}-- <nav aria-label="Tier 2 comparison scopes" class="tier2-scope-nav">- {% for scope in tier2_scopes %}<a href="#tier2-{{ scope.id }}">{{ scope.label }}</a>{% endfor %}- </nav>- {% for scope in tier2_scopes %}- <section id="tier2-{{ scope.id }}" aria-labelledby="tier2-{{ scope.id }}-title">- <h2 id="tier2-{{ scope.id }}-title">{{ scope.label }}</h2>- <p>{{ 'Redundant content among files in the evaluated skill.' if scope.id == 'within' else 'Semantic overlap with catalog entries or among a collection of skills.' }}</p>- {% if not scope.not_run %}- <div class="dashboard">- {#- Across skills counts every similarity match, not only duplicates. -#}- {% for label, value in [('Checks completed', scope.completed), ('Duplicate findings' if scope.id == 'within' else 'Similarity matches', scope.duplicates), ('Affected files' if scope.id == 'within' else 'Affected skills', scope.affected), ('Catalog entries compared', scope.catalog_entries)] %}- <div class="dashboard-card">- <h3 class="dashboard-card-title">{{ label }}</h3>- <p class="dashboard-card-value">{{ 'Not applicable' if label == 'Catalog entries compared' and scope.catalog_not_applicable else (value if value is not none else 'Unavailable') }}</p>- </div>- {% endfor %}- </div>- {% endif %}- {% for note in scope.notes %}<p class="t3-section-hint">{{ note }}</p>{% endfor %}- {% for result in scope.results %}- {% set execution_errors = result | additional_errors %}- {% if execution_errors %}- <div style="background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:8px;padding:1rem;margin:0.75rem 0;">- <strong>{{ 'Execution errors' if result.is_incomplete else 'Errors' }}</strong>- <ul style="margin:0.5rem 0 0;padding-left:1.25rem;">- {% for error in execution_errors %}<li style="white-space:pre-line;">{{ error }}</li>{% endfor %}- </ul>+ {% if result.summary.errors > 0 %}<span class="summary-stat error">{{ result.summary.errors }} errors{% if result.summary.critical_count > 0 or result.summary.high_count > 0 %} ({% if result.summary.critical_count > 0 %}{{ result.summary.critical_count }} critical{% endif %}{% if result.summary.critical_count > 0 and result.summary.high_count > 0 %}, {% endif %}{% if result.summary.high_count > 0 %}{{ result.summary.high_count }} high{% endif %}){% endif %}</span>{% endif %}+ {% if result.summary.warnings > 0 %}<span class="summary-stat warning">{{ result.summary.warnings }} warnings</span>{% endif %}</div>{% endif %}- {% if result | cleanly_skipped %}- <div style="background:var(--bg-secondary);border:1px solid var(--warning-color);border-radius:8px;padding:1rem;margin:0.75rem 0;">- <strong style="color:var(--warning-color);">Skip reason:</strong> {{ result | skip_reason }}- </div>- {% elif result.is_incomplete %}- <div style="background:var(--bg-secondary);border:1px solid var(--warning-color);border-radius:8px;padding:1rem;margin:0.75rem 0;">- <strong style="color:var(--warning-color);">Incomplete scanner evidence:</strong>- {{ result.incomplete_scans | join(', ') }} did not produce trustworthy evidence. Restore the scanner and rerun validation.- </div>- {% elif result.passed and not result.findings and scope.completed == scope.results | length %}- <div style="background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:8px;padding:1rem;margin:0.75rem 0;">- {{ icons.checkmark | safe }} <strong style="color:var(--success-color);">No semantic overlaps detected.</strong>- {% if result.success_details %}- <ul style="margin:0.5rem 0 0;padding-left:1.25rem;font-size:0.85rem;color:var(--text-secondary);">- {% for d in result.success_details %}<li>{{ d.message }}</li>{% endfor %}- </ul>- {% endif %}+ {% if result.is_incomplete %}+ <div class="suggestion" style="border-color:var(--warning-color);">+ <strong>Incomplete scanner evidence:</strong> {{ result.incomplete_scans | join(', ') }} did not produce a trustworthy report. Restore the scanner and rerun validation before publication.</div>{% endif %}- {% for finding in result.findings %}- {% set sev = finding.severity.value if finding.severity.value is defined else finding.severity %}- {% set is_high = sev in ['critical', 'high'] %}- <details class="dedup-finding {{ 'dedup-finding-high' if is_high else 'dedup-finding-medium' }}" style="border-radius:8px;margin:0.75rem 0;"{% if is_high %} open{% endif %}>- <summary style="padding:1rem;cursor:pointer;display:flex;align-items:center;gap:0.5rem;">- <span class="severity-tag severity-{{ sev }}" style="font-size:0.7rem;padding:2px 8px;border-radius:4px;">{{ sev | upper }}</span>- <strong style="font-size:0.95rem;">{{ finding.category }}</strong>- {% if finding.file_path %}<span style="font-size:0.8rem;color:var(--text-secondary);margin-left:auto;margin-right:0.5rem;">{{ finding.file_path }}{% if finding.line_number %}:{{ finding.line_number }}{% endif %}</span>{% endif %}- <span class="toggle-icon">▼</span>- </summary>- <div style="padding:0 1rem 1rem;">- <div style="font-size:0.9rem;line-height:1.5;white-space:pre-line;">{{ finding.message }}</div>- {% set related_paths = finding | related_paths %}- {% if related_paths %}- <div class="finding-meta"><span>{{ icons.file | safe }} Related paths: {{ related_paths | join(' <-> ') }}</span></div>- {% endif %}- {% if finding.suggestion %}- <div class="dedup-recommendation">- <strong style="color:var(--secondary-color);font-size:0.85rem;">Recommendation</strong>- <p style="margin:0.25rem 0 0;font-size:0.85rem;line-height:1.5;">{{ finding.suggestion }}</p>- </div>- {% endif %}- </div>- </details>- {% endfor %}- {% endfor %}- </section>- {% endfor %}-- {% elif tab.id == 'tier3' %}- {# ==================== TIER 3: AGENT EVALUATION (dimensions-first, schema v2.0) ==================== #}- {% if tier3 %}-- {# Helpers / locals used across the Tier 3 sub-tabs #}- {% set t3_summary = tier3.summary or {} %}- {% if tier3.baseline_description %}<p>{{ tier3.baseline_description }}</p>{% endif %}- {% for line in tier3.prior_version_lines | default([]) %}<p>{{ line }}</p>{% endfor %}- {% set t3_agents = tier3.agents or {} %}- {% macro tier3_chart(id, title, description, reference, reference_label, height) %}- <h3>{{ title }}</h3>- <p class="chart-description" id="{{ id }}-description">{{ description }} <a href="#{{ reference }}" onclick="return openTier3Reference(this.getAttribute('href').slice(1))">{{ reference_label }}</a>.</p>- <canvas id="{{ id }}" height="{{ height }}" role="img" aria-label="{{ title }}" aria-describedby="{{ id }}-description" hidden></canvas>- <p class="chart-fallback" id="{{ id }}-fallback" role="status">Chart unavailable. Use the data link above to read the results.</p>- {% endmacro %}- {% set t3_best_name = tier3.best_agent or t3_summary.best_agent %}- {% set t3_best = t3_agents[t3_best_name] if t3_best_name and t3_agents[t3_best_name] is defined else None %}- {% set t3_dim_ids = ["security", "correctness", "discoverability", "effectiveness", "efficiency"] %}- {% set t3_metric_ids = tier3.metric_ids or (tier3.evaluators or {}).keys() | list or ["security", "skill_execution", "skill_efficiency", "accuracy", "goal_accuracy", "behavior_check"] %}- {% set t3_metric_labels = tier3.metric_labels or {} %}- {% set t3_dim_hints = tier3.dimension_hints or {} %}- {% set t3_attempt_policy = tier3.attempt_policy or {} %}- {% set t3_max_attempts = (t3_attempt_policy.max_attempts or 1) | int %}- {% set t3_dataset = tier3.dataset or [] %}- {% set t3_provenance = tier3.provenance or {} %}- {% set t3_budget = tier3.budget or {} %}- {% set t3_source_errors = t3_provenance.get('source_validation') or [] %}- {% set t3_harbor = tier3.get('harbor_viewer') or t3_summary.get('harbor_viewer') or {} %}- {% set t3_harbor_job_url = t3_harbor.get('job_url') %}- {% set t3_harbor_analysis_url = t3_harbor.get('analysis_url') %}- {% set t3_evidence_links = t3_harbor.get('evidence_links') or [] %}- {% set t3_agent_anchor_ids = {} %}- {% set t3_agent_panel_ids = {} %}- {% if tier3.budget_summary and (t3_budget.status == 'exhausted' or t3_budget.partial or t3_budget.not_run or 'overrun observed' in tier3.budget_summary or 'not fully verified' in tier3.budget_summary) %}- <p class="warning">{{ tier3.budget_summary }}</p>- {% endif %}- {% if t3_budget.not_run %}<p class="warning">All scores and Skill Lift below cover admitted attempts only, not the complete planned run.</p>{% endif %}- {% for name, _agent in t3_agents.items() %}- {% set _ = t3_agent_anchor_ids.update({name: 'tier3-agent-anchor-' ~ loop.index0}) %}- {% set _ = t3_agent_panel_ids.update({name: 'tier3-agent-panel-' ~ loop.index0}) %}- {% endfor %}-- <style>- .t3-subtabs { display:flex; gap:0.25rem; background:var(--bg); border-radius:10px; padding:0.25rem; margin-bottom:1.25rem; overflow-x:auto; border:1px solid var(--border-color); }- .t3-subtab { padding:0.65rem 1rem; cursor:pointer; border:none; background:transparent; color:var(--text-secondary); font-weight:600; font-size:0.9rem; border-radius:8px; white-space:nowrap; }- .t3-subtab:hover { background:var(--bg-secondary); color:var(--dark-text); }- .t3-subtab.active { color:var(--dark-text); background:var(--bg-secondary); box-shadow:var(--shadow); }- .t3-page { display:none; }- .t3-page.active { display:block; }- .t3-agent-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:1rem; margin-top:1rem; }- .t3-agent-card { background:var(--bg); border:1px solid var(--border-color); border-radius:10px; padding:1rem; border-top:3px solid var(--accent-color); box-shadow:var(--shadow); }- .t3-agent-name { font-weight:700; }- .t3-agent-score { font-size:1.75rem; font-weight:700; margin:0.25rem 0; }- .t3-mini-bar { height:7px; background:var(--bg-tertiary); border-radius:999px; overflow:hidden; margin-top:0.5rem; }- .t3-mini-bar > span { display:block; height:100%; background:var(--accent-color); }- .t3-finding-card { background:var(--bg); border:1px solid var(--border-color); border-radius:10px; padding:1rem; margin:0.5rem 0; box-shadow:var(--shadow); }- .t3-finding-card.ok { border-left:4px solid var(--success-color); }- .t3-finding-card.warning { border-left:4px solid var(--warning-color); }- .t3-finding-card.critical { border-left:4px solid var(--danger-color); }- .t3-checks { list-style:none; margin:0.6rem 0 0; padding:0; }- .t3-checks li { margin:0; padding:0.3rem 0; color:var(--text-secondary); font-size:0.85rem; border-bottom:1px solid var(--bg-tertiary); }- .t3-checks li:last-child { border-bottom:none; }- .t3-pill { display:inline-block; padding:0.15rem 0.5rem; border-radius:4px; font-size:0.7rem; font-weight:700; text-transform:uppercase; }- .t3-pill.ok, .t3-pill.pass { background:var(--badge-pass-bg); color:var(--badge-pass-tx); }- .t3-pill.warning, .t3-pill.warn, .t3-pill.neutral { background:var(--badge-warn-bg); color:var(--badge-warn-tx); }- .t3-pill.critical, .t3-pill.fail { background:var(--badge-fail-bg); color:var(--badge-fail-tx); }- .t3-collapsed { background:var(--bg); border:1px solid var(--border-color); border-radius:10px; padding:0.75rem 1rem; margin-top:1rem; box-shadow:var(--shadow); }- .t3-section { margin-top:1.5rem; }- .t3-pre { background:var(--bg); border:1px solid var(--border-color); border-radius:6px; padding:0.75rem; overflow:auto; font-size:0.78rem; max-height:280px; }- .t3-section h3 { margin-bottom:0.75rem; }- .t3-details { background:var(--bg); border:1px solid var(--border-color); border-radius:12px; box-shadow:var(--shadow); margin-top:1rem; overflow:hidden; }- .t3-details > summary { cursor:pointer; list-style:none; display:flex; justify-content:space-between; align-items:center; gap:0.75rem; padding:0.9rem 1rem; font-weight:800; color:var(--dark-text); }- .t3-details > summary::-webkit-details-marker { display:none; }- .t3-details > summary::after { content:'▼'; color:var(--text-secondary); font-size:0.9rem; font-weight:800; transition:transform 0.2s ease; }- .t3-details[open] > summary::after { content:'▲'; }- .t3-details-body { border-top:1px solid var(--border-color); padding:1rem; }- .t3-details-body > .t3-section:first-child { margin-top:0; }- .t3-dataset-card { border-left:4px solid var(--secondary-color); }- .t3-dataset-hero { background:var(--bg); border:1px solid var(--border-color); border-radius:12px; padding:1.25rem; box-shadow:var(--shadow); margin-bottom:1rem; }- .t3-dataset-hero h2 { margin:0; color:var(--secondary-color); font-size:1.3rem; }- .t3-dataset-list { display:grid; grid-template-columns:1fr; gap:1rem; }- .t3-ds-card { background:var(--bg); border:1px solid var(--border-color); border-left:4px solid var(--secondary-color); border-radius:12px; padding:1.1rem 1.2rem; box-shadow:var(--shadow); }- details.t3-ds-card { padding:0; overflow:hidden; }- details.t3-ds-card > summary { cursor:pointer; list-style:none; padding:1rem 1.2rem; display:flex; align-items:center; gap:0.75rem; }- details.t3-ds-card > summary::-webkit-details-marker { display:none; }- details.t3-ds-card > summary::after { content:'▼'; color:var(--text-secondary); font-size:0.9rem; font-weight:800; margin-left:auto; flex-shrink:0; }- details.t3-ds-card[open] > summary::after { content:'▲'; }- details.t3-ds-card > .t3-ds-body { border-top:1px solid var(--border-color); padding:0 1.2rem 1rem; }- .t3-ds-head { display:flex; align-items:center; justify-content:space-between; gap:0.75rem; flex-wrap:wrap; margin-bottom:0.85rem; }- .t3-ds-id { color:var(--secondary-color); font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; font-weight:800; font-size:1rem; }- .t3-ds-meta { display:flex; gap:0.5rem; flex-wrap:wrap; color:var(--text-secondary); font-size:0.8rem; }- .t3-ds-chip { background:var(--bg-secondary); border:1px solid var(--border-color); border-radius:999px; padding:0.18rem 0.6rem; }- .t3-ds-field { margin:0.8rem 0; }- .t3-ds-label { display:block; color:var(--text-secondary); font-size:0.72rem; font-weight:800; letter-spacing:0.05em; text-transform:uppercase; margin-bottom:0.2rem; }- .t3-ds-value { font-size:0.92rem; line-height:1.55; white-space:pre-wrap; }- .t3-ds-gt { color:var(--text-secondary); font-style:italic; }- .t3-ds-behaviors { counter-reset:behavior; list-style:none; margin:0.45rem 0 0; padding:0; display:grid; gap:0.35rem; }- .t3-ds-behaviors li { counter-increment:behavior; display:grid; grid-template-columns:1.7rem 1fr; gap:0.5rem; align-items:start; color:var(--dark-text); font-size:0.87rem; line-height:1.45; }- .t3-ds-behaviors li::before { content:counter(behavior); display:inline-flex; align-items:center; justify-content:center; width:1.35rem; height:1.35rem; border-radius:999px; background:var(--bg-secondary); color:var(--secondary-color); font-weight:800; font-size:0.72rem; border:1px solid var(--border-color); }- .t3-ds-diagnostics { list-style:none; margin:0.45rem 0 0; padding:0; }- .t3-ds-diagnostics > li { margin-top:0.65rem; padding:0.65rem; border:1px solid var(--border-color); border-radius:0.4rem; overflow-wrap:anywhere; color:var(--dark-text); font-size:0.87rem; line-height:1.45; }- .t3-ds-diagnostics > li > div { margin-top:0.25rem; }- .t3-conclusion { border-left:4px solid var(--warning-color); }- .t3-conclusion.pass { border-left-color:var(--success-color); }- .t3-conclusion.fail { border-left-color:var(--danger-color); }- .t3-agent-scorecards-row { display:grid; grid-template-columns:minmax(220px,0.85fr) repeat(2,minmax(260px,1fr)); gap:1.25rem; align-items:stretch; margin-top:0.75rem; }- .t3-agent-scorecard-list { display:grid; gap:1rem; align-content:start; }- .t3-overview-lead .tolerated-baseline { display:block; margin-top:0.35rem; }- .t3-overview-lead { background:linear-gradient(135deg,var(--bg),var(--bg-secondary)); border:1px solid var(--border-color); border-left:4px solid var(--secondary-color); border-radius:12px; padding:1rem 1.15rem; box-shadow:var(--shadow); color:var(--dark-text); line-height:1.55; margin:0 0 1rem; }- .t3-dataset-provenance { margin:0 0 1rem; padding:0.7rem 0.9rem; border-left:4px solid var(--border-color); border-radius:6px; background:var(--bg-secondary); color:var(--dark-text); }- .t3-dataset-provenance.warning { border-left-color:var(--warning-color); background:var(--badge-warn-bg); color:var(--badge-warn-tx); }- .t3-harbor-panel { background:var(--bg); border:1px solid var(--border-color); border-left:4px solid var(--secondary-color); border-radius:12px; padding:0.95rem 1.1rem; box-shadow:var(--shadow); margin:0 0 1rem; display:flex; gap:1rem; justify-content:space-between; align-items:center; flex-wrap:wrap; }- .t3-harbor-panel strong { color:var(--dark-text); }- .t3-harbor-panel p { color:var(--text-secondary); margin:0.2rem 0 0; font-size:0.85rem; line-height:1.45; }- .t3-harbor-actions { display:flex; gap:0.45rem; flex-wrap:wrap; }- .t3-harbor-link, .t3-evidence-link { display:inline-flex; align-items:center; gap:0.3rem; border:1px solid var(--border-color); border-radius:7px; background:var(--bg-secondary); color:var(--secondary-color); text-decoration:none; font-weight:800; }- .t3-harbor-link { padding:0.42rem 0.75rem; font-size:0.8rem; }- .t3-evidence-link { padding:0.22rem 0.55rem; font-size:0.76rem; margin-top:0.45rem; }- .t3-harbor-link:hover, .t3-evidence-link:hover { border-color:var(--secondary-color); background:var(--bg); color:var(--accent-color); }- .t3-next-steps { background:var(--bg); border:1px solid var(--border-color); border-radius:12px; padding:1rem 1.15rem; box-shadow:var(--shadow); margin:0 0 1rem; }- .t3-next-steps-head { display:flex; justify-content:space-between; gap:0.75rem; align-items:center; flex-wrap:wrap; margin-bottom:0.7rem; }- .t3-next-steps-head h3 { margin:0; color:var(--dark-text); font-size:1rem; }- .t3-next-steps-conclusion { margin:0 0 0.65rem; color:var(--dark-text); line-height:1.5; }- .t3-next-steps-list { margin:0; padding-left:1.15rem; color:var(--dark-text); display:grid; gap:0.35rem; }- .t3-link-btn { background:var(--secondary-color); border:1px solid var(--secondary-color); color:var(--on-accent); border-radius:7px; padding:0.38rem 0.75rem; font-size:0.78rem; font-weight:800; cursor:pointer; }- .t3-link-btn:hover { filter:brightness(0.95); }- .t3-agent-link { background:transparent; border:0; color:var(--secondary-color); font:inherit; font-weight:800; padding:0; cursor:pointer; text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:2px; }- .t3-agent-link:hover { color:var(--accent-color); }- .t3-agent-deeplink { cursor:pointer; transition:transform 0.15s ease, border-color 0.15s ease; }- .t3-agent-deeplink:hover, .t3-agent-deeplink:focus { border-color:var(--secondary-color); transform:translateY(-1px); outline:none; }- /* Invisible scroll target inside each agent panel. ``scroll-margin-top``- keeps the anchor below the sticky Tier 3 sub-tab nav when jumped to. */- .t3-agent-anchor { display:block; width:0; height:0; overflow:hidden; scroll-margin-top:80px; }- @media(max-width:1100px){.t3-agent-scorecards-row{grid-template-columns:1fr}.t3-agent-scorecard-list{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));}}-- /* Sticky Tier 3 sub-tab nav */- .t3-subtabs { position:sticky; top:0; z-index:5; }-- /* Score chip (reusable 0-1 score badge) */- .t3-score-chip { display:inline-flex; align-items:center; gap:0.35rem; padding:0.18rem 0.55rem; border-radius:6px; font-weight:700; font-size:0.85rem; font-variant-numeric:tabular-nums; border:1px solid transparent; }- .t3-score-chip.ok { background:var(--badge-pass-bg); color:var(--badge-pass-tx); }- .t3-score-chip.warn { background:var(--badge-warn-bg); color:var(--badge-warn-tx); }- .t3-score-chip.fail { background:var(--badge-fail-bg); color:var(--badge-fail-tx); }- .t3-score-chip.neutral { background:var(--bg-secondary); color:var(--text-secondary); border-color:var(--border-color); }- .t3-delta { font-weight:700; font-size:0.78rem; padding:0.1rem 0.4rem; border-radius:4px; font-variant-numeric:tabular-nums; }- .t3-delta.up { color:var(--success-color); background:rgba(34,197,94,0.12); }- .t3-delta.down { color:var(--danger-color); background:rgba(239,68,68,0.12); }- .t3-delta.flat { color:var(--text-secondary); background:var(--bg-tertiary); }-- /* Agent tabs (horizontal pill bar inside Agent Details) */- .t3-agent-tabs { display:flex; gap:0.25rem; flex-wrap:wrap; padding:0.3rem; background:var(--bg-secondary); border-radius:10px; border:1px solid var(--border-color); margin-bottom:1rem; }- .t3-agent-tab-btn { background:transparent; border:none; color:var(--text-secondary); font-weight:700; font-size:0.88rem; padding:0.55rem 1rem; border-radius:8px; cursor:pointer; display:inline-flex; align-items:center; gap:0.5rem; white-space:nowrap; transition:background 0.15s, color 0.15s; }- .t3-agent-tab-btn:hover { color:var(--dark-text); background:var(--bg); }- .t3-agent-tab-btn .t3-tab-dot { width:0.6rem; height:0.6rem; border-radius:50%; background:var(--accent); display:inline-block; }- .t3-agent-tab-btn .t3-tab-score { font-size:0.75rem; font-weight:600; color:var(--text-secondary); padding-left:0.25rem; }- .t3-agent-tab-btn.active { background:var(--bg); color:var(--dark-text); box-shadow:var(--shadow); border-bottom:3px solid var(--accent); border-radius:8px 8px 4px 4px; }- .t3-agent-tab-btn.active .t3-tab-score { color:var(--dark-text); }- .t3-agent-panel { display:none; }- .t3-agent-panel.active { display:block; }-- /* Agent KPI strip */- .t3-kpi-strip { display:grid; grid-template-columns:repeat(auto-fit, minmax(160px, 1fr)); gap:0.75rem; margin-bottom:1rem; }- .t3-kpi-card { background:var(--bg); border:1px solid var(--border-color); border-radius:10px; padding:0.85rem 1rem; box-shadow:var(--shadow); }- .t3-kpi-card .t3-kpi-label { font-size:0.7rem; font-weight:700; color:var(--text-secondary); text-transform:uppercase; letter-spacing:0.05em; }- .t3-kpi-card .t3-kpi-value { font-size:1.5rem; font-weight:800; line-height:1.2; margin-top:0.2rem; font-variant-numeric:tabular-nums; }- .t3-kpi-card .t3-kpi-sub { font-size:0.78rem; color:var(--text-secondary); margin-top:0.15rem; }-- /* Dimension pill strip (compact horizontal mapping) */- .t3-dim-strip { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:0.5rem; margin:0.75rem 0 1rem; padding:0.75rem; background:var(--bg-secondary); border:1px solid var(--border-color); border-radius:10px; }- .t3-dim-pill { background:var(--bg); border:1px solid var(--border-color); border-radius:8px; padding:0.55rem 0.75rem; display:flex; flex-direction:column; gap:0.15rem; }- .t3-dim-pill .t3-dim-name { font-size:0.72rem; font-weight:800; text-transform:uppercase; color:var(--text-secondary); letter-spacing:0.04em; }- .t3-dim-pill .t3-dim-score { font-size:1.1rem; font-weight:800; font-variant-numeric:tabular-nums; }- .t3-dim-pill .t3-dim-lift { font-size:0.72rem; font-weight:600; }-- /* Vertical evaluator card stack */- .t3-eval-stack { display:flex; flex-direction:column; gap:0.85rem; }- .t3-eval-card { background:var(--bg); border:1px solid var(--border-color); border-radius:12px; padding:1rem 1.1rem; box-shadow:var(--shadow); border-left:4px solid var(--border-color); }- .t3-eval-card.ok { border-left-color:var(--success-color); }- .t3-eval-card.warn, .t3-eval-card.warning { border-left-color:var(--warning-color); }- .t3-eval-card.fail, .t3-eval-card.critical { border-left-color:var(--danger-color); }- .t3-eval-head { display:grid; grid-template-columns:1fr auto auto; gap:1rem; align-items:center; }- @media(max-width:720px){.t3-eval-head{grid-template-columns:1fr;gap:0.5rem;}}- .t3-eval-title { font-weight:800; font-size:1rem; color:var(--dark-text); }- .t3-eval-desc { display:block; font-size:0.78rem; font-weight:500; color:var(--text-secondary); margin-top:0.15rem; }- .t3-eval-gauge { position:relative; width:64px; height:64px; flex-shrink:0; }- .t3-eval-gauge svg { width:100%; height:100%; transform:rotate(-90deg); }- .t3-eval-gauge .t3-gauge-track { fill:none; stroke:var(--bg-tertiary); stroke-width:8; }- .t3-eval-gauge .t3-gauge-arc { fill:none; stroke-width:8; stroke-linecap:round; transition:stroke-dashoffset 0.6s ease; }- .t3-eval-gauge .t3-gauge-text { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:0.9rem; font-variant-numeric:tabular-nums; }- .t3-eval-bars { margin-top:0.75rem; display:grid; grid-template-columns:80px 1fr auto; gap:0.5rem 0.75rem; align-items:center; font-size:0.82rem; }- .t3-eval-bars .t3-bar-label { color:var(--text-secondary); font-weight:600; }- .t3-eval-bars .t3-bar-track { height:8px; background:var(--bg-tertiary); border-radius:999px; overflow:hidden; position:relative; }- .t3-eval-bars .t3-bar-fill { height:100%; border-radius:999px; }- .t3-eval-bars .t3-bar-value { font-weight:700; font-variant-numeric:tabular-nums; min-width:2.5rem; text-align:right; }- .t3-eval-evidence { margin-top:0.85rem; }- .t3-eval-evidence > summary { cursor:pointer; list-style:none; color:var(--text-secondary); font-size:0.82rem; font-weight:600; padding:0.35rem 0; }- .t3-eval-evidence > summary::-webkit-details-marker { display:none; }- .t3-eval-evidence > summary::before { content:'▸'; display:inline-block; margin-right:0.4rem; transition:transform 0.15s ease; }- .t3-eval-evidence[open] > summary::before { transform:rotate(90deg); }- .t3-eval-evidence ul { list-style:none; margin:0.45rem 0 0; padding:0; display:grid; gap:0.3rem; }- .t3-eval-evidence li { display:grid; grid-template-columns:auto 1fr auto auto; gap:0.5rem; align-items:center; padding:0.35rem 0.55rem; background:var(--bg-secondary); border-radius:6px; font-size:0.82rem; }- .t3-eval-evidence li .t3-ev-id { font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; font-weight:700; color:var(--secondary-color); }- .t3-eval-evidence li .t3-ev-count { font-size:0.7rem; color:var(--text-secondary); font-weight:700; padding:0.1rem 0.4rem; border-radius:4px; background:var(--bg-tertiary); }- .t3-eval-evidence li .t3-ev-notes { color:var(--text-secondary); font-size:0.78rem; }- .t3-eval-evidence li .t3-ev-detail { grid-column:1 / -1; display:flex; flex-wrap:wrap; align-items:center; gap:0.5rem; }- .t3-ev-excerpt { font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; font-size:0.76rem; padding:0.15rem 0.4rem; border-radius:4px; background:var(--bg-tertiary); color:var(--text-secondary); overflow-wrap:anywhere; }- .t3-eval-evidence li .t3-ev-lift-excluded { color:var(--text-secondary); font-size:0.76rem; font-weight:600; }- .t3-eval-lift-note { max-width:16rem; }- .t3-score-reason { border-bottom:1px dotted currentColor; cursor:help; }-- /* Attempt Details: SkillEvaluator-style chip table for per-case attempt scores */- .t3-attempt-list { display:flex; flex-wrap:wrap; gap:6px; min-width:180px; }- .t3-attempt-chip { display:inline-block; padding:3px 8px; border-radius:4px; font-size:0.76rem; font-weight:600; white-space:nowrap; font-variant-numeric:tabular-nums; }- .t3-attempt-chip.pass { background:rgba(34,197,94,0.18); color:var(--success-color); }- .t3-attempt-chip.warn { background:rgba(234,179,8,0.18); color:var(--warning-color); }- .t3-attempt-chip.fail { background:rgba(239,68,68,0.18); color:var(--danger-color); }- .t3-attempt-chip.muted { background:var(--bg-secondary); color:var(--text-secondary); border:1px dashed var(--border-color); }+ {% if result_is_skipped %}+ <div class="suggestion" style="border-color:var(--warning-color);">+ <strong>Skip reason:</strong> {{ result | skip_reason }}+ </div>+ {% elif result.passed %}+ <ul class="success-list">+ {% if result.success_details %}{% for detail in result.success_details %}<li class="success-item">{{ icons.checkmark | safe }}<span>{{ detail.check_name }}: {{ detail.message }}{% if detail.metadata %} ({% for k, v in detail.metadata.items() %}{{ k }}={{ v }}{% if not loop.last %}, {% endif %}{% endfor %}){% endif %}</span></li>{% endfor %}+ {% elif result.messages %}{% for msg in result.messages %}<li class="success-item">{{ icons.checkmark | safe }}<span>{{ msg }}</span></li>{% endfor %}+ {% else %}<li class="success-item">{{ icons.checkmark | safe }}<span>All checks passed</span></li>{% endif %}+ </ul>+ {% if result.findings %}+ <div style="margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border-color);">+ <div style="font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.5rem;">{{ result.findings | length }} advisory finding(s) — not blocking:</div>+ <div class="findings-list">+ {% for finding in result.findings %}+ <div class="finding {{ finding.severity.value }}" style="opacity: 0.8;">+ <div class="finding-header">+ <span class="finding-message">{{ finding.message }}</span>+ <span class="severity-tag severity-{{ finding.severity.value }}">{{ finding.severity.value | upper }}</span>+ </div>+ <div class="finding-meta">+ <span>{{ icons.file | safe }} {{ finding.location }}</span>+ <span>{{ icons.search | safe }} {{ finding.check_name }}</span>+ </div>+ {% if finding.suggestion %}<div class="suggestion"><strong>Suggestion:</strong> {{ finding.suggestion }}</div>{% endif %}+ {{ verification_detail(finding) }}+ </div>+ {% endfor %}+ </div>+ </div>+ {% endif %}+ {% else %}+ <div class="findings-list">+ {% for error in result | additional_errors %}+ <div class="finding high"><div class="finding-header"><span class="finding-message">{{ error }}</span></div></div>+ {% endfor %}+ {% if result.findings %}{% for finding in result.findings %}+ <div class="finding {{ finding.severity.value }}">+ <div class="finding-header">+ <span class="finding-message">{{ finding.message }}</span>+ <span class="severity-tag severity-{{ finding.severity.value }}">{{ finding.severity.value | upper }}</span>+ </div>+ <div class="finding-meta">+ <span>{{ icons.file | safe }} {{ finding.location }}</span>+ <span>{{ icons.search | safe }} {{ finding.check_name }}</span>+ </div>+ {% if finding.line_content %}<div class="code-snippet">{{ finding.line_content | truncate(200) }}</div>{% endif %}+ {% if finding.suggestion %}<div class="suggestion"><strong>Suggestion:</strong> {{ finding.suggestion }}</div>{% endif %}+ {{ verification_detail(finding) }}+ </div>+ {% endfor %}{% endif %}+ </div>+ {% endif %}+ </div>+ </div>+ {% endfor %}+ </div>{# End of results-by-validator #}+ {{ render_plugin_evidence(plugin_evidence, 'tier1') }}+{% elif tab.id == 'tier2' %}+ {# ==================== TIER 2: SEMANTIC OVERLAP ==================== #}- /* Lift split-bar visual */- .t3-lift-row { display:grid; grid-template-columns:140px 1fr; gap:0.85rem; align-items:center; padding:0.45rem 0; border-bottom:1px dashed var(--border-color); }- .t3-lift-row:last-child { border-bottom:none; }- .t3-lift-row .t3-lift-label { font-size:0.82rem; color:var(--text-secondary); font-weight:600; }- .t3-lift-bar { position:relative; height:18px; background:var(--bg-tertiary); border-radius:999px; overflow:hidden; }- .t3-lift-bar .t3-lift-base { position:absolute; left:0; top:0; bottom:0; background:var(--text-secondary); opacity:0.45; }- .t3-lift-bar .t3-lift-with { position:absolute; left:0; top:0; bottom:0; }- .t3-lift-bar .t3-lift-with.up { background:var(--success-color); }- .t3-lift-bar .t3-lift-with.down { background:var(--danger-color); }- .t3-lift-bar .t3-lift-with.flat { background:var(--secondary-color); }- .t3-lift-bar .t3-lift-text { position:absolute; inset:0; display:flex; align-items:center; justify-content:flex-end; padding:0 0.6rem; font-size:0.72rem; font-weight:700; color:var(--dark-text); mix-blend-mode:plus-lighter; gap:0.4rem; }- .t3-lift-agent-block { background:var(--bg); border:1px solid var(--border-color); border-radius:10px; padding:0.6rem 0.9rem 0.85rem; margin-bottom:0.75rem; box-shadow:var(--shadow); }- .t3-lift-agent-block > h4 { display:flex; gap:0.5rem; align-items:center; margin:0 0 0.5rem; font-size:0.95rem; font-weight:800; }- .t3-lift-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); gap:0.5rem 1.1rem; }- .t3-lift-case-block { padding:0.35rem 0; }- .t3-lift-case-id { font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; font-weight:700; font-size:0.82rem; color:var(--secondary-color); margin-bottom:0.25rem; }+ <div class="dashboard">+ <div class="dashboard-card">+ <h3 class="dashboard-card-title">Reported checks</h3>+ <p class="dashboard-card-value">{{ tier2_results | length }}</p>+ <p class="dashboard-card-subtitle">Intra-Skill + Inter-Skill</p>+ </div>+ <div class="dashboard-card{{ ' danger' if tier2_summary.issue_count else '' }}">+ <h3 class="dashboard-card-title">Findings</h3>+ <p class="dashboard-card-value">{{ tier2_summary.issue_count }}</p>+ <p class="dashboard-card-subtitle">Recorded Tier 2 findings; completion and scope are shown below.</p>+ </div>+ </div>+ <div class="nav-tabs tier2-subtabs" style="margin-top:1rem;" role="tablist" aria-label="Tier 2 comparison scopes">+ <button class="nav-tab active" id="dedup-tab-intra" type="button" role="tab" aria-controls="dedup-intra" aria-selected="true" tabindex="0" onclick="showDedupTab('intra')">Intra-Skill</button>+ <button class="nav-tab" id="dedup-tab-inter" type="button" role="tab" aria-controls="dedup-inter" aria-selected="false" tabindex="-1" onclick="showDedupTab('inter')">Inter-Skill</button>+ {% if tier2_scopes | selectattr('id', 'equalto', 'other') | list %}<button class="nav-tab" id="dedup-tab-other" type="button" role="tab" aria-controls="dedup-other" aria-selected="false" tabindex="-1" onclick="showDedupTab('other')">Other checks</button>{% endif %}+ </div>+ {% for scope in tier2_scopes %}+ {% set dedup_id = {'within':'intra','across':'inter'}.get(scope.id, 'other') %}+ <div id="dedup-{{ dedup_id }}" class="dedup-subtab" style="display:{{ 'block' if loop.first else 'none' }};" role="tabpanel" aria-labelledby="dedup-tab-{{ dedup_id }}" tabindex="0">+ <section id="tier2-{{ scope.id }}" aria-labelledby="tier2-{{ scope.id }}-title">+ <h2 id="tier2-{{ scope.id }}-title">{{ scope.label }}</h2>+ <p>{{ 'Redundant content among files in the evaluated skill.' if scope.id == 'within' else 'Semantic overlap with catalog entries or among a collection of skills.' }}</p>+ {% if not scope.not_run %}+ <dl class="tier2-scope-summary">+ {% for label, value in [('Checks completed', scope.completed), ('Duplicate findings' if scope.id == 'within' else 'Similarity matches', scope.duplicates), ('Affected files' if scope.id == 'within' else 'Affected skills', scope.affected), ('Catalog entries compared', scope.catalog_entries)] %}+ <div><dt>{{ label }}</dt><dd>{{ 'Not applicable' if label == 'Catalog entries compared' and scope.catalog_not_applicable else (value if value is not none else 'Unavailable') }}</dd></div>+ {% endfor %}+ </dl>+ {% endif %}+ {% for note in scope.notes %}<p class="t3-section-hint">{{ note }}</p>{% endfor %}+ {% for skip in scope.skips %}+ <div class="tier2-skip-notice">+ <strong>Skip reason:</strong> {{ skip.reason }}+ <div class="t3-dim-hint">Checks: {% for result in skip.results %}{{ result.validator_name }}{% if not loop.last %}, {% endif %}{% endfor %}</div>+ </div>+ {% endfor %}+ {% for result in scope.results %}+ {% set execution_errors = result | additional_errors %}+ {% if execution_errors %}+ <div style="background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:8px;padding:1rem;margin:0.75rem 0;">+ <strong>{{ 'Execution errors' if result.is_incomplete else 'Errors' }}</strong>+ <ul style="margin:0.5rem 0 0;padding-left:1.25rem;">+ {% for error in execution_errors %}<li style="white-space:pre-line;">{{ error }}</li>{% endfor %}+ </ul>+ </div>+ {% endif %}+ {% if result | cleanly_skipped %}+ {# Scope-level notices retain every affected check once. #}+ {% elif result.is_incomplete %}+ <div style="background:var(--bg-secondary);border:1px solid var(--warning-color);border-radius:8px;padding:1rem;margin:0.75rem 0;">+ <strong style="color:var(--warning-color);">Incomplete scanner evidence:</strong>+ {{ result.incomplete_scans | join(', ') }} did not produce trustworthy evidence. Restore the scanner and rerun validation.+ </div>+ {% elif result.passed and not result.findings and scope.completed == scope.results | length %}+ <div style="background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:8px;padding:1rem;margin:0.75rem 0;">+ {{ icons.checkmark | safe }} <strong style="color:var(--success-color);">No semantic overlaps detected.</strong>+ {% if result.success_details %}+ <ul style="margin:0.5rem 0 0;padding-left:1.25rem;font-size:0.85rem;color:var(--text-secondary);">+ {% for d in result.success_details %}<li>{{ d.message }}</li>{% endfor %}+ </ul>+ {% endif %}+ </div>+ {% endif %}+ {% for finding in result.findings %}+ {% set sev = finding.severity.value if finding.severity.value is defined else finding.severity %}+ {% set is_high = sev in ['critical', 'high'] %}+ <details class="dedup-finding {{ 'dedup-finding-high' if is_high else 'dedup-finding-medium' }}" style="border-radius:8px;margin:0.75rem 0;"{% if is_high %} open{% endif %}>+ <summary style="padding:1rem;cursor:pointer;display:flex;align-items:center;gap:0.5rem;">+ <span class="severity-tag severity-{{ sev }}" style="font-size:0.7rem;padding:2px 8px;border-radius:4px;">{{ sev | upper }}</span>+ <strong style="font-size:0.95rem;">{{ finding.category }}</strong>+ {% if finding.file_path %}<span style="font-size:0.8rem;color:var(--text-secondary);margin-left:auto;margin-right:0.5rem;">{{ finding.file_path }}{% if finding.line_number %}:{{ finding.line_number }}{% endif %}</span>{% endif %}+ <span class="toggle-icon">▼</span>+ </summary>+ <div style="padding:0 1rem 1rem;">+ <div style="font-size:0.9rem;line-height:1.5;white-space:pre-line;">{{ finding.message }}</div>+ {% set related_paths = finding | related_paths %}+ {% if related_paths %}+ <div class="finding-meta"><span>{{ icons.file | safe }} Related paths: {{ related_paths | join(' <-> ') }}</span></div>+ {% endif %}+ {% if finding.suggestion %}+ <div class="dedup-recommendation">+ <strong style="color:var(--secondary-color);font-size:0.85rem;">Recommendation</strong>+ <p style="margin:0.25rem 0 0;font-size:0.85rem;line-height:1.5;">{{ finding.suggestion }}</p>+ </div>+ {% endif %}+ </div>+ </details>+ {% endfor %}+ {% endfor %}+ </section>+ </div>+ {% endfor %}- /* Suggestions stacked cards & category chips */- .t3-sug-stack { display:flex; flex-direction:column; gap:0.7rem; }- .t3-sug-card { background:var(--bg); border:1px solid var(--border-color); border-radius:10px; padding:0.9rem 1rem; box-shadow:var(--shadow); border-left:4px solid var(--secondary-color); display:grid; grid-template-columns:auto 1fr auto; gap:0.75rem; align-items:start; }- .t3-sug-card.severity-pass { border-left-color:var(--success-color); }- .t3-sug-card.severity-warn { border-left-color:var(--warning-color); }- .t3-sug-card.severity-fail { border-left-color:var(--danger-color); }- .t3-sug-num { display:inline-flex; align-items:center; justify-content:center; width:1.7rem; height:1.7rem; border-radius:50%; background:var(--bg-secondary); border:1px solid var(--border-color); font-weight:800; font-size:0.78rem; color:var(--secondary-color); }- .t3-sug-body { font-size:0.92rem; line-height:1.55; color:var(--dark-text); }- .t3-sug-title { font-weight:800; color:var(--dark-text); display:flex; gap:0.55rem; align-items:center; flex-wrap:wrap; }- .t3-sug-cat { display:inline-block; padding:0.1rem 0.45rem; border-radius:4px; font-size:0.68rem; font-weight:800; text-transform:uppercase; letter-spacing:0.04em; background:var(--bg-secondary); color:var(--secondary-color); border:1px solid var(--border-color); }- .t3-sug-actions { display:flex; gap:0.35rem; }- .t3-copy-btn { background:var(--bg-secondary); border:1px solid var(--border-color); border-radius:6px; padding:0.25rem 0.55rem; font-size:0.72rem; font-weight:700; color:var(--text-secondary); cursor:pointer; }- .t3-copy-btn:hover { color:var(--dark-text); background:var(--bg); }- .t3-copy-btn.copied { color:var(--success-color); border-color:var(--success-color); }+ {{ render_plugin_evidence(plugin_evidence, 'tier2') }}+{% elif tab.id == 'tier3' %}+ {# ==================== TIER 3: AGENT EVALUATION (dimensions-first, schema v2.0) ==================== #}+ {% if tier3 %}- /* Provenance key-value grid */- .t3-prov-grid { display:grid; grid-template-columns:minmax(140px, 0.3fr) 1fr auto; gap:0.4rem 0.85rem; align-items:center; padding:0.25rem 0; }- .t3-prov-grid .t3-prov-label { font-weight:700; color:var(--dark-text); font-size:0.85rem; padding:0.4rem 0; }- .t3-prov-grid .t3-prov-value { font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; font-size:0.8rem; color:var(--text-secondary); background:var(--bg-secondary); padding:0.45rem 0.65rem; border-radius:6px; word-break:break-all; }- .t3-prov-grid .t3-prov-action { display:flex; gap:0.4rem; }- .t3-download-grid { display:flex; flex-wrap:wrap; gap:0.5rem; }- .t3-download-grid .t3-copy-btn { padding:0.4rem 0.85rem; font-size:0.78rem; }- .t3-truncation-notice { background:var(--badge-warn-bg); border:1px solid var(--warning-color); border-left:4px solid var(--warning-color); border-radius:10px; color:var(--dark-text); margin:0 0 1rem; padding:0.8rem 1rem; }- .t3-truncation-notice strong { display:block; margin-bottom:0.3rem; }- .t3-truncation-notice ul { display:flex; flex-wrap:wrap; gap:0.25rem 1rem; margin:0.35rem 0 0; padding-left:1.2rem; font-size:0.82rem; color:var(--text-secondary); }- .t3-coverage-notice ul { display:block; font-size:0.88rem; color:var(--dark-text); }- /* Insight source tag (deterministic vs LLM) */- .t3-insight-source { display:inline-block; padding:0.05rem 0.4rem; border-radius:4px; font-size:0.65rem; font-weight:800; text-transform:uppercase; letter-spacing:0.04em; vertical-align:middle; margin-left:0.35rem; }- .insight-source-deterministic { background:var(--bg-secondary); color:var(--text-secondary); border:1px solid var(--border-color); }- .insight-source-llm { background:rgba(139,92,246,0.18); color:#8b5cf6; border:1px solid rgba(139,92,246,0.4); }- /* Reasoning column wraps at a comfortable width */- .t3-reasoning { font-size:0.85rem; color:var(--dark-text); max-width:520px; line-height:1.45; white-space:normal; }- .t3-reasoning-list { margin:0; padding-left:1.05rem; }- .t3-reasoning-list li { margin-bottom:0.2rem; }- .t3-reasoning-list li:last-child { margin-bottom:0; }- /* One-liner hint shown beneath a dimension name in tables */- .t3-dim-hint { color:var(--text-secondary); font-size:0.78rem; font-weight:400; margin-top:0.15rem; line-height:1.35; }- /* Reusable section hint paragraph used above several Tier 3 tables */- .t3-section-hint { color:var(--text-secondary); font-size:0.85rem; margin:0 0 0.75rem; }- /* Multi-Agent Dimension Lift cell layout */- .t3-mad-cell { display:flex; flex-direction:column; align-items:flex-start; gap:0.2rem; min-width:84px; }- .t3-mad-score-row { display:flex; align-items:center; gap:0.45rem; width:100%; }- .t3-mad-score { font-weight:700; font-variant-numeric:tabular-nums; }- .t3-mad-bar { flex:1; height:6px; min-width:48px; background:var(--bg-tertiary); border-radius:999px; overflow:hidden; }- .t3-mad-bar > span { display:block; height:100%; border-radius:999px; }- .t3-mad-lift { font-size:0.74rem; font-weight:700; font-variant-numeric:tabular-nums; }- /* Tier summary chip strip on the global hero */- .agent-hero-tiers { display:flex; flex-wrap:wrap; gap:0.5rem; margin-top:0.65rem; }- .agent-hero-tier-chip { background:var(--bg-secondary); border:1px solid var(--border-color); border-radius:999px; padding:0.2rem 0.65rem; font-size:0.78rem; color:var(--text-secondary); }- .agent-hero-tier-chip strong { color:var(--dark-text); }- .agent-hero-tier-chip.pass strong { color:var(--success-color); }- .agent-hero-tier-chip.fail strong { color:var(--danger-color); }- .agent-hero-tier-chip.warn strong { color:var(--warning-color); }+ {# Helpers / locals used across the Tier 3 sub-tabs #}+ {% set t3_summary = tier3.summary or {} %}+ {% if tier3.baseline_description %}<p>{{ tier3.baseline_description }}</p>{% endif %}+ {% for line in tier3.prior_version_lines | default([]) %}<p>{{ line }}</p>{% endfor %}+ {% set t3_agents = tier3.agents or {} %}+ {% macro tier3_chart(id, title, description, reference, reference_label, height) %}+ <h3>{{ title }}</h3>+ <p class="chart-description" id="{{ id }}-description">{{ description }} <a href="#{{ reference }}" onclick="return openTier3Reference(this.getAttribute('href').slice(1))">{{ reference_label }}</a>.</p>+ <canvas id="{{ id }}" height="{{ height }}" role="img" aria-label="{{ title }}" aria-describedby="{{ id }}-description" hidden></canvas>+ <p class="chart-fallback" id="{{ id }}-fallback" role="status">Chart unavailable. Use the data link above to read the results.</p>+ {% endmacro %}+ {% set t3_best_name = tier3.best_agent or t3_summary.best_agent %}+ {% set t3_best = t3_agents[t3_best_name] if t3_best_name and t3_agents[t3_best_name] is defined else None %}+ {% set t3_dim_ids = ["security", "correctness", "discoverability", "effectiveness", "efficiency"] %}+ {% set t3_metric_ids = tier3.metric_ids or (tier3.evaluators or {}).keys() | list or ["security", "skill_execution", "skill_efficiency", "accuracy", "goal_accuracy", "behavior_check"] %}+ {% set t3_metric_labels = tier3.metric_labels or {} %}+ {% set t3_dim_hints = tier3.dimension_hints or {} %}+ {% set t3_attempt_policy = tier3.attempt_policy or {} %}+ {% set t3_max_attempts = (t3_attempt_policy.max_attempts or 1) | int %}+ {% set t3_dataset = tier3.dataset or [] %}+ {% set t3_provenance = tier3.provenance or {} %}+ {% set t3_budget = tier3.budget or {} %}+ {% set t3_source_errors = t3_provenance.get('source_validation') or [] %}+ {% set t3_harbor = tier3.get('harbor_viewer') or t3_summary.get('harbor_viewer') or {} %}+ {% set t3_harbor_job_url = t3_harbor.get('job_url') %}+ {% set t3_harbor_analysis_url = t3_harbor.get('analysis_url') %}+ {% set t3_evidence_links = t3_harbor.get('evidence_links') or [] %}+ {% set t3_agent_anchor_ids = {} %}+ {% set t3_agent_panel_ids = {} %}+ {% if tier3.budget_summary and (t3_budget.status == 'exhausted' or t3_budget.partial or t3_budget.not_run or 'overrun observed' in tier3.budget_summary or 'not fully verified' in tier3.budget_summary) %}+ <p class="warning">{{ tier3.budget_summary }}</p>+ {% endif %}+ {% if t3_budget.not_run %}<p class="warning">All scores and Skill Lift below cover admitted attempts only, not the complete planned run.</p>{% endif %}+ {% for name, _agent in t3_agents.items() %}+ {% set _ = t3_agent_anchor_ids.update({name: 'tier3-agent-anchor-' ~ loop.index0}) %}+ {% set _ = t3_agent_panel_ids.update({name: 'tier3-agent-panel-' ~ loop.index0}) %}+ {% endfor %}- /* Search/filter input */- .t3-filter-bar { display:flex; gap:0.5rem; align-items:center; margin:0 0 0.85rem; flex-wrap:wrap; }- .t3-filter-input { flex:1; min-width:220px; padding:0.5rem 0.75rem; border:1px solid var(--border-color); border-radius:8px; background:var(--bg); color:var(--dark-text); font-size:0.88rem; }- .t3-filter-input:focus { outline:none; border-color:var(--secondary-color); box-shadow:0 0 0 2px rgba(118,185,0,0.15); }- .t3-filter-count { font-size:0.78rem; color:var(--text-secondary); font-weight:600; }- /* Print-friendly */- @media print {- .t3-subtabs, .t3-agent-tabs, .t3-copy-btn, .t3-filter-bar { display:none !important; }- .t3-page, .t3-agent-panel { display:block !important; page-break-inside:avoid; }- .t3-eval-card, .t3-sug-card, .t3-kpi-card, .t3-pivot-wrap, .t3-lift-agent-block { page-break-inside:avoid; box-shadow:none; }- .t3-details { box-shadow:none; }- .t3-details > summary::after { display:none; }- .t3-eval-evidence { display:block; }- .t3-eval-evidence > summary { display:none; }- }- </style><nav class="t3-subtabs" role="tablist" aria-label="Live evaluation views"><button class="t3-subtab active" data-tier3-tab="overview" role="tab" id="tier3-tab-overview" aria-controls="tier3-page-overview" aria-selected="true" tabindex="0" onclick="showTier3SubTab('overview', this)">Overview</button>@@ -2526,57 +2669,41 @@{% endif %}{% set t3_coverage_messages = (tier3.coverage_notices or []) | selectattr('message', 'string') | map(attribute='message') | select | list %}- {% if t3_coverage_messages %}- <div class="t3-truncation-notice t3-coverage-notice" id="tier3-coverage-notices" role="status">- <strong>Agent coverage notes</strong>- <ul>- {% for message in t3_coverage_messages %}- <li>{{ message }}</li>- {% endfor %}- </ul>- </div>- {% endif %}-{# ---------- Overview ---------- #}<section class="t3-page active" id="tier3-page-overview" role="tabpanel" aria-labelledby="tier3-tab-overview" tabindex="0">- {% set t3_effect = (tier3.conclusions or []) | selectattr('title', 'equalto', 'Skill effect') | first %}+ {{ render_native_warnings(native_evidence) }}+ {% set t3_effect = (insights_view.conclusions or []) | selectattr('title', 'equalto', 'Skill effect') | first %}{# Set when the lead itself says that other failures need attention. #}{% set t3_lead_needs_attention = false %}- <div class="t3-overview-lead">- {% if tier3_is_skipped %}- <strong>Live evaluation skipped:</strong> {{ tier3_skip_message }}- Tier 3 is advisory and does not block required validation.- {% elif tier3_verdict == 'inconclusive' %}- <strong>Inconclusive: skill never activated.</strong>- Scores are diagnostic only; no lift verdict was computed. Check skill loading and agent support, then rerun the evaluation.- {% elif tier3.get('mode') == 'baseline_only' %}- <strong>Baseline-only calibration:</strong>- without-skill scores only, with a baseline calibration score of- {{ "%.2f" | format(tier3.overall_score) if tier3.overall_score is not none else "N/A" }}.- {% if t3_best_name %}Best performing agent is <strong>{{ t3_best_name }}</strong>.{% else %}No successfully scored agent is available.{% endif %}- No with-skill arm was run (<code>--skip-with-skill</code>), so no skill lift was measured.- {% else %}- {% if completed_agent and completed_agent.needs_attention %}- {% set t3_lead_needs_attention = true %}- <strong>Completed-agent result: {{ completed_agent.verdict | upper }}.</strong>- {{ completed_agent.name }} scored {{ "%.2f" | format(completed_agent.score) }}.- Other execution failures need attention. This is not a whole-run or publication PASS.- {% else %}- <strong>Verdict at a glance:</strong>- {{ advisory_fail_word if tier3_advisory_fail else (verdict_words.get(tier3_verdict) or tier3_verdict | title) }}{% if t3_effect %} · {{ t3_effect.message }}{% else %} with an overall score of- {{ "%.2f" | format(hero_score) if hero_score is not none else "N/A" }}.- {% if t3_best_name %}Best performing agent is <strong>{{ t3_best_name }}</strong>{% else %}No successfully scored agent is available{% endif %}- {% if tier3.get('overall_lift') is not none %} with {{ "%+.2f" | format(tier3.get('overall_lift')) }} skill lift{% endif %}.- {% endif %}- {% endif %}- {% endif %}- {% if tolerated_baselines and not t3_lead_needs_attention %}- <span class="tolerated-baseline"><strong>Needs attention:</strong> baseline timeouts were tolerated.</span>- {% endif %}+ <div class="t3-overview-lead" id="tier3-overview-summary" role="status">+ <div class="t3-summary-line">+ <span class="t3-summary-status">+ {% if tier3_is_skipped %}<strong>Live evaluation skipped:</strong> {{ tier3_skip_message }}+ {% elif tier3_verdict == 'inconclusive' %}<strong>Inconclusive: skill never activated.</strong> Scores are diagnostic only; no lift verdict was computed.+ {% elif tier3.get('mode') == 'baseline_only' %}<strong>Baseline-only calibration:</strong> No with-skill arm; no skill lift measured.+ {% elif completed_agent and completed_agent.needs_attention %}+ <strong>Completed-agent result: {{ completed_agent.verdict | upper }}.</strong> Other execution failures need attention; not a whole-run or publication PASS.+ {% else %}<strong>Live quality: {{ advisory_fail_word if tier3_advisory_fail else (verdict_words.get(tier3_verdict) or tier3_verdict | title) }}.</strong>{% endif %}+ </span><a class="trial-coverage" href="#tier3-page-agents">Coverage: {% if overview_coverage.known %}{{ overview_coverage.scored }} of {{ overview_coverage.expected }} scored{% if overview_coverage.expected > overview_coverage.scored %} · {{ overview_coverage.expected - overview_coverage.scored }} unscored{% endif %}{% else %}{{ hero_trials }}{% endif %}</a>+ {% if t3_coverage_messages %}<a href="#tier3-coverage-notices">Coverage details</a>{% endif %}+ </div>+ {% if hero_score is none %}<p id="tier3-quality-unavailable">Quality measurements unavailable.{% if t3_best_name %} Recorded best agent: {{ t3_best_name }}; review scoped evidence in Agent Details.{% endif %}</p>{% endif %}{% for tolerated in tolerated_baselines or [] %}- <span class="tolerated-baseline">Baseline incomplete for <strong>{{ tolerated.name }}</strong>{% if tolerated.scored_attempts is not none and tolerated.expected_attempts is not none %} ({{ tolerated.scored_attempts }} of {{ tolerated.expected_attempts }} attempts scored){% endif %}: kept by <code>--tolerate-baseline-timeouts</code>, so its baseline and uplift are not reported.</span>+ <span class="tolerated-baseline">Baseline incomplete for <strong>{{ tolerated.name }}</strong>{% if tolerated.scored_attempts is not none and tolerated.expected_attempts is not none %} ({{ tolerated.scored_attempts }} of {{ tolerated.expected_attempts }} attempts scored){% endif %}: baseline timeouts were tolerated by <code>--tolerate-baseline-timeouts</code>; baseline and uplift unavailable.</span>{% endfor %}+ <div class="t3-summary-action" id="tier3-next-steps-preview">+ {% set primary_step = (insights_view.next_steps or []) | first %}+ {% set primary_recommendation = (insights_view.recommendations or []) | first %}+ {% if primary_step or primary_recommendation %}<p><strong>Next action:</strong> {{ primary_step.action if primary_step else (primary_recommendation.title or primary_recommendation.message) }}</p>{% endif %}+ <div class="t3-summary-links"><a href="#tier3-page-suggestions">View insights</a>{% if insights_view.execution_errors %}<a href="#tier3-execution-errors">Execution errors</a>{% endif %}</div>+ </div>+ </div>+ {% if harbor_jobs %}+ <div class="t3-harbor-panel" id="tier3-harbor-viewer">+ <strong>Harbor Viewer</strong>+ {{ harbor_job_actions(harbor_jobs) }}</div>+ {% else %}<p class="t3-harbor-unavailable" id="tier3-harbor-unavailable">No Harbor viewer or analysis links were recorded.</p>{% endif %}{% if tier3_dataset_sufficiency and tier3_dataset_sufficiency.coverage_summary %}<p class="t3-dataset-sufficiency{% if tier3_dataset_sufficiency.status == 'provisional' %} warning{% endif %}"{% if tier3_dataset_sufficiency.status == 'provisional' %}style="color:var(--warning-color);font-weight:600"{% endif %}>@@ -2589,216 +2716,74 @@{{ tier3.evidence_volume.display }}</p>{% endif %}- {% if tier3_dataset_provenance_line %}+ {% if tier3_dataset_provenance_line and tier3_dataset_provenance_warning %}<p class="t3-dataset-provenance{{ ' warning' if tier3_dataset_provenance_warning else '' }}">{{ tier3_dataset_provenance_line }}</p>{% endif %}- {% if harbor_jobs %}- <div class="t3-harbor-panel">- <div>- <strong>Harbor artifacts</strong>- <p>Open retained logs, raw trajectories, artifacts, and generated Harbor analysis for this Tier 3 run.</p>- </div>- <div class="t3-harbor-actions">- {% for job in harbor_jobs %}- <div><strong>{{ job.name }}</strong>- {% if job.url %}<a class="t3-harbor-link" href="{{ job.url }}" target="_blank" rel="noopener">Results</a>{% endif %}- {% if job.analysis_url %}<a class="t3-harbor-link" href="{{ job.analysis_url }}" target="_blank" rel="noopener">Analysis</a>{% endif %}- </div>- {% endfor %}- </div>- </div>- {% endif %}- <div class="dashboard">- <div class="dashboard-card {{ 'success' if tier3_verdict == 'pass' else ('danger' if tier3_verdict == 'fail' else '') }}">- <h3 class="dashboard-card-title">{{ 'Quality Verdict' if report_scope == 'tier3' and completed_agent else 'Verdict' }}</h3>- <p class="dashboard-card-value">{{ verdict_words['skipped'] if tier3_is_skipped else (advisory_fail_word if tier3_advisory_fail else (verdict_words.get(tier3_verdict) or tier3_verdict | title)) }}</p>- <p class="dashboard-card-subtitle">{% if report_scope == 'tier3' and completed_agent and completed_agent.reason %}{{ completed_agent.reason }}{% else %}{{ "No skill verdict: baseline-only run" if tier3.get('mode') == 'baseline_only' else ('Completed-agent quality; lift shown separately' if report_scope == 'tier3' and completed_agent else 'Evaluation outcome') }}{% endif %}</p>- </div>- <div class="dashboard-card">- <h3 class="dashboard-card-title">{{ 'Completed Agent Score' if completed_agent and completed_agent.needs_attention else 'Overall Score' }}</h3>- <p class="dashboard-card-value">{{ "%.2f" | format(hero_score) if hero_score is not none else "N/A" }}</p>- <p class="dashboard-card-subtitle">{{ "Baseline calibration (no with-skill arm)" if tier3.get('mode') == 'baseline_only' else "Best run across evaluated dimensions" }}</p>- </div>- <div class="dashboard-card">- <h3 class="dashboard-card-title">Best Performing Agent</h3>- <p class="dashboard-card-value" style="font-size:1.35rem;">{{ t3_best_name or 'N/A' }}</p>- {% set t3_best_score = (t3_best.baseline if tier3.get('mode') == 'baseline_only' else t3_best.with_skill) if t3_best else none %}- <p class="dashboard-card-subtitle">Score {{ "%.2f" | format(t3_best_score) if t3_best_score is not none else "N/A" }}</p>+ {% if hero_score is not none %}+ <div class="dashboard t3-primary-metrics">+ {% if hero_score is not none %}+ <div class="dashboard-card" data-primary-metric="score">+ <h3 class="dashboard-card-title">{{ 'Baseline Score' if tier3.get('mode') == 'baseline_only' else ('Completed Agent Score' if completed_agent and completed_agent.needs_attention else 'Overall Score') }}</h3>+ <p class="dashboard-card-value">{{ "%.2f" | format(hero_score) }}</p>+ <p class="dashboard-card-subtitle">{{ completed_agent.name if completed_agent else (t3_best_name or 'Recorded quality') }}{% if tier3.get('mode') == 'baseline_only' %} · Baseline calibration (no with-skill arm){% endif %}</p></div>- <div class="dashboard-card">+ <div class="dashboard-card" data-primary-metric="lift"><h3 class="dashboard-card-title">Skill Lift</h3><p class="dashboard-card-value">{{ "%+.2f" | format(tier3.get('overall_lift')) if tier3.get('overall_lift') is not none else "N/A" }}</p>- <p class="dashboard-card-subtitle">Skill Lift compares Overall on the metrics and cases both arms scored, so it can differ from subtracting the displayed Overall scores.</p>- <p class="dashboard-card-subtitle">{% if tier3_verdict == 'fail' and tier3.get('overall_lift') is not none and tier3.get('overall_lift') > 0 %}shown for reference, not the verdict{% else %}Compared with baseline{% endif %}</p>- </div>- {% set t3_correct_answers = tier3.get('correct_answers') or {} %}- {% set t3_correct_with = t3_correct_answers.get('with_skill') or {} %}- {% set t3_correct_without = t3_correct_answers.get('without_skill') or {} %}- <div class="dashboard-card">- <h3 class="dashboard-card-title">Goals met</h3>- <p class="dashboard-card-value" style="font-size:1.05rem;">- {% if t3_correct_with.get('scored') %}- {{ t3_correct_with.get('correct') }}/{{ t3_correct_with.get('scored') }} |- {% if t3_correct_without.get('scored') %}- {{ t3_correct_without.get('correct') }}/{{ t3_correct_without.get('scored') }} |- {% if t3_correct_answers.get('difference') is not none %}- {% if t3_correct_answers.get('difference_unit') == 'percentage_points' %}{{ "%+.1f pp" | format(t3_correct_answers.get('difference')) }}{% else %}{{ "%+d" | format(t3_correct_answers.get('difference')) }}{% endif %}- {% else %}N/A{% endif %}- {% else %}N/A | N/A{% endif %}- {% else %}N/A{% endif %}- </p>- <p class="dashboard-card-subtitle">With skill | No skill | Difference</p>- </div>- {% set t3_required_checks = tier3.get('required_checks') or {} %}- {% set t3_required_with = t3_required_checks.get('with_skill') or {} %}- {% set t3_required_without = t3_required_checks.get('without_skill') or {} %}- <div class="dashboard-card">- <h3 class="dashboard-card-title">Required Checks Passed</h3>- <p class="dashboard-card-value" style="font-size:1.05rem;">- {% if t3_required_with.get('scored') %}- {{ t3_required_with.get('passed') }}/{{ t3_required_with.get('scored') }} |- {% if t3_required_without.get('scored') %}- {{ t3_required_without.get('passed') }}/{{ t3_required_without.get('scored') }} |- {% if t3_required_checks.get('difference') is not none %}- {% if t3_required_checks.get('difference_unit') == 'percentage_points' %}{{ "%+.1f pp" | format(t3_required_checks.get('difference')) }}{% else %}{{ "%+d" | format(t3_required_checks.get('difference')) }}{% endif %}- {% else %}N/A{% endif %}- {% else %}N/A | N/A{% endif %}- {% else %}N/A{% endif %}- </p>- <p class="dashboard-card-subtitle">With skill | No skill | Difference</p>+ <p class="dashboard-card-subtitle">{% if tier3.get('mode') == 'baseline_only' %}No with-skill arm{% elif tier3_verdict == 'inconclusive' %}Skill never activated{% elif tier3.get('overall_lift') is none %}{{ 'Comparison unavailable; baseline recorded' if t3_best and t3_best.baseline is not none else 'No comparable baseline' }}{% else %}Comparable scored cases{% endif %}</p></div>- {% set t3_security_clean = tier3.get('security_clean') or {} %}- {% set t3_security_with = t3_security_clean.get('with_skill') or {} %}- {% set t3_security_without = t3_security_clean.get('without_skill') or {} %}- <div class="dashboard-card">- <h3 class="dashboard-card-title">Security Clean</h3>- <p class="dashboard-card-value" style="font-size:1.05rem;">- {% if t3_security_with.get('scored') %}- {{ t3_security_with.get('clean') }}/{{ t3_security_with.get('scored') }} |- {% if t3_security_without.get('scored') %}- {{ t3_security_without.get('clean') }}/{{ t3_security_without.get('scored') }} |- {% if t3_security_clean.get('difference') is not none %}- {% if t3_security_clean.get('difference_unit') == 'percentage_points' %}{{ "%+.1f pp" | format(t3_security_clean.get('difference')) }}{% else %}{{ "%+d" | format(t3_security_clean.get('difference')) }}{% endif %}- {% else %}N/A{% endif %}- {% else %}N/A | N/A{% endif %}- {% else %}N/A{% endif %}- </p>- <p class="dashboard-card-subtitle">With skill | No skill | Difference</p>- </div>- </div>- <details class="t3-details" id="tier3-number-key">- <summary>What each number means</summary>- <div class="t3-details-body">- <ul class="t3-reasoning-list">- <li><strong>Verdict</strong>: the live-evaluation result from the five dimensions and required case checks. It passes when one agent scores at least {{ "%.2f" | format(tier3_dimension_pass_threshold) }} on every dimension with the skill and has no with-skill case failing a required goal-accuracy or security check. A scored unmet goal or security issue in any attempt fails its case and that agent's quality verdict, even if all dimensions pass. Baseline-arm required-check failures do not change this quality verdict.</li>- <li><strong>Overall Score</strong>: the equal-weight mean of the five dimension scores with the skill, from 0.00 to 1.00.</li>- <li><strong>Skill Lift</strong>: compares Overall on the metrics and cases both arms scored, so it can differ from subtracting the displayed Overall scores. It shows whether the skill helped and does not change the verdict; N/A means no comparable baseline, not zero.</li>- <li><strong>pass@k</strong> (Trials): the share of eval cases with at least one passing attempt out of k. It measures how repeatable success is.</li>- <li><strong>Quality Score</strong> (Tier 1, out of 100): a static review of the skill's files. It is not an input to any live-evaluation score.</li>- <li><strong>Publication eligibility</strong>: decided separately in BENCHMARK.md from every required tier's evidence, so a passing verdict here is not by itself a publication decision.</li>- </ul>- </div>- </details>-- {% set t3_preview_conclusion = (tier3.conclusions[0] if tier3.conclusions and (tier3.conclusions | length) > 0 else None) %}- {% set t3_preview_recommendations = tier3.recommendations or [] %}- {% set t3_preview_suggestions = tier3.suggestions or [] %}- <div class="t3-next-steps" id="tier3-next-steps-preview">- <div class="t3-next-steps-head">- <h3>Conclusion & Next Steps</h3>- <button class="t3-link-btn" type="button" onclick="showTier3SubTab('suggestions', document.querySelector('.t3-subtab[data-tier3-tab="suggestions"]'))">Open Full Insights</button>- </div>- {% if t3_effect %}- {% set t3_fix_count = t3_preview_recommendations | length %}- <p class="t3-next-steps-conclusion">- {% if t3_fix_count %}{{ t3_fix_count }} issue{{ 's' if t3_fix_count != 1 else '' }} to fix, most attempts lost first:{% else %}Nothing to fix in the available case evidence.{% endif %}- </p>- {% if t3_fix_count %}- <ol class="t3-next-steps-list">- {% for reco in t3_preview_recommendations[:3] %}- <li>- <strong>{{ reco.title }}</strong> [{{ reco.category }}]: {{ reco.message }}- {% if reco.evidence and reco.evidence.url %}- <a class="t3-evidence-link" href="{{ reco.evidence.url }}" target="_blank" rel="noopener">View {{ reco.evidence.label or 'evidence' }}</a>- {% endif %}- </li>- {% endfor %}- </ol>- {% endif %}- {% else %}- {% if t3_preview_conclusion %}- <p class="t3-next-steps-conclusion">- {{ t3_preview_conclusion.message if t3_preview_conclusion.message is defined and t3_preview_conclusion.message else t3_preview_conclusion }}- </p>- {% endif %}- {% if t3_preview_recommendations %}- <ol class="t3-next-steps-list">- {% for reco in t3_preview_recommendations[:3] %}- <li>- {{ reco.message if reco.message is defined and reco.message else reco }}- {% if reco.evidence and reco.evidence.url %}- <a class="t3-evidence-link" href="{{ reco.evidence.url }}" target="_blank" rel="noopener">View {{ reco.evidence.label or 'evidence' }}</a>- {% endif %}- </li>- {% endfor %}- </ol>- {% elif t3_preview_suggestions %}- <ol class="t3-next-steps-list">- {% for suggestion in t3_preview_suggestions[:3] %}- <li>{{ suggestion }}</li>- {% endfor %}- </ol>- {% else %}- <p class="t3-next-steps-conclusion">No recommendations were generated for this evaluation.</p>- {% endif %}- {% endif %}- {% set t3_run_next_steps = tier3.next_steps or [] %}- {% if t3_run_next_steps %}- <p class="t3-next-steps-conclusion" id="tier3-run-next-steps">Next steps for the run:</p>- <ol class="t3-next-steps-list">- {% for step in t3_run_next_steps %}- <li>- <strong>{{ step.problem }}</strong> [{{ step.target }}{% if step.strength and step.strength != 'supported' %} · {{ step.strength }}{% endif %}]:- {{ step.action }} Check: {{ step.check }}{% if step.evidence %} Evidence: {{ step.evidence }}{% endif %}- </li>- {% endfor %}- </ol>- {% endif %}- {% if (t3_source_errors | length) == 1 %}- <p class="t3-next-steps-conclusion">- Source validation error: {% if t3_source_errors[0].path %}{{ t3_source_errors[0].path }}: {% endif %}{{ t3_source_errors[0].message }}- </p>- {% elif (t3_source_errors | length) > 1 %}- <p class="t3-next-steps-conclusion">- {{ t3_source_errors | length }} source validation errors found. Open Full Insights to review the details.- </p>{% endif %}</div>-+ {% endif %}+ {% set secondary = namespace(rows=[]) %}+ {% for key, label, count in [('correct_answers', 'Goals met', 'correct'), ('required_checks', 'Required Checks Passed', 'passed'), ('security_clean', 'Security Clean', 'clean')] %}+ {% set family = tier3.get(key) or {} %}+ {% if (family.get('with_skill') or {}).get('scored') or (family.get('without_skill') or {}).get('scored') %}{% set _ = secondary.rows.append((label, family, count)) %}{% endif %}+ {% endfor %}+ {% if secondary.rows %}<div class="table-scroll"><table class="summary-table" id="tier3-secondary-outcomes">+ <caption>Recorded outcomes</caption><thead><tr><th>Outcome</th><th>With skill</th><th>No skill</th><th>Difference</th></tr></thead><tbody>+ {% for label, family, count in secondary.rows %}<tr><th scope="row">{{ label }}</th>+ {% for condition in ['with_skill', 'without_skill'] %}{% set arm = family.get(condition) or {} %}<td>{% if arm.get('scored') %}{{ arm.get(count) if arm.get(count) is not none else 'N/A' }}/{{ arm.get('scored') }}{% else %}N/A{% endif %}</td>{% endfor %}+ <td>{% if family.get('difference') is none %}N/A{% elif family.get('difference_unit') == 'percentage_points' %}{{ "%+.1f pp" | format(family.get('difference')) }}{% else %}{{ "%+d" | format(family.get('difference')) }}{% endif %}{% if family.get('reason') %} · {{ family.get('reason') }}{% endif %}</td></tr>{% endfor %}+ </tbody></table></div>{% endif %}{% set t3_na_dimensions = tier3.not_applicable_dimensions or [] %}- {% if tier3_display_dimensions or t3_na_dimensions %}+ {% set t3_dim_by_agent = {} %}+ {% set t3_other_agents = [] %}+ {% for name, agent in t3_agents.items() %}+ {% set dmap = {} %}+ {% for dim in agent.dimensions or [] %}{% if dim.id %}{% set _ = dmap.update({dim.id: dim}) %}{% endif %}{% endfor %}+ {% set _ = t3_dim_by_agent.update({name: dmap}) %}+ {% if name != t3_best_name %}{% set _ = t3_other_agents.append(name) %}{% endif %}+ {% endfor %}+ {% set t3_present_dimension_ids = (tier3_display_dimensions | map(attribute='id') | list) + (t3_na_dimensions | map(attribute='id') | list) %}+ {% set t3_peer_only_dimensions = [] %}+ {% for name in t3_other_agents %}{% for dimension_id in t3_dim_by_agent[name] %}+ {% if dimension_id not in t3_present_dimension_ids %}+ {% set _ = t3_peer_only_dimensions.append({'id': dimension_id, 'peer_only': true}) %}+ {% set _ = t3_present_dimension_ids.append(dimension_id) %}+ {% endif %}+ {% endfor %}{% endfor %}+ {% if tier3_display_dimensions or t3_na_dimensions or t3_peer_only_dimensions %}{% set t3_baseline_only = tier3.get('mode') == 'baseline_only' %}{% set t3_signal_evidence = tier3.signal_evidence or {} %}<details class="t3-details" id="tier3-dimension-lift" open>- <summary>Dimension Scores and Skill Lift (Best Performing Agent: {{ t3_best_name or 'N/A' }})</summary>+ <summary>Dimension Scores and Skill Lift{% if t3_best_name %} (Best Performing Agent: {{ t3_best_name }}){% endif %}</summary><div class="t3-details-body">- <p class="t3-section-hint">- Each dimension answers one question about the skill, scored from 0.00 to 1.00.- Score is the agent's result with the skill; Baseline is the same eval cases run without it;- Skill Lift compares Overall on the metrics and cases both arms scored, so it can differ from subtracting the displayed Overall scores. A dimension passes at {{ "%.2f" | format(tier3_dimension_pass_threshold) }} or above- and fails below {{ "%.2f" | format(tier3_dimension_neutral_threshold) }}.- Signals are the evaluator metrics behind each dimension, and Evidence says where they come from.- N/A means no measurement, never a score of zero; the note under it says why.- </p>- <div class="table-scroll">+ <div class="table-scroll" id="tier3-multi-agent-dimension-table"><table class="summary-table" id="tier3-dimension-table">+ <caption class="t3-comparison-caption">N/A means unavailable. Expand Details for the recorded scope and evidence.</caption><thead><tr><th>Dimension</th><th>Score</th><th>Baseline</th><th>Skill Lift</th>- <th>Verdict</th><th>Signals</th><th>Reasoning</th>+ <th>Verdict</th>+ {% for name in t3_other_agents %}<th><button class="t3-agent-link" type="button" data-tier3-agent-link="{{ t3_agent_anchor_ids[name] }}" onclick="jumpToTier3Agent('{{ t3_agent_anchor_ids[name] }}')">{{ name }}</button></th>{% endfor %}+ <th>Signals</th><th>Reasoning</th></tr></thead><tbody>{% set t3_best_agent = t3_agents.get(t3_best_name, {}) %}+ {% set t3_baseline_coverage = presentation.coverage.agents.get(t3_best_name, {}).get('without_skill') %}+ {% set t3_recorded_conditions = t3_best_agent.get('conditions') %}+ {% set t3_recorded_baseline = t3_recorded_conditions.get('without_skill') if t3_recorded_conditions is mapping else none %}{% set baseline_na_metrics = t3_best_agent.get('not_applicable_metrics', {}).get('without_skill', []) %}{% for dim in tier3_display_dimensions %}{% set dim_score = dim.score if dim.score is not none else dim.with_skill %}@@ -2808,8 +2793,13 @@<tr><td><strong>{{ "Skill Efficiency" if dim.id == "efficiency" else (dim.id | title) }}</strong>- {% if t3_dim_hints.get(dim.id) %}<div class="t3-dim-hint">{{ t3_dim_hints.get(dim.id) }}</div>{% endif %}- {% if dim_evidence %}<div class="t3-dim-hint">Evidence: {{ dim_evidence | join('; ') }}.</div>{% endif %}+ {% if dim.partial %}<span class="t3-pill warning" title="A subset of the configured signals was recorded.">partial</span>{% endif %}+ {% if t3_dim_hints.get(dim.id) %}+ <details class="t3-table-detail t3-dimension-definition">+ <summary aria-label="Definition of {{ 'Skill Efficiency' if dim.id == 'efficiency' else (dim.id | title) }}">Definition</summary>+ <p>{{ t3_dim_hints.get(dim.id) }}</p>+ </details>+ {% endif %}</td><td>{% if dim_score is not none %}@@ -2818,26 +2808,35 @@<div class="mini-bar"><span style="width:{{ (dim_score * 100) | round(0) }}%; background:{{ dim_color }};"></span></div></div>{% else %}- <span class="metric-value" style="color:{{ dim_color }}">N/A</span>- <div class="t3-dim-hint">{{ "with-skill arm not run" if t3_baseline_only else "not scored with the skill" }}</div>+ <span class="metric-value" style="color:{{ dim_color }}" title="{{ 'with-skill arm not run' if t3_baseline_only else 'not scored with the skill' }}">N/A</span>{% endif %}</td><td{% if dim.id == 'discoverability' and 'skill_execution' in baseline_na_metrics %} title="No-skill baseline: {{ 'skill_execution' | not_applicable_reason }}"{% elif dim.id == 'efficiency' and 'skill_efficiency' in baseline_na_metrics %} title="No-skill baseline: {{ 'skill_efficiency' | not_applicable_reason }}"{% endif %}>- {% if dim.baseline is not none %}{{ "%.2f" | format(dim.baseline) }}{% else %}N/A- <div class="t3-dim-hint">{{ "baseline not scored" if t3_best and t3_best.baseline is not none else "baseline not run" }}</div>{% endif %}+ {% if dim.baseline is not none %}{{ "%.2f" | format(dim.baseline) }}{% else %}<span title="{{ 'baseline not run' if t3_baseline_coverage and t3_baseline_coverage.status == 'skipped' and t3_recorded_baseline is mapping and t3_recorded_baseline.get('execution_status') == 'skipped' else 'baseline quality unavailable' }}">N/A</span>{% endif %}</td><td style="color:{{ 'var(--success-color)' if dim.lift is not none and dim.lift >= tier3_lift_pass_threshold else ('var(--danger-color)' if dim.lift is not none and dim.lift <= tier3_lift_fail_threshold else 'var(--text-secondary)') }};font-weight:600;">- {% if dim.lift is not none %}{{ "%+.2f" | format(dim.lift) }}{% else %}N/A- <div class="t3-dim-hint">{% if t3_baseline_only %}baseline-only run{% elif dim_score is none %}with-skill unavailable{% elif dim.baseline is not none %}comparison unavailable{% else %}no baseline{% endif %}</div>{% endif %}+ {% if dim.lift is not none %}{{ "%+.2f" | format(dim.lift) }}{% else %}<span title="{% if t3_best_agent.get('skill_activation', {}).get('status') == 'never_activated' %}inconclusive: skill never activated{% elif t3_baseline_only %}baseline-only run{% elif dim_score is none %}with-skill unavailable{% elif dim.baseline is not none %}comparison unavailable{% else %}no baseline score{% endif %}">N/A</span>{% endif %}</td>{% set dim_regressed = dim.verdict == 'PASS' and dim.lift is not none and dim.lift <= tier3_lift_fail_threshold %}<td>{% if dim.verdict %}<span class="t3-pill {{ 'warning' if dim_regressed else ('ok' if dim.verdict == 'PASS' else ('critical' if dim.verdict == 'FAIL' else 'warning')) }}">{{ dim.verdict }}{{ ' · regressed' if dim_regressed else '' }}</span>{% else %}<span class="t3-pill warning">No verdict</span>{% endif %}</td>+ {% for name in t3_other_agents %}+ {{ other_dimension_cell(t3_dim_by_agent[name].get(dim.id), t3_agents[name]) }}+ {% endfor %}<td>+ {% if dim.evaluators %}<details class="t3-table-detail"><summary>{{ dim.evaluators | length }} signal{{ 's' if dim.evaluators | length != 1 else '' }}</summary>{% for metric_id in dim.evaluators or [] %}<span class="metadata-tag" title="{{ t3_signal_evidence.get(metric_id, '') }}">{{ t3_metric_labels.get(metric_id, metric_id | replace("_", " ") | title) }}</span>{% endfor %}+ </details>{% else %}—{% endif %}</td><td class="t3-reasoning">+ {% if dim.comparison and dim.comparison.status != 'comparable' %}<p class="t3-dim-hint">{% if dim.comparison.label %}<strong>{{ dim.comparison.label }}</strong>{% endif %}{% if dim.comparison.with_skill is number and dim.comparison.baseline is number and dim.comparison.lift is number %}: {{ "%.2f" | format(dim.comparison.baseline) }} → {{ "%.2f" | format(dim.comparison.with_skill) }} ({{ "%+.2f" | format(dim.comparison.lift) }} lift).{% endif %}</p>{% endif %}+ <details class="t3-table-detail"><summary>Details</summary>+ {% if dim_evidence %}<p>Evidence: {{ dim_evidence | join('; ') }}.</p>{% endif %}+ {% if dim_score is none %}<p>{{ "with-skill arm not run" if t3_baseline_only else "not scored with the skill" }}</p>{% endif %}+ {% if dim.baseline is none %}<p>{{ "baseline not run" if t3_baseline_coverage and t3_baseline_coverage.status == 'skipped' and t3_recorded_baseline is mapping and t3_recorded_baseline.get('execution_status') == 'skipped' else "baseline quality unavailable" }}</p>{% endif %}+ {% if dim.lift is none %}<p>{{ 'with-skill unavailable' if dim_score is none else 'comparison unavailable' }}</p>{% endif %}+ {% if dim.comparison and dim.comparison.status != 'comparable' and dim.comparison.reason %}<p>{{ dim.comparison.reason }}</p>{% endif %}{% if dim.reasoning_bullets %}<ul class="t3-reasoning-list">{% for bullet in dim.reasoning_bullets %}<li>{{ bullet }}</li>{% endfor %}@@ -2845,150 +2844,131 @@{% else %}{{ dim.explanation if dim.explanation else "" }}{% endif %}+ </details></td></tr>{% endfor %}- {% for dim in t3_na_dimensions %}+ {% for dim in t3_na_dimensions + t3_peer_only_dimensions %}<tr><td><strong>{{ "Skill Efficiency" if dim.id == "efficiency" else (dim.id | title) }}</strong>- {% if t3_dim_hints.get(dim.id) %}<div class="t3-dim-hint">{{ t3_dim_hints.get(dim.id) }}</div>{% endif %}+ {% if t3_dim_hints.get(dim.id) %}+ <details class="t3-table-detail t3-dimension-definition">+ <summary aria-label="Definition of {{ 'Skill Efficiency' if dim.id == 'efficiency' else (dim.id | title) }}">Definition</summary>+ <p>{{ t3_dim_hints.get(dim.id) }}</p>+ </details>+ {% endif %}</td><td>N/A</td><td>N/A</td><td>N/A</td>- <td><span class="t3-pill warning">Not applicable</span></td>+ <td><span class="t3-pill warning">{{ 'Not measured' if dim.peer_only else 'Not applicable' }}</span></td>+ {% for name in t3_other_agents %}{{ other_dimension_cell(t3_dim_by_agent[name].get(dim.id), t3_agents[name]) }}{% endfor %}<td></td>- <td class="t3-reasoning">{{ dim.reason or "Not applicable: its signals had nothing to judge in any eval case." }} It has no score, so the agent's verdict stays NEUTRAL and cannot PASS.</td>+ <td class="t3-reasoning">{% if dim.peer_only %}No measurement was recorded for the primary agent; other-agent evidence is shown alongside.{% else %}{% set na_reason = dim.reason or "Not applicable: its signals had nothing to judge in any eval case" %}{{ na_reason }}{{ "" if na_reason.endswith(".") else "." }} It has no score, so the agent cannot PASS.{% endif %}</td></tr>{% endfor %}+ {% set best_overall_score = t3_best.with_skill if t3_best else none %}+ {% set best_overall_baseline = t3_best.baseline if t3_best else none %}+ {% set best_overall_color = 'var(--text-secondary)' if best_overall_score is none else ('var(--success-color)' if best_overall_score >= 0.7 else ('var(--warning-color)' if best_overall_score >= 0.4 else 'var(--danger-color)')) %}+ <tr>+ <td><strong>Overall</strong><div class="t3-dim-hint">Recorded aggregate; review each agent's scope below.</div></td>+ <td>{% if best_overall_score is not none %}<div class="metric-bar-cell"><span class="metric-value" style="color:{{ best_overall_color }};">{{ "%.2f" | format(best_overall_score) }}</span><div class="mini-bar"><span style="width:{{ (best_overall_score * 100) | round(0) }}%;background:{{ best_overall_color }};"></span></div></div>{% else %}<span class="metric-value">N/A</span>{% endif %}</td>+ <td>{{ "%.2f" | format(best_overall_baseline) if best_overall_baseline is not none else 'N/A' }}</td>+ <td style="color:{{ 'var(--success-color)' if tier3.overall_lift is not none and tier3.overall_lift >= tier3_lift_pass_threshold else ('var(--danger-color)' if tier3.overall_lift is not none and tier3.overall_lift <= tier3_lift_fail_threshold else 'var(--text-secondary)') }};font-weight:600;">{% if tier3.overall_lift is not none %}{{ "%+.2f" | format(tier3.overall_lift) }}{% else %}N/A<div class="t3-dim-hint">{{ unavailable_lift(best_overall_score, best_overall_baseline, t3_best.get('skill_activation', {}) if t3_best else {}) }}</div>{% endif %}</td>+ <td class="t3-dim-hint">—</td>+ {% for name in t3_other_agents %}{% set other_agent = t3_agents[name] %}{% set other_overall_color = 'var(--text-secondary)' if other_agent.with_skill is none else ('var(--success-color)' if other_agent.with_skill >= 0.7 else ('var(--warning-color)' if other_agent.with_skill >= 0.4 else 'var(--danger-color)')) %}<td><div class="t3-mad-cell"><div class="t3-mad-score-row"><span class="t3-mad-score" style="color:{{ other_overall_color }};">{{ "%.2f" | format(other_agent.with_skill) if other_agent.with_skill is not none else 'N/A' }}</span>{% if other_agent.with_skill is not none %}<div class="t3-mad-bar"><span style="width:{{ (other_agent.with_skill * 100) | round(0) }}%;background:{{ other_overall_color }};"></span></div>{% endif %}</div><span class="t3-mad-lift">{% if other_agent.lift is not none and other_agent.get('skill_activation', {}).get('status') != 'never_activated' %}{{ "%+.2f" | format(other_agent.lift) }} lift{% else %}{{ unavailable_lift(other_agent.with_skill, other_agent.baseline, other_agent.get('skill_activation', {})) }}{% endif %}</span></div></td>{% endfor %}+ <td colspan="2" class="t3-dim-hint">Agent Scorecards link to trial counts, coverage and evaluator evidence.</td>+ </tr></tbody></table></div>+ <details class="t3-method"><summary>How dimension scores and lift are read</summary><p class="t3-section-hint">+ Each dimension answers one question about the skill, scored from 0.00 to 1.00.+ Score is the agent's result with the skill; Baseline is the same eval cases run without it;+ Skill Lift compares Overall on the metrics and cases both arms scored, so it can differ from subtracting the displayed Overall scores. A dimension passes at {{ "%.2f" | format(tier3_dimension_pass_threshold) }} or above+ and fails below {{ "%.2f" | format(tier3_dimension_neutral_threshold) }}.+ Signals are the evaluator metrics behind each dimension, and Evidence says where they come from.+ N/A means no measurement, never a score of zero; the note under it says why.+ </p></details>+ {% if t3_other_agents %}<p class="t3-section-hint">Score, Baseline and Skill Lift describe {{ t3_best_name or 'the run result' }}. Other agent columns show that agent's score and lift.</p>{% endif %}</div></details>- {% if t3_agents | length > 1 %}- <details class="t3-details" open>- <summary>Multi-Agent Dimension Lift</summary>+ {% endif %}++ <details class="t3-details" id="tier3-number-key">+ <summary>What each number means</summary><div class="t3-details-body">- <p class="t3-section-hint">- Per-dimension comparison across agents. The top number in each cell is the- with-skill score (with a mini-bar); the smaller line below is the skill lift- versus that agent's baseline.- </p>- {# Build {agent_name: {dim_id: dim_dict}} so each cell is a quick lookup. #}- {% set t3_mad_by_agent = {} %}- {% for name, agent in t3_agents.items() %}- {% set dmap = {} %}- {% for dim in agent.dimensions or [] %}{% set _ = dmap.update({dim.id: dim}) %}{% endfor %}- {% set _ = t3_mad_by_agent.update({name: dmap}) %}- {% endfor %}- <div class="table-scroll">- <table class="summary-table" id="tier3-multi-agent-dimension-table" style="width:100%;">- <thead><tr>- <th>Dimension</th>- {% for name, _agent in t3_agents.items() %}- <th><button class="t3-agent-link" type="button" data-tier3-agent-link="{{ t3_agent_anchor_ids[name] }}" onclick="jumpToTier3Agent('{{ t3_agent_anchor_ids[name] }}')">{{ name }}</button></th>- {% endfor %}- </tr></thead>- <tbody>- {% for dim_id in t3_dim_ids %}- <tr>- <td>- <strong>{{ dim_id | title }}</strong>- {% if t3_dim_hints.get(dim_id) %}<div class="t3-dim-hint">{{ t3_dim_hints.get(dim_id) }}</div>{% endif %}- </td>- {% for name, _agent in t3_agents.items() %}- {% set d = t3_mad_by_agent[name].get(dim_id) %}- {% if d %}- {% set d_score = d.score if d.score is not none else d.with_skill %}- {% set d_lift = d.lift %}- {% set d_color = 'var(--text-secondary)' if d_score is none else ('var(--success-color)' if d_score >= 0.7 else ('var(--warning-color)' if d_score >= 0.4 else 'var(--danger-color)')) %}- {% set lift_color = 'var(--success-color)' if d_lift is not none and d_lift >= tier3_lift_pass_threshold else ('var(--danger-color)' if d_lift is not none and d_lift <= tier3_lift_fail_threshold else 'var(--text-secondary)') %}- <td>- <div class="t3-mad-cell">- <div class="t3-mad-score-row">- <span class="t3-mad-score" style="color:{{ d_color }};">{{ "%.2f" | format(d_score) if d_score is not none else "N/A" }}</span>- {% if d_score is not none %}<div class="t3-mad-bar"><span style="width:{{ (d_score * 100) | round(0) }}%; background:{{ d_color }};"></span></div>{% endif %}- </div>- <span class="t3-mad-lift" style="color:{{ lift_color }};">{% if _agent.get('skill_activation', {}).get('status') == 'never_activated' %}inconclusive: skill never activated{% elif d_lift is not none %}{{ "%+.2f" | format(d_lift) }} lift{% elif d_score is none and d.baseline is not none %}with-skill unavailable{% elif d_score is none %}N/A lift{% elif d.baseline is not none %}comparison unavailable{% else %}no baseline lift{% endif %}</span>- </div>- </td>- {% else %}- <td style="color:var(--text-secondary);">N/A</td>- {% endif %}- {% endfor %}- </tr>- {% endfor %}- <tr>- <td><strong>Overall</strong></td>- {% for name, agent in t3_agents.items() %}- {% set ws = agent.with_skill %}- {% set bl = agent.baseline %}- {% set lf = agent.lift %}- {% set ws_color = 'var(--text-secondary)' if ws is none else ('var(--success-color)' if ws >= 0.7 else ('var(--warning-color)' if ws >= 0.4 else 'var(--danger-color)')) %}- {% set lf_color = 'var(--success-color)' if lf is not none and lf >= tier3_lift_pass_threshold else ('var(--danger-color)' if lf is not none and lf <= tier3_lift_fail_threshold else 'var(--text-secondary)') %}- <td>- <div class="t3-mad-cell">- <div class="t3-mad-score-row">- <span class="t3-mad-score" style="color:{{ ws_color }};">{{ "%.2f" | format(ws) if ws is not none else "N/A" }}</span>- {% if ws is not none %}<div class="t3-mad-bar"><span style="width:{{ (ws * 100) | round(0) }}%; background:{{ ws_color }};"></span></div>{% endif %}- </div>- <span class="t3-mad-lift" style="color:{{ lf_color }};">{% if agent.get('skill_activation', {}).get('status') == 'never_activated' %}inconclusive: skill never activated{% elif lf is not none %}{{ "%+.2f" | format(lf) }} lift{% elif ws is none and bl is not none %}with-skill unavailable{% elif ws is none %}N/A lift{% elif bl is not none %}comparison unavailable{% else %}no baseline lift{% endif %}</span>- </div>- </td>- {% endfor %}- </tr>- </tbody>- </table>- </div>+ <ul class="t3-reasoning-list">+ <li><strong>Verdict</strong>: the live-evaluation result from the five dimensions and required case checks. It passes when one agent scores at least {{ "%.2f" | format(tier3_dimension_pass_threshold) }} on every dimension with the skill and has no with-skill case failing a required goal-accuracy or security check. A scored unmet goal or security issue in any attempt fails its case and that agent's quality verdict, even if all dimensions pass. Baseline-arm required-check failures do not change this quality verdict.</li>+ <li><strong>Overall Score</strong>: the equal-weight mean of the five dimension scores with the skill, from 0.00 to 1.00.</li>+ <li><strong>Skill Lift</strong>: compares Overall on the metrics and cases both arms scored, so it can differ from subtracting the displayed Overall scores. It shows whether the skill helped and does not change the verdict; N/A means no comparable baseline, not zero.</li>+ <li><strong>pass@k</strong> (Trials): the share of eval cases with at least one passing attempt out of k. It measures how repeatable success is.</li>+ <li><strong>Quality Score</strong> (Tier 1, out of 100): a static review of the skill's files. It is not an input to any live-evaluation score.</li>+ <li><strong>Publication eligibility</strong>: decided separately in BENCHMARK.md from every required tier's evidence, so a passing verdict here is not by itself a publication decision.</li>+ </ul></div></details>- {% endif %}+ {% if tier3_metric_comparison_rows %}+ <details class="t3-details" id="tier3-metric-comparison" open>+ <summary>Metric Scores and Baseline</summary>+ <div class="t3-details-body">+ <p class="t3-section-hint">Recorded evaluator measurements. N/A means unavailable; no missing scores or lift values are estimated.</p>+ <div class="table-scroll"><table class="summary-table" id="tier3-metric-comparison-table">+ <thead><tr><th>Metric</th><th>Score</th><th>Baseline</th><th>Skill Lift</th><th>Reason</th></tr></thead>+ <tbody>{% for row in tier3_metric_comparison_rows %}<tr>+ <th scope="row">{{ row.label }}</th>+ <td>{{ "%.2f" | format(row.score) if row.score is not none else 'N/A' }}</td>+ <td>{{ "%.2f" | format(row.baseline) if row.baseline is not none else 'N/A' }}</td>+ <td>{{ "%+.2f" | format(row.lift) if row.lift is not none else 'N/A' }}</td>+ <td>{{ row.reason }}</td>+ </tr>{% endfor %}</tbody>+ </table></div>+ {% if tier3_metric_comparison_omitted %}<p class="t3-section-hint">{{ tier3_metric_comparison_omitted }} additional metrics are retained in <a href="#tier3-json-downloads">JSON Downloads</a>.</p>{% endif %}+ </div>+ </details>{% endif %}{% if t3_agents %}- <details class="t3-details" open>+ <details class="t3-details" id="tier3-agent-scorecards" open><summary>Agent Scorecards</summary><div class="t3-details-body">- <div class="t3-agent-scorecards-row">+ <div class="t3-agent-scorecards-row{{ ' t3-scorecards-only' if not tier3_display_dimensions else '' }}"><div class="t3-agent-scorecard-list">{% for name, agent in t3_agents.items() %}- {% set with_skill = agent.with_skill %}- {% set lift = agent.lift %}- {% set score_color = 'var(--text-secondary)' if with_skill is none else ('var(--success-color)' if with_skill >= 0.7 else ('var(--warning-color)' if with_skill >= 0.4 else 'var(--danger-color)')) %}- {% set card_lift_color = 'var(--text-secondary)' if lift is none else ('var(--success-color)' if lift >= tier3_lift_pass_threshold else ('var(--danger-color)' if lift <= tier3_lift_fail_threshold else 'var(--text-secondary)')) %}+ {% set score_color = 'var(--text-secondary)' if agent.with_skill is none else ('var(--success-color)' if agent.with_skill >= 0.7 else ('var(--warning-color)' if agent.with_skill >= 0.4 else 'var(--danger-color)')) %}<div class="t3-agent-card t3-agent-deeplink"- role="button"- tabindex="0"- data-tier3-agent-link="{{ t3_agent_anchor_ids[name] }}"+ role="button" tabindex="0" data-tier3-agent-link="{{ t3_agent_anchor_ids[name] }}"onclick="jumpToTier3Agent('{{ t3_agent_anchor_ids[name] }}')"onkeydown="tier3MaybeActivateAgentLink(event, '{{ t3_agent_anchor_ids[name] }}')"- aria-label="Open Agent Details for {{ name }}"- title="Open Agent Details for {{ name }}">+ aria-label="Open Agent Details for {{ name }}" title="Open Agent Details for {{ name }}"><div class="t3-agent-name">{{ name }}</div>- <div class="t3-agent-score" style="color:{{ score_color }};">{{ "%.2f" | format(with_skill) if with_skill is not none else "N/A" }}</div>- <div style="color:{{ card_lift_color }};font-size:0.85rem;">- {% if agent.get('skill_activation', {}).get('status') == 'never_activated' %}inconclusive: skill never activated{% elif lift is not none %}{{ "%+.2f" | format(lift) }} lift{% elif with_skill is none and agent.baseline is not none %}with-skill unavailable{% elif with_skill is none %}N/A lift{% elif agent.baseline is not none %}comparison unavailable{% else %}no baseline{% endif %}- </div>- <div style="color:var(--text-secondary);font-size:0.75rem;margin-top:0.25rem;">{{ agent.num_trials or 0 }} trials</div>- {% if with_skill is not none %}<div class="t3-mini-bar"><span style="width:{{ (with_skill * 100) | round(0) }}%; background:{{ score_color }};"></span></div>{% endif %}+ <div class="t3-agent-score" style="color:{{ score_color }};">{{ "%.2f" | format(agent.with_skill) if agent.with_skill is not none else 'N/A' }}</div>+ <div class="t3-dim-hint">{% if agent.lift is not none and agent.get('skill_activation', {}).get('status') != 'never_activated' %}{{ "%+.2f" | format(agent.lift) }} lift{% else %}{{ unavailable_lift(agent.with_skill, agent.baseline, agent.get('skill_activation', {})) }}{% endif %}</div>+ <div class="t3-dim-hint">{{ agent.num_trials or 0 }} trials{% if agent.num_trials_baseline %} · {{ agent.num_trials_baseline }} baseline{% endif %}{% if agent.execution_status %} · {{ agent.execution_status | title }}{% endif %}</div>+ {% set card_coverage = presentation.coverage.agents.get(name, {}) %}+ {% if card_coverage %}<div class="t3-dim-hint">{% for condition, label in [('with_skill', 'With skill'), ('without_skill', 'Baseline')] %}{% set arm = card_coverage.get(condition) %}{% if arm %}{{ ' · ' if not loop.first else '' }}{{ label }} {{ arm.scored if arm.scored is not none else '?' }}/{{ arm.expected if arm.expected is not none else '?' }} scored{% endif %}{% endfor %}</div>{% endif %}+ {% if agent.with_skill is not none %}<div class="t3-mini-bar"><span style="width:{{ (agent.with_skill * 100) | round(0) }}%;background:{{ score_color }};"></span></div>{% endif %}</div>{% endfor %}</div>{% set dimension_reference = ('tier3-multi-agent-dimension-table' if t3_agents | length > 1 else 'tier3-dimension-table') if tier3_display_dimensions else 'tier3-json-downloads' %}{% set dimension_reference_label = 'Read the dimension scores table' if tier3_display_dimensions else 'Read JSON Downloads (dimension scores unavailable)' %}+ {% if tier3_display_dimensions %}<div class="chart-card">{{ tier3_chart('tier3-radar', 'Dimension Comparison (Radar)', 'Dimension scores for each agent, on a scale from 0 to 1; missing measurements are gaps.', dimension_reference, dimension_reference_label, 260) }}</div><div class="chart-card">{{ tier3_chart('tier3-metric-bar', 'Dimension Scores by Agent', 'Dimension scores grouped by dimension and agent, on a scale from 0 to 1; missing measurements are gaps.', dimension_reference, dimension_reference_label, 260) }}</div>+ {% endif %}</div></div></details>{% endif %}+ {{ render_plugin_evidence(plugin_evidence, 'overview') }}</section>{# ---------- Trials ---------- #}<section class="t3-page" id="tier3-page-trials" role="tabpanel" aria-labelledby="tier3-tab-trials" tabindex="0">+ {{ render_native_evidence(native_evidence, 'trials') }}{# Drill-down rows for both conditions: with-skill rows come from the canonicaltop-level trials, baseline rows from each agent's trials_baseline. #}{% set t3_condition_trial_rows = [] %}@@ -3069,12 +3049,15 @@</p><div class="table-scroll" tabindex="0" role="region" aria-label="Pass at K summary table">{% macro t3_attempts_passed(branch) %}- {% set ns = namespace(n=0, truncated=branch.case_details_truncated or false) %}- {% for case in (branch.cases or {}).values() %}+ {% set ns = namespace(n=0, seen=0, known=true, truncated=branch.case_details_truncated or false) %}+ {% for case in (branch.cases if branch.cases is mapping else {}).values() %}{% if case.attempt_details_truncated %}{% set ns.truncated = true %}{% endif %}- {% for att in case.attempts or [] %}{% if att.passed %}{% set ns.n = ns.n + 1 %}{% endif %}{% endfor %}+ {% if case.attempts is not sequence or case.attempts is string or case.attempts is mapping or not case.attempts %}{% set ns.known = false %}+ {% else %}{% for att in case.attempts %}{% if att is mapping and att.passed is boolean %}{% set ns.seen = ns.seen + 1 %}{% if att.passed %}{% set ns.n = ns.n + 1 %}{% endif %}{% else %}{% set ns.known = false %}{% endif %}{% endfor %}{% endif %}{% endfor %}- {% if ns.truncated %}{{ branch.attempts_used or 0 }} scored; pass details truncated{% else %}{{ ns.n }} of {{ branch.attempts_used or 0 }}{% endif %}+ {% if ns.truncated %}{{ branch.attempts_used if branch.attempts_used is integer else 'N/A' }} scored; pass details truncated+ {% elif branch.cases is not mapping or not branch.cases or not ns.known or branch.attempts_used is not integer or ns.seen != branch.attempts_used %}N/A{% if branch.attempts_used is integer %} · {{ branch.attempts_used }} scored{% endif %}+ {% else %}{{ ns.n }} of {{ branch.attempts_used }}{% endif %}{% endmacro %}<table class="summary-table pass-at-k-table" style="width:100%;"><thead><tr>@@ -3089,16 +3072,16 @@{% set wi = wp.rate_interval or {} %}{% set bi = bp.rate_interval or {} %}{% set paired = lf.paired_comparison if lf.paired_comparison is mapping else {} %}- {% set wp_rate = wp.get('rate') %}- {% set bp_rate = bp.get('rate') if (tier3.baseline or {}).get('mode') != 'skipped' else none %}+ {% set wp_rate = wp.get('rate') if wp.get('rate') is number and wp.get('rate') is not boolean and 0 <= wp.get('rate') <= 1 else none %}+ {% set bp_rate = bp.get('rate') if (tier3.baseline or {}).get('mode') != 'skipped' and bp.get('rate') is number and bp.get('rate') is not boolean and 0 <= bp.get('rate') <= 1 else none %}{% set arm_delta = wp_rate - bp_rate if wp_rate is number and bp_rate is number else none %}{% if wp %}<tr><td><strong>{{ name }}</strong></td><td>With skill</td>- <td>{{ "%.0f%%" | format((wp_rate or 0.0) * 100) }}</td>+ <td>{% if wp_rate is number and wp_rate is not boolean %}{{ "%.0f%%" | format(wp_rate * 100) }}{% else %}N/A{% endif %}</td><td>{% if wi %}{{ wi | adaptive_interval_percent }}{% else %}—{% endif %}</td>- <td>{{ wp.passed_cases or 0 }} of {{ wp.total_cases or 0 }}</td>+ <td>{% if wp.passed_cases is integer and wp.total_cases is integer %}{{ wp.passed_cases }} of {{ wp.total_cases }}{% else %}N/A{% endif %}</td><td>{{ t3_attempts_passed(wp) }}</td><td style="color:{{ 'var(--success-color)' if arm_delta is not none and arm_delta >= tier3_lift_pass_threshold else ('var(--danger-color)' if arm_delta is not none and arm_delta <= tier3_lift_fail_threshold else 'var(--text-secondary)') }};font-weight:600;">{% if arm_delta is not none %}{{ "%+.0f%%" | format(arm_delta * 100) }}{% else %}—{% endif %}@@ -3114,7 +3097,7 @@<td>Without skill</td><td>{% if bp_rate is number and bp_rate is not boolean %}{{ "%.0f%%" | format(bp_rate * 100) }}{% else %}N/A{% endif %}</td><td>{% if bi %}{{ bi | adaptive_interval_percent }}{% else %}—{% endif %}</td>- <td>{{ bp.passed_cases or 0 }} of {{ bp.total_cases or 0 }}</td>+ <td>{% if bp.passed_cases is integer and bp.total_cases is integer %}{{ bp.passed_cases }} of {{ bp.total_cases }}{% else %}N/A{% endif %}</td><td>{{ t3_attempts_passed(bp) }}</td><td>baseline</td></tr>@@ -3160,10 +3143,10 @@{% endif %}{% if t3_agents %}- <details class="t3-details" open>+ <details class="t3-details" id="tier3-agent-resources"><summary>Measured Agent Resources</summary><div class="t3-details-body">- <p class="t3-section-hint">Efficiency scores measure routing and productive tool use. These separate measurements show observed agent resource use, including failed task outcomes. Lower use alone does not establish improved task quality or Efficiency. Delta = with skill minus baseline; negative means less use. Judge and setup time are excluded. Deltas require complete execution evidence, complete telemetry and matching case counts in both arms. Pairing does not certify matched concurrency or budget, or judge-model agreement. Reused baseline measurements are historical, not fresh or independent evidence. LLM and tool seconds split the agent's trajectory time; inferred LLM time also includes harness and queue time.</p>+ <p class="t3-section-hint">Observed consumption includes failed outcomes; lower use does not imply quality. Partial coverage limits comparisons; unavailable values are N/A.</p>{% set t3_resource_rows = [('tokens', 'Prompt + completion tokens (cache included)', '{:,.0f}', 'total'),('agent_seconds', 'Agent execution seconds', '{:,.1f} s', 'total'),@@ -3202,7 +3185,7 @@{% endfor %}{% if tier3_token_usage %}<div id="t3-token-usage">- <p class="t3-section-hint"><strong>Token usage by case.</strong> {{ tier3_token_usage.note }}</p>+ <p class="t3-section-hint"><strong>Token usage by case.</strong></p><div class="table-scroll"><table class="summary-table"><thead><tr><th>Agent</th><th>Case</th><th>With skill</th><th>Baseline</th><th>Change</th><th>Measured attempts</th></tr></thead><tbody>@@ -3219,9 +3202,13 @@{% for note in [tier3_token_usage.more_cases, tier3_token_usage.dropped_cases, tier3_token_usage.unverified_cases] if note %}<p class="t3-section-hint">{{ note }}</p>{% endfor %}+ <details class="t3-details" id="tier3-token-accounting"><summary>Token accounting</summary><p class="t3-section-hint">{{ tier3_token_usage.note }}</p></details></div>{% endif %}</div>+ <details class="t3-details" id="tier3-resource-methods"><summary>Resource methods</summary>+ <p class="t3-section-hint">Efficiency scores measure routing and productive tool use. These separate measurements show observed agent resource use, including failed task outcomes. Lower use alone does not establish improved task quality or Efficiency. Delta = with skill minus baseline; negative means less use. Judge and setup time are excluded. Deltas require complete execution evidence, complete telemetry and matching case counts in both arms. Pairing does not certify matched concurrency or budget, or judge-model agreement. Reused baseline measurements are historical, not fresh or independent evidence. LLM and tool seconds split the agent's trajectory time; inferred LLM time also includes harness and queue time.</p>+ </details></details>{% endif %}@@ -3253,12 +3240,12 @@{% endfor %}{% set t3_steps_chart = steps_by_case_chart | default({'labels': [], 'datasets': []}) %}{# Charts moved above the heatmap so the visualization narrative is summary-chart -> pivot -> drill-down #}- {% if t3_token_coverage.all_agents_complete or t3_steps_chart.datasets %}+ {% if (t3_token_coverage.all_agents_complete and not tier3_telemetry.token_chart) or t3_steps_chart.datasets %}<details class="t3-details" open><summary>Trial Charts</summary><div class="t3-details-body"><div class="chart-grid">- {% if t3_token_coverage.all_agents_complete %}<div class="chart-card">{{ tier3_chart('tier3-token-chart', 'With-Skill Token Usage by Agent', 'Prompt, completion and observed cached tokens summed across with-skill trials for each agent.', 't3-trials-table', 'Read token measurements in the trial table', 250) }}</div>{% endif %}+ {% if t3_token_coverage.all_agents_complete and not tier3_telemetry.token_chart %}<div class="chart-card">{{ tier3_chart('tier3-token-chart', 'With-Skill Token Usage by Agent', 'Prompt, completion and observed cached tokens summed across with-skill trials for each agent.', 't3-trials-table', 'Read token measurements in the trial table', 250) }}</div>{% endif %}{% if t3_steps_chart.datasets %}<div class="chart-card">{{ tier3_chart('tier3-steps-chart', 'Steps per Eval Case by Agent and Condition', 'Average measured steps per eval case, grouped by agent and with-skill or baseline condition; incomplete measurements are gaps.', 't3-trials-table', 'Read individual step measurements in the trial table', 250) }}{% if t3_steps_chart.get('omitted_cases') %}<p style="color:var(--text-secondary);font-size:0.82rem;">Showing the first {{ t3_steps_chart.labels | length }} eval cases; {{ t3_steps_chart['omitted_cases'] }} more are in the JSON Downloads.</p>{% endif %}</div>{% endif %}</div></div>@@ -3517,7 +3504,12 @@<p style="color:var(--text-secondary);">No per-trial data available for this run.</p>{% endif %}- {% set t3_lift_trials = (tier3.trials or []) | selectattr('lift_scores', 'defined') | list %}+ {% set t3_lift_trials = [] %}+ {% for trial in tier3.trials or [] %}+ {% if trial.lift_scores is defined and trial.get('diagnostic_only') is not sameas true and trial.get('scored') is not sameas false and (trial.agent or '(default)') not in tier3_diagnostic_comparison_agents %}+ {% set _ = t3_lift_trials.append(trial) %}+ {% endif %}+ {% endfor %}{% if t3_lift_trials %}<details class="t3-details" id="tier3-lift-per-case" open><summary>Lift per Eval Case</summary>@@ -3630,10 +3622,25 @@</div></details>{% endif %}+ {{ render_telemetry(tier3_telemetry) }}+ {{ render_plugin_evidence(plugin_evidence, 'trials') }}</section>{# ---------- Agent Details ---------- #}<section class="t3-page" id="tier3-page-agents" role="tabpanel" aria-labelledby="tier3-tab-agents" tabindex="0">+ {{ render_native_evidence(native_evidence, 'agents') }}+ {% if t3_coverage_messages %}+ <div class="t3-truncation-notice t3-coverage-notice" id="tier3-coverage-notices" role="status">+ <strong>Agent coverage notes</strong>+ <ul>+ {% for message in t3_coverage_messages %}+ <li>{{ message }}</li>+ {% endfor %}+ </ul>+ </div>+ {% endif %}++{% if t3_agents %}{% set t3_palette = ["#76b900","#8b5cf6","#ec4899","#06b6d4","#3b82f6","#f59e0b","#22c55e"] %}<nav class="t3-agent-tabs" role="tablist" aria-label="Agent details">@@ -3658,13 +3665,15 @@{% set agent_color = t3_palette[agent_idx % (t3_palette | length)] %}{% set agent_score = agent.with_skill %}{% set agent_score_color = 'var(--text-secondary)' if agent_score is none else ('var(--success-color)' if agent_score >= 0.7 else ('var(--warning-color)' if agent_score >= 0.4 else 'var(--danger-color)')) %}- {% set best_dim = none %}- {% set worst_dim = none %}+ {% set extremes = namespace(best=none, worst=none) %}{% for d in agent.dimensions or [] %}{% set dscore = d.score if d.score is not none else d.with_skill %}- {% if best_dim is none or dscore > (best_dim.score if best_dim.score is not none else best_dim.with_skill) %}{% set best_dim = d %}{% endif %}- {% if worst_dim is none or dscore < (worst_dim.score if worst_dim.score is not none else worst_dim.with_skill) %}{% set worst_dim = d %}{% endif %}+ {% if dscore is number %}+ {% if extremes.best is none or dscore > (extremes.best.score if extremes.best.score is not none else extremes.best.with_skill) %}{% set extremes.best = d %}{% endif %}+ {% if extremes.worst is none or dscore < (extremes.worst.score if extremes.worst.score is not none else extremes.worst.with_skill) %}{% set extremes.worst = d %}{% endif %}+ {% endif %}{% endfor %}+ {% set best_dim = extremes.best %}{% set worst_dim = extremes.worst %}<div class="t3-agent-panel{% if loop.first %} active{% endif %}" id="{{ t3_agent_panel_ids[name] }}" data-tier3-agent="{{ name }}" role="tabpanel" aria-labelledby="tier3-agent-tab-{{ loop.index0 }}" tabindex="0">{# Stable, index-based scroll target for jumpToTier3Agent. Raw agentnames can contain characters that are unsafe in CSS/HTML IDs (slashes,@@ -3678,6 +3687,13 @@tabindex="-1"aria-hidden="true"></a>+ {% set agent_coverage = presentation.coverage.agents.get(name, {}) %}+ {% if agent_coverage %}<dl class="t3-agent-coverage" aria-label="Recorded agent condition coverage">+ {% for condition, label in [('with_skill', 'With skill'), ('without_skill', 'Without skill')] %}{% set arm = agent_coverage.get(condition) %}{% if arm %}+ <div><dt>{{ label }}</dt><dd>{% if arm.status == 'skipped' %}Skipped{% else %}{{ arm.scored if arm.scored is not none else '?' }} of {{ arm.expected if arm.expected is not none else '?' }} scored · {{ arm.status | title }}{% endif %}</dd></div>+ {% endif %}{% endfor %}+ </dl>{% endif %}+{# KPI strip #}<div class="t3-kpi-strip"><div class="t3-kpi-card" style="border-top:3px solid {{ agent_color }};">@@ -3693,9 +3709,11 @@<div class="t3-kpi-sub">{% if agent.lift >= tier3_lift_pass_threshold %}positive{% elif agent.lift <= tier3_lift_fail_threshold %}regression{% else %}neutral{% endif %}</div>{% else %}<div class="t3-kpi-value" style="color:var(--text-secondary);">N/A</div>- <div class="t3-kpi-sub">{% if agent.get('skill_activation', {}).get('status') == 'never_activated' %}inconclusive: skill never activated{% elif agent.with_skill is none and agent.baseline is not none %}with-skill unavailable{% elif agent.with_skill is none %}N/A lift{% elif agent.baseline is not none %}comparison unavailable{% else %}no baseline{% endif %}</div>+ {% set baseline_condition = agent.conditions.get('without_skill') if agent.conditions is mapping else none %}+ {% set baseline_condition = baseline_condition if baseline_condition is mapping else {} %}+ <div class="t3-kpi-sub">{% if agent.get('skill_activation', {}).get('status') == 'never_activated' %}inconclusive: skill never activated{% elif agent.with_skill is none and agent.baseline is not none %}with-skill unavailable{% elif agent.with_skill is none %}N/A lift{% elif agent.baseline is not none %}comparison unavailable{% elif baseline_condition.get('execution_status') != 'skipped' and (agent.num_trials_baseline or baseline_condition.get('execution_status') in ['succeeded', 'failed', 'incomplete']) %}Overall baseline unavailable{% else %}no baseline{% endif %}</div>{% endif %}- <div class="t3-kpi-sub">Skill Lift compares Overall on the metrics and cases both arms scored, so it can differ from subtracting the displayed Overall scores.</div>+ <div class="t3-kpi-sub"><a href="#tier3-number-key">How lift is measured</a></div></div><div class="t3-kpi-card"><div class="t3-kpi-label">Trials</div>@@ -3707,7 +3725,7 @@<div class="t3-kpi-card"><div class="t3-kpi-label">Best Dimension</div><div class="t3-kpi-value" style="font-size:1.1rem; color:var(--success-color);">{{ best_dim.id | title }}</div>- <div class="t3-kpi-sub">{{ "%.2f" | format(best_score or 0.0) }}</div>+ <div class="t3-kpi-sub">{{ "%.2f" | format(best_score) }}</div></div>{% endif %}{% if worst_dim and worst_dim.id != (best_dim.id if best_dim else None) %}@@ -3715,7 +3733,7 @@<div class="t3-kpi-card"><div class="t3-kpi-label">Weakest Dimension</div><div class="t3-kpi-value" style="font-size:1.1rem; color:var(--danger-color);">{{ worst_dim.id | title }}</div>- <div class="t3-kpi-sub">{{ "%.2f" | format(worst_score or 0.0) }}</div>+ <div class="t3-kpi-sub">{{ "%.2f" | format(worst_score) }}</div></div>{% endif %}</div>@@ -3777,8 +3795,10 @@{% set lift_excluded_label = lift_excluded_cases ~ (' case' if one_lift_excluded_case else ' cases') %}{# Only a card with both arm scores can say they include the cases. #}<div class="t3-dim-hint t3-eval-lift-note">- {%- if card.lift is none -%}+ {%- if card.lift is none and card.comparison_basis.contributing_attempts == 0 -%}No lift: {{ lift_excluded_label }} {{ 'was' if one_lift_excluded_case else 'were' }} scored by different judge models and no comparable result remains+ {%- elif card.lift is none -%}+ No lift: {{ lift_excluded_label }} {{ 'was' if one_lift_excluded_case else 'were' }} scored by different judge models and the loaded results cannot confirm the comparison{%- else -%}Lift leaves out {{ lift_excluded_label }} scored by different judge models{%- endif -%}@@ -3873,19 +3893,22 @@{% else %}<p style="color:var(--text-secondary);">No per-agent data available.</p>{% endif %}+ {{ render_plugin_evidence(plugin_evidence, 'agents') }}</section>{# ---------- Dataset ---------- #}<section class="t3-page" id="tier3-page-dataset" role="tabpanel" aria-labelledby="tier3-tab-dataset" tabindex="0">+ {% if dataset_diagnostics_view %}<p class="t3-section-hint" id="dataset-diagnostic-guidance">Recorded verdicts, not inferred skill defects. Evidence excerpts are metric-level context; inspect the trial for attribution.</p>{% endif %}+ {% if insights_view.execution_errors %}<p><a href="#tier3-execution-errors">Shared run execution errors are retained once in Diagnostics.</a></p>{% endif %}{% if t3_dataset %}<div class="t3-dataset-hero">- <h2>AgentSkills Dataset</h2>+ <h2>Evaluation Dataset</h2><p style="color:var(--text-secondary);font-size:0.9rem;margin:0.25rem 0 0;">- {{ t3_dataset | length }} AgentSkills eval case{{ 's' if t3_dataset | length != 1 else '' }} used for this Tier 3 run.+ {{ t3_dataset | length }} eval case{{ 's' if t3_dataset | length != 1 else '' }} used for this Tier 3 run.</p><div class="t3-ds-meta" style="margin-top:0.75rem;">- <span class="t3-ds-chip">Skill: <b>{{ tier3.skill_name or 'unknown' }}</b></span>- <span class="t3-ds-chip">Best Performing Agent: <b>{{ t3_best_name or 'N/A' }}</b></span>+ <span class="t3-ds-chip">{{ content_label }}: <b>{{ tier3.skill_name or 'unknown' }}</b></span>+ {% if t3_best_name %}<span class="t3-ds-chip">Best Performing Agent: <b>{{ t3_best_name }}</b></span>{% endif %}{% set t3_env = (tier3.summary.environment if tier3.summary is defined and tier3.summary else None) or tier3.environment %}{% if t3_env %}<span class="t3-ds-chip">Environment: <b>{{ t3_env }}</b></span>{% endif %}<span class="t3-ds-chip">Schema: <b>v{{ tier3.schema_version or '2.0' }}</b></span>@@ -3931,41 +3954,7 @@<ol class="t3-ds-behaviors">{% for b in case_assertions %}<li>{{ b }}</li>{% endfor %}</ol></div>{% endif %}- {% for diagnostic in tier3.case_diagnostics or [] if diagnostic.entry_id == case.id %}- <div class="t3-ds-field">- <span class="t3-ds-label">Expectation diagnostics</span>- <p>Recorded verdicts, not inferred skill defects. Evidence excerpts are metric-level context; inspect the trial for attribution.</p>- {% for attempt in diagnostic.attempts %}- <details class="t3-details" open>- <summary>{{ attempt.agent }} · {{ 'With skill' if attempt.condition == 'with_skill' else 'Without skill' }} · {{ attempt.trial_id or 'No matched trial' }}</summary>- <div class="t3-details-body">- {% for error in attempt.errors %}<p>{{ error }}</p>{% endfor %}- {% if attempt.judge_note %}<p>{{ attempt.judge_note }}</p>{% endif %}- {% for status in ['unmet', 'not_checked', 'unscored', 'not_applicable', 'met'] %}- {% set judgments = attempt.judgments | selectattr('status', 'equalto', status) | list %}- {% if judgments %}- <h4>{{ status | replace('_', ' ') | title }} ({{ judgments | length }})</h4>- <ul class="t3-ds-diagnostics">- {% for judgment in judgments %}- <li>- {% for requirement in diagnostic.requirements if requirement.expectation_id == judgment.expectation_id %}- <div><b>{{ requirement.expectation_id }}</b>: <span style="white-space:pre-wrap;">{{ requirement.requirement }}</span></div>- {% endfor %}- <div>{{ judgment.reason }}</div>- {% if judgment.unmet_checks %}<div>Unmet rubric checks: {{ judgment.unmet_checks | join(', ') }}</div>{% endif %}- {% if judgment.inapplicable_checks %}<div>Inapplicable rubric checks: {{ judgment.inapplicable_checks | join(', ') }}</div>{% endif %}- {% for excerpt in judgment.evidence %}<div><code>{{ excerpt }}</code></div>{% endfor %}- {% if status != 'met' %}<div>Next diagnostic step: {{ judgment.next_step }}</div>{% endif %}- </li>- {% endfor %}- </ul>- {% endif %}- {% endfor %}- </div>- </details>- {% endfor %}- </div>- {% endfor %}+ {{ render_case_diagnostics(dataset_diagnostics_view, case.id, insights_view.execution_errors, loop.index0) }}</div></details>{% endfor %}@@ -3977,8 +3966,8 @@{# ---------- Insights (Conclusions + Recommendations) ---------- #}<section class="t3-page" id="tier3-page-suggestions" role="tabpanel" aria-labelledby="tier3-tab-suggestions" tabindex="0">- {% set t3_has_conclusions = tier3.conclusions and (tier3.conclusions | length) > 0 %}- {% set t3_recommendations = tier3.recommendations or [] %}+ {% set t3_has_conclusions = insights_view.conclusions and (insights_view.conclusions | length) > 0 %}+ {% set t3_recommendations = insights_view.recommendations or [] %}{% set t3_has_suggestions = (t3_recommendations | length) > 0 or (tier3.suggestions and (tier3.suggestions | length) > 0) %}{% if t3_source_errors %}@@ -3993,6 +3982,7 @@</div></details>{% endif %}+ <details class="t3-method"><summary>About insight sources</summary><p style="color:var(--text-secondary);font-size:0.85rem;margin:0 0 0.85rem;">Insights combine deterministic baselines (best performing agent, weakest dimension, coverage gaps)with additional contextual observations and action items produced by an LLM-as-Judge.@@ -4003,68 +3993,27 @@tag marks judge-generated entries that may vary between runs.{% if t3_evidence_links %}Evidence links open the matching Harbor trial or exact trajectory step when captured.{% endif %}</p>+ </details>{% if t3_has_conclusions %}<details class="t3-details" id="tier3-conclusions" open><summary>Conclusions</summary><div class="t3-details-body">- <div class="t3-sug-stack">- {% for conclusion in tier3.conclusions %}- {% set sev = conclusion.severity or 'warn' %}- {% set sev_class = 'severity-pass' if sev in ('pass','ok') else ('severity-fail' if sev in ('fail','critical','high') else 'severity-warn') %}- {% set sev_pill = 'ok' if sev in ('pass','ok') else ('critical' if sev in ('fail','critical','high') else 'warning') %}- {% set source = (conclusion.source or 'deterministic') %}- <div class="t3-sug-card {{ sev_class }}">- <span class="t3-sug-num">{{ loop.index }}</span>- <div>- <div class="t3-sug-title">- {{ conclusion.title }}- <span class="t3-pill {{ sev_pill }}">{{ sev }}</span>- <span class="t3-insight-source insight-source-{{ source }}">{{ source }}</span>- </div>- <div class="t3-sug-body">{{ conclusion.message }}</div>- {% if conclusion.evidence and conclusion.evidence.url %}- <a class="t3-evidence-link" href="{{ conclusion.evidence.url }}" target="_blank" rel="noopener">View {{ conclusion.evidence.label or 'evidence' }}</a>- {% endif %}- </div>- <div class="t3-sug-actions">- <button class="t3-copy-btn" onclick='tier3CopyText(this, {{ ((conclusion.title ~ ': ' ~ conclusion.message) | tojson) }})'>Copy</button>- </div>- </div>- {% endfor %}- </div>+ {{ insight_cards(insights_view.conclusions, mode='conclusion') }}</div></details>{% endif %}+ {% if t3_effect %}<p class="t3-next-steps-conclusion">{% if insights_case_fix_count %}{{ insights_case_fix_count }} issue{{ 's' if insights_case_fix_count != 1 else '' }} to fix, most attempts lost first:{% else %}Nothing to fix in the available case evidence.{% endif %}</p>{% endif %}++ <div id="tier3-run-next-steps">{% if t3_has_suggestions %}<details class="t3-details" open><summary>Recommendations</summary><div class="t3-details-body"><div class="t3-sug-stack">{% if t3_recommendations %}- {% for reco in t3_recommendations %}- {% set sev = reco.severity or 'warn' %}- {% set sev_class = 'severity-pass' if sev in ('pass','ok') else ('severity-fail' if sev in ('fail','critical','high') else 'severity-warn') %}- {% set source = (reco.source or 'deterministic') %}- <div class="t3-sug-card {{ sev_class }}">- <span class="t3-sug-num">{{ loop.index }}</span>- <div>- <div class="t3-sug-title">- <span class="t3-sug-cat">{{ reco.category or 'Action' }}</span>- {% if reco.title %}<span style="font-weight:700;">{{ reco.title }}</span>{% endif %}- <span class="t3-insight-source insight-source-{{ source }}">{{ source }}</span>- </div>- <div class="t3-sug-body">{{ reco.message }}</div>- {% if reco.evidence and reco.evidence.url %}- <a class="t3-evidence-link" href="{{ reco.evidence.url }}" target="_blank" rel="noopener">View {{ reco.evidence.label or 'evidence' }}</a>- {% endif %}- </div>- <div class="t3-sug-actions">- <button class="t3-copy-btn" onclick='tier3CopyText(this, {{ (reco.message | string | tojson) }})'>Copy</button>- </div>- </div>- {% endfor %}+ {{ insight_cards(insights_view.recommendations) }}{% else %}{% for suggestion in tier3.suggestions %}{% set fallback_evidence = none %}@@ -4102,6 +4051,8 @@</details>{% endif %}+ {{ insight_next_steps(remaining_insight_steps) }}+ </div>{% if not t3_source_errors and not t3_has_conclusions and not t3_has_suggestions %}<p style="color:var(--text-secondary);">No evaluation insights were generated.</p>{% endif %}@@ -4109,16 +4060,43 @@{# ---------- Diagnostics (raw SkillEvaluator data + downloads) ---------- #}<section class="t3-page" id="tier3-page-provenance" role="tabpanel" aria-labelledby="tier3-tab-provenance" tabindex="0">+ {{ render_native_evidence(native_evidence, 'provenance') }}+ {% if harbor_jobs %}+ <div class="t3-harbor-panel">+ <div>+ <strong>Harbor artifacts</strong>+ <p>Open retained logs, raw trajectories, artifacts, and generated Harbor analysis for this Tier 3 run.</p>+ </div>+ <div class="t3-harbor-actions">+ {% for job in harbor_jobs %}+ {% set job_labels = [] %}+ {% for row in t3_condition_trial_rows if job.url and row.trial.harbor_viewer and row.trial.harbor_viewer.job_url == job.url %}+ {% set label = row.agent ~ ' · ' ~ row.condition %}{% if label not in job_labels %}{% set _ = job_labels.append(label) %}{% endif %}+ {% endfor %}+ <div><strong>{{ job_labels | join('; ') if job_labels else ('Run analysis' if job.name == 'Run analysis' else 'Job ' ~ loop.index) }}</strong>+ <details class="t3-artifact-identifiers"><summary>Artifact identifiers</summary><code>{{ job.name }}</code>{% if job.url %}<div>{{ job.url }}</div>{% endif %}{% if job.analysis_url %}<div>{{ job.analysis_url }}</div>{% endif %}</details>+ {% if job.url %}<a class="t3-harbor-link" href="{{ job.url }}" target="_blank" rel="noopener">Results</a>{% endif %}+ {% if job.analysis_url %}<a class="t3-harbor-link" href="{{ job.analysis_url }}" target="_blank" rel="noopener">Analysis</a>{% endif %}+ </div>+ {% endfor %}+ </div>+ </div>+ {% endif %}+<p style="color:var(--text-secondary);">- Diagnostics preserve raw evaluation artifacts for deep dives and troubleshooting.- The main report leads with human-readable dimensions; the blocks below show the- underlying evaluator scores, Harbor artifacts, and timing — each available as a- one-click download.+ Raw scores, execution errors, artifacts and downloads.</p>+ {% if insights_view.execution_errors %}+ <details class="t3-details t3-execution-errors" id="tier3-execution-errors">+ <summary>Full execution errors ({{ insights_view.execution_errors | length }})</summary>+ <div class="t3-details-body"><ol>{% for error in insights_view.execution_errors %}<li><pre>{{ error }}</pre></li>{% endfor %}</ol></div>+ </details>+ {% endif %}<details class="t3-details"><summary>Recorded evaluation provenance</summary><div class="t3-details-body">+ {% if tier3_dataset_provenance_line and not tier3_dataset_provenance_warning %}<p>{{ tier3_dataset_provenance_line }}</p>{% endif %}<p>Only metadata recorded for this evaluation is shown. Missing values are unavailable.</p><dl class="t3-prov-grid"><dt>Evaluator version</dt><dd>{{ tier3.evaluator_version or t3_summary.evaluator_version or 'Unavailable' }}</dd>@@ -4151,6 +4129,9 @@<p style="color:var(--text-secondary);font-size:0.85rem;margin:0 0 0.75rem;">Use these to share or attach the underlying data to a bug report.</p>+ {% if ci.get('canonical_json_url') %}+ <a class="t3-harbor-link" href="{{ ci.canonical_json_url }}" download="skillevaluator-report.json">Download canonical report JSON</a>+ {% elif tier3_canonical_data %}<div class="t3-download-grid"><button class="t3-copy-btn" onclick="tier3DownloadJson('tier3-full', 'tier3-full.json')">Download Full Tier 3 Payload</button>{% if t3_provenance.raw_evaluators %}@@ -4166,9 +4147,10 @@<button class="t3-copy-btn" onclick="tier3DownloadJson('tier3-timing', 'tier3-timing.json')">Download Pipeline Timing</button>{% endif %}</div>+ {% else %}<p>No canonical Tier 3 payload was recorded. The report JSON includes the supplied passive plugin snapshots.</p>{% endif %}</div></details>- <script type="application/json" id="tier3-full"{% if tier3_canonical_encoding == 'base64' %} data-encoding="base64"{% endif %}>{{ tier3_canonical_data | safe }}</script>+ {% if not ci.get('canonical_json_url') and tier3_canonical_data %}<script type="application/json" id="tier3-full"{% if tier3_canonical_encoding == 'base64' %} data-encoding="base64"{% endif %}>{{ tier3_canonical_data | safe }}</script>{% endif %}{% if tier3.evaluators %}<details class="t3-details">@@ -4194,7 +4176,7 @@{% endif %}{% if t3_provenance.evaluator_paths or t3_provenance.run_dir or t3_harbor_job_url or t3_harbor_analysis_url %}- <details class="t3-details" open>+ <details class="t3-details"><summary>Artifact Paths</summary><div class="t3-details-body"><div class="t3-prov-grid">@@ -4265,10 +4247,12 @@</div></details>{% endif %}+ {{ render_plugin_evidence(plugin_evidence, 'provenance') }}+ {{ render_retention_limits(plugin_evidence) }}</section>{# Sub-tab switcher and Chart.js charts #}- {% if t3_agents or (t3_steps_chart is defined and t3_steps_chart.datasets) %}+ {% if t3_agents or tier3_telemetry.token_chart or (t3_steps_chart is defined and t3_steps_chart.datasets) %}{% set chart_runtime, chart_notices = chart_assets() %}{% if chart_runtime %}<details class="chart-notices" id="tier3-chart-notices">@@ -4457,20 +4441,32 @@var cards = container.querySelectorAll('[data-tier3-filterable]');var visible = 0;cards.forEach(function(card){- var hay = (card.getAttribute('data-tier3-filterable') || '').toLowerCase();+ var details = [card].concat(Array.from(card.querySelectorAll('details')));+ details.forEach(function(detail){+ if (detail.dataset.tier3SearchOpened) { detail.open = false; delete detail.dataset.tier3SearchOpened; }+ });+ var hay = ((card.getAttribute('data-tier3-filterable') || '') + ' ' + card.textContent).toLowerCase();var match = !q || hay.indexOf(q) !== -1;card.style.display = match ? '' : 'none';- if (match) visible++;+ if (match) {+ visible++;+ if (q) details.forEach(function(detail){+ if (detail.tagName !== 'DETAILS' || detail.textContent.toLowerCase().indexOf(q) === -1) return;+ for (var ancestor = detail; ancestor && ancestor !== container; ancestor = ancestor.parentElement) {+ if (ancestor.tagName === 'DETAILS' && !ancestor.open) { ancestor.dataset.tier3SearchOpened = 'true'; ancestor.open = true; }+ }+ });+ }});var counter = document.querySelector('[data-tier3-filter-count="' + containerId + '"]');if (counter) counter.textContent = visible + ' / ' + cards.length;}(function(){- var tier3Data = {{ tier3 | tojson | safe }};+ var tier3Data = {{ tier3_chart_data | tojson | safe }};var dimensionIds = (tier3Data.dimensions || []).map(function(dim){ return dim.id; });if (!dimensionIds.length) dimensionIds = ["security","correctness","discoverability","effectiveness","efficiency"];var palette = ["#76b900", "#8b5cf6", "#ec4899", "#06b6d4", "#3b82f6", "#f59e0b", "#22c55e"];- var charts = [];+ var charts = Object.create(null);function labelForDimension(dim) {return dim.replace(/_/g, " ").replace(/\b\w/g, function(c){ return c.toUpperCase(); });}@@ -4544,32 +4540,38 @@});return chart;}- function destroyCharts() {- charts.forEach(function(chart){ chart.destroy(); });- charts = [];- }function createChart(canvas, config) {+ // A hidden canvas starts hidden until a chart succeeds. Check its+ // container, including closed disclosures, before creating it.+ if (!printing && (canvas.closest("details:not([open])") || !canvas.parentElement.getClientRects().length)) return;var fallback = document.getElementById(canvas.id + "-fallback");canvas.hidden = false;- var chart = null;+ var chart = charts[canvas.id];try {- chart = new Chart(canvas, config);+ if (chart) {+ chart.data = config.data;+ chart.options = config.options;+ chart.resize();+ chart.update(printing ? "none" : undefined);+ } else {+ chart = new Chart(canvas, config);+ }// Chart.js can return an instance without a context instead of throwing.if (!chart.ctx) throw new Error("Chart canvas unavailable");- charts.push(chart);+ charts[canvas.id] = chart;if (fallback) fallback.hidden = true;} catch (error) {// A context-less instance is registered with canvas=null, so// Chart.getChart(canvas) cannot find it; destroy what was built.var partial = chart || (Chart.getChart && Chart.getChart(canvas));if (partial) partial.destroy();+ delete charts[canvas.id];canvas.hidden = true;if (fallback) fallback.hidden = false;}}window.rebuildTier3Charts = function rebuildTier3Charts() {if (typeof Chart === "undefined") return;- destroyCharts();var colors = cssColors();var agents = agentEntries();var dimensionLabelList = dimensionIds.map(labelForDimension);@@ -4615,6 +4617,18 @@})});}+ var recordedTokenChart = document.getElementById("tier3-recorded-token-chart");+ var recordedTokenData = {{ tier3_telemetry.token_chart | tojson | safe }};+ if (recordedTokenChart && recordedTokenData) {+ recordedTokenData.datasets.forEach(function(dataset, idx){ dataset.backgroundColor = palette[idx % palette.length] + "cc"; });+ createChart(recordedTokenChart, {+ type: "bar", data: recordedTokenData,+ options: chartOptions({ responsive: true,+ scales: { x: { stacked: true, ticks: { color: colors.tick, maxRotation: 45 }, grid: { display: false } }, y: { stacked: true, ticks: { color: colors.label }, grid: { color: colors.grid } } },+ plugins: { legend: { labels: { color: colors.label } } }+ })+ });+ }var tokenChart = document.getElementById("tier3-token-chart");var tokenTotals = tokenTotalsByAgent();var tokenAgents = Object.keys(tokenTotals);@@ -4652,13 +4666,19 @@}}};- document.addEventListener("DOMContentLoaded", function(){ window.rebuildTier3Charts(); });+ // The report theme initializer creates the first visible charts only+ // after the saved/system theme has been applied.+ document.addEventListener("toggle", function(event){+ if (event.target.tagName === "DETAILS" && event.target.open && event.target.querySelector("canvas")) window.rebuildTier3Charts();+ }, true);function redrawForPrint(isPrinting) {- if (printing === isPrinting) return;+ // beforeprint can precede disclosure opening and print CSS. A subsequent+ // print-media event must resize against the now-visible layout as well.printing = isPrinting;window.rebuildTier3Charts();}- window.addEventListener("beforeprint", function(){ redrawForPrint(true); });+ // The report's disclosure handler draws after enabling its print layout.+ window.addEventListener("beforeprint", function(){ printing = true; });window.addEventListener("afterprint", function(){ redrawForPrint(false); });if (window.matchMedia) {var printQuery = window.matchMedia("print");@@ -4684,7 +4704,16 @@</div><details class="run-metadata" id="run-metadata"><summary>Run details & provenance</summary>+ {% if not has_tier3 %}{{ render_retention_limits(plugin_evidence) }}{% endif %}<div class="metadata-grid">+ {% for owner in ['static', 'runtime'] %}{% set snapshot = plugin_evidence.metadata.get(owner) %}{% if snapshot %}+ <div><strong>{{ owner | title }} evidence</strong><div>{{ snapshot.name }} · {{ snapshot.status }}</div>+ {% if snapshot.run_id is defined %}<div>Run ID: <code>{{ snapshot.run_id }}</code></div>{% endif %}+ {% if snapshot.execution_status is defined %}<div>Execution: {{ snapshot.execution_status }}</div>{% endif %}+ {% if snapshot.source is defined %}{% for key, value in snapshot.source.items() %}<div>{{ key | replace('_', ' ') | title }}: <code>{{ value }}</code></div>{% endfor %}{% endif %}+ {% if snapshot.notice %}<p>{{ snapshot.notice }}</p>{% endif %}+ </div>{% endif %}{% endfor %}+{% if has_tier3 %}<div><strong>Agent evaluation</strong> {% if completed_agent and completed_agent.recovered_attempts %}<div>{{ completed_agent.recovered_attempts }} timeout attempt(s) recovered; failed history retained.</div>{% endif %}<div class="trial-coverage">{{ hero_trials }}</div>{% for detail in presentation.coverage.details %}<div>{{ detail }}</div>{% endfor %}<div><strong>Metrics:</strong> {{ hero_metric_count }} evaluators</div>@@ -4692,6 +4721,7 @@{% if tier3.get('overall_lift') is not none %}<div><strong>Best-agent lift:</strong> {{ "%+.2f" | format(tier3.get('overall_lift')) }}</div>{% endif %}</div>{% endif %}{% if target_path %}<p class="header-meta-item"><strong>Target:</strong> {% if target_path.startswith('https://') %}<a href="{{ target_path }}" target="_blank" class="header-target-link" title="{{ target_path }}">{{ target_display or target_path }}</a>{% else %}{{ target_path }}{% endif %}</p>{% endif %}+ {% if skillspector_versions %}<p>SkillSpector <strong>v{{ skillspector_versions | join(', v') }}</strong></p>{% endif %}{% if profile %}<p class="header-meta-item"><strong>Profile:</strong> <span class="header-profile-badge profile-{{ profile }}">{{ profile }}</span></p>{% endif %}{% if timestamp %}<p class="header-meta-item">Generated: {{ timestamp }}{% if version %} · SkillEvaluator v{{ version }}{% endif %}</p>{% endif %}@@ -4700,7 +4730,6 @@{% if ci.get('image') %}<p><strong>Evaluator image</strong><code>{{ ci.image }}</code></p>{% endif %}{% if ci.get('ci_conclusion') %}<p><strong>CI conclusion</strong>{{ ci.ci_conclusion }}</p>{% endif %}</div>- </details>{% if has_tier2 or has_tier3 %}{% set included_tiers = [] %}{% if has_tier1 %}{% set _ = included_tiers.append('tier1') %}{% endif %}@@ -4716,6 +4745,8 @@{% if advisory_labels %}<span>Advisory ({{ advisory_labels | join(' + ') }}): <strong>{{ advisory_critical }} critical · {{ advisory_high }} high · {{ advisory_medium }} medium · {{ advisory_low }} low</strong>.{% if has_tier3 and 'tier3' in gating.advisory_tiers %} Tier 3 agent-eval findings are advisory and don't block merge.{% endif %}</span>{% endif %}</div>{% endif %}+ </details>+</main><footer>Generated by <strong>SkillEvaluator</strong> — NVIDIA Benchmark for Agent Skills Evaluation</footer><button id="backToTop" onclick="scrollToTop()" title="Back to Top">↑ Top</button>@@ -4741,8 +4772,8 @@}function showTab(tabId, btn) { activateReportTier(tabId); }function filterValidators(status) {- const cards = document.querySelectorAll('.validator-card');- const rows = document.querySelectorAll('.summary-table tbody tr');+ const cards = document.querySelectorAll('#tab-tier1 .validator-card');+ const rows = document.querySelectorAll('#tab-tier1 .summary-table tbody tr');['all', 'pass', 'fail', 'incomplete'].forEach(s => document.getElementById('filter-' + s)?.classList.remove('active'));document.getElementById('filter-' + status)?.classList.add('active');let visibleCount = 0;diff --git a/src/skillevaluator/reporting/templates/report_ui.css.j2 b/src/skillevaluator/reporting/templates/report_ui.css.j2index df564c7e..17cea288 100644--- a/src/skillevaluator/reporting/templates/report_ui.css.j2+++ b/src/skillevaluator/reporting/templates/report_ui.css.j2@@ -1,314 +1,201 @@/* SPDX-License-Identifier: Apache-2.0 */-/* Report workspace: static evidence, readable without a network connection. */-/* One palette built on the logo greens. #76b900 is decoration only; text colors meet WCAG AA (4.5:1) on --bg and --bg-secondary in both themes. */-:root{--brand-core:#76b900;--brand-green:#3e6500;--brand-deep:#315b25;--light-bg:#f5f6f7;--bg:#fff;--bg-secondary:#f5f6f7;--bg-tertiary:#e8ebed;--dark-text:#24292f;--text-secondary:#59636e;--border-color:#dfe3e6;--primary-color:#26302b;--secondary-color:#3e6500;--accent-color:#3e6500;--nv:#76b900;--success-color:#3e6500;--danger-color:#b4232d;--warning-color:#8a5800;--critical-color:#a3232b;--high-color:#b54708;--medium-color:#8a5800;--low-color:#59636e;--info-color:#0b6b9a;--on-accent:#fff;--on-success:#fff;--on-danger:#fff;--on-warning:#fff;--focus-ring:#3d6b00;--chart-grid:#e8ebed;--chart-tick:#59636e;--chart-label:#24292f;--table-header-bg:#f5f6f7;--table-row-hover:#f5f6f7;--shadow:none;--shadow-lg:0 4px 16px #1f293708;--badge-pass-bg:#edf5e4;--badge-pass-tx:#315b25;--badge-fail-bg:#fff0ef;--badge-fail-tx:#a3232b;--badge-warn-bg:#fff5df;--badge-warn-tx:#7a4e00;--sev-critical-bg:#fdecec;--sev-critical-tx:#a3232b;--sev-high-bg:#fff4ec;--sev-high-tx:#b54708;--sev-medium-bg:#fff5df;--sev-medium-tx:#7a4e00;--sev-low-bg:#eef0f2;--sev-low-tx:#4b5563;--sev-info-bg:#e8f2f8;--sev-info-tx:#0b5a82;--llm-tx:#6d28d9;--sidebar-bg:#1e2328;--sidebar-tx:#c7ced5;--se-logo-panel:#f2f7ec;--se-logo-panel-edge:#d7e5cc;--se-logo-ring-outer:#b8d3a5;--se-logo-ring-middle:#83aa66;--se-logo-ring-inner:#315b25;--se-logo-core:#76b900;--se-logo-core-edge:#3e6500;--se-logo-check:#fff}-body{font-family:ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px;line-height:1.55;padding-left:216px;transition:none}-button,input,summary{font:inherit}button{cursor:pointer}a{color:var(--secondary-color)}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--focus-ring);outline-offset:3px}code,pre{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}code{overflow-wrap:anywhere}h1,h2,h3{letter-spacing:-.025em}table{width:100%}td,th{overflow-wrap:break-word}th{white-space:nowrap}td code,td .code-snippet{overflow-wrap:anywhere}pre{max-width:100%;overflow:auto}p{overflow-wrap:anywhere}[hidden]{display:none!important}-.skip-link{position:fixed;left:228px;top:-80px;background:var(--bg);z-index:1000;padding:12px 20px}.skip-link:focus{top:8px}-.report-sidebar{position:fixed;inset:0 auto 0 0;width:216px;background:var(--sidebar-bg);color:var(--sidebar-tx);display:flex;flex-direction:column;padding:29px 16px;z-index:110}.report-sidebar a{color:#c7ced5;text-decoration:none;border-radius:6px;padding:10px 12px;margin-bottom:4px;font-size:13px}.report-sidebar a:hover{background:#2a3036;color:#fff}.report-sidebar .sidebar-brand{display:flex;align-items:center;gap:10px;color:white;padding:0 6px 37px;font-weight:650;font-size:16px;letter-spacing:-.5px;white-space:nowrap}.sidebar-brand-text{min-width:0;line-height:1.25}.sidebar-brand small{display:block;font-size:11px;font-weight:500;letter-spacing:0;color:#9da7af;margin-top:3px;overflow:hidden;text-overflow:ellipsis}.sidebar-label{color:#89949e;font-size:11px;letter-spacing:1.5px;margin:0 12px 12px}.report-sidebar .sidebar-current{background:#30392b;color:#c3e498;border-left:2px solid #76b900}.sidebar-footer{margin-top:auto;padding:14px 12px 0;color:#939da6;font-size:11px;line-height:1.8}-.main-header{position:relative;top:auto;background:var(--bg);color:var(--dark-text);padding:15px 0;border-bottom:1px solid var(--border-color);box-shadow:none;z-index:10}.header-content{max-width:1320px;padding:0 40px;flex-wrap:nowrap}.header-title{font-size:15px;font-weight:650;letter-spacing:-.4px}.header-subtitle{font-size:11px;color:var(--text-secondary)}.header-meta{display:flex;flex-direction:row;flex-wrap:wrap;gap:8px;justify-content:flex-end}.header-controls{display:flex;gap:8px}.theme-toggle,.export-btn{color:var(--dark-text);background:var(--bg);border:1px solid var(--border-color);font-size:12px;padding:7px 11px;box-shadow:none}.theme-toggle:hover,.export-btn:hover{background:var(--bg-secondary)}.header-status-badge{font-size:12px;padding:5px 8px;letter-spacing:0;text-transform:none;border:1px solid var(--border-color)}.header-status-badge.pass{color:var(--badge-pass-tx);background:var(--badge-pass-bg)}.header-status-badge.fail{background:var(--badge-fail-bg);color:var(--badge-fail-tx);border-color:#f2d6d6}.header-status-badge.warn{background:var(--badge-warn-bg);color:var(--badge-warn-tx);border-color:#ead9ae}-.container{max-width:1320px;margin:0 auto;padding:30px 40px 64px;min-width:0}.report-breadcrumb{font-size:11px;color:var(--text-secondary);margin-bottom:20px}.agent-hero{background:var(--bg);border:1px solid var(--border-color);border-radius:10px;padding:26px 28px;margin-bottom:16px;box-shadow:none}.agent-hero-eyebrow{font-size:12px;letter-spacing:1.4px;color:var(--text-secondary);text-transform:uppercase}.agent-hero-title{font-size:28px;line-height:1.22;font-weight:650;margin-top:8px;overflow-wrap:anywhere}.agent-hero-top{gap:24px}.agent-hero-subtitle{font-size:12px;overflow-wrap:anywhere;max-width:650px;margin-top:12px}.agent-hero-score{font-size:35px}.agent-hero-score.verdict-text{font-size:23px;font-weight:650;max-width:250px;line-height:1.15}.verdict-caption{font-size:12px;color:var(--text-secondary);text-align:right;margin:7px 0 12px;text-transform:uppercase;letter-spacing:1px}.agent-hero-detail{font-size:11px;line-height:1.8}.score-pass{color:var(--success-color)}.score-fail{color:var(--danger-color)}.score-warn{color:var(--warning-color)}-.tier-cards{display:flex;gap:8px;flex-wrap:wrap;margin-top:24px;padding-top:20px;border-top:1px solid var(--border-color)}.tier-card{flex:1;min-width:180px;border:1px solid var(--border-color);border-radius:6px;padding:12px 14px;background:var(--bg);box-shadow:none;border-left:1px solid var(--border-color);cursor:pointer}.tier-card.active{box-shadow:inset 0 0 0 1px currentColor;background:var(--bg-secondary)}.tier-card.pass{border-color:var(--success-color);color:var(--success-color)}.tier-card.fail{border-color:var(--danger-color);color:var(--danger-color)}.tier-card.warn{border-color:var(--warning-color);color:var(--warning-color)}.tier-card .tier-card-title,.tier-card .tier-card-stats{color:var(--dark-text)}.tier-cards.single-tier .tier-card{cursor:default}.tier-card:hover{transform:none;box-shadow:none}.tier-card-label{font-size:12px;color:var(--text-secondary)}.tier-card-title{font-size:12px;font-weight:600;color:var(--dark-text);margin:6px 0}.tier-card-stats{font-size:12px;line-height:1.6}.tier-card-verdict{font-size:11px}.tier-card-sev-pill{font-size:11px}.scope-strip{display:flex;flex-wrap:wrap;gap:8px 20px;font-size:11px;color:var(--text-secondary);padding:0 2px 16px}.scope-strip span+span{border-left:1px solid var(--border-color);padding-left:18px}-.run-metadata{border-top:1px solid var(--border-color);border-bottom:1px solid var(--border-color);padding:12px 2px;margin-bottom:28px;font-size:12px;scroll-margin-top:20px}.run-metadata summary{cursor:pointer;font-weight:600}.metadata-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 28px;margin-top:20px;padding-bottom:8px}.metadata-grid p,.metadata-grid .header-meta-item{font-size:11px;opacity:1;color:var(--text-secondary);text-align:left}.metadata-grid strong{display:block;color:var(--dark-text);font-size:12px;margin-bottom:5px}.metadata-grid code{font-size:12px;word-break:break-all}.header-target-link{color:var(--secondary-color)}.workspace-heading{margin:0 0 20px;scroll-margin-top:20px}.workspace-heading h2{font-size:19px;font-weight:650;margin-bottom:5px}.workspace-heading p{color:var(--text-secondary);font-size:12px}-.dashboard{display:flex;flex-wrap:wrap;gap:0;margin:18px 0 24px;border:1px solid var(--border-color);background:var(--bg);border-radius:8px;padding:14px 0}.dashboard-card{flex:1;min-width:130px;border:0;border-right:1px solid var(--border-color);border-radius:0;padding:0 18px;box-shadow:none;background:transparent}.dashboard-card:last-child{border-right:0}.dashboard-card:hover{box-shadow:none}.dashboard-card-title{font-size:11px;letter-spacing:.8px}.dashboard-card-value{font-size:21px}.dashboard-card-subtitle{font-size:12px}.dashboard .progress-bar{display:none}.severity-breakdown-label{font-size:11px}-.top-issues-section{border:1px solid #ead6d5;border-radius:8px;box-shadow:none;margin:0 0 18px;background:var(--bg);overflow:hidden}.top-issues-header{background:var(--badge-fail-bg);padding:13px 18px;color:var(--badge-fail-tx);border:0}.top-issues-header h3{font-size:13px;color:inherit;font-weight:650}.top-issues-content.active{max-height:none}.top-issues-table{font-size:11px}.top-issues-table th{background:var(--bg);font-size:11px;letter-spacing:.4px;text-transform:uppercase;color:var(--text-secondary);padding:12px 15px}.top-issues-table td{padding:12px 15px;vertical-align:top}.top-issues-table tbody tr{cursor:pointer}.skills-pills{gap:5px}.skill-pill,.quality-pill{font-size:11px}.count-badge,.metadata-tag,.severity-tag{font-size:11px;box-shadow:none}.contributor-section{margin-top:16px;border:1px solid var(--border-color);box-shadow:none}.contributor-header{background:var(--bg-secondary);padding:12px 16px}.contributor-header h3{font-size:12px}.contributor-content.active{max-height:none}-.report-searchbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:15px}.report-searchbar label{font-size:11px;font-weight:600}.report-searchbar input{min-width:190px;flex:1;padding:10px 12px;border:1px solid var(--border-color);border-radius:6px;background:var(--bg);color:var(--dark-text);font-size:12px}.report-searchbar #report-search-count{font-size:12px;color:var(--text-secondary)}.report-no-matches{padding:24px;border:1px dashed var(--border-color);border-radius:8px;margin-bottom:18px;background:var(--bg);color:var(--text-secondary)}.view-toggle-section{background:none;border:0;padding:0;gap:6px}.view-toggle-btn,.filter-btn,.bulk-action-btn,.severity-filter-btn{font-size:11px;padding:7px 11px;min-height:32px;border-radius:5px;background:var(--bg);color:var(--dark-text);border:1px solid var(--border-color);box-shadow:none}.view-toggle-btn.active,.filter-btn.active,.filter-btn.success.active,.filter-btn.danger.active,.severity-filter-btn.active{background:var(--badge-pass-bg);border-color:var(--success-color);color:var(--badge-pass-tx)}.severity-filter-group{margin-left:auto}.skills-summary-bar{background:transparent;border:0;padding:10px 0;margin-bottom:12px;font-size:11px}.section-header{font-size:14px;letter-spacing:-.1px}.skill-card,.validator-card{border:1px solid var(--border-color);box-shadow:none;margin-bottom:10px;border-radius:8px;background:var(--bg)}.skill-header{padding:15px 18px;background:var(--bg);gap:14px}.skill-name{font-size:13px;overflow-wrap:anywhere;min-width:0;font-weight:600}.skill-checks-summary{font-size:12px;flex-wrap:wrap;gap:7px}.skill-checks-summary .status-badge{font-size:12px}.status-badge{font-size:12px;border-radius:4px;padding:3px 7px;text-transform:none}.skill-content.active{max-height:none;padding:18px;border-top:1px solid var(--border-color)}.validator-collapsible{padding:14px 18px;background:var(--bg);font-size:12px;gap:12px;text-align:left}.validator-content.active{max-height:none;padding:18px}.validator-name{font-size:13px}.check-finding{box-shadow:none;border-radius:5px}.quality-score-block{background:var(--bg-secondary)!important}.quality-score-block strong{font-size:14px!important}.finding-message{font-size:12px}.finding-suggestion{font-size:11px}.finding-suggestion.truncatable{max-height:none;overflow:visible;cursor:auto}.summary-table-wrapper,.top-issues-content,.contributor-content{overflow-x:auto}.skill-card,.validator-card{scroll-margin-top:20px}footer{margin-left:0;padding:20px 40px;border-top:1px solid var(--border-color);font-size:12px;background:var(--bg);text-align:center}#backToTop{background:var(--brand-deep);color:#fff;border-radius:6px;box-shadow:none}-@media screen{[data-theme="dark"]{--light-bg:#151a1f;--bg:#1e252c;--bg-secondary:#252d35;--bg-tertiary:#303b46;--dark-text:#e1e6eb;--text-secondary:#aab5bf;--border-color:#3b454f;--secondary-color:#b0d684;--accent-color:#b0d684;--success-color:#a2cf72;--danger-color:#ffadb1;--warning-color:#e7c778;--critical-color:#ffadb1;--high-color:#f7b27a;--medium-color:#e7c778;--low-color:#aab5bf;--info-color:#8ccff0;--on-accent:#151a1f;--on-success:#151a1f;--on-danger:#151a1f;--on-warning:#151a1f;--focus-ring:#b0d684;--chart-grid:#4b5661;--chart-tick:#aab5bf;--chart-label:#e1e6eb;--table-header-bg:#252d35;--table-row-hover:#303b46;--badge-pass-bg:#293e27;--badge-pass-tx:#c4e7a0;--badge-fail-bg:#412a2d;--badge-fail-tx:#ffc1c4;--badge-warn-bg:#403826;--badge-warn-tx:#f4d792;--sev-critical-bg:#412a2d;--sev-critical-tx:#ffc1c4;--sev-high-bg:#45301f;--sev-high-tx:#ffcd9e;--sev-medium-bg:#403826;--sev-medium-tx:#f4d792;--sev-low-bg:#303b46;--sev-low-tx:#d0d7de;--sev-info-bg:#1d3646;--sev-info-tx:#a9d8f5;--llm-tx:#c4b5fd;--sidebar-bg:#151a1f;--se-logo-panel:#152117;--se-logo-panel-edge:#304631;--se-logo-ring-outer:#39523a;--se-logo-ring-middle:#6f9264;--se-logo-ring-inner:#dbe8d6;--se-logo-core:#76b900;--se-logo-core-edge:#9bdb34}[data-theme="dark"] .filter-btn.active,[data-theme="dark"] .severity-filter-btn.active,[data-theme="dark"] .view-toggle-btn.active{background:#344a2e;color:#d4e9c2}}-@media(min-width:1600px){.container{padding-top:40px}}@media(max-width:1150px){body{padding-left:180px}.report-sidebar{width:180px}.report-sidebar .sidebar-brand{font-size:13px;gap:7px}.container{padding:25px}.header-content{padding:0 25px}.header-content{flex-wrap:wrap}.header-status-badge{display:inline-flex;white-space:normal}.dashboard-card{min-width:110px;padding:0 12px}.agent-hero-title{font-size:25px}.top-issues-table th,.top-issues-table td{padding:10px}.severity-filter-group{margin-left:0}}-@media(max-width:760px){body{padding-left:0}.report-sidebar{position:relative;width:100%;padding:13px 18px;flex-direction:row;align-items:center;gap:6px;flex-wrap:wrap}.report-sidebar .sidebar-brand{padding:0;margin-right:auto;font-size:14px}.sidebar-brand small,.sidebar-label,.sidebar-footer{display:none}.report-sidebar>a:not(.sidebar-brand){margin:0;padding:8px 10px;white-space:nowrap}.report-sidebar{overflow-x:auto;flex-wrap:nowrap}.main-header{padding:10px 0}.header-content{padding:0 18px;gap:8px}.header-brand .header-subtitle{display:none}.header-meta{width:100%;justify-content:space-between}.header-controls{width:100%;justify-content:flex-end}.header-controls button{min-height:36px}.container{padding:20px 16px 40px}.agent-hero{padding:20px}.agent-hero-top{display:block}.agent-hero-title{font-size:25px}.agent-hero-score.verdict-text,.agent-hero-score,.agent-hero-detail,.verdict-caption{text-align:left}.agent-hero-score.verdict-text{margin-top:22px;font-size:22px}.agent-hero-detail{margin-top:8px}.verdict-caption{margin-bottom:5px}.tier-cards{display:block}.tier-card{margin-top:8px;min-width:0}.tier-card-stats{display:flex;flex-wrap:wrap;gap:8px}.scope-strip{gap:6px 12px;font-size:12px}.scope-strip span+span{padding-left:0;border:0}.scope-strip span:first-child{width:100%}.metadata-grid{grid-template-columns:1fr}.dashboard{gap:16px 0}.dashboard-card{min-width:45%;padding-left:14px}.dashboard-card:nth-child(2n){border-right:0}.dashboard-card-value{font-size:20px}.report-searchbar input{width:100%;flex-basis:100%;order:2}.report-searchbar label{flex:1}.report-searchbar #report-search-count{order:3}.filter-group{gap:6px}.filter-group .severity-filter-group{width:100%;padding-top:8px}.skill-header{display:block;padding:14px}.skill-name{font-size:12px;word-break:break-word}.skill-checks-summary{margin-top:12px}.skill-content.active{padding:12px}.top-issues-table{min-width:620px}.quality-score-block>div:first-child{flex-wrap:wrap;gap:8px}.validator-collapsible{flex-wrap:wrap}.workspace-heading h2{font-size:18px}.workspace-heading p{font-size:11px}.skip-link{left:10px}footer{padding:18px;font-size:11px}}-@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition:none!important;animation:none!important}}---@media print{body{padding-left:0;background:#fff;color:#111}.skip-link,.report-sidebar,.header-controls,.report-searchbar,.filter-group,.view-toggle-section,#backToTop,.report-no-matches{display:none!important}.container{max-width:none;padding:0}.tab-content,.results-view,.skill-card,.validator-card,.skill-content,.validator-content,.top-issues-content,.contributor-content,.summary-table-container{display:block!important;max-height:none!important;height:auto!important;overflow:visible!important}.skill-card,.validator-card,.top-issues-section{break-inside:auto}.skill-content,.validator-content{padding:12px!important}.scope-strip,.run-metadata{font-size:12px}.agent-hero{padding:15px}.run-metadata>.metadata-grid{display:grid!important}.finding-suggestion{max-height:none!important}footer{padding:12px}.dashboard-card{min-width:100px}.top-issues-table{min-width:0}.report-breadcrumb{margin-bottom:8px}a{color:inherit}}--.quality-outcome-note{font-size:11px;color:var(--text-secondary);margin-bottom:12px}.export-btn{text-decoration:none}--.incomplete-notice,.scan-diagnostic{font-size:12px;line-height:1.6;margin:0 0 10px;padding:10px 12px;background:var(--badge-warn-bg);color:var(--badge-warn-tx);border-radius:5px;overflow-wrap:anywhere}-.agent-hero-title-block,.agent-hero-top>div,.skill-checks-summary,.check-result,.check-header>div,.report-searchbar>*{min-width:0}.quality-score-block{max-width:100%;overflow-x:auto}.check-header{flex-wrap:wrap;gap:8px}.check-details{min-width:0}.check-name,.check-description,.finding-msg,.finding-meta{overflow-wrap:anywhere}-@media(max-width:400px){.view-toggle-section{flex-wrap:wrap}.bulk-action-btn,.filter-btn{padding:7px 9px}.severity-filter-group{gap:4px}.severity-filter-btn{padding:6px}.quality-score-block{padding:12px!important}.skill-checks-grid{grid-template-columns:minmax(0,1fr)!important}.agent-hero{padding:16px}}--.advisory-findings{border-color:var(--border-color)}.advisory-findings .top-issues-header{background:var(--bg-secondary);color:var(--dark-text)}--.findings-overflow-note{padding:12px 16px;font-size:11px;color:var(--text-secondary);border-top:1px solid var(--border-color)}-details.check-result>summary{cursor:pointer;list-style:none;margin-bottom:0}details.check-result>summary::-webkit-details-marker{display:none}details.check-result>summary::before{content:'›';font-size:18px;color:var(--text-secondary);margin-right:4px}details.check-result[open]>summary::before{content:'⌄'}details.check-result .check-details{padding-top:12px}details.check-result:not([open]){padding-bottom:14px}-@media print{details.check-result>div{display:block!important;content-visibility:visible!important}}--.check-label{min-width:0;flex:1}-@media print{details::details-content{content-visibility:visible!important;height:auto!important}}--.gate-policy{display:flex;flex-wrap:wrap;gap:8px 18px;font-size:11px;color:var(--text-secondary);padding:0 2px 18px}.gate-policy strong{color:var(--dark-text);font-weight:600}---/* Severity tags: one token pair per level. The [data-theme] selectors outrank the base template's hard-coded dark colors. */-.severity-critical,[data-theme="dark"] .severity-critical{background:var(--sev-critical-bg);color:var(--sev-critical-tx)}.severity-high,[data-theme="dark"] .severity-high{background:var(--sev-high-bg);color:var(--sev-high-tx)}.severity-medium,[data-theme="dark"] .severity-medium{background:var(--sev-medium-bg);color:var(--sev-medium-tx)}.severity-low,[data-theme="dark"] .severity-low{background:var(--sev-low-bg);color:var(--sev-low-tx)}.severity-info,[data-theme="dark"] .severity-info{background:var(--sev-info-bg);color:var(--sev-info-tx)}-.severity-tag,.status-badge,.metadata-tag,.count-badge,.skill-pill,.quality-pill,.tier-card-verdict,.tier-card-sev-pill{white-space:nowrap}-/* Confidence badges: the type floor, and the palette's AA pairs in both themes. */-.confidence-badge{font-size:11px}.confidence-badge.high-conf,[data-theme="dark"] .confidence-badge.high-conf{background:var(--badge-fail-bg);color:var(--badge-fail-tx)}.confidence-badge.medium-conf,[data-theme="dark"] .confidence-badge.medium-conf{background:var(--badge-warn-bg);color:var(--badge-warn-tx)}.confidence-badge.low-conf,[data-theme="dark"] .confidence-badge.low-conf{background:var(--sev-low-bg);color:var(--sev-low-tx);border-color:var(--border-color)}-.count-badge.medium-count{background:var(--warning-color);color:var(--on-warning)}.count-badge.low-count{background:var(--low-color);color:var(--on-accent)}--/* Header, hero, executive summary and Fix first. */-.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}-.se-logo{flex:none;display:block}-/* The sidebar is dark in both themes, so its logo always uses the dark panel colors. */-.report-sidebar .se-logo{--se-logo-panel:#152117;--se-logo-panel-edge:#304631;--se-logo-ring-outer:#39523a;--se-logo-ring-middle:#6f9264;--se-logo-ring-inner:#dbe8d6;--se-logo-core-edge:#9bdb34}-/* One logo per view: the sidebar on wide screens, the header on narrow screens and in print. */-.header-brand{display:flex;align-items:center;gap:10px;min-width:0}.header-brand .se-logo,.header-brand .header-title{display:none}.header-brand .header-title{margin:0;font-size:15px;font-weight:650;line-height:1.2;letter-spacing:-.3px}.header-brand .header-subtitle{margin:0;font-size:12px;color:var(--text-secondary);opacity:1}-.header-content{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 auto}.header-meta{align-items:center}.theme-toggle[aria-pressed="true"]{background:var(--bg-tertiary);border-color:var(--text-secondary)}-.verdict-badge{display:inline-flex;align-items:center;gap:7px;font-size:13px!important;font-weight:650;padding:6px 11px!important;border-radius:999px;white-space:nowrap}.verdict-dot{width:8px;height:8px;border-radius:50%;background:currentColor}-.verdict-chip{display:inline-block;font-size:15px;font-weight:700;padding:5px 12px;border-radius:999px;border:1px solid currentColor;white-space:nowrap}.verdict-chip.pass{background:var(--badge-pass-bg);color:var(--badge-pass-tx)}.verdict-chip.fail{background:var(--badge-fail-bg);color:var(--badge-fail-tx)}.verdict-chip.warn{background:var(--badge-warn-bg);color:var(--badge-warn-tx)}-.verdict-badge,.verdict-chip,.tier-card-verdict,.severity-tag,.status-badge,.sev-dot{print-color-adjust:exact;-webkit-print-color-adjust:exact}-.report-breadcrumb a{color:var(--text-secondary)}.agent-hero-title{color:var(--dark-text)!important}.hero-skills{margin:10px 0 0;font-size:12px;color:var(--text-secondary)}-.agent-hero-top{display:flex;justify-content:space-between;align-items:flex-start;gap:24px}.hero-side{display:flex;flex-direction:column;align-items:flex-end;gap:8px;text-align:right;max-width:380px;min-width:0}.hero-side .agent-hero-score,.hero-side .agent-hero-detail{text-align:right}-.hero-score-label{display:block;font-size:12px;font-weight:500;color:var(--text-secondary);margin-top:4px}.hero-reason{margin:0;font-size:12px;color:var(--text-secondary);max-width:340px}-.publication-line{margin:0;font-size:12px;color:var(--text-secondary);display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:4px 8px}.publication-label{font-weight:600;color:var(--dark-text)}.publication-reasons{flex-basis:100%;line-height:1.5}-.tier-card-title{margin:6px 0}/* One Tier 1 card is a scope line: the executive summary carries its verdict and numbers. */.tier-line{margin-top:16px;padding-top:14px}.tier-line .tier-card,.tier-line .tier-card.active{display:flex;flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:4px 14px;border:0;box-shadow:none;background:none;padding:0;min-width:0;color:var(--text-secondary);opacity:1}.tier-line .tier-card::before{display:none}.tier-line .tier-card:hover{transform:none;box-shadow:none}.tier-line .tier-card-head,.tier-line .tier-card-stats{display:contents}.tier-line .tier-card-title{margin:0;font-size:13px}.tier-card-verdict{font-size:12px!important;font-weight:700;padding:2px 8px;border-radius:999px}-.exec-summary{border:1px solid var(--border-color);border-left:4px solid var(--border-color);border-radius:10px;background:var(--bg);padding:20px 22px;margin:0 0 24px}.exec-summary.fail{border-left-color:var(--danger-color)}.exec-summary.pass{border-left-color:var(--success-color)}.exec-summary.warn{border-left-color:var(--warning-color)}-.exec-verdict{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px}.exec-title{margin:0;font-size:inherit;line-height:1}.exec-reason{margin:0;font-size:14px;color:var(--dark-text);flex:1 1 320px}-.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin:18px 0 8px}.kpi{border:1px solid var(--border-color);border-radius:8px;padding:12px 14px;background:var(--bg-secondary);min-width:0}.kpi dt{font-size:12px;font-weight:600;color:var(--text-secondary)}.kpi dd{margin:4px 0 0;font-size:13px;color:var(--dark-text)}.kpi .kpi-value strong{font-size:24px;font-weight:650;letter-spacing:-.5px;font-variant-numeric:tabular-nums}.kpi .kpi-sub{font-size:12px;color:var(--text-secondary);margin-top:6px}-.sev-item{display:inline-block;white-space:nowrap;margin-right:6px}.sev-dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:4px}.sev-dot.critical{background:var(--critical-color)}.sev-dot.high{background:var(--high-color)}.sev-dot.medium{background:var(--medium-color)}.sev-dot.low{background:var(--low-color)}-.kpi-legend{font-size:12px;color:var(--text-secondary);margin:4px 0 0}-.fix-first{margin-top:16px;border-top:1px solid var(--border-color);padding-top:14px}.fix-first h3{font-size:14px;margin:0 0 8px}.fix-first ol{margin:0;padding-left:22px}.fix-first li{padding:6px 0;font-size:13px;line-height:1.5}.fix-first .severity-tag{margin-right:6px;font-size:11px}-.fix-link{font-weight:600;color:var(--dark-text);text-decoration:underline;text-decoration-color:var(--text-secondary);text-underline-offset:3px;overflow-wrap:anywhere}.fix-link:hover{text-decoration-color:currentColor}.fix-meta{display:block;font-size:12px;color:var(--text-secondary)}.fix-meta code{font-size:12px}.fix-more{font-size:12px;color:var(--text-secondary);margin:8px 0 0}-.severity-incomplete,[data-theme="dark"] .severity-incomplete{background:var(--badge-warn-bg);color:var(--badge-warn-tx)}-.check-id{font-size:11px;color:var(--text-secondary);background:var(--bg-tertiary);padding:1px 5px;border-radius:4px;font-weight:500}.validator-link{color:inherit;font-weight:600}-.check-finding:target,.check-result:target,.finding-flash{outline:3px solid var(--focus-ring);outline-offset:2px}/* Land below the sticky filter bar. */.check-finding,.check-result{scroll-margin-top:14rem}-.quality-pill{min-width:24px;min-height:24px;display:inline-flex;align-items:center;justify-content:center;padding:0 6px}-.raw-output{margin:0 0 10px;font-size:12px}.raw-output>summary{cursor:pointer;color:var(--text-secondary);font-weight:600;padding:4px 0}.raw-output .scan-diagnostic{margin-top:6px}-@media(max-width:1150px){.report-sidebar .sidebar-brand{gap:8px}}-@media(max-width:760px){.report-sidebar .sidebar-brand{display:none}.header-brand .se-logo,.header-brand .header-title{display:block}.sidebar-index-link{order:-1}.header-content{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between}.header-meta{display:contents}.header-status-badge{margin-left:auto}.header-controls{width:100%;justify-content:flex-end}.agent-hero-top{display:block}.hero-side{align-items:flex-start;text-align:left;max-width:none;margin-top:16px}.hero-side .agent-hero-score,.hero-side .agent-hero-detail{text-align:left}.publication-line{justify-content:flex-start}.kpis{grid-template-columns:1fr 1fr}.exec-summary{padding:16px}.top-issues-table{min-width:0}}-@media(max-width:420px){.export-btn span:first-child{display:none}.theme-toggle #theme-icon{display:none}.kpis{grid-template-columns:1fr}}-@media print{.main-header{display:block!important;position:static;border-bottom:1px solid #ccc;padding:6px 0;background:#fff}.header-content{padding:0;flex-direction:row!important;justify-content:space-between!important;align-items:center!important;flex-wrap:wrap;text-align:left!important}.header-brand .se-logo,.header-brand .header-title,.header-brand .header-subtitle{display:block}.header-status-badge{display:inline-flex!important}.header-meta{justify-content:flex-start}.kpi,.fix-first li{break-inside:avoid}.kpi{background:#fff}.fix-link{color:#111}.tier-card{color:inherit}-/* One results view prints. The check table stays for its files scanned and checks performed counts. */-#results-by-validator>.filter-group,#results-by-validator>.section-header,#results-by-validator>.validator-card,#results-by-validator .toggle-icon{display:none!important}.raw-output:not([open]) .scan-diagnostic{display:none}}--/* Tier 3 pills: the type floor and AA text in both themes. The Tier 3 tab has its own later style block, hence the .tab-content prefix. */-.tab-content .t3-insight-source,.tab-content .t3-sug-cat{font-size:11px}.tab-content .insight-source-llm{color:var(--llm-tx)}--/* Native page scrolling and complete expanded evidence. */-:root{color-scheme:light;scrollbar-gutter:stable;--mobile-nav-height:0px;--tier3-nav-height:0px}-[data-theme="dark"]{color-scheme:dark}-html{scroll-behavior:auto}-.table-container.active,.summary-table-container.active{max-height:none;overflow-y:visible}-.skill-content.active,.validator-content.active,.top-issues-content.active,.contributor-content.active{overflow-y:visible}-.raw-output{max-height:320px;overflow:auto;scrollbar-gutter:stable}-.tab-content,.workspace-heading,.run-metadata,.t3-agent-anchor,.check-result,.check-finding{scroll-margin-top:calc(var(--mobile-nav-height) + 80px)}-.tab-content:focus,.container:focus{outline:none}-.theme-control{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--text-secondary)}-.theme-control select{font:inherit;color:var(--dark-text);background:var(--bg);border:1px solid var(--border-color);border-radius:5px;padding:7px;min-height:36px}-select:focus-visible{outline:3px solid var(--focus-ring);outline-offset:3px}-.tier-empty{padding:24px;border:1px solid var(--border-color);border-radius:8px;background:var(--bg)}-.tier-empty h2{font-size:18px}.tier-empty p{color:var(--text-secondary);margin-top:10px}-.mobile-tier-nav{display:none}-.agent-hero{padding:20px 24px}.agent-hero-detail{max-width:460px}-.t3-subtabs{top:var(--mobile-nav-height)!important;scrollbar-gutter:stable}-.t3-subtab,.t3-agent-tab-btn{min-height:40px}-.t3-agent-anchor{scroll-margin-top:calc(var(--mobile-nav-height) + 80px)}-@media(max-width:760px){- .report-sidebar{position:relative;overflow:visible;flex-wrap:wrap;gap:6px}- .report-sidebar [data-report-tier]{display:none}- .report-sidebar .sidebar-brand{flex:1}- .mobile-tier-nav{display:flex;position:sticky;top:0;z-index:100;gap:6px;padding:8px;background:var(--sidebar-bg);border-radius:6px;box-shadow:0 2px 4px #0001;margin-bottom:16px}- .mobile-tier-nav a{flex:1;padding:7px 10px;border-radius:4px;font-size:12px;text-align:center;color:#dce3e8;text-decoration:none;white-space:nowrap}- .mobile-tier-nav a[aria-current]{color:#c3e498;background:#30392b;box-shadow:inset 0 -2px #76b900}- .tier-cards{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px;padding-top:16px}- .tier-card{flex:1 1 150px;margin:0;padding:10px;min-width:0}- .tier-card-title,.tier-card-stats{font-size:11px}.agent-hero{padding:16px}- .report-sidebar>a:not(.sidebar-brand){padding:6px;font-size:12px}- .t3-subtabs{border-radius:0;max-width:100%;z-index:90}- .t3-subtab{padding:10px;font-size:12px}+/* Narrow behavior/accessibility additions to the native report presentation. */+:root { --focus-ring:#76b900; --mobile-nav-height:0px; --tier3-nav-height:0px; }+[hidden] { display:none!important; }+button,input,select { font:inherit; }+button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,[tabindex]:focus-visible { outline:3px solid var(--focus-ring); outline-offset:3px; }+.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }+.skip-link { position:fixed;left:1rem;top:-5rem;z-index:1000;padding:0.75rem 1rem;background:var(--bg);color:var(--dark-text); }+.skip-link:focus { top:0.5rem; }+.theme-control { display:flex;align-items:center;gap:.4rem;font-size:.8rem; }+.theme-control select { background:var(--bg);color:var(--dark-text);border:1px solid var(--border-color);border-radius:6px;padding:.35rem; }+.nav-tabs a { text-decoration:none; }+.nav-tabs [aria-current=location] { background:var(--secondary-color);color:white;border-color:var(--secondary-color); }+.workspace-heading { margin:1.5rem 0; }+.workspace-heading h2 { font-size:1.15rem; }+.workspace-heading p,.report-breadcrumb,.hero-decision-reason,.hero-skills,.hero-score-label,.publication-reasons { font-size:.85rem;color:var(--text-secondary); }+.hero-score-label { display:block; }+.hero-side { text-align:right; }+.hero-command-status,.publication-line { margin-top:.75rem; }+.publication-label { font-size:.8rem; }+.verdict-chip { display:inline-block;padding:.2rem .65rem;border-radius:999px;font-size:.85rem;font-weight:700; }+.verdict-chip.pass { background:var(--badge-pass-bg);color:var(--badge-pass-tx); }+.verdict-chip.fail { background:var(--badge-fail-bg);color:var(--badge-fail-tx); }+.verdict-chip.warn { background:var(--badge-warn-bg);color:var(--badge-warn-tx); }+.verdict-caption { color:var(--text-secondary); }+.score-pass { color:var(--success-color); }.score-warn { color:var(--warning-color); }.score-fail { color:var(--danger-color); }+.tier-card.skipped { border-left-color:var(--text-secondary); }+.tier-card.active { outline:2px solid var(--secondary-color);outline-offset:2px; }+.tier-empty { padding:1rem;border:1px solid var(--border-color);border-radius:8px;background:var(--bg); }+.exec-summary { padding:1rem; }+.exec-title { font-size:1rem; }+.exec-verdict,.exec-reason { margin-bottom:.8rem; }+.kpis { display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:1rem;margin:1rem 0; }+.kpi dt,.kpi-sub,.kpi-legend,.fix-meta,.fix-more { color:var(--text-secondary);font-size:.8rem; }+.kpi-value { font-size:1.25rem; }+.fix-first { margin-top:1rem; }.fix-first ol { padding-left:1.5rem; }.fix-first li { margin:.75rem 0; }.fix-meta { display:block; }+.fix-link,.validator-link { color:var(--secondary-color); }+.check-id { font-size:.72rem;color:var(--text-secondary);margin-left:.35rem; }+.report-searchbar { display:flex;flex-wrap:wrap;align-items:center;gap:.75rem;margin:1rem 0; }+.report-searchbar input { flex:1;min-width:180px;padding:.6rem .8rem;border:1px solid var(--border-color);border-radius:8px;background:var(--bg);color:var(--dark-text); }+.report-searchbar label,#report-search-count { font-size:.85rem; }+.report-no-matches { padding:1rem;border:1px dashed var(--border-color);border-radius:8px; }+.raw-output { margin-top:.75rem; }.raw-output summary { cursor:pointer;font-size:.85rem; }.raw-output pre { max-height:30rem;overflow:auto; }+.scan-diagnostic { margin:.75rem 0;white-space:pre-wrap; }+.quality-outcome-note,.findings-overflow-note { margin:.75rem;font-size:.85rem;color:var(--text-secondary); }+.run-metadata { margin-top:2rem;padding:1rem;background:var(--bg);border:1px solid var(--border-color);border-radius:8px; }+.run-metadata summary { cursor:pointer;font-weight:600; }.metadata-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin-top:1rem; }+.metadata-grid .header-meta-item { color:var(--text-secondary);opacity:1; }+.tier2-scope-nav { display:flex;gap:1rem;margin:1rem 0; }+.chart-description,.chart-fallback { font-size:.8rem;color:var(--text-secondary);margin:.5rem 0; }+.t3-ds-diagnostics,.t3-reasoning-list { padding-left:1.25rem; }.t3-ds-diagnostics li { margin:.6rem 0; }+.t3-ev-refs,.t3-ev-detail { grid-column:1/-1;overflow-wrap:anywhere;font-size:.8rem; }+.t3-execution-errors pre { white-space:pre-wrap;overflow-wrap:anywhere; }+pre { max-width:100%;overflow:auto; } code,td,th,p { overflow-wrap:anywhere; }+.container,.agent-hero-title-block,.hero-side,.tab-content,.t3-page { min-width:0; }+.t3-filter-input { min-width:0; }+.table-scroll,.table-container,.summary-table-container,.top-issues-content,.contributor-content { max-width:100%;overflow-x:auto; }+.t3-agent-anchor,[id^=tier3-dataset-case],.tab-content { scroll-margin-top:8rem; }+@media(max-width:720px) {+ .header-content,.container { padding-left:1rem;padding-right:1rem; }.header-meta,.hero-side { text-align:left;align-items:flex-start; }+ .agent-hero-top { flex-direction:column; }.agent-hero-title { overflow-wrap:anywhere; }.tier-card { min-width:0; }.tier-cards { grid-template-columns:1fr; }+ .chart-grid { grid-template-columns:minmax(0,1fr); }.metadata-grid { grid-template-columns:1fr; }+ .t3-subtabs,.t3-agent-tabs { flex-wrap:wrap; }.t3-subtab,.t3-agent-tab-btn { white-space:normal; }+ .t3-prov-grid { grid-template-columns:minmax(0,1fr)!important; }.t3-filter-input { width:100%; }}-@media(forced-colors:active){- .tier-card.active,.mobile-tier-nav a[aria-current],.report-sidebar .sidebar-current,[role="tab"][aria-selected="true"]{outline:2px solid Highlight;outline-offset:-2px}- .theme-control select{border:1px solid ButtonText}+@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; }* { transition:none!important;animation:none!important; } }+/* beforeprint can run before print media applies; charts need visible parents now. */+:root[data-report-printing] .tab-content,:root[data-report-printing] .t3-page,:root[data-report-printing] .t3-agent-panel { display:block!important; }+@media print {+ :root,[data-theme=dark] { --light-bg:#fff;--bg:#fff;--bg-secondary:#f1f5f9;--bg-tertiary:#e2e8f0;--dark-text:#1e293b;--text-secondary:#64748b;--border-color:#e2e8f0;--primary-color:#0f4c2a;--secondary-color:#76b900;--success-color:#166534;--danger-color:#991b1b;--warning-color:#92400e;--badge-pass-bg:#dcfce7;--badge-pass-tx:#166534;--badge-warn-bg:#fef9c3;--badge-warn-tx:#854d0e;--badge-fail-bg:#fee2e2;--badge-fail-tx:#991b1b; }+ body { background:#fff;color:#1e293b; }.main-header { display:block;position:static; }.container { max-width:none;padding:1rem; }+ .nav-tabs,.header-controls,.report-searchbar,.skip-link,.filter-group,.view-toggle-section,#backToTop,.t3-subtabs,.t3-agent-tabs,.t3-copy-btn { display:none!important; }+ .dedup-subtab,.tab-content,.t3-page,.t3-agent-panel,.results-view,.skill-content,.validator-content,.top-issues-content,.contributor-content { display:block!important;max-height:none!important;overflow:visible!important; }+ .table-scroll,.table-container,.summary-table-container { overflow:visible!important; }.results-view:not(#results-by-skill),.raw-output { display:none!important; }+ .skill-card,.validator-card,.check-finding,.summary-table tr,.t3-trial-card { display:revert!important; }+ #t3-dataset-list > .t3-ds-card { display:revert!important; }+ .chart-grid { display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem; }+ .chart-card { break-inside:avoid;min-width:0;padding:1rem; }+ .chart-card canvas { max-width:100%;max-height:260px; }+ details { break-inside:auto; }a { color:inherit; } table { font-size:8pt; }}-@media print{- :root,[data-theme="dark"]{color-scheme:light;--mobile-nav-height:0px;--tier3-nav-height:0px}- .mobile-tier-nav,.theme-control{display:none!important}- .tab-content,.t3-page,.t3-agent-panel,.table-container,.summary-table-container{display:block!important;max-height:none!important;overflow:visible!important}- .skill-card,.validator-card,.check-finding,.summary-table tr,.t3-trial-card{display:revert!important}- .t3-filter-bar{display:none!important}- .raw-output{max-height:none;overflow:visible}-}--.hero-decision-reason{font-size:12px;color:var(--text-secondary);margin-top:8px;max-width:420px}-@media screen and (prefers-color-scheme:dark){:root:not([data-theme]){color-scheme:dark;--light-bg:#151a1f;--bg:#1e252c;--bg-secondary:#252d35;--bg-tertiary:#303b46;--dark-text:#e1e6eb;--text-secondary:#aab5bf;--border-color:#3b454f;--secondary-color:#b0d684;--accent-color:#b0d684;--success-color:#a2cf72;--danger-color:#ffadb1;--warning-color:#e7c778;--critical-color:#ffadb1;--high-color:#f7b27a;--medium-color:#e7c778;--low-color:#aab5bf;--info-color:#8ccff0;--on-accent:#151a1f;--on-success:#151a1f;--on-danger:#151a1f;--on-warning:#151a1f;--focus-ring:#b0d684;--chart-grid:#4b5661;--chart-tick:#aab5bf;--chart-label:#e1e6eb;--table-header-bg:#252d35;--table-row-hover:#303b46;--badge-pass-bg:#293e27;--badge-pass-tx:#c4e7a0;--badge-fail-bg:#412a2d;--badge-fail-tx:#ffc1c4;--badge-warn-bg:#403826;--badge-warn-tx:#f4d792;--sev-critical-bg:#412a2d;--sev-critical-tx:#ffc1c4;--sev-high-bg:#45301f;--sev-high-tx:#ffcd9e;--sev-medium-bg:#403826;--sev-medium-tx:#f4d792;--sev-low-bg:#303b46;--sev-low-tx:#d0d7de;--sev-info-bg:#1d3646;--sev-info-tx:#a9d8f5;--llm-tx:#c4b5fd;--sidebar-bg:#151a1f;--se-logo-panel:#152117;--se-logo-panel-edge:#304631;--se-logo-ring-outer:#39523a;--se-logo-ring-middle:#6f9264;--se-logo-ring-inner:#dbe8d6;--se-logo-core:#76b900;--se-logo-core-edge:#9bdb34}}-/* Without JS there is no data-theme, so mirror the hard-coded dark overrides from- report.html.j2 for system dark mode; test_nojs_dark_fallback keeps both in sync. */-@media screen and (prefers-color-scheme:dark){:root:not([data-theme]) .header-status-badge.fail { background: #450a0a; color: #fca5a5; border-color: #991b1b; } :root:not([data-theme]) .header-status-badge.warn { background: #451a03; color: #fcd34d; border-color: #92400e; } :root:not([data-theme]) .status-badge.pass { background: #14532d; color: #86efac; } :root:not([data-theme]) .status-badge.fail { background: #450a0a; color: #fca5a5; } :root:not([data-theme]) .status-badge.warn { background: #451a03; color: #fcd34d; } :root:not([data-theme]) .severity-critical, :root:not([data-theme]) .severity-high { background: #450a0a; color: #fca5a5; } :root:not([data-theme]) .severity-medium { background: #451a03; color: #fcd34d; } :root:not([data-theme]) .severity-low { background: #374151; color: #9ca3af; } :root:not([data-theme]) .severity-info { background: #1e3a8a; color: #93c5fd; } :root:not([data-theme]) .suggestion { background: #14532d; color: #bbf7d0; } :root:not([data-theme]) .check-finding .finding-suggestion { background: #14532d; color: #bbf7d0; } :root:not([data-theme]) .contributor-item-pill.pass { background: #14532d; color: #86efac; } :root:not([data-theme]) .contributor-item-pill.fail { background: #450a0a; color: #fca5a5; } :root:not([data-theme]) .skill-filter-banner { background: #1e3a5f; border-color: #2563eb; color: #93c5fd; } :root:not([data-theme]) .skill-filter-banner .clear-filter:hover { background: rgba(255,255,255,0.1); } :root:not([data-theme]) .confidence-badge.high-conf { background: #450a0a; color: #fca5a5; } :root:not([data-theme]) .confidence-badge.medium-conf { background: #451a03; color: #fcd34d; } :root:not([data-theme]) .confidence-badge.low-conf { background: #374151; color: #9ca3af; border-color: #4b5563; } :root:not([data-theme]) .finding-suggestion.truncatable::after { background: #14532d; } :root:not([data-theme]) .severity-breakdown-item.sev-critical, :root:not([data-theme]) .severity-breakdown-item.sev-high { background: #450a0a; color: #fca5a5; } :root:not([data-theme]) .severity-breakdown-item.sev-medium { background: #451a03; color: #fcd34d; } :root:not([data-theme]) .severity-breakdown-item.sev-low { background: #374151; color: #9ca3af; } :root:not([data-theme]) .severity-breakdown-label.advisory { color: #fcd34d; } :root:not([data-theme]) .dedup-finding-high { border-color: #991b1b; background: #450a0a; } :root:not([data-theme]) .dedup-finding-medium { border-color: #92400e; background: #451a03; }}--@media print{- table{table-layout:fixed;width:100%!important;min-width:0!important}- th,td{white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important}- .skill-pill-group,.skill-pill,.quality-pill{white-space:normal;min-width:0;max-width:100%;flex-wrap:wrap}- .table-scroll,.table-scroll-lg{overflow:visible;min-width:0;max-width:100%}+/* Long recorded agent identities wrap inside their native tab buttons. */+.tab-content .t3-agent-tabs { min-width:0;flex-wrap:wrap; }+.tab-content .t3-agent-tab-btn { min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere; }+.tab-content .t3-agent-tab-btn .t3-tab-dot,.tab-content .t3-agent-tab-btn .t3-tab-score { flex-shrink:0; }++/* The native header can wrap; sticky controls and deep links clear its measured height. */+:root { --report-header-height:0px; }+.tab-content .t3-subtabs,.filter-group { top:var(--report-header-height); }+.tab-content .t3-agent-anchor { scroll-margin-top:calc(var(--report-header-height) + var(--tier3-nav-height) + 20px); }+.tab-content,.skill-card,.validator-card,[id^=tier3-dataset-case],.check-finding { scroll-margin-top:calc(var(--report-header-height) + 20px); }++/* Bound the public eligibility component within the native two-column hero. */+@media(min-width:721px) {+ .agent-hero-title-block { flex:1 1 0; }+ .hero-side { flex:0 1 22rem;max-width:40%;overflow-wrap:anywhere; }}-@media print{- .metric-bar-cell,.metric-value,.t3-attempt-list,.t3-mad-cell,.t3-mad-bar,.t3-delta{min-width:0!important;max-width:100%;flex-wrap:wrap}- .t3-attempt-chip{white-space:normal;overflow-wrap:anywhere}+/* Neutral pills and inactive hovered tabs retain a readable theme foreground. */+.skill-pill,.quality-pill,.nav-tab:hover { color:var(--dark-text); }+/* Bright native action colors need the existing dark palette foreground. */+.nav-tab.active,.nav-tabs [aria-current=location],.view-toggle-btn.active,.filter-btn.active,.severity-filter-btn.active { color:#0c111b; }+/* Light-theme critical/high colors are deep red; their dark-theme variants are bright. */+.severity-filter-btn.active.critical-btn,.severity-filter-btn.active.high-btn { color:#fff; }+[data-theme=dark] .severity-filter-btn.active.critical-btn,[data-theme=dark] .severity-filter-btn.active.high-btn { color:#0c111b; }+/* Status chips and badges keep 4.5:1 for their small text. Tier chips use the badge colors; the rest keep their fill and take a dark or deeper-red text pair. */+:root { --danger-solid:#b91c1c; }+.tier-card.pass .tier-card-verdict { background:var(--badge-pass-bg);color:var(--badge-pass-tx);border:1px solid currentColor; }+.tier-card.fail .tier-card-verdict { background:var(--badge-fail-bg);color:var(--badge-fail-tx);border:1px solid currentColor; }+.tier-card.warn .tier-card-verdict { background:var(--badge-warn-bg);color:var(--badge-warn-tx);border:1px solid currentColor; }+.tier-card.skipped .tier-card-verdict { color:var(--dark-text); }+.count-badge,.t3-incomplete-badge { background:var(--danger-solid);color:#fff; }+.count-badge.medium-count,[data-theme=dark] .count-badge.low-count { color:#0c111b; }+.skill-pill:hover,.quality-pill:hover,.validator-collapsible.active,#backToTop { color:#0c111b; }+#backToTop:hover { color:#fff; }++/* New text links follow the theme; native lime actions need a dark foreground. */+@media screen {+:root { --report-link-color:#245d00; }+[data-theme=dark] { --report-link-color:#a3e635; }+.tab-content a:not([class]) { color:var(--report-link-color);text-decoration:underline;text-underline-offset:2px; }+.tier-card-link,.tier-card-link:hover,.t3-harbor-link,.t3-harbor-link:hover { color:var(--report-link-color); }+/* Detailed tables retain whole words/numbers and use their bounded scroll owner. */+.table-scroll th,.table-scroll td { overflow-wrap:normal;word-break:normal; }+/* Tier 1 has its own scroll owner; long finding/category/skill evidence still wraps. */+.top-issues-table th { overflow-wrap:normal;word-break:normal; }+.top-issues-table .quality-pill,.top-issues-table .count-badge { white-space:nowrap;flex-shrink:0; }}--@media(max-width:420px){.tier-cards .tier-card{flex-basis:100%}}--.tier2-scope-nav{display:flex;flex-wrap:wrap;gap:8px 16px;margin-bottom:16px}--/* Readability rhythm shared by every tier. Tier 3's conditional style block is- emitted later, so scoped selectors retain these spacing rules there too. */-body{line-height:1.6}-.agent-hero{padding:24px 28px;margin-bottom:24px}-.agent-hero-top{gap:28px}-.agent-hero-title{line-height:1.3}-.agent-hero-subtitle,.hero-decision-reason,.hero-reason{font-size:14px;line-height:1.6;margin-top:12px}-.hero-side{gap:12px}-.agent-hero-detail,.publication-line{font-size:12px;line-height:1.6}-.hero-score-label{margin-top:8px;line-height:1.6}-.publication-reasons{line-height:1.6}-.tier-cards{gap:12px;margin-top:24px;padding-top:24px}-.tier-card{padding:16px 18px}-.tier-card-head{flex-wrap:wrap;gap:8px 12px}-.tier-card-title{font-size:14px;line-height:1.6;margin:12px 0 8px}-.tier-card-stats{gap:8px 16px;font-size:12px;line-height:1.6}-.tier-card-links,.tier-card-sev{gap:8px;margin-top:10px}-.scope-strip,.gate-policy{gap:10px 20px;font-size:12px;line-height:1.6;padding-bottom:20px}-.run-metadata{padding:16px 2px;margin-bottom:32px}-.metadata-grid{gap:20px 28px;margin-top:24px}-.metadata-grid p,.metadata-grid .header-meta-item{font-size:12px;line-height:1.6}-.metadata-grid strong{margin-bottom:8px}-.workspace-heading{margin-bottom:24px}-.workspace-heading h2{margin-bottom:8px}-.workspace-heading p{font-size:14px;line-height:1.6}-.exec-summary{padding:24px;margin-bottom:28px}-.exec-verdict{gap:12px 18px}-.exec-reason{line-height:1.6}-.kpis{gap:16px;margin:24px 0 12px}-.kpi{padding:16px 18px}-.kpi dt{line-height:1.6}-.kpi dd{margin-top:10px;line-height:1.6}-.kpi .kpi-sub{margin-top:10px}-.kpi-legend{line-height:1.6;margin-top:8px}-.fix-first{margin-top:24px;padding-top:20px}-.fix-first h3{margin-bottom:12px}-.fix-first li{padding:10px 0;font-size:14px;line-height:1.6}-.fix-meta{margin-top:6px;line-height:1.6}-.dashboard{padding:18px 0;margin:24px 0 28px;row-gap:20px}-.dashboard-card-title{font-size:12px;line-height:1.6}-.dashboard-card-value{margin:8px 0}-.dashboard-card-subtitle{line-height:1.6}-.report-searchbar{gap:12px;margin-bottom:20px}-.report-searchbar label,.skills-summary-bar{font-size:12px}-.view-toggle-section,.filter-group{gap:10px}-.view-toggle-btn,.filter-btn,.bulk-action-btn,.severity-filter-btn{font-size:12px;padding:8px 12px}-.skill-card,.validator-card{margin-bottom:16px}-.skill-header,.validator-collapsible{padding:18px 20px;gap:16px}-.skill-name,.validator-name{font-size:14px;line-height:1.6}-.skill-content.active,.validator-content.active{padding:20px}-.check-header{padding:14px 16px;gap:12px}-.check-name{font-size:14px;line-height:1.6}-.check-description{display:block;font-size:12px;line-height:1.6;margin:6px 0 0}-.check-details{padding:16px}-.check-detail-item{padding:8px 0;font-size:14px;line-height:1.6}-.check-finding{padding:16px;margin:12px 0}-.finding-message,.check-finding .finding-msg{font-size:14px;line-height:1.6}-.finding-meta{gap:8px 16px;margin-top:10px;font-size:12px;line-height:1.6}-.check-finding .finding-suggestion,.finding-suggestion{font-size:12px;line-height:1.6;padding:12px;margin-top:12px}-.quality-outcome-note,.findings-overflow-note{font-size:12px;line-height:1.6}-.summary-table th,.top-issues-table th{padding:14px 18px;font-size:12px;line-height:1.6}-.summary-table td,.top-issues-table td{padding:16px 18px;font-size:14px;line-height:1.6;vertical-align:top}-.raw-output>summary{padding:8px 0;line-height:1.6}-.tab-content .t3-subtabs{gap:8px;padding:8px;margin-bottom:24px;flex-wrap:wrap;overflow:visible}-.tab-content .t3-subtab{padding:10px 16px;font-size:14px;line-height:1.6;white-space:normal}-.tab-content .t3-page{line-height:1.6;min-width:0;overflow-wrap:anywhere}-.tab-content .t3-page p{line-height:1.6}-.tab-content .t3-section{margin-top:28px}-.tab-content .t3-section h3{margin-bottom:16px;line-height:1.6}-.tab-content .t3-section-hint{font-size:14px;line-height:1.6;margin-bottom:16px}-.tab-content .t3-agent-card,.tab-content .t3-finding-card,.tab-content .t3-eval-card,.tab-content .t3-sug-card,.tab-content .t3-harbor-panel,.tab-content .t3-next-steps{padding:20px}-.tab-content .t3-finding-card{margin:16px 0}-.tab-content .t3-overview-lead{padding:20px;line-height:1.6;margin-bottom:20px}-.tab-content .t3-agent-score{margin:10px 0}-.tab-content .t3-checks{margin-top:12px}-.tab-content .t3-checks li{padding:8px 0;font-size:14px;line-height:1.6}-.tab-content .t3-details,.tab-content .t3-collapsed{margin-top:20px}-.tab-content .t3-details>summary,.tab-content details.t3-ds-card>summary{padding:18px 20px;line-height:1.6}-.tab-content .t3-details-body{padding:20px}-.tab-content .t3-agent-tabs{gap:8px;padding:8px;margin-bottom:24px}-.tab-content .t3-agent-tab-btn{padding:10px 16px;gap:10px;white-space:normal;text-align:left;overflow-wrap:anywhere}-.tab-content .t3-agent-tab-btn .t3-tab-dot{flex-shrink:0}-.tab-content .t3-kpi-strip{gap:16px;margin-bottom:24px}-.tab-content .t3-kpi-card{padding:18px 20px;min-width:0}-.tab-content .t3-kpi-card .t3-kpi-label{font-size:12px;line-height:1.6}-.tab-content .t3-kpi-card .t3-kpi-value{margin-top:10px;line-height:1.35}-.tab-content .t3-kpi-card .t3-kpi-sub{font-size:12px;line-height:1.6;margin-top:10px}-.tab-content .t3-dim-strip{gap:12px;padding:16px;margin:20px 0 24px}-.tab-content .t3-dim-pill{padding:12px 14px;gap:8px;min-width:0}-.tab-content .t3-dim-pill .t3-dim-name,.tab-content .t3-dim-pill .t3-dim-lift{font-size:12px;line-height:1.6}-.tab-content .t3-eval-stack,.tab-content .t3-sug-stack{gap:16px}-.tab-content .t3-eval-desc,.tab-content .t3-dim-hint{font-size:12px;line-height:1.6;margin-top:8px}-.tab-content .t3-eval-bars{margin-top:16px;row-gap:12px}-.tab-content .t3-eval-evidence{margin-top:20px}-.tab-content .t3-eval-evidence>summary{padding:8px 0;font-size:12px;line-height:1.6}-.tab-content .t3-eval-evidence ul{gap:10px;margin-top:12px}-.tab-content .t3-eval-evidence li{padding:12px;gap:10px;font-size:12px;line-height:1.6}-.tab-content .t3-reasoning,.tab-content .t3-sug-body,.tab-content .t3-ds-value{font-size:14px;line-height:1.6}-.tab-content .t3-reasoning-list li{margin-bottom:8px}-.tab-content .t3-dataset-list{gap:20px}-.tab-content .t3-ds-field{margin:20px 0}-.tab-content .t3-ds-label{font-size:12px;line-height:1.6;margin-bottom:8px}-.tab-content .t3-ds-behaviors{gap:12px;margin-top:12px}-.tab-content .t3-ds-behaviors li{font-size:14px;line-height:1.6;grid-template-columns:24px minmax(0,1fr)}-.tab-content .t3-prov-grid{grid-template-columns:minmax(140px,.3fr) minmax(0,1fr) auto;gap:12px 20px;padding:8px 0}-.tab-content .t3-prov-grid .t3-prov-value{padding:10px 12px;line-height:1.6}-.tab-content .t3-download-grid{gap:12px}-.tab-content .t3-filter-bar{gap:12px;margin-bottom:20px}-.tab-content .t3-filter-input{min-width:0;padding:10px 14px}-.tab-content .t3-lift-grid{grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr));gap:16px}-.tab-content .t3-lift-row{padding:10px 0;gap:12px}-@media(max-width:760px){- .agent-hero,.exec-summary{padding:20px}- .hero-side{margin-top:24px}- .tier-cards{gap:12px;margin-top:24px;padding-top:20px}- .tier-card{padding:16px}- .tier-card-title{font-size:14px}- .tier-card-stats{font-size:12px}- .skill-header,.validator-collapsible{padding:16px}- .skill-content.active,.validator-content.active{padding:16px}- .tab-content .t3-subtab{padding:10px 12px;font-size:12px}- .tab-content .t3-prov-grid{grid-template-columns:minmax(0,1fr);gap:8px}- .tab-content .t3-prov-grid .t3-prov-label:not(:first-child){margin-top:12px}+.tab-content .t3-link-btn { color:#0c111b; }++/* Each retained baseline warning remains a separate readable notice. */+.t3-overview-lead .tolerated-baseline { display:block; margin-top:.5rem; }++/* Keep the native brand scale and align its version with the product name. */+.header-brand-row { display:flex;align-items:baseline;flex-wrap:wrap;gap:.35rem .65rem; }+.header-version { font-size:.85rem;font-weight:600;line-height:1.3;overflow-wrap:anywhere; }+.tier-card-stats .tier-card-scanner-version { min-width:0;max-width:100%;overflow-wrap:anywhere; }+/* A little more room on desktop, with the header and report edges aligned. */+@media screen {+ .header-content,.container { max-width:1280px; }}-@media(max-width:420px){- .agent-hero,.exec-summary{padding:18px}- .summary-table th,.top-issues-table th,.summary-table td,.top-issues-table td{padding:14px}- .tab-content .t3-agent-card,.tab-content .t3-finding-card,.tab-content .t3-eval-card,.tab-content .t3-sug-card,.tab-content .t3-harbor-panel,.tab-content .t3-next-steps,.tab-content .t3-details-body{padding:16px}- .tab-content .t3-eval-evidence li{grid-template-columns:minmax(0,1fr);gap:8px}- .tab-content .t3-sug-card{grid-template-columns:auto minmax(0,1fr)}- .tab-content .t3-sug-actions{grid-column:2}- .tab-content .t3-lift-row{grid-template-columns:minmax(0,1fr)}- .tab-content .t3-agent-grid,.tab-content .t3-agent-scorecard-list{grid-template-columns:minmax(0,1fr)}+.tier-card-job-label,.t3-harbor-job-label { overflow-wrap:anywhere; }+.t3-harbor-unavailable { color:var(--text-secondary);font-size:.85rem;margin:.75rem 0; }+.t3-primary-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }+.t3-primary-metrics .dashboard-card { padding:1rem; }+.t3-primary-metrics .dashboard-card-value { margin:.25rem 0; }+.t3-primary-metrics .t3-coverage-value { font-size:1.15rem; }+.t3-quality-unavailable { padding:.75rem 1rem;margin:.75rem 0;border-left:3px solid var(--warning-color);background:var(--bg); }+.t3-method { margin:.75rem 0;color:var(--text-secondary);font-size:.85rem; }+.t3-method summary,.publication-reasons summary { cursor:pointer; }+.publication-reasons ul { text-align:left;padding-left:1.25rem; }+.tab-content .t3-scorecards-only { grid-template-columns:minmax(0,1fr); }+.t3-scorecards-only .t3-agent-scorecard-list { grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); }+#tier3-next-steps-preview { margin:1rem 0; }+#tier3-next-steps-preview p { margin:.4rem 0; }+#tier3-next-steps-preview .t3-link-btn { text-decoration:underline; }+#tier3-secondary-outcomes { margin:1rem 0; }+@media(max-width:720px) {+ .main-header { position:static; }+ .main-header .header-controls { gap:.5rem;flex-wrap:wrap; }+ .main-header .theme-control select { font-size:.8rem;max-width:5.5rem;padding:.3rem; }+ .main-header .export-btn { font-size:.75rem;padding:.35rem .5rem; }+ .t3-primary-metrics { grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem; }+ .t3-primary-metrics>.dashboard-card:only-child { grid-column:1/-1; }+ .t3-primary-metrics .dashboard-card { padding:.65rem; }+ .t3-primary-metrics .dashboard-card-value { font-size:1.5rem; }+ .t3-primary-metrics .t3-coverage-value { font-size:1rem; }+ .t3-primary-metrics .dashboard-card-subtitle { font-size:.75rem; }+ .workspace-heading { margin:1rem 0; }}-/* Semantic severity tokens also govern system themes when JavaScript is unavailable. */-@media screen and (prefers-color-scheme:dark){:root:not([data-theme]) .severity-critical{background:var(--sev-critical-bg);color:var(--sev-critical-tx)}:root:not([data-theme]) .severity-high{background:var(--sev-high-bg);color:var(--sev-high-tx)}:root:not([data-theme]) .severity-medium{background:var(--sev-medium-bg);color:var(--sev-medium-tx)}:root:not([data-theme]) .severity-low{background:var(--sev-low-bg);color:var(--sev-low-tx)}:root:not([data-theme]) .severity-info{background:var(--sev-info-bg);color:var(--sev-info-tx)}}--@media print{- .tab-content .t3-subtabs,.tab-content .t3-agent-tabs{display:none!important}- .agent-hero,.exec-summary{padding:16px;margin-bottom:20px}- .summary-table th,.summary-table td,.top-issues-table th,.top-issues-table td{padding:10px 12px}- .tab-content .t3-page{break-inside:auto}+.tier2-scope-summary { display:flex;flex-wrap:wrap;gap:.75rem 1.5rem;margin:.75rem 0; }+.tier2-scope-summary div { display:flex;gap:.4rem; }+.tier2-scope-summary dt { color:var(--text-secondary); }+.tier2-scope-summary dd { font-weight:700; }+.t3-agent-coverage { display:flex;flex-wrap:wrap;gap:.5rem 1.5rem;margin:.75rem 0; }+.t3-agent-coverage div { display:flex;gap:.4rem; }+.t3-agent-coverage dt { color:var(--text-secondary); }+.t3-summary-line,.t3-summary-links { display:flex;flex-wrap:wrap;gap:.4rem 1rem;align-items:baseline; }+.t3-overview-lead p { margin:.5rem 0; }+.tab-content .t3-overview-lead a { color:var(--report-link-color);text-decoration:underline;text-underline-offset:2px; }+.t3-summary-action { margin-top:.6rem; }+.tab-content #tier3-next-steps-preview { margin:.5rem 0 0; }+.t3-summary-links { font-size:.85rem; }+.t3-table-detail summary { cursor:pointer;white-space:nowrap;color:var(--report-link-color); }+.t3-table-detail p { margin:.5rem 0; }+.table-scroll .t3-table-detail p { overflow-wrap:normal;word-break:normal; }+.t3-comparison-caption { text-align:left;font-size:.85rem;color:var(--text-secondary);padding:0 0 .6rem; }+.tier2-skip-notice { background:var(--bg-secondary);border-left:3px solid var(--warning-color);border-radius:6px;padding:.75rem 1rem;margin:.75rem 0; }+.t3-harbor-panel .t3-harbor-jobs { display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:.65rem 1rem;width:100%; }+.t3-harbor-panel .t3-harbor-job { min-width:0; }+.t3-harbor-panel .t3-harbor-job-label { font-size:.85rem; }+.t3-primary-metrics { grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); }+@media(max-width:720px) {+ .tier1-statistics { grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem; }+ .tier1-statistics .dashboard-card { min-width:0;padding:1rem; }+ .t3-primary-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }+ .t3-primary-metrics [data-primary-metric=coverage] { grid-column:1/-1; }+ .t3-harbor-panel .t3-harbor-jobs { grid-template-columns:repeat(2,minmax(0,1fr)); }+ .t3-harbor-panel .t3-harbor-actions { flex-wrap:wrap;gap:.35rem; }}-/* Keep job actions and recorded metadata distinct when names wrap. */-.tier-card-link{padding:6px 10px;font-size:12px;line-height:1.6;max-width:100%;white-space:normal;overflow-wrap:anywhere}-.metadata-grid>div>div{margin-top:12px;line-height:1.6}-.metadata-grid>div>strong{margin-bottom:12px}-.tab-content .t3-harbor-actions{gap:12px;min-width:0}-.tab-content .t3-harbor-link{padding:10px 14px;font-size:12px;line-height:1.6;max-width:100%;white-space:normal;overflow-wrap:anywhere}-.tab-content .t3-harbor-panel>div{min-width:0}-.tab-content .t3-harbor-panel p{margin-top:8px;font-size:14px;line-height:1.6}-.tab-content dl:not(.kpis){row-gap:16px}-.tab-content dl:not(.kpis) dt{margin-top:8px;font-size:12px;line-height:1.6}-.tab-content dl:not(.kpis) dd{margin-top:8px;line-height:1.6;overflow-wrap:anywhere}-/* Measured heights clear every wrapped tab row, independent of breakpoints. */-.tab-content .t3-agent-anchor{scroll-margin-top:calc(var(--mobile-nav-height) + var(--tier3-nav-height) + 20px)}-/* Recorded provenance is a label/value list; action-column grids use DIVs. */-.tab-content dl.t3-prov-grid{grid-template-columns:minmax(140px,.3fr) minmax(0,1fr);align-items:start}-@media(max-width:760px){.tab-content dl.t3-prov-grid{grid-template-columns:minmax(0,1fr)}}diff --git a/src/skillevaluator/reporting/templates/report_ui.js.j2 b/src/skillevaluator/reporting/templates/report_ui.js.j2index a7da84b7..bea64b9a 100644--- a/src/skillevaluator/reporting/templates/report_ui.js.j2+++ b/src/skillevaluator/reporting/templates/report_ui.js.j2@@ -3,6 +3,7 @@let reportSkillStatus = 'all';let reportAffectedSkills = null;let reportValidatorStatus = 'all';+let reportSearchOpenedDetails = new Set();function reportPressedButtons() {document.querySelectorAll('.tier-card[data-target-tab]').forEach(card => card.setAttribute('aria-pressed', card.classList.contains('active') ? 'true' : 'false'));document.querySelectorAll('.filter-btn,.severity-filter-btn,.view-toggle-btn').forEach(button => button.setAttribute('aria-pressed', button.classList.contains('active') ? 'true' : 'false'));@@ -29,12 +30,31 @@ function applyReportSearch() {if (section.classList.contains('active')) { total++; if (shown) visible++; }});});- document.querySelectorAll('.summary-table tbody tr[data-status]').forEach(row => {+ document.querySelectorAll('#tab-tier1 .summary-table tbody tr[data-status]').forEach(row => {row.style.display = (reportValidatorStatus === 'all' || row.dataset.status === reportValidatorStatus) && (!query || row.textContent.toLocaleLowerCase().includes(query)) ? '' : 'none';});+ // Folded evidence remains searchable. Restore only disclosures search opened.+ reportSearchOpenedDetails.forEach(detail => { detail.open = false; });+ reportSearchOpenedDetails.clear();+ let evidenceMatches = 0;+ let firstEvidenceMatch = null;+ if (query) {+ document.querySelectorAll('details[id^="plugin-"],.t3-eval-evidence,.t3-ds-card,.t3-ds-card details').forEach(detail => {+ if (!detail.textContent.toLocaleLowerCase().includes(query)) return;+ evidenceMatches++;+ if (!firstEvidenceMatch) firstEvidenceMatch = detail;+ for (let node = detail; node; node = node.parentElement) {+ if (node.tagName === 'DETAILS' && !node.open) {+ reportSearchOpenedDetails.add(node);+ node.open = true;+ }+ }+ });+ }+ if (query && visible === 0 && firstEvidenceMatch) reportRevealTier(firstEvidenceMatch);const counter = document.getElementById('report-search-count');- counter.textContent = visible + ' of ' + total + ' shown';- document.getElementById('report-no-matches').hidden = visible !== 0;+ counter.textContent = visible + ' of ' + total + ' shown' + (evidenceMatches ? ' · ' + evidenceMatches + ' evidence sections matched' : '');+ document.getElementById('report-no-matches').hidden = visible !== 0 || evidenceMatches !== 0;['skill-empty-msg','validator-empty-msg'].forEach(id => { const el = document.getElementById(id); if (el) el.style.display = 'none'; });reportPressedButtons();}@@ -98,10 +118,14 @@ filterToAffectedSkills = function(row) {// Raw scanner output stays collapsed: it only repeats finding cards, which print.let reportPrintClosedDetails = [];window.addEventListener('beforeprint', function() {+ document.documentElement.setAttribute('data-report-printing', '');reportPrintClosedDetails = Array.from(document.querySelectorAll('details:not([open]):not(.raw-output)'));reportPrintClosedDetails.forEach(detail => { detail.open = true; });+ // Disclosure opening must precede the synchronous print chart resize.+ if (window.rebuildTier3Charts) window.rebuildTier3Charts();});window.addEventListener('afterprint', function() {+ document.documentElement.removeAttribute('data-report-printing');reportPrintClosedDetails.forEach(detail => { detail.open = false; });reportPrintClosedDetails = [];reportMeasureNavigation();@@ -168,14 +192,22 @@ window.addEventListener('load', function() {}, 0);});+// Navigating to a fragment on the same standalone file does not fire load again.+window.addEventListener('hashchange', function() {+ if (location.hash.length > 1) {+ try { openReportDestination(decodeURIComponent(location.hash.slice(1))); } catch (err) { /* Ignore malformed fragments. */ }+ }+});+// All entry points (sidebar, tiles, mobile links and evidence) use this tier state.function reportScrollBehavior() {return window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches ? 'auto' : 'smooth';}function reportMeasureNavigation() {- [['.mobile-tier-nav', '--mobile-nav-height'], ['.t3-subtabs', '--tier3-nav-height']].forEach(([selector, property]) => {+ [['.main-header', '--report-header-height'], ['.mobile-tier-nav', '--mobile-nav-height'], ['.t3-subtabs', '--tier3-nav-height']].forEach(([selector, property]) => {const nav = document.querySelector(selector);- const height = nav && nav.getClientRects().length ? nav.getBoundingClientRect().height : 0;+ const pinned = nav && ['sticky', 'fixed'].includes(getComputedStyle(nav).position);+ const height = pinned && nav.getClientRects().length ? nav.getBoundingClientRect().height : 0;document.documentElement.style.setProperty(property, height + 'px');});}@@ -202,12 +234,15 @@ function activateReportTier(tierId, options = {}) {tile.classList.toggle('active', selected);tile.setAttribute('aria-pressed', String(selected));});- document.querySelectorAll('.mobile-tier-nav [data-report-tier]').forEach(link => {- if (link.dataset.reportTier === tierId) link.setAttribute('aria-current', 'location');+ document.querySelectorAll('.nav-tabs [data-report-tier]').forEach(link => {+ const selected = link.dataset.reportTier === tierId;+ link.classList.toggle('active', selected);+ if (selected) link.setAttribute('aria-current', 'location');else link.removeAttribute('aria-current');});reportMeasureNavigation();reportCurrentSection(panel.id);+ if (window.rebuildTier3Charts) window.rebuildTier3Charts();if (options.scroll !== false) reportScrollTo(panel);if (options.focus !== false) panel.focus({preventScroll:true});return true;@@ -222,6 +257,7 @@ function activateReportTabs(tabSelector, panelSelector, panelId, button) {tab.setAttribute('aria-selected', String(selected));tab.tabIndex = selected ? 0 : -1;});+ if (window.rebuildTier3Charts) window.rebuildTier3Charts();if (button) button.focus({preventScroll:true});}function reportTabKeyboard(event) {@@ -242,36 +278,55 @@ function reportTabKeyboard(event) {event.target.click();}}-let reportThemePreference = 'system';+let reportThemePreference = document.documentElement.dataset.defaultTheme || 'light';const reportColorScheme = window.matchMedia ? window.matchMedia('(prefers-color-scheme: dark)') : null;function applyReportTheme() {const theme = reportThemePreference === 'system' ? (reportColorScheme?.matches ? 'dark' : 'light') : reportThemePreference;document.documentElement.setAttribute('data-theme', theme);const control = document.getElementById('report-theme');if (control) control.value = reportThemePreference;+ const icon = document.getElementById('theme-icon');+ const text = document.getElementById('theme-text');+ if (icon) icon.textContent = theme === 'dark' ? '☀' : '☾';+ if (text) text.textContent = theme === 'dark' ? 'Light' : 'Dark';if (window.rebuildTier3Charts) window.rebuildTier3Charts();}function setReportTheme(preference) {reportThemePreference = ['light','dark'].includes(preference) ? preference : 'system';try {- if (reportThemePreference === 'system') localStorage.removeItem('skillevaluator-theme');- else localStorage.setItem('skillevaluator-theme', reportThemePreference);+ localStorage.setItem('skillevaluator-theme', reportThemePreference);} catch (err) { /* Standalone reports work without storage. */ }applyReportTheme();}+function toggleTheme() {+ setReportTheme(document.documentElement.getAttribute('data-theme') === 'dark' ? 'light' : 'dark');+}function initReportTheme() {try {const saved = localStorage.getItem('skillevaluator-theme');- reportThemePreference = ['light','dark'].includes(saved) ? saved : 'system';+ reportThemePreference = ['light','dark','system'].includes(saved) ? saved : (document.documentElement.dataset.defaultTheme || 'light');} catch (err) { /* Follow system when storage is unavailable. */ }applyReportTheme();if (reportColorScheme?.addEventListener) reportColorScheme.addEventListener('change', function() {if (reportThemePreference === 'system') applyReportTheme();});}+function showDedupTab(which) {+ const panel = document.getElementById('dedup-' + which);+ if (!panel) return;+ document.querySelectorAll('.dedup-subtab').forEach(el => el.style.display = el === panel ? 'block' : 'none');+ document.querySelectorAll('.tier2-subtabs .nav-tab').forEach(button => {+ const selected = button.getAttribute('aria-controls') === panel.id;+ button.classList.toggle('active', selected);+ button.setAttribute('aria-selected', String(selected));+ button.tabIndex = selected ? 0 : -1;+ });+}function reportRevealTier(target) {const panel = target.closest('.tab-content');if (panel) activateReportTier(panel.id.slice(4), {scroll:false, focus:false});+ const dedup = target.closest('.dedup-subtab');+ if (dedup) showDedupTab(dedup.id.slice('dedup-'.length));const local = target.closest('.t3-page');if (local) activateReportTabs('.t3-subtab', '.t3-page', local.id);const agent = target.closest('.t3-agent-panel');@@ -291,7 +346,7 @@ document.addEventListener('DOMContentLoaded', function() {}});});- document.querySelectorAll('.t3-subtabs,.t3-agent-tabs').forEach(list => list.addEventListener('keydown', reportTabKeyboard));+ document.querySelectorAll('.t3-subtabs,.t3-agent-tabs,.tier2-subtabs').forEach(list => list.addEventListener('keydown', reportTabKeyboard));const initial = document.querySelector('.tab-content.active') || document.querySelector('.tab-content');if (initial) activateReportTier(initial.id.slice(4), {scroll:false, focus:false});reportCurrentSection('report-workspace');@@ -303,7 +358,7 @@ document.addEventListener('DOMContentLoaded', function() {reportMeasureNavigation();if (window.ResizeObserver) {const observer = new ResizeObserver(reportMeasureNavigation);- document.querySelectorAll('.mobile-tier-nav,.t3-subtabs').forEach(nav => observer.observe(nav));+ document.querySelectorAll('.main-header,.mobile-tier-nav,.t3-subtabs').forEach(nav => observer.observe(nav));}window.addEventListener('resize', reportMeasureNavigation);let navigationFrame = null;@@ -333,3 +388,9 @@ document.addEventListener('DOMContentLoaded', function() {openReportDestination(id);});});++// The copied native insight cards use inert data attributes for copy actions.+document.addEventListener('click', function(event) {+ const button = event.target.closest('[data-report-action="copy"]');+ if (button && typeof tier3CopyText === 'function') tier3CopyText(button, button.dataset.copyText || '');+});diff --git a/src/skillevaluator/reporting/templates/telemetry.html.j2 b/src/skillevaluator/reporting/templates/telemetry.html.j2new file mode 100644index 00000000..4ac054ef--- /dev/null+++ b/src/skillevaluator/reporting/templates/telemetry.html.j2@@ -0,0 +1,51 @@+{# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. #}+{# SPDX-License-Identifier: Apache-2.0 #}+{% macro telemetry_table(sections, columns, table_id) -%}+ <p class="t3-section-hint">Accounting source: {{ sections[0].source }} · schema {{ sections[0].schema_version }}.</p>+ {% for section in sections %}+ {% for note in section.notes %}<p class="t3-section-hint">{{ note }}</p>{% endfor %}+ <h4>{{ section.label }}</h4>+ <div class="table-scroll">+ <table class="contributor-table"{% if loop.first %} id="{{ table_id }}"{% endif %}>+ <caption class="sr-only">{{ section.label }} recorded telemetry, by condition and case</caption>+ <thead><tr><th>Case</th><th>Condition</th>{% for column in columns %}<th>{{ column }}</th>{% endfor %}<th>Coverage / comparison</th></tr></thead>+ <tbody>+ {% for row in section.rows %}+ <tr><td><code>{{ row.case }}</code></td><td>{{ row.condition }}</td>+ {% for value in row['values'] %}<td>{{ value }}</td>{% endfor %}+ <td>{{ row.coverage }}{% for note in row.notes %}<div>{{ note }}</div>{% endfor %}</td>+ </tr>+ {% endfor %}+ </tbody>+ </table>+ </div>+ {% endfor %}+{%- endmacro %}++{% macro render_telemetry(view) -%}+{% if view.has_tokens %}+<details class="t3-details" id="tier3-token-usage">+ <summary>Recorded token usage · dataset, agents and cases</summary>+ <div class="t3-details-body">+ <p class="t3-section-hint">Measured tokens, not scored. Partial totals cover measured attempts only; missing counters are N/A. Changes retain the recorded comparison status and reasons.</p>+ {{ telemetry_table(view.token_sections, ['Prompt', 'Cached', 'Uncached prompt', 'Completion', 'Total', 'Efficiency Tokens'], 't3-recorded-token-usage-table') }}+ {% if view.token_chart %}+ <div class="t3-chart-box"><canvas id="tier3-recorded-token-chart" role="img" aria-label="Recorded token usage by agent and condition" aria-describedby="tier3-recorded-token-chart-description" hidden></canvas></div>+ <p id="tier3-recorded-token-chart-description" class="chart-description">Recorded agent totals for both conditions: uncached prompt, cached prompt and completion tokens. Partial groups are labelled; missing components remain unavailable. Long chart labels may be shortened. <a href="#t3-recorded-token-usage-table">View recorded token values and scope labels.</a></p>+ <p id="tier3-recorded-token-chart-fallback" class="chart-fallback">Token chart unavailable. <a href="#t3-recorded-token-usage-table">Read the recorded token table.</a></p>+ {% endif %}+ <details class="t3-details"><summary>Token accounting</summary><div class="t3-details-body">Prompt includes cached reads. Total = Prompt + Completion. Efficiency Tokens = Uncached prompt + Completion. Cached reads are never added to Prompt again. Change = with skill − without skill; percentages require a valid recorded comparison. No missing counters are estimated. Coverage shows measured / expected attempts; observed, partial and unscored attempts and recorded reasons follow when available.</div></details>+ </div>+</details>+{% endif %}+{% if view.has_latency %}+<details class="t3-details" id="tier3-latency-metrics">+ <summary>Recorded model latency · dataset, agents and cases</summary>+ <div class="t3-details-body">+ <p class="t3-section-hint">Recorded LLM and tool timing. Missing instrumentation is N/A. Inferred timestamps include queue/harness time; mixed timing sources are not like-for-like.</p>+ {{ telemetry_table(view.latency_sections, ['LLM (s)', 'Tool (s)', 'LLM ms/token', 'LLM timing', 'Arm runtime (ms)'], 't3-latency-table') }}+ <details class="t3-details"><summary>Timing methods</summary><div class="t3-details-body">LLM timing comes from native ATIF extras or inferred step timestamps. Tool time comes from tool-call intervals or recorded execution wall time; complete tool totals require every trial in the scope. LLM ms/token uses recorded LLM time and complete token coverage. Arm runtime is whole-arm wall time, shown only for agent totals; it is not model-only time. This report does not recompute timings or comparisons.</div></details>+ </div>+</details>+{% endif %}+{%- endmacro %}diff --git a/src/skillevaluator/reporting/tier2_views.py b/src/skillevaluator/reporting/tier2_views.pyindex 462e70e3..98bf4880 100644--- a/src/skillevaluator/reporting/tier2_views.py+++ b/src/skillevaluator/reporting/tier2_views.py@@ -6,12 +6,18 @@ from __future__ import annotationsfrom dataclasses import dataclassfrom typing import TYPE_CHECKING-from skillevaluator.reporting.base import additional_errors, is_cleanly_skipped+from skillevaluator.reporting.base import additional_errors, get_skip_reason, is_cleanly_skippedif TYPE_CHECKING:from skillevaluator.models import ValidationResult+@dataclass(frozen=True)+class Tier2SkipView:+ reason: str+ results: tuple[ValidationResult, ...]++@dataclass(frozen=True)class Tier2ScopeView:id: str@@ -24,6 +30,7 @@ class Tier2ScopeView:notes: tuple[str, ...]catalog_not_applicable: bool = Falsenot_run: bool = False+ skips: tuple[Tier2SkipView, ...] = ()def _count(value: object) -> int | None:@@ -39,6 +46,14 @@ def _scope(result: ValidationResult) -> str | None:return None+def _skip_views(results: tuple[ValidationResult, ...]) -> tuple[Tier2SkipView, ...]:+ groups: dict[str, list[ValidationResult]] = {}+ for result in results:+ if is_cleanly_skipped(result):+ groups.setdefault(get_skip_reason(result), []).append(result)+ return tuple(Tier2SkipView(reason, tuple(group)) for reason, group in groups.items())++def tier2_scope_views(results: list[ValidationResult]) -> tuple[Tier2ScopeView, ...]:"""Keep missing completion/count metadata unknown; never rewrite results.@@ -176,13 +191,22 @@ def tier2_scope_views(results: list[ValidationResult]) -> tuple[Tier2ScopeView,tuple(dict.fromkeys(notes)),scope == "within" or pairwise_only,not_run,+ _skip_views(members),))unknown = tuple(result for result in results if _scope(result) is None)if unknown:views.append(Tier2ScopeView(- "other", "Other recorded checks", unknown, None, None, None, None, ("Comparison scope unavailable.",)+ "other",+ "Other recorded checks",+ unknown,+ None,+ None,+ None,+ None,+ ("Comparison scope unavailable.",),+ skips=_skip_views(unknown),))return tuple(views)diff --git a/src/skillevaluator/reporting/tier3_coverage.py b/src/skillevaluator/reporting/tier3_coverage.pyindex 97c3069f..7f656a88 100644--- a/src/skillevaluator/reporting/tier3_coverage.py+++ b/src/skillevaluator/reporting/tier3_coverage.py@@ -26,8 +26,11 @@ _NOT_REPORTED = {# many of its attempts scored._NOTICE_CODES = {"with_skill": "with_skill_failed", "without_skill": "baseline_failed"}# Harbor records a failed trial as ``ExceptionType: message`` after the trial-# label. Only the type name is kept, as plain words, so it is safe to publish.-_EXCEPTION_TYPE = re.compile(r"(?:^|: )(?:[A-Za-z_]\w{0,63}\.){0,8}([A-Z][A-Za-z0-9]{0,63}(?:Error|Exception))(?=:|$)")+# label, or as ``trial <label> recorded ExceptionType: message`` in a failed+# job's statistics. Only the type name is kept, as plain words, so it is safe to publish.+_EXCEPTION_TYPE = re.compile(+ r"(?:^|: | recorded )(?:[A-Za-z_]\w{0,63}\.){0,8}([A-Z][A-Za-z0-9]{0,63}(?:Error|Exception))(?=:|$)"+)# An acronym keeps its trailing digits: ``S3UploadFailedError`` gives ``s3 upload# failed error`` and ``HTTP2Error`` gives ``http2 error``._CAMEL_WORD = re.compile(r"[A-Z]+[0-9]*(?![a-z])|[A-Z][a-z0-9]*")diff --git a/tests/ci/test_native_reports.py b/tests/ci/test_native_reports.pyindex e5a8066a..f208d594 100644--- a/tests/ci/test_native_reports.py+++ b/tests/ci/test_native_reports.py@@ -469,5 +469,28 @@ def test_native_tier_navigation_remains_within_static_trusted_code():assert set(parser.handlers + parser.scripts) <= _trusted_inline_code()constrained = constrain_native_html(document)for tier in (1, 2, 3):- assert f'href="#tab-tier{tier}" data-report-tier="tier{tier}"' in constrained- assert f'data-target-tab="tier{tier}"' in constrained+ card = re.search(rf'<div class="tier-card\b[^>]*data-target-tab="tier{tier}"[^>]*>', constrained)+ assert card is not None+ markup = card.group()+ assert 'role="button"' in markup+ assert 'tabindex="0"' in markup+ assert f'aria-controls="tab-tier{tier}"' in markup+ if tier == 1:+ assert f"onclick=\"showTab('tier{tier}')\"" in markup+ assert (+ f"onkeydown=\"if(event.key==='Enter'||event.key===' '){{event.preventDefault();showTab('tier{tier}');}}\""+ in markup+ )+ else:+ assert 'data-report-tier-tile="true"' in markup+ tile_script = next(code for code in parser.scripts if "[data-report-tier-tile]" in code)+ assert (+ "tile.addEventListener('click', function() { activateReportTier(tile.dataset.targetTab); });"+ in tile_script+ )+ assert "tile.addEventListener('keydown', function(event)" in tile_script+ assert "(event.key === 'Enter' || event.key === ' ') && event.target === tile" in tile_script+ constrained_code = _InlineCode()+ constrained_code.feed(constrained)+ assert set(constrained_code.handlers + constrained_code.scripts) <= _trusted_inline_code()+ assert not constrained_code.external_scriptdiff --git a/tests/reporting/browser_navigation_checks.py b/tests/reporting/browser_navigation_checks.pyindex 6fd58d58..5ca42323 100644--- a/tests/reporting/browser_navigation_checks.py+++ b/tests/reporting/browser_navigation_checks.py@@ -1,379 +1,52 @@# SPDX-License-Identifier: Apache-2.0-"""Real-browser navigation, theme, print and layout checks for the HTML report.+"""Convenience entry point for the collected offline Chromium report suite."""-Not collected by pytest. Run from the repository root, in an environment with the-project and Playwright installed (``pip install -e ".[dev]" playwright``):-- python tests/reporting/browser_navigation_checks.py OUTPUT_DIRECTORY--By default the script renders full.html, stress.html and absent.html with-``browser_navigation_fixtures.py`` into OUTPUT_DIRECTORY/fixtures, then writes-screenshots and navigation-results.json to OUTPUT_DIRECTORY. Pass-``--reports DIRECTORY`` to check reports that are already rendered instead.--The browser is Playwright's bundled Chromium (``python -m playwright install-chromium``). To use another Chromium-based browser, such as system Chrome, pass-``--browser PATH`` or set SKILLEVALUATOR_TEST_BROWSER to its executable. No live-evaluation or network access is needed.-"""+from __future__ import annotationsimport argparse-import jsonimport os-import sysfrom pathlib import Path-from playwright.sync_api import sync_playwright---def check(page, condition, message):- try:- page.wait_for_function(condition, timeout=3000)- except Exception as error:- raise AssertionError(message) from error-+import pytest-def severity_palette(page):- return page.evaluate("""() => ['critical','high','medium','low','info'].map(severity => {- const probe=document.createElement('span');- probe.className='severity-' + severity;- document.body.append(probe);- const style=getComputedStyle(probe);- const colors={background:style.backgroundColor,foreground:style.color};- probe.remove();- return colors;- })""")--BROWSER_ENV = "SKILLEVALUATOR_TEST_BROWSER"---def render_default_fixtures(directory):- sys.path.insert(0, str(Path(__file__).resolve().parent))- from browser_navigation_fixtures import render_fixtures-- return render_fixtures(directory)---def run(reports, output, browser_path=None):+def run(reports: Path | None, output: Path, browser_path: str | None = None) -> int:+ """Run the same checks as CI, retaining screenshots and JUnit results."""+ output = output.resolve()output.mkdir(parents=True, exist_ok=True)- records = []- with sync_playwright() as runtime:- # None launches Playwright's bundled Chromium.- browser = runtime.chromium.launch(executable_path=browser_path, headless=True)- for width in (1440, 760, 390):- for theme in ("light", "dark"):- context = browser.new_context(- viewport={"width": width, "height": 1000}, color_scheme=theme, reduced_motion="reduce"- )- # Task 2 owns chart-runtime offline behavior; navigation must work without it.- context.route("https://**/*", lambda route: route.abort())- context.add_init_script("""- (() => {- window._navigationScroll=[];- const original=Element.prototype.scrollIntoView;- Element.prototype.scrollIntoView=function(options) { window._navigationScroll.push(options.behavior); original.call(this,options); };- })();- """)- page = context.new_page()- errors = []- page.on("pageerror", lambda error, errors=errors: errors.append(str(error)))- page.goto((reports / "full.html").as_uri())- page.select_option("#report-theme", "system")- check(page, f"() => document.documentElement.dataset.theme === '{theme}'", "system theme")- opposite = "light" if theme == "dark" else "dark"- page.emulate_media(color_scheme=opposite)- check(page, f"() => document.documentElement.dataset.theme === '{opposite}'", "live system theme")- page.select_option("#report-theme", theme)- page.reload()- check(page, f"() => document.documentElement.dataset.theme === '{theme}'", "explicit theme persists")- page.emulate_media(color_scheme=opposite)- check(- page,- f"() => document.documentElement.dataset.theme === '{theme}'",- "explicit preference ignores system",- )- check(- page,- "() => document.querySelector('.hero-command-status.verdict-chip.fail')?.innerText === 'Changes required' && document.querySelector('.hero-side .verdict-chip').innerText.startsWith('Tier 3 quality: ')",- "visible outcome hierarchy",- )- page.screenshot(path=str(output / f"hierarchy-{width}-{theme}.png"))- # Every entry point synchronizes all other surfaces and focuses its panel.- for tier in ("tier2", "tier3", "tier1"):- page.locator(f'.tier-card[data-target-tab="{tier}"]').click()- check(- page,- f"""() => document.activeElement.id === 'tab-{tier}' &&- document.querySelectorAll('.tab-content.active').length === 1 &&- document.querySelector('.tab-content.active').id === 'tab-{tier}' &&- document.querySelector('.tier-card[data-target-tab="{tier}"]').getAttribute('aria-pressed') === 'true' &&- document.querySelector('.report-sidebar .sidebar-current').dataset.reportTier === '{tier}' &&- document.querySelector('.mobile-tier-nav [aria-current]').dataset.reportTier === '{tier}'""",- "tier synchronization",- )- tier_nav = ".mobile-tier-nav" if width <= 760 else ".report-sidebar"- page.locator(f'{tier_nav} [data-report-tier="tier3"]').click()- # Chart/table references need to reveal the containing local view as well.- page.evaluate("""() => {- activateReportTier('tier1');- const ref=document.createElement('a'); ref.href='#t3-trials-table'; ref.id='test-trial-reference';- ref.textContent='Trials evidence'; document.body.append(ref);- }""")- page.locator("#test-trial-reference").click()- check(- page,- "() => document.querySelector('#t3-trials-table').getClientRects().length > 0 && document.activeElement.id === 't3-trials-table'",- "generic local evidence link",- )- page.locator("#test-trial-reference").evaluate("(node) => node.remove()")- # Manual-activation roving tabs: arrows move focus; Enter/Space changes view.- overview = page.locator("#tier3-tab-overview")- overview.click()- overview.press("ArrowRight")- check(- page,- "() => document.activeElement.id === 'tier3-tab-suggestions' && document.querySelector('#tier3-tab-overview').getAttribute('aria-selected') === 'true'",- "arrow focus",- )- page.keyboard.press("Enter")- check(- page,- "() => document.querySelector('#tier3-page-suggestions').classList.contains('active')",- "enter activation",- )- page.keyboard.press("End")- page.keyboard.press("Space")- check(- page,- "() => document.querySelector('#tier3-page-provenance').classList.contains('active')",- "end/space activation",- )- page.keyboard.press("Home")- page.keyboard.press("ArrowLeft")- check(page, "() => document.activeElement.id === 'tier3-tab-provenance'", "left wraps")- page.locator("#tier3-tab-agents").click()- agent_tabs = page.locator(".t3-agent-tab-btn")- agent_tabs.first.focus()- page.keyboard.press("End")- page.keyboard.press("Enter")- check(- page,- "() => document.querySelector('.t3-agent-panel.active').id === document.activeElement.getAttribute('aria-controls')",- "agent keyboard",- )- # Deep links use stable panel IDs even when agent names contain selector syntax.- page.evaluate("""() => {- const anchor=document.querySelector('.t3-agent-anchor');- anchor.dataset.tier3AgentName='agent"[雪]/name';- document.querySelector('.t3-agent-tab-btn').dataset.tier3Agent=anchor.dataset.tier3AgentName;- jumpToTier3Agent(anchor.id);- }""")- page.wait_for_timeout(50)- check(- page,- "() => document.querySelector('.t3-agent-panel.active').id === document.querySelector('.t3-agent-anchor').dataset.tier3AgentPanelId",- "unusual agent link",- )- # Focus lands on the named panel, never on the aria-hidden scroll anchor.- check(- page,- "() => document.activeElement.id === document.querySelector('.t3-agent-anchor').dataset.tier3AgentPanelId",- "agent link focus",- )- anchor_id = page.locator(".t3-agent-anchor").first.get_attribute("id")- page.goto((reports / "full.html").as_uri() + "#" + anchor_id)- page.reload()- check(- page,- "() => document.activeElement.id === document.querySelector('.t3-agent-anchor').dataset.tier3AgentPanelId && document.activeElement.getAttribute('aria-hidden') !== 'true'",- "agent fragment reload focus",- )- # Sticky tier and local navigation occupy separate vertical bands.- page.evaluate("() => window.scrollBy(0, 350)")- if width <= 760:- check(- page,- "() => document.querySelector('.t3-subtabs').getBoundingClientRect().top >= document.querySelector('.mobile-tier-nav').getBoundingClientRect().bottom - 1",- "sticky navigation overlap",- )- # A finding deep-link reveals Tier 1, resets incompatible filters, and focuses exact evidence.- page.evaluate("""() => {- document.querySelector('#report-search').value='no such finding';- filterSkills('pass'); filterSeverity('critical-high'); applyReportSearch();- openFinding(document.querySelector('.check-finding[id]').id);- }""")- check(- page,- """() => document.querySelector('.tab-content.active').id === 'tab-tier1' &&- document.activeElement.classList.contains('check-finding') &&- document.activeElement.getClientRects().length > 0 &&- document.activeElement.classList.contains('finding-flash') &&- document.querySelector('#report-search').value === ''""",- "exact finding reveal",- )- page.evaluate("""() => {- activateReportTier('tier3'); document.querySelector('#tier3-tab-overview').focus();- const finding=document.querySelector('.check-finding[id]');- scrollToFinding(finding.closest('.skill-card').dataset.skillName, finding.dataset.issueKey);- }""")- check(page, "() => document.activeElement.classList.contains('check-finding')", "legacy finding focus")- check(- page,- "() => window._navigationScroll.length > 0 && window._navigationScroll.every(mode=>mode === 'auto')",- "reduced motion navigation",- )- # Print exposes filtered evidence and all local pages; restores disclosures afterward.- page.evaluate("""() => {- document.querySelector('#report-search').value='no such finding'; applyReportSearch();- window._closed = Array.from(document.querySelectorAll('details:not([open]):not(.raw-output)')).map(x=>x);- dispatchEvent(new Event('beforeprint'));- }""")- page.emulate_media(media="print")- check(- page,- """() => [...document.querySelectorAll('.t3-page,.t3-agent-panel,.check-finding')].every(e=>e.getClientRects().length > 0) && window._closed.every(e=>e.open)""",- "print evidence",- )- page.emulate_media(media="screen")- page.evaluate("() => dispatchEvent(new Event('afterprint'))")- check(- page,- "() => window._closed.every(e=>!e.open) && document.querySelector('#report-search').value === 'no such finding'",- "print restoration",- )- page.locator('.report-sidebar [data-report-section="run-metadata"]').click()- page.wait_for_timeout(50)- check(- page,- "() => document.querySelector('.report-sidebar .sidebar-current').dataset.reportSection === 'run-metadata'",- "run details navigation",- )- page.locator('.report-sidebar [data-report-section="report-workspace"]').click()- page.wait_for_timeout(50)- check(- page,- "() => document.querySelector('.report-sidebar .sidebar-current').dataset.reportSection === 'report-workspace'",- "summary navigation",- )- for fixture in ("full", "stress"):- page.goto((reports / f"{fixture}.html").as_uri())- check(- page,- "() => [...document.querySelectorAll('.tier-card')].every(tile=>tile.scrollWidth <= tile.clientWidth + 1)",- "tier tile content clipping",- )- for tier in ("tier1", "tier2", "tier3"):- page.evaluate("(tier) => activateReportTier(tier)", tier)- check(- page,- "() => document.documentElement.scrollWidth <= innerWidth + 1",- "page horizontal overflow",- )- page.screenshot(path=str(output / f"{fixture}-{width}-{theme}-{tier}.png"))- page.evaluate("() => { activateReportTier('tier1'); toggleAllSkills(true); }")- check(- page,- """() => [...document.querySelectorAll('.skill-content.active,.validator-content.active,.top-issues-content.active,.table-container.active')].every(e=>getComputedStyle(e).maxHeight === 'none')""",- "expanded evidence cap",- )- # A real URL reload must use the same reveal/focus path as an in-page link.- page.goto((reports / "full.html").as_uri() + "#validator-1")- page.reload()- check(- page,- "() => document.querySelector('#results-by-validator').classList.contains('active') && document.querySelector('#validator-1').getClientRects().length > 0 && document.activeElement.id === 'validator-1' && document.querySelector('#validator-1 .validator-content').classList.contains('active')",- "validator fragment reload",- )- # Whole tiers and the skip link are sections: open at their top, never centred.- page.goto((reports / "full.html").as_uri() + "#tab-tier3")- page.reload()- check(- page,- "() => document.querySelector('.tab-content.active').id === 'tab-tier3' && Math.abs(document.getElementById('tab-tier3').getBoundingClientRect().top) < 200",- "tier fragment reload",- )- page.goto((reports / "full.html").as_uri())- page.evaluate("() => window.scrollTo(0, document.documentElement.scrollHeight)")- page.locator(".skip-link").focus()- page.keyboard.press("Enter")- check(- page,- "() => document.activeElement.id === 'report-workspace' && Math.abs(document.getElementById('report-workspace').getBoundingClientRect().top) < 2",- "skip link",- )- page.goto((reports / "absent.html").as_uri())- page.select_option("#report-theme", theme)- contrast = page.evaluate(r"""() => {- const rgb = value => (value.match(/[\d.]+/g) || []).map(Number);- const luminance = color => color.slice(0,3).map(v=>v/255).map(v=>v<=0.04045?v/12.92:((v+0.055)/1.055)**2.4).reduce((sum,v,i)=>sum+v*[0.2126,0.7152,0.0722][i],0);- return [...document.querySelectorAll('.tier-card.skipped .tier-card-label')].map(label=>{- const tile=label.closest('.tier-card');- let background=rgb(getComputedStyle(tile).backgroundColor);- const foreground=rgb(getComputedStyle(label).color);- let opacity=1;- for(let node=label;node;node=node.parentElement) opacity*=Number(getComputedStyle(node).opacity);- if(background[3] === 0) background=rgb(getComputedStyle(tile.parentElement.closest('section')).backgroundColor);- const rendered=foreground.slice(0,3).map((v,i)=>v*opacity+background[i]*(1-opacity));- const values=[luminance(rendered),luminance(background)].sort((a,b)=>a-b);- return {tier:tile.dataset.targetTab,opacity,ratio:(values[1]+0.05)/(values[0]+0.05)};- });- }""")- assert len(contrast) == 2 and all(value["ratio"] >= 4.5 for value in contrast), contrast- page.screenshot(path=str(output / f"absent-{width}-{theme}.png"))- explicit_palette = severity_palette(page)- assert not errors, errors- records.append(- {"width": width, "theme": theme, "errors": errors, "checks": "passed", "absentContrast": contrast}- )- context.close()- no_js = browser.new_context(- viewport={"width": width, "height": 1000}, java_script_enabled=False, color_scheme=theme- )- page = no_js.new_page()- page.goto((reports / "full.html").as_uri())- check(- page,- "() => [...document.querySelectorAll('.t3-page,.t3-agent-panel,.check-finding')].every(e=>e.getClientRects().length > 0)",- "no-JS evidence",- )- check(page, "() => document.documentElement.scrollWidth <= innerWidth + 1", "no-JS page overflow")- check(- page,- f"() => getComputedStyle(document.documentElement).colorScheme === '{theme}'",- "no-JS system theme",- )- assert severity_palette(page) == explicit_palette, "no-JS and explicit theme severity palette"- no_js.close()- storage_context = browser.new_context()- storage_context.route("https://**/*", lambda route: route.abort())- storage_context.add_init_script(- "Object.defineProperty(window, 'localStorage', {get() { throw new Error('storage blocked'); }});"+ values = {+ "SKILLEVALUATOR_BROWSER_TESTS": "1",+ "SKILLEVALUATOR_BROWSER_SCREENSHOTS": str(output / "screenshots"),+ }+ if browser_path:+ values["SKILLEVALUATOR_TEST_BROWSER"] = browser_path+ if reports is not None:+ values["SKILLEVALUATOR_BROWSER_REPORTS"] = str(reports.resolve())+ previous = {name: os.environ.get(name) for name in values}+ os.environ.update(values)+ try:+ return int(+ pytest.main(+ [+ "-q",+ str(Path(__file__).with_name("test_report_browser.py")),+ "--basetemp=" + str(output / "pytest"),+ "--junitxml=" + str(output / "browser-results.xml"),+ ]+ ))- storage_page = storage_context.new_page()- storage_page.goto((reports / "full.html").as_uri())- storage_page.select_option("#report-theme", "dark")- check(storage_page, "() => document.documentElement.dataset.theme === 'dark'", "storage-independent theme")- storage_context.close()- browser.close()- (output / "navigation-results.json").write_text(json.dumps(records, indent=2))- print(json.dumps(records, indent=2)) # noqa: T201+ finally:+ for name, value in previous.items():+ if value is None:+ os.environ.pop(name, None)+ else:+ os.environ[name] = valueif __name__ == "__main__":- parser = argparse.ArgumentParser(description="Run the HTML report's real-browser navigation checks.")- parser.add_argument("output", type=Path, help="directory for screenshots and navigation-results.json")- parser.add_argument(- "--reports",- type=Path,- help="directory with full.html, stress.html and absent.html (default: render them into OUTPUT/fixtures)",- )- parser.add_argument(- "--browser",- default=os.environ.get(BROWSER_ENV) or None,- help=f"Chromium-based browser executable (default: ${BROWSER_ENV}, else Playwright's bundled Chromium)",- )+ parser = argparse.ArgumentParser(description="Run offline HTML report browser checks.")+ parser.add_argument("output", type=Path, help="directory for screenshots and test results")+ parser.add_argument("--reports", type=Path, help="optional existing full.html/stress.html/absent.html fixtures")+ parser.add_argument("--browser", default=os.environ.get("SKILLEVALUATOR_TEST_BROWSER"), help="Chromium executable")args = parser.parse_args()- output = args.output.resolve()- reports = args.reports.resolve() if args.reports else render_default_fixtures(output / "fixtures")- run(reports, output, args.browser)+ raise SystemExit(run(args.reports, args.output, args.browser))diff --git a/tests/reporting/fixtures/native-optional-evidence.json b/tests/reporting/fixtures/native-optional-evidence.jsonnew file mode 100644index 00000000..ff23424d--- /dev/null+++ b/tests/reporting/fixtures/native-optional-evidence.json@@ -0,0 +1,125 @@+{+ "plugin_provenance": {+ "partial": true,+ "evaluated_member_skills": [+ "resolved-skill"+ ],+ "staged_rules": [+ "resolved-rule"+ ],+ "unresolved_skill_refs": [+ "unresolved-skill"+ ],+ "unresolved_rule_refs": [+ "unresolved-rule"+ ],+ "mcp_resolutions": [+ {+ "name": "synthetic-mcp",+ "status": "reachable-in-agent",+ "tool_count": 1,+ "tool_usage": {+ "calls": 0,+ "failed": 0,+ "tools": [+ "synthetic-tool"+ ]+ },+ "reason": "Synthetic connection evidence"+ }+ ]+ },+ "integration": {+ "with_plugin": 0.71,+ "sum_of_parts": 0.54,+ "integration_lift": 0.17,+ "verdict": "real_integration",+ "point_verdict": "real_integration",+ "interpretation": "Synthetic recorded interpretation",+ "components": [+ "component-alpha",+ "component-beta"+ ],+ "lift_uncertainty": {+ "ci_low": 0.04,+ "ci_high": 0.3,+ "n_cases": 8,+ "precision": "adequate"+ },+ "complete": false,+ "completeness": {+ "missing_sum_of_parts": [+ "missing-part-case"+ ],+ "missing_with_plugin": []+ },+ "component_signals": {+ "multi_component_rate": 0.5,+ "unused_declared": {+ "rules": [+ "unused-rule"+ ]+ },+ "runtime_unavailable": [+ {+ "name": "unavailable-component",+ "type": "rule"+ }+ ],+ "convention_note": "Synthetic activation convention"+ },+ "mcp": {+ "declared": 1,+ "connected_in_agent": 1,+ "used": 0,+ "failed_calls": 0,+ "exercised": false,+ "servers": [+ {+ "name": "synthetic-mcp",+ "status": "reachable-in-agent",+ "calls": 0,+ "failed": 0,+ "tools": []+ }+ ]+ }+ },+ "harbor_viewer_delivery": {+ "viewer_status": "failed",+ "uploads": [+ {+ "job_name": "demo-job",+ "status": "failed",+ "error": "synthetic upload timeout",+ "diagnostic_archive": "uploads/demo.tar.gz"+ }+ ]+ },+ "agents": {+ "demo-agent": {+ "safety_refusals": {+ "attempts": 2,+ "model_mixed_attempts": 1,+ "categories": [+ "synthetic-category"+ ],+ "cases": [+ "refused-case"+ ]+ },+ "recovery_notes": [+ "Synthetic recovery note"+ ],+ "pass_at_k": {+ "lift": {+ "safety_refusal_cases": [+ "refused-case"+ ],+ "with_skill": 0.8,+ "without_skill": 0.6+ }+ }+ }+ }+}diff --git a/tests/reporting/native_comparison_assertions.py b/tests/reporting/native_comparison_assertions.pynew file mode 100644index 00000000..e8f549cc--- /dev/null+++ b/tests/reporting/native_comparison_assertions.py@@ -0,0 +1,44 @@+# SPDX-License-Identifier: Apache-2.0+"""Read agent associations from the consolidated native comparison table."""++import re+from html import unescape++from report_markup_assertions import text_content+++def _text(fragment):+ return re.sub(r"\s+", " ", text_content(fragment)).strip()+++def dimension_lift_labels(html, agents, best_agent):+ table = re.search(r'<table[^>]*id="tier3-dimension-table"[^>]*>(.*?)</table>', html, re.DOTALL)+ assert table is not None+ head = re.search(r"<thead>(.*?)</thead>", table[1], re.DOTALL)+ headings = re.findall(r"<th(?:\s[^>]*)?>(.*?)</th>", head[1], re.DOTALL)+ others = [name for name in agents if name != best_agent]+ assert [_text(heading) for heading in headings[5:-2]] == others+ labels = {name: [] for name in agents}+ body = re.search(r"<tbody>(.*?)</tbody>", table[1], re.DOTALL)+ for row in re.findall(r"<tr(?:\s[^>]*)?>(.*?)</tr>", body[1], re.DOTALL):+ cells = re.findall(r"<td(?:\s[^>]*)?>(.*?)</td>", row, re.DOTALL)+ primary = _text(cells[3])+ if primary == "N/A":+ primary += " " + " ".join(unescape(value) for value in re.findall(r'title="([^"]+)"', cells[3]))+ if re.fullmatch(r"[+-]\d+\.\d{2}", primary):+ primary += " lift"+ elif "inconclusive: skill never activated" in primary:+ primary = "inconclusive: skill never activated"+ elif "with-skill unavailable" in primary:+ primary = "with-skill unavailable"+ elif "no baseline" in primary:+ primary = "no baseline lift"+ else:+ assert "comparison unavailable" in primary+ primary = "comparison unavailable"+ labels[best_agent].append(primary)+ for index, name in enumerate(others, 5):+ match = re.search(r'<span class="t3-mad-lift"[^>]*>(.*?)</span>', cells[index], re.DOTALL)+ assert match is not None+ labels[name].append(_text(match[1]))+ return labelsdiff --git a/tests/reporting/report_markup_assertions.py b/tests/reporting/report_markup_assertions.pynew file mode 100644index 00000000..31747486--- /dev/null+++ b/tests/reporting/report_markup_assertions.py@@ -0,0 +1,71 @@+# SPDX-License-Identifier: Apache-2.0+"""Parse generated report markup for tests; this is not an HTML sanitizer."""++from html.parser import HTMLParser+++class _ScriptRanges(HTMLParser):+ def __init__(self, markup: str) -> None:+ super().__init__(convert_charrefs=False)+ self.markup = markup+ self.line_starts = [0, *(index + 1 for index, char in enumerate(markup) if char == "\n")]+ self.script_start: int | None = None+ self.ranges: list[tuple[int, int]] = []++ def _offset(self) -> int:+ line, column = self.getpos()+ return self.line_starts[line - 1] + column++ def handle_starttag(self, tag: str, _attrs) -> None:+ if tag == "script":+ assert self.script_start is None, "Generated report contains nested script elements"+ self.script_start = self._offset()++ def handle_startendtag(self, tag: str, _attrs) -> None:+ assert tag != "script", "Generated report script elements require an explicit closing tag"++ def handle_endtag(self, tag: str) -> None:+ if tag != "script" or self.script_start is None:+ return+ start = self._offset()+ end = self.markup.find(">", start)+ assert end >= 0, "Generated report contains an incomplete script closing tag"+ assert self.markup[start + 2 : end].strip().casefold() == "script", (+ "Generated report contains an unsupported script closing tag"+ )+ self.ranges.append((self.script_start, end + 1))+ self.script_start = None+++def without_scripts(markup: str) -> str:+ """Remove complete parsed script nodes, preserving all other markup and attributes."""+ parser = _ScriptRanges(markup)+ parser.feed(markup)+ parser.close()+ # HTMLParser's raw-text handling differs by Python patch version for malformed+ # closing tags. Fail rather than silently discarding a possibly visible tail.+ assert parser.script_start is None, "Generated report contains an unterminated or unsupported script element"+ parts = []+ previous = 0+ for start, end in parser.ranges:+ parts.append(markup[previous:start])+ previous = end+ parts.append(markup[previous:])+ return "".join(parts)+++class _TextContent(HTMLParser):+ def __init__(self) -> None:+ super().__init__(convert_charrefs=True)+ self.parts: list[str] = []++ def handle_data(self, data: str) -> None:+ self.parts.append(data)+++def text_content(fragment: str) -> str:+ """Read rendered fragment text without treating quoted attribute angles as tags."""+ parser = _TextContent()+ parser.feed(fragment)+ parser.close()+ return "".join(parser.parts)diff --git a/tests/reporting/test_activation_benchmark_html_regressions.py b/tests/reporting/test_activation_benchmark_html_regressions.pyindex 5298ebb0..72520995 100644--- a/tests/reporting/test_activation_benchmark_html_regressions.py+++ b/tests/reporting/test_activation_benchmark_html_regressions.py@@ -8,6 +8,7 @@ from __future__ import annotationsimport reimport pytest+from native_comparison_assertions import dimension_lift_labelsfrom skillevaluator.constants import DIMENSION_MAPPINGfrom skillevaluator.evaluation.tier3_report import _validation_result_from_payload, build_agent_eval_payload@@ -108,10 +109,8 @@ def test_benchmark_mixed_agents_keep_inconclusive_missing_baseline_and_measured_def test_html_mixed_agents_identify_activation_suppression_in_every_grid_cell() -> None:payload, _, html = _render(_mixed_agents())- # The HTML grid interleaves one cell per agent for every dimension and Overall.- labels = re.findall(r'<span class="t3-mad-lift"[^>]*>(.*?)</span>', html, flags=re.DOTALL)- assert len(labels) == 3 * (len(DIMENSION_MAPPING) + 1)- by_agent = {name: labels[index::3] for index, name in enumerate(payload["agents"])}+ by_agent = dimension_lift_labels(html, list(payload["agents"]), payload["best_agent"])+ assert all(len(labels) == len(DIMENSION_MAPPING) + 1 for labels in by_agent.values())assert by_agent["unactivated"] == ["inconclusive: skill never activated"] * (len(DIMENSION_MAPPING) + 1)assert all(re.fullmatch(r"[+-]\d+\.\d{2} lift", label) for label in by_agent["activated"])assert by_agent["no-baseline"] == ["no baseline lift"] * (len(DIMENSION_MAPPING) + 1)@@ -133,8 +132,7 @@ def test_html_grid_names_never_activation_with_or_without_baseline(baseline: boo"activated": _agent(activated=True),})- labels = re.findall(r'<span class="t3-mad-lift"[^>]*>(.*?)</span>', html, flags=re.DOTALL)- assert len(labels) == 2 * (len(DIMENSION_MAPPING) + 1)- by_agent = {name: labels[index::2] for index, name in enumerate(payload["agents"])}+ by_agent = dimension_lift_labels(html, list(payload["agents"]), payload["best_agent"])+ assert all(len(labels) == len(DIMENSION_MAPPING) + 1 for labels in by_agent.values())assert by_agent["unactivated"] == ["inconclusive: skill never activated"] * (len(DIMENSION_MAPPING) + 1)assert all(re.fullmatch(r"[+-]\d+\.\d{2} lift", label) for label in by_agent["activated"])diff --git a/tests/reporting/test_advisory_skip_verdict.py b/tests/reporting/test_advisory_skip_verdict.pyindex 0d00a2cd..8a1a709c 100644--- a/tests/reporting/test_advisory_skip_verdict.py+++ b/tests/reporting/test_advisory_skip_verdict.py@@ -14,6 +14,7 @@ from html import unescapefrom pathlib import Pathimport pytest+from report_markup_assertions import without_scriptsfrom scripts.ci import check_public_benchmarks as benchmark_gatefrom skillevaluator.evaluation.tier3_report import _validation_result_from_payload, advisory_skip_result@@ -1215,13 +1216,18 @@ def test_html_displays_effective_dimension_verdict(assert f"| Tier 3 | Live agent evaluation | **{expected_upper}** |" in benchmarkassert f'data-publication-status="{expected_status}"' in html_outputassert re.search(rf'tier-card-verdict">\s*{expected_words}\s*</span>', html_output)- assert f"Verdict at a glance:</strong>\n {expected_words}" in html_output+ assert f"<strong>Live quality: {expected_words}.</strong>" in html_outputif with_skill_effect:- assert f"{expected_words} · {effect_message}" in html_output+ assert effect_message in html_output+ assert (+ effect_message+ not in html_output.split('id="tier3-page-overview"', 1)[1].split('id="tier3-page-trials"', 1)[0]+ )overview = html_output.split('class="t3-overview-lead"', 1)[1].split("</div>", 1)[0]assert "with an overall score of" not in overviewelse:- assert f"{expected_words} with an overall score of" in html_output+ assert 'data-primary-metric="score"' in html_output+ assert f">{dimension_score:.2f}<" in html_outputassert json_payload["publication_status"] == expected_statusassert f"**Verdict:** {expected_upper}" in markdown@@ -3617,12 +3623,15 @@ def test_html_partial_tier3_payload_removes_unsafe_only_harbor_links() -> None:},}+ original = deepcopy(partial_tier3.metadata["agent_eval"])reporter = HTMLReporter(include_timestamp=False)html = reporter.render_all([partial_tier3])fallback = reporter._tier3_report_data([partial_tier3])- assert "javascript:alert" not in html- assert "file:///tmp" not in html+ visible = without_scripts(html)+ assert "javascript:alert" not in visible+ assert "file:///tmp" not in visible+ assert _html_tier3_payload(html) == originalassert fallback is not Noneassert "harbor_viewer" not in fallbackassert "harbor_viewer" not in fallback["summary"]@@ -3665,6 +3674,7 @@ def test_html_result_failure_scrubs_untrusted_pass_shaped_scores() -> None:assert failed_tier3 is not Nonefailed_tier3.add_error("Engine forced failure")+ original = deepcopy(failed_tier3.metadata["agent_eval"])reporter = HTMLReporter(include_timestamp=False)html = reporter.render_all([failed_tier3])payload = reporter._tier3_report_data([failed_tier3])@@ -3675,7 +3685,9 @@ def test_html_result_failure_scrubs_untrusted_pass_shaped_scores() -> None:assert payload["overall_score"] is Noneassert payload["agents"]["codex"]["with_skill"] is Noneassert payload["execution_errors"] == ["Engine forced failure"]- assert "0.99" not in html+ visible = without_scripts(html)+ assert "0.99" not in visible+ assert _html_tier3_payload(html) == originalassert "Engine forced failure" in htmldiff --git a/tests/reporting/test_budget_denied_html_context.py b/tests/reporting/test_budget_denied_html_context.pyindex 74617a9b..89f4e63a 100644--- a/tests/reporting/test_budget_denied_html_context.py+++ b/tests/reporting/test_budget_denied_html_context.py@@ -1,13 +1,38 @@# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.# SPDX-License-Identifier: Apache-2.0+import json+import re+from copy import deepcopy+from html.parser import HTMLParser+import pytest+from tests.reporting.report_markup_assertions import without_scriptsfrom skillevaluator.evaluation.tier3_report import _validation_result_from_payload, build_agent_eval_payloadfrom skillevaluator.reporting import HTMLReporterfrom skillevaluator.tier3.harbor.run_budget import BudgetController+class _ReportText(HTMLParser):+ def __init__(self):+ super().__init__()+ self.in_style = False+ self.parts = []++ def handle_starttag(self, tag, _attrs):+ if tag == "style":+ self.in_style = True++ def handle_endtag(self, tag):+ if tag == "style":+ self.in_style = False++ def handle_data(self, data):+ if not self.in_style:+ self.parts.append(data)++@pytest.mark.parametrize("change", [None, "error", "started", "reason", "empty", "missing"])def test_html_preserves_only_fully_denied_budget_context(change):budget = BudgetController(max_attempts_total=0, planned=4)@@ -42,10 +67,22 @@ def test_html_preserves_only_fully_denied_budget_context(change):payload["budget"]["not_run"] = []elif change == "missing":payload.pop("budget")+ original = deepcopy(payload)validation = _validation_result_from_payload(payload)rendered = HTMLReporter(report_scope="tier3").render_all([validation])- assert ("Budget exhausted (attempts 0 of 0)" in rendered) is (change is None)+ # Check every reachable report view, excluding non-rendered script/style data.+ text = _ReportText()+ text.feed(without_scripts(rendered))+ text.close()+ visible_text = " ".join("".join(text.parts).split())+ assert ("Budget exhausted (attempts 0 of 0)" in visible_text) is (change is None)+ # Stale diagnostics remain in the original evidence export, never in the view.+ canonical = re.search(r'<script[^>]*id="tier3-full"[^>]*>(.*?)</script>', rendered, re.DOTALL)+ assert canonical is not None+ assert json.loads(canonical[1]) == original+ assert payload == originalif change is None:assert not validation.errorsassert 'data-verdict="incomplete"' in rendered- assert "with-skill not run due to budget" in rendered+ assert "Live quality: Incomplete." in visible_text+ assert "with-skill not run due to budget" in visible_textdiff --git a/tests/reporting/test_case_findings_report.py b/tests/reporting/test_case_findings_report.pyindex 4544a08c..3338aefb 100644--- a/tests/reporting/test_case_findings_report.py+++ b/tests/reporting/test_case_findings_report.py@@ -53,11 +53,11 @@ def test_report_leads_with_skill_effect_and_goal_not_met_fix(tmp_path) -> None:[fix] = json.loads((run / "what_to_fix.json").read_text())assert fix["kind"] == "goal not met"assert (- "· per-case result: skill helps (opencode +100 pp). 1 passing with-skill attempt(s) did not meet the goal"- in html+ "per-case result: skill helps (opencode +100 pp). 1 passing with-skill attempt(s) did not meet the goal" in html)assert "1 issue to fix, most attempts lost first:" in html- assert "[goal not met]: passed on the other metrics but scored goal accuracy 0.00: asked for the data." in html+ assert '<span class="t3-sug-cat">goal not met</span>' in html+ assert "passed on the other metrics but scored goal accuracy 0.00: asked for the data." in htmlassert "Evidence: opencode/with-skill/trials/case__1/trajectory.json" in htmlassert "FAIL</span> goal not met (goal accuracy 0.00)" in htmldiff --git a/tests/reporting/test_chart_dependency.py b/tests/reporting/test_chart_dependency.pyindex b37edbc9..4ec78622 100644--- a/tests/reporting/test_chart_dependency.py+++ b/tests/reporting/test_chart_dependency.py@@ -106,7 +106,8 @@ def test_chart_canvases_explain_data_and_keep_visible_failure_fallback(agent_couhtml = _tier3_html(agent_count=agent_count)report = _parse(html)canvases = {key: attrs for key, (tag, attrs) in report.elements.items() if tag == "canvas"}- assert canvases.keys() == {"tier3-radar", "tier3-metric-bar", "tier3-token-chart", "tier3-steps-chart"}+ token_chart = "tier3-recorded-token-chart" if "tier3-recorded-token-chart" in canvases else "tier3-token-chart"+ assert canvases.keys() == {"tier3-radar", "tier3-metric-bar", token_chart, "tier3-steps-chart"}for chart_id, attrs in canvases.items():assert attrs["role"] == "img"assert attrs["aria-label"]@@ -117,7 +118,14 @@ def test_chart_canvases_explain_data_and_keep_visible_failure_fallback(agent_couassert "hidden" not in fallbackreferences = re.findall(r'class="chart-description"[^>]*>[^<]*<a href="#([^"]+)"', html)assert len(references) == 4- assert all(report.elements[reference][0] == "table" for reference in references)+ for reference in references:+ if reference == "tier3-multi-agent-dimension-table":+ assert re.search(+ r'id="tier3-multi-agent-dimension-table"[^>]*>\s*<table[^>]*id="tier3-dimension-table"',+ html,+ )+ else:+ assert report.elements[reference][0] == "table"assert references[:2] == ["tier3-dimension-table" if agent_count == 1 else "tier3-multi-agent-dimension-table"] * 2@@ -155,10 +163,15 @@ def test_chart_initialization_failure_keeps_fallback_and_recovers() -> None:script = r"""const vm = require('node:vm');const controller = JSON.parse(require('node:fs').readFileSync(0, 'utf8'));-const ids = ['tier3-radar', 'tier3-metric-bar', 'tier3-token-chart', 'tier3-steps-chart'];+const ids = ['tier3-radar', 'tier3-metric-bar', 'tier3-recorded-token-chart', 'tier3-steps-chart'];const elements = {};+let visible = true;ids.forEach(id => {- elements[id] = {id, hidden: true};+ elements[id] = {+ id, hidden: true,+ closest: () => null,+ parentElement: {getClientRects: () => visible ? [{}] : []}+ };elements[id + '-fallback'] = {hidden: false};});const listeners = {};@@ -174,7 +187,8 @@ const context = {};vm.createContext(context);vm.runInContext(controller, context);-listeners.DOMContentLoaded();+// Theme initialization invokes the controller after selecting the report palette.+context.window.rebuildTier3Charts();const missing = ids.map(id => [elements[id].hidden, elements[id + '-fallback'].hidden]);context.Chart = class {constructor() {throw new Error('Canvas unavailable');}};context.window.rebuildTier3Charts();@@ -189,23 +203,39 @@ context.Chart = class {};context.window.rebuildTier3Charts();const missingContext = ids.map(id => [elements[id].hidden, elements[id + '-fallback'].hidden]);-let built = 0, destroyed = 0;-const printAnimations = [];-const colors = [];+let built = 0, destroyed = 0, resized = 0;+const constructions = [];+const updates = [];context.Chart = class {constructor(canvas, config) {this.ctx = {};+ this.id = canvas.id;+ this.data = config.data;+ this.options = config.options;built++;- printAnimations.push(config.options.animation);- colors.push(config.options.plugins.legend.labels.color);+ constructions.push({id:canvas.id, type:config.type, color:config.options.plugins.legend.labels.color});+ }+ resize() {resized++;}+ update(mode) {+ updates.push({+ id:this.id, mode:mode || null,+ animation:this.options.animation === false ? false : null,+ color:this.options.plugins.legend.labels.color+ });}destroy() {destroyed++;}};+visible = false;+context.window.rebuildTier3Charts();+const hiddenBuilt = built;+visible = true;context.window.rebuildTier3Charts();const recovered = ids.map(id => [elements[id].hidden, elements[id + '-fallback'].hidden]);listeners.beforeprint();+// The shared report handler redraws after exposing print containers/disclosures.+context.window.rebuildTier3Charts();listeners.afterprint();-process.stdout.write(JSON.stringify({missing, failed, missingContext, released, recovered, built, destroyed, printAnimations, colors, theme}));+process.stdout.write(JSON.stringify({missing, failed, missingContext, released, recovered, hiddenBuilt, built, destroyed, resized, constructions, updates, theme}));"""result = subprocess.run([node, "-e", script], input=json.dumps(controller.group()), capture_output=True, text=True, check=False@@ -217,14 +247,24 @@ process.stdout.write(JSON.stringify({missing, failed, missingContext, released,assert states["missingContext"] == [[True, False]] * 4assert states["released"] == 4assert states["recovered"] == [[False, True]] * 4- assert states["built"] == 12- assert states["destroyed"] == 8- assert states["printAnimations"][4:8] == [False] * 4- assert states["colors"] == ["#e2e8f0"] * 4 + ["#0f172a"] * 4 + ["#e2e8f0"] * 4+ assert states["hiddenBuilt"] == 0+ assert states["built"] == 4+ assert states["destroyed"] == 0+ assert states["resized"] == 8+ assert [(row["id"], row["type"]) for row in states["constructions"]] == [+ ("tier3-radar", "radar"),+ ("tier3-metric-bar", "bar"),+ ("tier3-recorded-token-chart", "bar"),+ ("tier3-steps-chart", "bar"),+ ]+ assert [row["color"] for row in states["constructions"]] == ["#e2e8f0"] * 4+ assert [row["animation"] for row in states["updates"][:4]] == [False] * 4+ assert [row["mode"] for row in states["updates"][:4]] == ["none"] * 4+ assert [row["color"] for row in states["updates"]] == ["#0f172a"] * 4 + ["#e2e8f0"] * 4assert states["theme"] == "dark"-def test_charts_without_dimension_scores_link_to_an_openable_download_section() -> None:+def test_missing_dimension_scores_keep_agent_cards_and_openable_downloads() -> None:result = ValidationResult(validator_name="AGENT_EVAL")result.metadata["agent_eval"] = build_agent_eval_payload("example",@@ -233,12 +273,10 @@ def test_charts_without_dimension_scores_link_to_an_openable_download_section())html = HTMLReporter(include_timestamp=False).render_all([result])report = _parse(html)- links = re.findall(r'class="chart-description"[^>]*>[^<]*<a href="#([^"]+)" onclick="([^"]+)"', html)- dimension_links = [link for link in links if link[0] != "t3-trials-table"][:2]- assert [target for target, _ in dimension_links] == ["tier3-json-downloads"] * 2+ assert "tier3-radar" not in report.elements and "tier3-metric-bar" not in report.elements+ assert 'class="t3-agent-score" style="color:var(--text-secondary);">N/A</div>' in htmlassert report.elements["tier3-json-downloads"][0] == "details"# The section sits in the hidden Diagnostics sub-tab; the static handler reveals it.- assert all("openTier3Reference" in handler for _, handler in dimension_links)assert "function openTier3Reference(id)" in htmldiff --git a/tests/reporting/test_diagnostic_trial_comparisons.py b/tests/reporting/test_diagnostic_trial_comparisons.pynew file mode 100644index 00000000..a07c0d4a--- /dev/null+++ b/tests/reporting/test_diagnostic_trial_comparisons.py@@ -0,0 +1,84 @@+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0++"""Failed-arm trial diagnostics never become HTML skill comparisons."""++import base64+import json+import re+from copy import deepcopy++import pytest+from tests.reporting.test_dimension_explanations import _agent++from skillevaluator.evaluation.tier3_report import _validation_result_from_payload, build_agent_eval_payload+from skillevaluator.reporting import html as html_module+from skillevaluator.reporting.html import HTMLReporter+++def _trial_agent(failed_arm=None):+ info = _agent()+ if failed_arm is not None:+ key = "rewards" if failed_arm == "with_skill" else "rewards_baseline"+ info[f"diagnostic_{key}"] = [+ *info[key],+ {"entry_id": "case-1", "trial_id": "case-1__unscored", "_unscored": True},+ ]+ info[key] = []+ info["execution_status"] = "failed"+ info["conditions"][failed_arm] = {"execution_status": "failed"}+ return info+++def _render(agents):+ payload = build_agent_eval_payload("demo", agents, use_llm_judge=False)+ original = deepcopy(payload)+ result = _validation_result_from_payload(payload)+ output = HTMLReporter(include_timestamp=False).render_all([result])+ match = re.search(r'<script\b([^>]*\bid="tier3-full"[^>]*)>(.*?)</script>', output, re.DOTALL)+ assert match is not None+ data = base64.b64decode(match[2]).decode() if 'data-encoding="base64"' in match[1] else match[2]+ assert json.loads(data) == original+ assert payload == original+ return output, payload++[email protected]("failed_arm", [None, "with_skill", "without_skill"])+def test_html_compares_trials_only_when_both_arms_are_scored(failed_arm):+ output, payload = _render({"agent": _trial_agent(failed_arm)})++ # Pairing retained diagnostic rewards can still produce per-trial deltas.+ assert any(row.get("lift_scores") for row in payload["trials"])+ table = re.search(r'<table\b[^>]*id="t3-trials-table".*?<tbody>(.*?)</tbody>', output, re.DOTALL)+ assert table is not None+ assert len(re.findall(r"<tr\b", table[1])) == (3 if failed_arm else 2)+ assert ('id="tier3-lift-per-case"' in output) is (failed_arm is None)+ if failed_arm:+ key = "trials" if failed_arm == "with_skill" else "trials_baseline"+ assert all(row["diagnostic_only"] for row in payload["agents"]["agent"][key])+ assert any(row.get("scored") is False for row in payload["agents"]["agent"][key])++[email protected]("failed_arm", ["with_skill", "without_skill"])+def test_html_keeps_complete_peer_trial_comparisons(failed_arm):+ output, _payload = _render({"failed": _trial_agent(failed_arm), "completed": _trial_agent()})++ comparison = re.search(r'<details\b[^>]*id="tier3-lift-per-case".*?</details>', output, re.DOTALL)+ assert comparison is not None+ assert "<h4>completed " in comparison[0]+ assert "<h4>failed " not in comparison[0]+++def test_omitting_diagnostic_baseline_preview_rows_cannot_restore_a_comparison(monkeypatch):+ bounded_preview = html_module._bounded_tier3_preview++ def omit_baseline_rows(payload):+ preview, notice = bounded_preview(payload)+ for agent in preview["agents"].values():+ agent["trials_baseline"] = []+ return preview, notice++ monkeypatch.setattr(html_module, "_bounded_tier3_preview", omit_baseline_rows)+ output, _payload = _render({"agent": _trial_agent("without_skill")})++ assert 'id="tier3-lift-per-case"' not in outputdiff --git a/tests/reporting/test_diagnostic_view.py b/tests/reporting/test_diagnostic_view.pynew file mode 100644index 00000000..b92e9ffa--- /dev/null+++ b/tests/reporting/test_diagnostic_view.py@@ -0,0 +1,191 @@+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0+"""Grouped diagnostic explanations retain every recorded requirement association."""++from __future__ import annotations++from copy import deepcopy+from html.parser import HTMLParser++from jinja2 import Environment, PackageLoader+++def _judgment(expectation_id, **overrides):+ return {+ "expectation_id": expectation_id,+ "status": "not_checked",+ "reason": "No retained trial result could be matched to this case",+ "next_step": "Inspect execution and judge artifacts; then rerun this check.",+ "evidence": [],+ "unmet_checks": [],+ "inapplicable_checks": [],+ **overrides,+ }+++def _diagnostics(judgments):+ return [+ {+ "entry_id": "case-a",+ "requirements": [+ {"expectation_id": "assertions/0", "requirement": "Read the input\nwithout changing it"},+ {"expectation_id": "assertions/1", "requirement": "Write the output"},+ ],+ "attempts": [+ {+ "agent": "agent-a",+ "condition": "with_skill",+ "trial_id": None,+ "errors": [],+ "judge_note": "",+ "judgments": judgments,+ }+ ],+ }+ ]+++def _project(diagnostics):+ from skillevaluator.reporting.diagnostic_view import build_dataset_diagnostics_view++ return build_dataset_diagnostics_view(diagnostics)+++def _render(view, shared_errors=(), case_index=0):+ environment = Environment(loader=PackageLoader("skillevaluator.reporting", "templates"), autoescape=True)+ template = environment.from_string(+ '{% from "dataset_diagnostics.html.j2" import render_case_diagnostics with context %}'+ "{{ render_case_diagnostics(view, 'case-a', shared_errors, case_index) }}"+ )+ return template.render(view=view, shared_errors=shared_errors, case_index=case_index)+++class _Links(HTMLParser):+ def __init__(self):+ super().__init__()+ self.ids = []+ self.targets = []++ def handle_starttag(self, tag, attrs):+ attributes = dict(attrs)+ if attributes.get("id"):+ self.ids.append(attributes["id"])+ if tag == "a" and attributes.get("href", "").startswith("#"):+ self.targets.append(attributes["href"][1:])+++def test_same_attempt_status_and_cause_share_one_explanation_with_all_requirement_references():+ diagnostics = _diagnostics([_judgment("assertions/0"), _judgment("assertions/1")])+ view = _project(diagnostics)+ html = _render(view)++ assert html.count("No retained trial result could be matched to this case") == 1+ assert html.count("Inspect execution and judge artifacts; then rerun this check.") == 1+ assert "Not Checked (2)" in html+ assert "assertions/0" in html and "assertions/1" in html+ assert "Read the input\nwithout changing it" in html and "Write the output" in html+ links = _Links()+ links.feed(html)+ explanation_links = [target for target in links.targets if target.startswith("tier3-diagnostic-")]+ assert len(explanation_links) == 2+ assert len(set(explanation_links)) == 1+ assert explanation_links[0] in links.ids+++def test_distinct_reasons_actions_statuses_attempts_and_error_associations_stay_separate():+ judgments = [+ _judgment("assertions/0"),+ _judgment("assertions/1", reason="Judge failed; keep this entire reason"),+ _judgment("assertions/0", next_step="Inspect a different artifact"),+ _judgment("assertions/1", status="unscored"),+ _judgment("assertions/0", error_ref="judge-a"),+ _judgment("assertions/1", error_ref="judge-b"),+ ]+ diagnostics = _diagnostics(judgments)+ diagnostics[0]["attempts"].append(+ {**deepcopy(diagnostics[0]["attempts"][0]), "agent": "agent-b", "condition": "without_skill"}+ )+ view = _project(diagnostics)++ for attempt in view[0]["attempts"]:+ assert [(group["status"], group["count"]) for group in attempt["status_groups"]] == [+ ("not_checked", 5),+ ("unscored", 1),+ ]+ assert len(attempt["status_groups"][0]["groups"]) == 5+ html = _render(view)+ assert html.count("Judge failed; keep this entire reason") == 2+ assert "agent-a" in html and "agent-b" in html and "Without skill" in html+ links = _Links()+ links.feed(html)+ assert len(links.ids) == len(set(links.ids))+++def test_same_explanation_preserves_each_evidence_and_rubric_association_without_mutating_canonical_data():+ judgments = [+ _judgment("assertions/0", evidence=["trace-a"], unmet_checks=["INPUT"], inapplicable_checks=["SCRIPT"]),+ _judgment("assertions/1", evidence=["trace-b"], unmet_checks=["OUTPUT"]),+ ]+ diagnostics = _diagnostics(judgments)+ before = deepcopy(diagnostics)+ view = _project(diagnostics)+ group = view[0]["attempts"][0]["status_groups"][0]["groups"][0]++ assert group["judgments"] == judgments+ html = _render(view)+ first, second = html.split('<ul class="t3-ds-diagnostics">')[1].split("</ul>")[0].split("</li>")[:2]+ assert "assertions/0" in first and "trace-a" in first and "INPUT" in first and "SCRIPT" in first+ assert "trace-b" not in first+ assert "assertions/1" in second and "trace-b" in second and "OUTPUT" in second+ assert "trace-a" not in second+ group["judgments"][0]["evidence"].append("view-only")+ view[0]["requirements"][0]["requirement"] = "view-only"+ assert diagnostics == before+++def test_projection_keeps_omission_counts_and_all_retained_judgments_including_unknown_statuses():+ diagnostics = _diagnostics([_judgment(f"retained/{index}") for index in range(129)])+ diagnostics[0]["omissions"] = {"expectations": 7, "expectation_attempts": 3}+ diagnostics[0]["attempts"][0]["judgments"].append(_judgment("unrecognized", status="custom_status"))+ diagnostics[0]["attempts"][0]["judgments_omitted"] = 9+ view = _project(diagnostics)++ assert view[0]["omissions"] == {"expectations": 7, "expectation_attempts": 3}+ assert view[0]["attempts"][0]["judgments_omitted"] == 9+ assert len(view[0]["attempts"][0]["judgments"]) == 130+ groups = view[0]["attempts"][0]["status_groups"]+ assert [(group["status"], group["count"]) for group in groups] == [("not_checked", 129), ("custom_status", 1)]+ html = _render(view)+ assert "retained/128" in html and "unrecognized" in html and "Custom Status (1)" in html+++def test_template_escapes_each_recorded_field_and_keeps_shared_execution_errors_accessible():+ diagnostics = _diagnostics(+ [+ _judgment(+ "assertions/0",+ reason="reason <script>alert(1)</script>",+ next_step="step <img src=x onerror=alert(1)>",+ evidence=["evidence <svg onload=alert(1)>"],+ unmet_checks=["<check>"],+ ),+ _judgment("missing<id>", status="met"),+ ]+ )+ diagnostics[0]["requirements"][0]["requirement"] = "requirement <button>"+ diagnostics[0]["attempts"][0].update(+ agent="<agent>",+ trial_id="<trial>",+ judge_note="note <strong>",+ errors=["shared run error <private>", "local error <detail>"],+ )+ html = _render(_project(diagnostics), shared_errors=["shared run error <private>"], case_index=4)++ for text in ("<script>", "<img ", "<svg ", "<button>", "<agent>", "<trial>", "<private>", "<detail>"):+ assert text not in html+ for text in ("<script>", "<img ", "<svg ", "<button>", "<agent>", "<trial>"):+ assert text in html+ assert "missing<id>" in html+ assert "local error <detail>" in html+ assert "shared run error" not in html+ assert 'href="#tier3-execution-errors"' in htmldiff --git a/tests/reporting/test_dimension_explanations.py b/tests/reporting/test_dimension_explanations.pyindex 26ff2834..86660bc2 100644--- a/tests/reporting/test_dimension_explanations.py+++ b/tests/reporting/test_dimension_explanations.py@@ -11,6 +11,7 @@ from pathlib import Pathimport pytestfrom scripts.ci import check_public_benchmarks as benchmark_gate+from tests.reporting.report_markup_assertions import text_contentfrom skillevaluator.constants import DIMENSION_HINTS, SIGNAL_EVIDENCE_SOURCESfrom skillevaluator.evaluation.tier3_report import _validation_result_from_payload, build_agent_eval_payload@@ -77,6 +78,24 @@ def _dimension_table(html: str) -> str:return re.sub(r"\s+", " ", re.sub(r"<[^>]+>", " ", match.group(0)))+def _dimension_row(html: str, label: str) -> str:+ table = re.search(r'<table[^>]*id="tier3-dimension-table".*?</table>', html, re.DOTALL)+ return next(+ row for row in re.findall(r"<tr[^>]*>(.*?)</tr>", table[0], re.DOTALL) if f"<strong>{label}</strong>" in row+ )+++def _dimension_definition(html: str, label: str) -> str:+ row = _dimension_row(html, label)+ name_cell = re.search(r"<td>(.*?)</td>", row, re.DOTALL)[1]+ match = re.search(+ r'<details[^>]*class="[^"]*t3-dimension-definition[^"]*"[^>]*>.*?</details>', name_cell, re.DOTALL+ )+ assert match is not None, f"{label} needs a definition beneath its name"+ assert name_cell.index(f"<strong>{label}</strong>") < match.start()+ return match[0]++def _assert_gate_accepts(markdown: str, tmp_path: Path) -> None:card = tmp_path / "BENCHMARK.md"card.write_text(markdown, encoding="utf-8")@@ -162,7 +181,11 @@ def test_unscored_dimension_is_explained_not_zero(tmp_path: Path) -> None:table = _dimension_table(html)assert "Correctness" in table- assert "N/A not scored with the skill 0.50 N/A with-skill unavailable No verdict" in table+ row = _dimension_row(html, "Correctness")+ assert 'title="not scored with the skill"' in row+ assert 'title="with-skill unavailable"' in row+ assert re.search(r">0.50<|>\s*0.50\s*<", row)+ assert "No verdict" in rowassert "With-skill score unavailable; no verdict was computed." in table@@ -189,9 +212,35 @@ def test_missing_and_not_applicable_dimensions_have_reasons(tmp_path: Path) -> Nassert "Discoverability" in tableassert "N/A N/A N/A Not applicable" in tableassert "Skill Efficiency" in table- assert "N/A not scored with the skill N/A baseline not scored N/A with-skill unavailable No verdict" in table+ row = _dimension_row(html, "Skill Efficiency")+ for missing_reason in ("not scored with the skill", "baseline quality unavailable", "with-skill unavailable"):+ assert missing_reason in row+ assert "No verdict" in rowassert "A signal this dimension needs produced no score." in table- assert f"{reason} It has no score, so the agent's verdict stays NEUTRAL and cannot PASS." in table+ assert f"{reason}. It has no score, so the agent cannot PASS." in table+ assert "NEUTRAL" not in table+++def test_not_applicable_dimension_row_does_not_contradict_a_failing_verdict() -> None:+ # A scored dimension below 0.40 fails the agent even when another dimension+ # is Not applicable, so the row names only the shared outcome.+ payload = _payload({"agent": _agent(with_scores={"skill_efficiency": 0.1})})+ assert payload["verdict"] == "fail"+ agent = payload["agents"]["agent"]+ agent["dimensions"] = [d for d in agent["dimensions"] if d["id"] != "correctness"]+ agent["not_applicable_dimensions"] = [{"id": "correctness", "reason": ""}]+ payload["dimensions"] = deepcopy(agent["dimensions"])+ payload["not_applicable_dimensions"] = deepcopy(agent["not_applicable_dimensions"])++ _markdown, html = _render(payload)++ assert "Tier 3 quality: Changes required" in re.sub(r"\s+", " ", re.sub(r"<[^>]+>", " ", html))+ table = _dimension_table(html)+ row = table[table.index("N/A N/A N/A Not applicable") :].split("Overall", 1)[0]+ assert (+ "Not applicable: its signals had nothing to judge in any eval case. It has no score, so the agent cannot PASS."+ ) in row+ assert "verdict stays NEUTRAL" not in rowdef test_html_dimension_table_names_evidence_and_baseline_status() -> None:@@ -199,10 +248,76 @@ def test_html_dimension_table_names_evidence_and_baseline_status() -> None:table = _dimension_table(html)assert f"Evidence: {SIGNAL_EVIDENCE_SOURCES['security']}." in table.replace("'", "'")- assert "0.90 N/A baseline not run N/A no baseline PASS" in table+ row = _dimension_row(html, "Security")+ assert "0.90" in row and "PASS" in row+ assert 'title="baseline not run"' in row and 'title="no baseline score"' in rowassert "N/A means no measurement, never a score of zero; the note under it says why." in html+def test_html_dimension_definitions_are_discoverable_beneath_each_dimension_name() -> None:+ payload = _payload({"agent": _agent()})+ # Older retained reports do not always record the hint mapping.+ payload.pop("dimension_hints")+ _markdown, html = _render(payload)++ assert 'id="tier3-dimension-definitions"' not in html+ for label, meaning in (+ ("Security", "Avoids unsafe operations, secret leakage, and unauthorized access."),+ ("Correctness", "Produces factually accurate output."),+ ("Discoverability", "Activates the right skill when relevant; ignores unrelated skills."),+ ("Effectiveness", "Reaches the user's goal and follows the expected behavior."),+ ("Skill Efficiency", "Uses the skill and tools productively without wasted work."),+ ):+ definition = _dimension_definition(html, label)+ assert f'<summary aria-label="Definition of {label}">Definition</summary>' in definition+ assert "open" not in definition.split(">", 1)[0]+ assert meaning in text_content(definition)+ # Reasoning retains scope and evidence without a duplicate definition.+ assert text_content(_dimension_row(html, label)).count(meaning) == 1+++def test_html_dimension_definitions_remain_available_for_unscored_inapplicable_and_peer_only_rows() -> None:+ payload = _payload({"agent": _agent(baseline=False, with_scores={"accuracy": None})})+ agent = payload["agents"]["agent"]+ payload["agents"]["peer"] = deepcopy(agent)+ agent["dimensions"] = [d for d in agent["dimensions"] if d["id"] not in {"discoverability", "efficiency"}]+ agent["metrics_with_skill"] = [m for m in agent["metrics_with_skill"] if m != "skill_efficiency"]+ agent["not_applicable_dimensions"] = [{"id": "discoverability", "reason": "No relevant skill case"}]+ payload["dimensions"] = deepcopy(agent["dimensions"])+ payload["not_applicable_dimensions"] = deepcopy(agent["not_applicable_dimensions"])++ _markdown, html = _render(payload)++ assert "Produces factually accurate output." in text_content(_dimension_definition(html, "Correctness"))+ assert "Activates the right skill when relevant; ignores unrelated skills." in text_content(+ _dimension_definition(html, "Discoverability")+ )+ assert "Uses the skill and tools productively without wasted work." in text_content(+ _dimension_definition(html, "Skill Efficiency")+ )+ assert 'title="not scored with the skill"' in _dimension_row(html, "Correctness")+ assert "Not applicable" in _dimension_row(html, "Discoverability")+ assert "Not measured" in _dimension_row(html, "Skill Efficiency")+ assert "No measurement was recorded for the primary agent" in _dimension_row(html, "Skill Efficiency")+++def test_html_dimension_definitions_escape_recorded_text_and_skip_missing_hints() -> None:+ payload = _payload({"agent": _agent()})+ recorded_hint = '<img src=x onerror="alert(1)"> & "recorded definition"'+ payload["dimension_hints"] = {"security": recorded_hint, "correctness": None}++ _markdown, html = _render(payload)++ definition = _dimension_definition(html, "Security")+ assert recorded_hint in text_content(definition)+ assert "<img" not in definition+ assert "<img" in definition and "&" in definition+ table = re.search(r'<table[^>]*id="tier3-dimension-table".*?</table>', html, re.DOTALL)[0]+ assert table.count('class="t3-table-detail t3-dimension-definition"') == 1+ assert recorded_hint not in text_content(_dimension_row(html, "Security").split("</td>", 1)[1])+ assert "None" not in definition++def test_html_number_key_separates_verdict_scores_lift_and_quality() -> None:_markdown, html = _render(_payload({"agent": _agent()}))@@ -246,6 +361,7 @@ def test_html_does_not_add_unscored_rows_for_custom_only_metrics() -> None:_markdown, html = _render(payload)assert 'id="tier3-dimension-table"' not in html+ assert "t3-dimension-definition" not in htmldef test_benchmark_missing_dimension_requires_a_successful_active_signal() -> None:diff --git a/tests/reporting/test_evidence_views.py b/tests/reporting/test_evidence_views.pyindex b0bca3ec..c3289ade 100644--- a/tests/reporting/test_evidence_views.py+++ b/tests/reporting/test_evidence_views.py@@ -239,7 +239,7 @@ def test_catalog_kpi_marks_non_catalog_scopes_not_applicable():result.add_success("index_built", "Indexed", entry_count=3, content_type="skill")output = HTMLReporter(include_timestamp=False).render_all([result])across = output.split('id="tier2-across"', 1)[1].split("</section>", 1)[0]- catalog_card = across.split("Catalog entries compared</h3>", 1)[1].split("</div>", 1)[0]+ catalog_card = across.split("Catalog entries compared</dt>", 1)[1].split("</div>", 1)[0]assert "Not applicable" in catalog_card# similarity-check never runs the within-skill scope: say so, without Unavailable KPIs.within = output.split('id="tier2-within"', 1)[1].split("</section>", 1)[0]@@ -291,7 +291,7 @@ def test_across_scope_counts_similarity_matches_not_duplicates():result.add_success("catalog_compared", "Compared", catalog_entry_count=5, self_matches_excluded=1)output = HTMLReporter(include_timestamp=False).render_all([result])across = output.split('id="tier2-across"', 1)[1].split("</section>", 1)[0]- assert "Similarity matches</h3>" in across and "Duplicate findings" not in across+ assert "Similarity matches</dt>" in across and "Duplicate findings" not in acrossdef test_harbor_legacy_pair_stays_one_job_and_bad_shapes_do_not_crash():diff --git a/tests/reporting/test_final_render_context.py b/tests/reporting/test_final_render_context.pyindex 2d048831..b6847f70 100644--- a/tests/reporting/test_final_render_context.py+++ b/tests/reporting/test_final_render_context.py@@ -135,7 +135,7 @@ def test_failed_result_outranks_incomplete_in_html_tile_and_header():)tile = re.search(r'<div class="tier-card ([^"]+)"[^>]+data-target-tab="tier1"', html)assert tile and "fail" in tile[1]- assert 'data-verdict="fail"' in html+ assert 'hero-command-status verdict-chip fail">Changes required</p>' in htmlassert "Changes required" in html@@ -204,7 +204,7 @@ def test_html_coverage_uses_full_raw_counts_and_preserves_payload():original = copy.deepcopy(source)html = HTMLReporter().render(source)assert "188 scored trials: 101 with skill, 87 baseline" in html- assert "Best agent score" in html+ assert "188 of 240 scored" in htmlassert source == original@@ -212,7 +212,7 @@ def test_required_failure_cannot_be_replaced_by_completed_quality_verdict():source = result(3, agent_eval={"verdict": "pass", "overall_score": 0.8})source.add_error("agent setup failed")html = HTMLReporter(report_scope="tier3").render(source)- assert re.search(r'header-status-badge[^>]+data-verdict="fail"', html)+ assert re.search(r'hero-command-status verdict-chip fail">Changes required</p>', html)assert 'data-publication-status="not-assessed"' in html@@ -534,7 +534,7 @@ def test_standalone_tier3_report_header_follows_failing_tier3_verdict():ctx = context([source], report_scope="tier3")assert ctx.command_status == Status.FAILEDhtml = HTMLReporter(report_scope="tier3", tabs=[{"id": "tier3", "label": "Tier 3"}]).render_all([source])- assert re.search(r'header-status-badge[^>]*data-verdict="fail"', html)+ assert re.search(r'hero-command-status verdict-chip fail">Changes required</p>', html)assert "Passed required checks" not in htmldiff --git a/tests/reporting/test_incomplete_scans.py b/tests/reporting/test_incomplete_scans.pyindex a0b6f24b..e2a75d1a 100644--- a/tests/reporting/test_incomplete_scans.py+++ b/tests/reporting/test_incomplete_scans.py@@ -24,12 +24,11 @@ def _plain(output: str) -> str:def _assert_html_verdict_is_incomplete(output: str) -> None:- """The header verdict and the summary verdict both say Incomplete, and nothing says Passed."""- header = output.split('<header class="main-header">', 1)[1].split("</header>", 1)[0]+ """The primary result and the evidence summary say Incomplete, without a passing claim."""+ hero = output.split('<section class="agent-hero"', 1)[1].split("</section>", 1)[0]summary = output.split('<section class="exec-summary', 1)[1].split("</section>", 1)[0]- assert 'data-verdict="incomplete"' in header- assert '<span class="sr-only">Verdict: </span>Incomplete</span>' in header+ assert 'hero-command-status verdict-chip warn">Incomplete</p>' in heroassert '<span class="verdict-chip warn">Incomplete</span>' in summaryassert 'data-verdict="pass"' not in outputassert "verdict-chip pass" not in outputdiff --git a/tests/reporting/test_insights_view.py b/tests/reporting/test_insights_view.pynew file mode 100644index 00000000..e773c669--- /dev/null+++ b/tests/reporting/test_insights_view.py@@ -0,0 +1,438 @@+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0+"""Concise execution insights preserve canonical errors and scoped evidence."""++import copy++import pytest++from skillevaluator.evaluation.tier3_report import build_agent_eval_payload+++def _project(payload):+ from skillevaluator.reporting.insights_view import build_insights_view++ return build_insights_view(payload)+++def _failed_payload():+ errors = ["AgentTimeoutError: runtime failed; diagnostic contains a semicolon", "Judge failed for case-b"]+ blob = "; ".join(errors)+ return {+ "execution_status": "failed",+ "execution_errors": errors,+ "expected_attempts": 6,+ "scored_attempts": 3,+ "agents": {+ "agent-a": {+ "execution_status": "failed",+ "conditions": {+ "with_skill": {"execution_status": "failed", "scored_attempts": 2, "expected_attempts": 3},+ "without_skill": {"execution_status": "failed", "scored_attempts": 1, "expected_attempts": 3},+ },+ },+ },+ "conclusions": [{"title": "Evaluation incomplete", "severity": "fail", "message": blob}],+ "recommendations": [{"title": "AgentTimeoutError", "message": blob, "source": "deterministic"}],+ "next_steps": [+ {+ "kind": "incomplete run",+ "target": "evaluation",+ "problem": "3 attempts missing",+ "evidence": "agent-a/case-a (with-skill)",+ "action": "Rerun the failed attempts after checking logs.",+ "check": "Every planned attempt is scored.",+ "strength": "supported",+ }+ ],+ }+++def test_joined_error_copies_become_coverage_and_actions_without_splitting_error_prose():+ payload = _failed_payload()+ view = _project(payload)++ assert set(view) == {"conclusions", "recommendations", "next_steps", "execution_errors"}+ text = " ".join(card["message"] for key in ("conclusions", "recommendations") for card in view[key])+ assert "3 of 6 attempts scored" in text+ assert "2 of 3 attempts scored" in text and "1 of 3 attempts scored" in text+ assert "agent-a" in text and "baseline" in text and "with-skill" in text+ assert "diagnostic contains a semicolon" not in text+ assert view["execution_errors"] == payload["execution_errors"]+ assert [item["message"] for item in view["recommendations"]] == ["Rerun the failed attempts after checking logs."]+ assert view["next_steps"] == payload["next_steps"]+++def test_projection_does_not_mutate_or_alias_retained_feedback_and_errors():+ payload = _failed_payload()+ before = copy.deepcopy(payload)+ view = _project(payload)+ view["conclusions"][0]["message"] = "changed"+ view["execution_errors"].append("changed")+ view["next_steps"][0]["action"] = "changed"+ assert payload == before+++def test_healthy_feedback_with_semicolons_and_duplicates_stays_verbatim():+ payload = {+ "execution_status": "succeeded",+ "conclusions": [{"title": "Author's conclusion", "message": "Keep this; exact wording.", "source": "llm"}] * 2,+ "recommendations": [{"message": "Explain one; then two.", "evidence": {"url": "https://example.test/case"}}],+ "next_steps": [{"kind": "more cases", "action": "Add cases; keep existing ones."}],+ "execution_errors": [],+ }+ assert _project(payload) == {+ key: payload[key] for key in ("conclusions", "recommendations", "next_steps", "execution_errors")+ }+++def test_same_failure_at_different_cases_agents_or_evidence_is_not_deduplicated():+ payload = _failed_payload()+ cards = [+ {+ "title": "case-a",+ "message": "Timeout; inspect trace.",+ "agent": "agent-a",+ "case": "case-a",+ "evidence": {"url": "https://example.test/a"},+ },+ {+ "title": "case-b",+ "message": "Timeout; inspect trace.",+ "agent": "agent-a",+ "case": "case-b",+ "evidence": {"url": "https://example.test/b"},+ },+ {+ "title": "case-a",+ "message": "Timeout; inspect trace.",+ "agent": "agent-b",+ "case": "case-a",+ "evidence": {"url": "https://example.test/c"},+ },+ ]+ payload["recommendations"].extend([cards[0], *cards])+ view = _project(payload)+ scoped = [card for card in view["recommendations"] if card.get("case")]+ assert scoped == cards+++ "counts",+ [{}, {"scored_attempts": None, "expected_attempts": None}, {"scored_attempts": True, "expected_attempts": 2}],+)+def test_missing_or_invalid_coverage_is_unavailable_never_invented_zero(counts):+ payload = {"execution_status": "failed", "execution_errors": ["setup failed"], **counts}+ view = _project(payload)+ text = " ".join(card["message"] for card in view["conclusions"])+ assert "unavailable" in text.lower()+ assert "0 of" not in text+ assert view["recommendations"] and "setup failed" not in view["recommendations"][0]["message"]+++def test_unrecognized_authored_semicolon_feedback_is_preserved_on_failed_runs():+ payload = _failed_payload()+ authored = {"title": "case-a", "message": "Check authorization; then retry.", "source": "llm"}+ payload["conclusions"].append(authored)+ assert authored in _project(payload)["conclusions"]+++def test_new_failed_evaluation_emits_actions_and_keeps_complete_errors_without_provider_calls(monkeypatch):+ from tests.reporting.test_tier3_incomplete_arms import _agent, _condition++ from skillevaluator.evaluation import insights_judge++ def forbidden(*args, **kwargs):+ pytest.fail("failed evaluation attempted an insights provider call")++ monkeypatch.setattr(insights_judge, "build_insights", forbidden)+ errors = ["AgentTimeoutError: agent stopped; keep this full detail", "JudgeError: required check failed"]+ agent = _agent(baseline=_condition("failed", 1, errors=errors), with_skill=_condition("failed", 1, errors=errors))+ payload = build_agent_eval_payload("demo", {"agent-a": agent}, use_llm_judge=True)+ assert payload["execution_status"] == "failed" and payload["overall_score"] is None+ assert payload["execution_errors"] == errors+ # The saved payload keeps the recorded text; the report view derives the concise cards from it.+ view = _project(payload)+ assert "2 of 4 attempts scored" in " ".join(item["message"] for item in view["conclusions"])+ assert all(error not in card["message"] for error in errors for card in view["recommendations"])+ assert view["recommendations"]+++def test_error_blob_replacement_keeps_its_distinct_trace_associations():+ payload = _failed_payload()+ blob = payload["recommendations"][0]+ payload["recommendations"] = [+ {**blob, "evidence": {"url": "https://example.test/trace-a", "agent": "agent-a"}},+ {**blob, "evidence": {"url": "https://example.test/trace-b", "agent": "agent-b"}},+ ]+ view = _project(payload)+ assert [card["evidence"]["url"] for card in view["recommendations"] if card.get("evidence")] == [+ "https://example.test/trace-a",+ "https://example.test/trace-b",+ ]+ assert all("diagnostic contains a semicolon" not in card["message"] for card in view["recommendations"])+++def test_rendering_retained_failed_evidence_does_not_rebuild_or_call_a_provider(monkeypatch):+ from skillevaluator.evaluation import insights_judge, tier3_report+ from skillevaluator.models import ValidationResult+ from skillevaluator.reporting import HTMLReporter++ def forbidden(*args, **kwargs):+ pytest.fail("rendering retained evidence attempted evaluation or an insights provider call")++ monkeypatch.setattr(insights_judge, "build_insights", forbidden)+ monkeypatch.setattr(tier3_report, "build_agent_eval_payload", forbidden)+ payload = _failed_payload()+ payload.update({"skill_name": "demo", "verdict": "fail", "best_agent": "agent-a"})+ result = ValidationResult(validator_name="AGENT_EVAL", metadata={"agent_eval": payload})+ before = copy.deepcopy(payload)+ report = HTMLReporter(include_timestamp=False).render_all([result])+ assert "Evaluation incomplete" in report+ assert result.metadata["agent_eval"] == before++[email protected]("level", ["agent", "condition"])+def test_retained_agent_or_condition_counters_supply_missing_run_coverage(level):+ payload = _failed_payload()+ payload.pop("scored_attempts")+ payload.pop("expected_attempts")+ if level == "agent":+ payload["agents"]["agent-a"].update(scored_attempts=3, expected_attempts=6)+ payload["agents"]["agent-a"].pop("conditions")+ view = _project(payload)+ assert "3 of 6 attempts scored" in view["conclusions"][0]["message"]+ assert "3 of 6 attempts remain unscored" in view["conclusions"][0]["message"]+++def test_unknown_peer_coverage_prevents_partial_totals_being_reported_as_whole_run():+ payload = _failed_payload()+ payload.pop("scored_attempts")+ payload.pop("expected_attempts")+ payload["agents"]["unknown-peer"] = {"execution_status": "failed"}+ assert "unavailable" in _project(payload)["conclusions"][0]["message"].lower()+++def test_structured_action_keeps_its_evidence_and_verification_check():+ payload = _failed_payload()+ [card] = _project(payload)["recommendations"]+ assert card["evidence_text"] == "agent-a/case-a (with-skill)"+ assert card["check"] == "Every planned attempt is scored."+ assert card["problem"] == "3 attempts missing"+++def test_identical_actions_with_distinct_authored_problems_remain_distinct_and_independent():+ payload = _failed_payload()+ step = payload["next_steps"][0]+ payload["next_steps"] = [+ {**step, "problem": "Runner exited; the first diagnosis stays complete."},+ {**step, "problem": "Judge stopped; the second diagnosis stays complete."},+ ]+ before = copy.deepcopy(payload)+ first = _project(payload)+ assert [card.get("problem") for card in first["recommendations"]] == [+ "Runner exited; the first diagnosis stays complete.",+ "Judge stopped; the second diagnosis stays complete.",+ ]+ assert _project({**payload, **first}) == first+ first["recommendations"][0]["problem"] = "changed"+ assert payload == before+++def test_problem_without_a_run_diagnostics_copy_keeps_its_card_disclosure():+ payload = _failed_payload()+ payload["execution_errors"] = []+ payload["recommendations"] = []+ payload["agents"]["agent-a"]["execution_errors"] = ["RunnerError: retained agent-only cause"]+ payload["next_steps"][0]["problem"] = "RunnerError: retained agent-only cause"+ [card] = _project(payload)["recommendations"]+ assert card["problem"] == "RunnerError: retained agent-only cause"+ assert not card.get("problem_in_diagnostics")+++def test_render_time_error_append_does_not_hide_a_recognizable_legacy_blob_copy():+ payload = _failed_payload()+ payload["execution_errors"].append("Later retained report diagnostic")+ view = _project(payload)+ assert len(view["conclusions"]) == 3+ assert len(view["recommendations"]) == 1+ assert view["execution_errors"][-1] == "Later retained report diagnostic"+ assert all("diagnostic contains a semicolon" not in card["message"] for card in view["conclusions"])+++def test_partial_error_prose_is_not_misidentified_as_a_complete_legacy_blob():+ payload = _failed_payload()+ authored = {"title": "Evaluation incomplete", "message": "AgentTimeoutError: runtime failed"}+ payload["conclusions"] = [authored]+ assert authored in _project(payload)["conclusions"]++[email protected]("mode,arm", [("with_skill_only", "with_skill"), ("baseline_only", "without_skill")])+def test_deliberately_skipped_arm_does_not_make_active_arm_coverage_unknown(mode, arm):+ payload = {+ "execution_status": "failed",+ "mode": mode,+ "agents": {+ "agent-a": {+ "conditions": {+ arm: {"execution_status": "failed", "scored_attempts": 0, "expected_attempts": 2},+ }+ }+ },+ }+ text = _project(payload)["conclusions"][0]["message"]+ assert "0 of 2 attempts scored" in text and "2 of 2 attempts remain unscored" in text+++def test_projecting_a_new_failed_producer_payload_twice_does_not_duplicate_cards():+ payload = _failed_payload()+ first = _project(payload)+ second = _project({**payload, **first})+ assert second == first+++def test_authored_feedback_with_malformed_optional_metadata_remains_renderable():+ payload = _failed_payload()+ authored = {"title": "Author note", "message": "Inspect the case.", "insight_kind": ["legacy"]}+ payload["conclusions"].append(authored)+ payload["mode"] = {"legacy": True}+ payload.pop("scored_attempts")+ payload.pop("expected_attempts")+ assert authored in _project(payload)["conclusions"]+++def test_error_summary_keeps_distinct_trace_associations_across_repeated_projection():+ payload = _failed_payload()+ blob = payload["conclusions"][0]+ payload["conclusions"] = [+ {**blob, "evidence": {"url": "https://example.test/trace-a"}},+ {**blob, "evidence": {"url": "https://example.test/trace-b"}},+ ]+ first = _project(payload)+ assert [card["evidence"]["url"] for card in first["conclusions"] if card.get("evidence")] == [+ "https://example.test/trace-a",+ "https://example.test/trace-b",+ ]+ assert _project({**payload, **first}) == first++[email protected]("level", ["agent", "condition"])+def test_complete_structured_coverage_takes_precedence_over_stale_run_summary(level):+ payload = _failed_payload()+ payload.pop("scored_attempts")+ payload.pop("expected_attempts")+ payload["summary"] = {"scored_attempts": 1, "expected_attempts": 1}+ if level == "agent":+ payload["agents"]["agent-a"].update(scored_attempts=3, expected_attempts=6)+ payload["agents"]["agent-a"].pop("conditions")+ assert "3 of 6 attempts scored" in _project(payload)["conclusions"][0]["message"]+++def test_scoped_actions_never_inherit_another_agent_or_case_legacy_trace():+ payload = _failed_payload()+ blob = payload["recommendations"][0]+ payload["recommendations"] = [+ {**blob, "evidence": {"url": "https://example.test/a", "agent": "agent-a", "case_id": "case-a"}},+ {**blob, "evidence": {"url": "https://example.test/b", "agent": "agent-b", "case_id": "case-b"}},+ ]+ payload["next_steps"] = [+ {+ "kind": "incomplete run",+ "agent": "agent-a",+ "case_id": "case-a",+ "action": "Rerun only agent-a/case-a.",+ "evidence": {"url": "https://example.test/a"},+ },+ {+ "kind": "incomplete run",+ "agent": "agent-b",+ "case_id": "case-b",+ "action": "Rerun only agent-b/case-b.",+ "evidence": {"url": "https://example.test/b"},+ },+ ]+ recommendations = _project(payload)["recommendations"]+ for card in recommendations:+ evidence = card.get("evidence") or {}+ if card["message"] == "Rerun only agent-a/case-a.":+ assert evidence["url"] == "https://example.test/a"+ assert card.get("agent") == "agent-a" and card.get("case_id") == "case-a"+ if card["message"] == "Rerun only agent-b/case-b.":+ assert evidence["url"] == "https://example.test/b"+ assert card.get("agent") == "agent-b" and card.get("case_id") == "case-b"+ assert [card["message"] for card in recommendations if card.get("agent")] == [+ "Rerun only agent-a/case-a.",+ "Rerun only agent-b/case-b.",+ ]+++def test_repeated_projection_preserves_coverage_case_and_trace_associations():+ payload = _failed_payload()+ first = _project(payload)+ arm = next(card for card in first["conclusions"] if card.get("condition") == "with_skill")+ first["conclusions"].remove(arm)+ first["conclusions"].extend(+ [+ {**arm, "case_id": "case-a", "evidence": {"url": "https://example.test/a"}, "evidence_refs": ["trace-a"]},+ {**arm, "case_id": "case-b", "evidence": {"url": "https://example.test/b"}, "evidence_refs": ["trace-b"]},+ ]+ )+ before = copy.deepcopy(first)+ second = _project({**payload, **first})+ coverage = [card for card in second["conclusions"] if card.get("condition") == "with_skill"]+ assert [(card["agent"], card["case_id"], card["evidence"]["url"], card["evidence_refs"]) for card in coverage] == [+ ("agent-a", "case-a", "https://example.test/a", ["trace-a"]),+ ("agent-a", "case-b", "https://example.test/b", ["trace-b"]),+ ]+ assert _project({**payload, **second}) == second+ coverage[0]["evidence"]["url"] = "changed"+ assert first == before++[email protected]("mode", ["with_skill_only", "baseline_only"])+def test_explicit_non_skipped_conditions_override_stale_single_arm_mode(mode):+ payload = _failed_payload()+ payload["mode"] = mode+ payload["scored_attempts"] = 1+ payload["expected_attempts"] = 1+ text = _project(payload)["conclusions"][0]["message"]+ assert "3 of 6 attempts scored" in text++[email protected]("error_count", [0, 1])[email protected]("authored", [False, True])+def test_blocking_source_preflight_preserves_feedback_without_inventing_runtime_failure(+ tmp_path, error_count, authored+):+ from skillevaluator.evaluation.tier3_report import dataset_required_result+ from skillevaluator.tier3.evals_spec import CheckResult++ checks = [CheckResult("entry case-a", "error", "Missing required field: question")] if error_count else []+ result = dataset_required_result(+ tmp_path / "evals" / "evals.json",+ checks,+ blocking=True,+ skill_name="demo",+ source_kind="evals_json",+ )+ payload = result.metadata["agent_eval"]+ conclusions = (+ [{"title": "Coverage gap", "message": "Add the missing source fields; preserve this advice."}]+ if authored+ else []+ )+ recommendations = [{"title": "Fix the dataset", "message": "Supply a question for each case."}] if authored else []+ if authored:+ payload.update(conclusions=conclusions, recommendations=recommendations)+ before = copy.deepcopy(payload)+ view = _project(payload)+ assert view == {+ "conclusions": conclusions,+ "recommendations": recommendations,+ "next_steps": [],+ "execution_errors": payload["execution_errors"],+ }+ assert payload == before+ assert payload["suggestions"] == [+ f"Create or fix the Tier 3 source under {tmp_path / 'evals'} and rerun validation."+ ]diff --git a/tests/reporting/test_native_comparison_assertions.py b/tests/reporting/test_native_comparison_assertions.pynew file mode 100644index 00000000..635ab2a1--- /dev/null+++ b/tests/reporting/test_native_comparison_assertions.py@@ -0,0 +1,20 @@+# SPDX-License-Identifier: Apache-2.0+"""Consolidated-table assertions must require the actual visible lift reason."""++import re++import pytest+from native_comparison_assertions import dimension_lift_labels+from test_tier3_unavailable_lift_labels import _agent, _html++[email protected]("baseline", [False, True])+def test_missing_primary_overall_lift_reason_is_detected(baseline):+ payload, html = _html({"agent": _agent(baseline=baseline, judge_with="fallback")})+ assert len(dimension_lift_labels(html, ["agent"], payload["best_agent"])["agent"]) == 6+ overall = re.search(r"<tr>\s*<td><strong>Overall</strong>.*?</tr>", html, re.DOTALL)[0]+ cells = re.findall(r"<td(?:\s[^>]*)?>(.*?)</td>", overall, re.DOTALL)+ assert "no baseline" in cells[3] or "comparison unavailable" in cells[3]+ broken = html.replace(overall, overall.replace(cells[3], "N/A", 1), 1)+ with pytest.raises(AssertionError):+ dimension_lift_labels(broken, ["agent"], payload["best_agent"])diff --git a/tests/reporting/test_native_evidence.py b/tests/reporting/test_native_evidence.pynew file mode 100644index 00000000..89353223--- /dev/null+++ b/tests/reporting/test_native_evidence.py@@ -0,0 +1,395 @@+# SPDX-License-Identifier: Apache-2.0+"""Sanitized synthetic native fields; these are not live evaluation results."""++from __future__ import annotations++import importlib+import json+from copy import deepcopy+from pathlib import Path++import pytest+++def api():+ module = importlib.import_module("skillevaluator.reporting.native_evidence")+ return module.build_native_evidence+++def fixture():+ return json.loads((Path(__file__).parent / "fixtures" / "native-optional-evidence.json").read_text())+++def fragment(view, slot):+ from skillevaluator.reporting import HTMLReporter++ return (+ HTMLReporter(include_timestamp=False)+ ._env.from_string(+ "{% from 'native_evidence.html.j2' import render_native_warnings, render_native_evidence %}"+ "{{ render_native_warnings(view) if slot == 'overview' else render_native_evidence(view, slot) }}"+ )+ .render(view=view, slot=slot)+ )+++def test_native_groups_display_recorded_evidence_without_changing_input():+ raw = fixture()+ original = deepcopy(raw)+ view = api()(raw)+ overview = fragment(view, "overview")+ agents = fragment(view, "agents")+ trials = fragment(view, "trials")+ diagnostics = fragment(view, "provenance")+ assert "Harbor delivery incomplete" in overview+ assert "Provider safety notice" in overview+ assert "Plugin dependency coverage" in overview+ assert "uploads/demo.tar.gz" in diagnostics+ assert "synthetic upload timeout" in diagnostics+ assert "resolved-skill" in agents and "unresolved-rule" in agents+ assert "synthetic-tool" in agents and "connected, no recorded calls" in agents+ assert "Recorded refusal comparison basis" in agents and "refused-case" in agents+ assert "0.8" in agents and "0.6" in agents+ assert "Plugin composition" in trials and "0.71" in trials and "0.54" in trials+ assert "0.17" in trials and "0.04" in trials and "0.3" in trials+ assert "Synthetic recorded interpretation" in trials and "component-alpha" in trials+ assert "missing-part-case" in trials and "unused-rule" in trials+ assert "Synthetic recovery note" in diagnostics+ assert '<details class="t3-details"' in agents+ assert " open" not in agents + trials + diagnostics+ assert "Synthetic recovery note" not in overview+ assert raw == original++[email protected]("value", [None, {}, [], "unexpected", False])+def test_absent_null_empty_and_wrong_shapes_do_not_invent_status(value):+ view = api()(+ {+ "plugin_provenance": value,+ "integration": value,+ "harbor_viewer_delivery": value,+ "agents": {"demo": {"safety_refusals": value, "recovery_notes": value}},+ }+ )+ assert not view.warnings and not view.agents and not view.trials and not view.provenance+ assert not fragment(view, "overview").strip()+++def test_partial_composition_shows_only_supplied_fields_and_reason():+ view = api()({"integration": {"reason": "Synthetic missing arm", "requested_lift_mode": "both"}})+ html = fragment(view, "trials")+ assert "Synthetic missing arm" in html and "both" in html+ assert "inconclusive" not in html.lower()+ assert "0.0" not in html and "not exercised" not in html+ assert not view.warnings++[email protected]("usage", [None, {}, {"calls": None}, {"calls": False}, {"calls": "0"}])+def test_mcp_missing_or_malformed_call_measurements_are_not_zero(usage):+ view = api()(+ {+ "plugin_provenance": {+ "mcp_resolutions": [+ {+ "name": "synthetic-mcp",+ "status": "reachable-in-agent",+ "tool_usage": usage,+ }+ ]+ }+ }+ )+ html = fragment(view, "agents")+ assert "synthetic-mcp" in html+ assert "connected, no recorded calls" not in html and "tool calls failed" not in html++[email protected]("status", [None, "not-evaluated", "unreachable"])+def test_zero_calls_without_recorded_connection_do_not_claim_connected(status):+ view = api()(+ {+ "plugin_provenance": {+ "mcp_resolutions": [+ {+ "name": "synthetic-mcp",+ "status": status,+ "tool_usage": {"calls": 0},+ }+ ]+ }+ }+ )+ assert "connected, no recorded calls" not in fragment(view, "agents")+++def test_explicit_mcp_failures_are_advisory_and_do_not_change_payload():+ raw = {+ "plugin_provenance": {+ "mcp_resolutions": [+ {+ "name": "synthetic-mcp",+ "status": "reachable-host",+ "tool_usage": {"calls": 2, "failed": 1},+ }+ ]+ }+ }+ original = deepcopy(raw)+ html = fragment(api()(raw), "agents")+ assert "tool calls failed" in html and "advisory" in html.lower()+ assert "connected, no recorded calls" not in html+ assert raw == original+++def test_presentation_escapes_redacts_and_links_only_exact_safe_archive_urls():+ raw = fixture()+ agent = raw["agents"]["demo-agent"]+ agent["recovery_notes"] = ["<script>injected()</script> password=syntheticsecret\ud800\u202e\x1b[31m"]+ raw["harbor_viewer_delivery"]["uploads"] = [+ {"status": "failed", "diagnostic_archive": "https://example.test/retained/demo.tar.gz"},+ {"status": "failed", "diagnostic_archive": "javascript:alert(1)"},+ ]+ html = fragment(api()(raw), "provenance")+ assert "<script>injected()" not in html and "<script>" in html+ assert "syntheticsecret" not in html and "redacted" in html+ assert "\ud800" not in html and "\x1b" not in html and "\u202e" not in html+ assert 'href="https://example.test/retained/demo.tar.gz"' in html+ assert 'href="javascript:' not in html+ assert 'href="uploads/' not in html+++def test_rows_cells_and_notes_are_bounded_with_local_disclosures():+ raw = {+ "plugin_provenance": {"evaluated_member_skills": [f"skill-{n}" for n in range(90)]},+ "agents": {"demo": {"recovery_notes": ["Recorded " + "x" * 500] * 20}},+ }+ original = deepcopy(raw)+ view = api()(raw)+ html = fragment(view, "agents") + fragment(view, "provenance")+ assert "rows omitted" in html and "notes omitted" in html and "text shortened" in html+ assert "skill-89" not in html and "x" * 500 not in html+ assert len(html) < 50000+ assert raw == original+++def test_large_nested_or_cyclic_unknown_fields_are_not_traversed():+ raw = {"integration": {"reason": "Bounded retained reason"}}+ raw["integration"]["unknown"] = raw+ assert "Bounded retained reason" in fragment(api()(raw), "trials")+++def test_successful_delivery_and_zero_refusal_counts_do_not_emit_active_warnings():+ view = api()(+ {+ "harbor_viewer_delivery": {"viewer_status": "succeeded", "uploads": []},+ "agents": {"demo": {"safety_refusals": {"attempts": 0, "model_mixed_attempts": 0}}},+ }+ )+ assert not view.warnings+++def test_native_pass_rate_basis_comes_from_pass_at_k_lift():+ raw = {+ "agents": {+ "demo": {+ "pass_at_k": {+ "lift": {+ "safety_refusal_cases": ["native-excluded-case"],+ "with_skill": 0.75,+ "without_skill": 0.25,+ }+ }+ }+ }+ }+ html = fragment(api()(raw), "agents")+ assert "native-excluded-case" in html and "0.75" in html and "0.25" in html+++def test_native_mcp_preserves_recorded_resolution_detail_and_ignores_shaped_status():+ raw = {+ "plugin_provenance": {+ "mcp_resolutions": [+ {+ "name": "detailed",+ "status": "not-evaluated",+ "url": "https://example.test/mcp",+ "tool_count": 3,+ "reason": "Synthetic resolution reason",+ "remediation": "Synthetic next step",+ },+ {"name": "malformed", "status": {}, "tool_usage": {"calls": 0}},+ ]+ }+ }+ html = fragment(api()(raw), "agents")+ assert (+ "https://example.test/mcp" in html and "Synthetic resolution reason" in html and "Synthetic next step" in html+ )+ assert "connected, no recorded calls" not in html+++def test_case_only_refusal_record_keeps_a_short_active_notice():+ view = api()({"agents": {"demo": {"safety_refusals": {"cases": ["recorded-refusal-case"]}}}})+ assert "Provider safety notice" in fragment(view, "overview")+ assert "recorded-refusal-case" in fragment(view, "agents")+++def test_native_html_places_each_group_once_and_preserves_canonical_exports():+ from test_native_report_parity import _embedded_payload++ from skillevaluator.evaluation.tier3_report import build_agent_eval_payload+ from skillevaluator.models import ValidationResult+ from skillevaluator.reporting import HTMLReporter++ payload = build_agent_eval_payload(+ "synthetic", {"agent": {"overall_with_skill": 0.8, "overall_without_skill": 0.4}}, use_llm_judge=False+ )+ optional = fixture()+ payload["agents"]["agent"].update(optional.pop("agents")["demo-agent"])+ payload.update(optional)+ # A scored, succeeded synthetic run qualifies for the existing safe display+ # boundary. Uncertified arm data is deliberately scrubbed before this adapter.+ payload.update(execution_status="succeeded", expected_attempts=2, scored_attempts=2)+ payload["agents"]["agent"].update(execution_status="succeeded", expected_attempts=2, scored_attempts=2)+ original = deepcopy(payload)+ result = ValidationResult(validator_name="AGENT_EVAL", metadata={"agent_eval": payload})+ html = HTMLReporter(include_timestamp=False).render_all([result])+ overview = html.split('id="tier3-page-overview"', 1)[1].split('id="tier3-page-trials"', 1)[0]+ trials = html.split('id="tier3-page-trials"', 1)[1].split('id="tier3-page-agents"', 1)[0]+ agents = html.split('id="tier3-page-agents"', 1)[1].split('id="tier3-page-dataset"', 1)[0]+ diagnostics = html.split('id="tier3-page-provenance"', 1)[1].split("</section>", 1)[0]+ assert overview.count('id="tier3-native-notices"') == 1+ for key, page in (+ ("plugin-completeness", agents),+ ("refusal-basis-0", agents),+ ("integration", trials),+ ("viewer-delivery", diagnostics),+ ("recovery-notes-0", diagnostics),+ ):+ assert html.count(f'id="native-{key}"') == 1+ assert f'id="native-{key}"' in page+ assert _embedded_payload(html) == original == payload+++def test_numeric_native_values_reject_strings_booleans_and_nonfinite_numbers():+ raw = {+ "integration": {+ "with_plugin": True,+ "sum_of_parts": "not-a-score",+ "integration_lift": float("inf"),+ "lift_uncertainty": {"ci_low": "not-an-interval", "n_cases": False},+ },+ "plugin_provenance": {"partial": "not-a-boolean"},+ }+ view = api()(raw)+ assert not view.agents and not view.trials and not view.warnings+++def test_explicit_numeric_zero_is_retained_without_becoming_a_missing_value():+ view = api()(+ {+ "integration": {+ "with_plugin": 0,+ "sum_of_parts": 0,+ "integration_lift": 0,+ "lift_uncertainty": {"ci_low": 0, "ci_high": 0, "n_cases": 0},+ }+ }+ )+ html = fragment(view, "trials")+ assert html.count("<td>0</td>") == 6+++def test_native_completeness_retains_recorded_ignored_mcp_config_details():+ view = api()(+ {+ "plugin_provenance": {+ "mcp_untrusted_configs": [+ {+ "path": "evals/environment/synthetic-mcp.json",+ "entries": 2,+ }+ ]+ }+ }+ )+ html = fragment(view, "agents")+ assert "evals/environment/synthetic-mcp.json" in html and "<td>2</td>" in html+ assert not view.warnings+++def test_nested_tool_list_omissions_are_disclosed_even_when_cell_is_shortened():+ raw = {+ "plugin_provenance": {+ "mcp_resolutions": [+ {+ "name": "synthetic-mcp",+ "tool_usage": {"tools": ["t" * 200] * 20},+ }+ ]+ }+ }+ html = fragment(api()(raw), "agents")+ assert "4 tool entries omitted" in html and "text shortened" in html+++def test_agent_identity_survives_an_exhausted_shared_native_text_budget():+ mcp = {+ "name": "n" * 300,+ "status": "s" * 300,+ "tool_count": 1,+ "tool_usage": {"calls": 1, "failed": 0, "tools": ["t" * 300]},+ "url": "u" * 300,+ "reason": "r" * 300,+ "remediation": "m" * 300,+ }+ raw = {+ "plugin_provenance": {"mcp_resolutions": [mcp] * 64},+ "agents": {+ name: {"safety_refusals": {"attempts": 1}, "recovery_notes": ["Recorded recovery"]}+ for name in ("first-agent", "second-agent")+ },+ }+ original = deepcopy(raw)+ view = api()(raw)+ basis = [section for section in view.agents if section.key.startswith("refusal-basis-")]+ recovery = [section for section in view.provenance if section.key.startswith("recovery-notes-")]+ assert all(not section.rows and section.omitted_rows for section in basis)+ for sections in (basis, recovery):+ assert len(sections) == 2+ assert "first-agent" in sections[0].title+ assert "second-agent" in sections[1].title+ assert all(all(note.strip() for note in section.notes) for section in sections)+ assert all(section.text_shortened for section in sections)+ html = fragment(view, "agents") + fragment(view, "provenance")+ assert len(html.encode()) < 160_000+ assert raw == original+++def test_unused_native_components_keep_their_kind_and_disclose_omitted_groups():+ unused = {kind: ["shared-component"] for kind in ("skill", "rule", "mcp")}+ unused.update({f"extra-{index}": ["another-component"] for index in range(16)})+ raw = {"integration": {"component_signals": {"unused_declared": unused}}}+ original = deepcopy(raw)+ view = api()(raw)+ html = fragment(view, "trials")+ assert "Declared but unused · skill" in html+ assert "Declared but unused · rule" in html+ assert "Declared but unused · mcp" in html+ assert "3 component groups omitted" in html+ assert "extra-15" not in html+ assert raw == original+++def test_reserved_native_agent_labels_stay_sanitized_bounded_and_distinct():+ names = [f"{'界' * 200}-{index}" for index in range(40)]+ raw = {"agents": {name: {"safety_refusals": {"attempts": 1}, "recovery_notes": ["Recorded"]} for name in names}}+ view = api()(raw)+ assert len(view.agents) == len(view.provenance) == 32+ assert view.omitted_agents == 8+ assert len({section.title for section in view.agents}) == 32+ assert all(len(section.title.encode()) < 180 for section in (*view.agents, *view.provenance))+ assert all(section.text_shortened for section in (*view.agents, *view.provenance))+ html = fragment(view, "agents") + fragment(view, "provenance")+ assert len(html.encode()) < 160_000diff --git a/tests/reporting/test_native_feature_restoration.py b/tests/reporting/test_native_feature_restoration.pynew file mode 100644index 00000000..96f8783d--- /dev/null+++ b/tests/reporting/test_native_feature_restoration.py@@ -0,0 +1,354 @@+# SPDX-License-Identifier: Apache-2.0+"""Native report capabilities stay visible without changing retained measurements."""++import re+from copy import deepcopy+from pathlib import Path++import pytest+from browser_navigation_fixtures import _agent_result+from report_markup_assertions import text_content++from skillevaluator import __version__+from skillevaluator.evaluation.tier3_report import build_agent_eval_payload+from skillevaluator.models import ValidationResult+from skillevaluator.reporting.html import HTMLReporter+from skillevaluator.tier3.harbor.metrics import DEFAULT_METRICS++[email protected]("status", ["comparable", "partial"])+def test_comparison_table_keeps_partial_notes_without_repeating_normal_comparison_prose(status):+ result = _agent_result("synthetic", ["first-agent", "second-agent"])+ payload = result.metadata["agent_eval"]+ note = "The same full-comparison note should not repeat in every measured cell."+ dimensions = list(payload["dimensions"])+ for agent in payload["agents"].values():+ dimensions.extend(agent["dimensions"])+ for dimension in dimensions:+ dimension["comparison"] = {+ "status": status,+ "label": "Recorded comparison",+ "reason": note,+ "with_skill": 0.8,+ "baseline": 0.6,+ "lift": 0.15,+ }+ original = deepcopy(payload)+ html = _render(result)+ table = html.split('id="tier3-dimension-table"', 1)[1].split("</table>", 1)[0]+ assert (note in table) is (status == "partial")+ assert payload == original+++def test_incomplete_baseline_quality_is_not_reported_as_a_baseline_that_never_ran():+ from test_report_clarity import _result++ result = _result("incomplete")+ payload = result.metadata["agent_eval"]+ payload["metric_ids"] = list(DEFAULT_METRICS)+ payload["agents"] = {+ "agent": {+ "execution_status": "failed",+ "conditions": {+ "with_skill": {"execution_status": "failed", "scored_attempts": 16, "expected_attempts": 18},+ "without_skill": {"execution_status": "failed", "scored_attempts": 12, "expected_attempts": 18},+ },+ }+ }+ original = deepcopy(payload)+ html = _render(result)+ table = html.split('id="tier3-dimension-table"', 1)[1].split("</table>", 1)[0]+ assert "baseline not run" not in table+ assert "baseline quality unavailable" in table+ assert "28 of 36 scored" in html+ assert payload == original++[email protected]("arm", [None, "unknown", [], {"execution_status": "skipped"}])+def test_baseline_quality_hint_tolerates_legacy_arm_shapes_and_keeps_explicit_skips(arm):+ from test_report_browser import _edge_result++ result = _edge_result("missing-baseline")+ payload = result.metadata["agent_eval"]+ next(iter(payload["agents"].values()))["conditions"]["without_skill"] = arm+ original = deepcopy(payload)+ html = _render(result)+ table = html.split('id="tier3-dimension-table"', 1)[1].split("</table>", 1)[0]+ explicit_skip = isinstance(arm, dict) and arm.get("execution_status") == "skipped"+ assert ("baseline not run" in table) is explicit_skip+ if not explicit_skip:+ assert "baseline quality unavailable" in table+ assert payload == original++[email protected]("invalid_dimension", [{}, {"id": ""}, {"id": " "}])+def test_custom_metrics_do_not_create_a_blank_dimension_table_from_missing_peer_ids(invalid_dimension):+ from test_report_browser import _edge_result++ result = _edge_result("custom-only")+ payload = result.metadata["agent_eval"]+ payload["agents"]["peer-custom"] = deepcopy(next(iter(payload["agents"].values())))+ payload["agents"]["peer-custom"]["dimensions"] = [invalid_dimension]+ original = deepcopy(payload)+ html = HTMLReporter(include_timestamp=False).render_all([result])+ assert 'id="tier3-metric-comparison-table"' in html+ assert 'id="tier3-dimension-table"' not in html+ assert payload == original+++def _render(result=None, **kwargs):+ result = result or _agent_result("synthetic", ["first-agent", "second-agent"])+ return HTMLReporter(include_timestamp=False, **kwargs).render_all([result])+++def _overview(html):+ return html.split('id="tier3-page-overview"', 1)[1].split('id="tier3-page-trials"', 1)[0]+++def test_recorded_tool_versions_are_visible_without_a_generated_timestamp():+ result = ValidationResult(validator_name="Schema Check")+ result.metadata["skillspector_version"] = "2.11.1"+ original = deepcopy(result)+ html = _render(result)+ header = html.split('<header class="main-header">', 1)[1].split("</header>", 1)[0]+ assert f"SkillEvaluator v{__version__}" in " ".join(text_content(header).split())+ tile = html.split('data-target-tab="tier1"', 1)[1].split("</nav>", 1)[0]+ assert "SkillSpector v2.11.1" in " ".join(text_content(tile).split())+ assert "SkillSpector" not in header+ assert "<details" not in header+ assert "Generated:" not in header+ assert result == original+++def test_native_header_scale_is_not_replaced_by_the_compact_override():+ css = (Path(__file__).parents[2] / "src/skillevaluator/reporting/templates/report_ui.css.j2").read_text()+ assert not re.search(r"\.main-header\s+\.header-title\s*\{[^}]*font-size", css)+ assert not re.search(r"\.main-header\s*\{[^}]*padding:\s*\.7rem", css)+ assert ".main-header .header-subtitle-row { display:none; }" not in css++[email protected]("multi", [False, True])+def test_harbor_results_and_analysis_are_visible_in_tile_and_overview(multi):+ result = _agent_result("synthetic", ["first-agent"])+ viewer = {"job_url": "https://example.test/job/one", "analysis_url": "https://example.test/analysis/one"}+ if multi:+ viewer = {+ "analysis_url": "https://example.test/analysis/run",+ "jobs": [+ {+ "name": name,+ "url": f"https://example.test/job/{name}",+ "analysis_url": f"https://example.test/analysis/{name}",+ }+ for name in ("one", "two")+ ],+ }+ result.metadata["agent_eval"]["harbor_viewer"] = viewer+ original = deepcopy(result.metadata["agent_eval"])+ html = _render(result)+ tile = html.split('data-target-tab="tier3"', 1)[1].split("</nav>", 1)[0]+ urls = ["https://example.test/job/one", "https://example.test/analysis/one"]+ if multi:+ urls += [+ "https://example.test/job/two",+ "https://example.test/analysis/two",+ "https://example.test/analysis/run",+ ]+ for surface in (tile, _overview(html)):+ for url in urls:+ assert surface.count(f'href="{url}"') == 1+ assert "event.target===this" in tile+ assert result.metadata["agent_eval"] == original+++def test_absent_harbor_links_have_a_concise_overview_state():+ overview = _overview(_render())+ assert 'id="tier3-harbor-unavailable"' in overview+ assert "No Harbor viewer or analysis links were recorded." in overview+ assert 'class="t3-harbor-link"' not in overview+++def test_overview_has_one_native_dimension_table_with_cross_agent_context():+ overview = _overview(_render())+ table = overview.split('id="tier3-dimension-table"', 1)[1].split("</table>", 1)[0]+ assert "Baseline</th>" in table+ assert "second-agent</button>" in table+ assert "Overall</strong>" in table+ assert '<table class="summary-table" id="tier3-multi-agent-dimension-table"' not in overview+ wrapper = overview.split('id="tier3-multi-agent-dimension-table"', 1)[1]+ assert wrapper.index('id="tier3-dimension-table"') < wrapper.index("</table>")+ assert "Multi-Agent Dimension Lift</summary>" not in overview+++def test_native_agent_scorecards_retain_scores_counts_and_details_navigation():+ result = _agent_result("synthetic", ["first-agent", "second-agent"])+ original = deepcopy(result.metadata["agent_eval"])+ overview = _overview(_render(result))+ assert 'id="tier3-agent-scorecards" open' in overview+ cards = re.findall(r'<div class="t3-agent-card t3-agent-deeplink"(.*?)</div>\s*</div>', overview, re.DOTALL)+ assert len(cards) == 2+ for name, card in zip(("first-agent", "second-agent"), cards, strict=True):+ assert name in card+ assert 'class="t3-agent-score"' in card+ assert "2 trials" in card+ assert "jumpToTier3Agent" in card+ assert result.metadata["agent_eval"] == original+++def test_dataset_uses_native_generic_title_and_the_recorded_content_subject():+ result = _agent_result("synthetic", ["first-agent"])+ result.metadata["agent_eval"]["dataset"] = [{"id": "case-1", "prompt": "Summarize synthetic input."}]+ html = _render(result, content_label="Plugin")+ dataset = html.split('id="tier3-page-dataset"', 1)[1].split('id="tier3-page-suggestions"', 1)[0]+ assert "Evaluation Dataset</h2>" in dataset+ assert "AgentSkills Dataset" not in dataset+ assert "Plugin: <b>synthetic</b>" in dataset+++def test_unavailable_overall_comparison_does_not_label_a_missing_measurement_fail():+ result = _agent_result("synthetic", ["first-agent"])+ result.metadata["agent_eval"].update(+ agents={},+ dimensions=[],+ overall_score=None,+ overall_lift=None,+ best_agent=None,+ execution_status="failed",+ metric_ids=list(DEFAULT_METRICS),+ )+ result.add_error("Recorded evaluation did not complete")+ original = deepcopy(result.metadata["agent_eval"])+ overview = _overview(_render(result))+ overall = re.search(r"<tr>\s*<td><strong>Overall</strong>.*?</tr>", overview, re.DOTALL)[0]+ assert "N/A" in overall+ assert "FAIL" not in overall and "PASS" not in overall+ assert result.metadata["agent_eval"] == original+++def _extreme_result(scores):+ baseline = dict.fromkeys(DEFAULT_METRICS, 0.4)+ payload = build_agent_eval_payload(+ "synthetic",+ {+ "agent": {+ "execution_status": "succeeded",+ "expected_attempts": 2,+ "scored_attempts": 2,+ "with_skill": scores,+ "without_skill": baseline,+ "rewards": [{"trial_id": "with", "entry_id": "case-1", **scores}],+ "rewards_baseline": [{"trial_id": "base", "entry_id": "case-1", **baseline}],+ "num_trials": 1,+ "num_trials_baseline": 1,+ }+ },+ use_llm_judge=False,+ )+ result = ValidationResult(validator_name="AGENT_EVAL")+ result.metadata["agent_eval"] = payload+ return result+++def test_agent_details_extremes_use_recorded_dimensions_and_include_zero():+ scores = dict.fromkeys(DEFAULT_METRICS, 0.5)+ scores.update(security=0.9, accuracy=0.0, goal_accuracy=0.6, skill_efficiency=0.2)+ result = _extreme_result(scores)+ original = deepcopy(result.metadata["agent_eval"])+ html = _render(result)+ agents = html.split('id="tier3-page-agents"', 1)[1].split('id="tier3-page-dataset"', 1)[0]+ assert 'class="t3-kpi-label">Best Dimension</div>' in agents+ assert 'class="t3-kpi-label">Weakest Dimension</div>' in agents+ best = re.search(r'Best Dimension</div>\s*<div[^>]*>([^<]+)</div>\s*<div class="t3-kpi-sub">([^<]+)</div>', agents)+ weakest = re.search(+ r'Weakest Dimension</div>\s*<div[^>]*>([^<]+)</div>\s*<div class="t3-kpi-sub">([^<]+)</div>', agents+ )+ assert best.groups() == ("Security", "0.90")+ assert weakest.groups() == ("Correctness", "0.00")+ assert result.metadata["agent_eval"] == original+++def test_agent_details_missing_dimensions_do_not_become_zero_extremes():+ result = _extreme_result(dict.fromkeys(DEFAULT_METRICS, None))+ html = _render(result)+ agents = html.split('id="tier3-page-agents"', 1)[1].split('id="tier3-page-dataset"', 1)[0]+ assert "Best Dimension</div>" not in agents+ assert "Weakest Dimension</div>" not in agents++[email protected]("score", [None, 0.0])+def test_scorecard_distinguishes_missing_quality_from_a_recorded_zero(score):+ result = _extreme_result(dict.fromkeys(DEFAULT_METRICS, score))+ if score is None:+ result.metadata["agent_eval"]["mode"] = "baseline_only"+ original = deepcopy(result.metadata["agent_eval"])+ overview = _overview(_render(result))+ card = re.search(r'<div class="t3-agent-card t3-agent-deeplink".*?</div>\s*</div>', overview, re.DOTALL)[0]+ assert ('class="t3-mini-bar"' in card) is (score is not None)+ if score is None:+ assert "with-skill unavailable" in card+ else:+ assert re.search(r"width:0(?:\.0)?%", card)+ assert result.metadata["agent_eval"] == original++[email protected]("status", ["partial", "unavailable"])+def test_recorded_partial_comparison_is_visible_and_unavailable_numbers_stay_absent(status):+ result = _agent_result("synthetic", ["first-agent"])+ result.metadata["agent_eval"]["dimensions"][0].update(+ partial=True,+ comparison={+ "status": status,+ "label": "Recorded paired comparison",+ "reason": "Recorded scope limitation",+ "with_skill": 0.8,+ "baseline": 0.6,+ "lift": 0.15,+ },+ )+ original = deepcopy(result.metadata["agent_eval"])+ overview = _overview(_render(result))+ assert ">partial</span>" in overview+ assert "Recorded paired comparison" in overview and "Recorded scope limitation" in overview+ assert ("0.60 → 0.80 (+0.15 lift)" in overview) is (status == "partial")+ assert result.metadata["agent_eval"] == original++[email protected]("peer_score", [None, 0.0])[email protected]("recorded_not_applicable", [False, True])+def test_missing_best_dimensions_keep_each_peers_recorded_scope(peer_score, recorded_not_applicable):+ result = _agent_result("synthetic", ["best", "peer"])+ payload = result.metadata["agent_eval"]+ recorded_dimensions = deepcopy(payload["dimensions"])+ payload["dimensions"] = [dimension for dimension in recorded_dimensions if dimension["id"] == "correctness"]+ payload["not_applicable_dimensions"] = [+ {"id": dimension["id"], "reason": "Not configured for the best agent"}+ for dimension in recorded_dimensions+ if recorded_not_applicable and dimension["id"] != "correctness"+ ]+ payload["agents"]["best"]["dimensions"] = deepcopy(payload["dimensions"])+ payload["agents"]["best"]["metrics_with_skill"] = ["accuracy"]+ peer = payload["agents"]["peer"]+ peer.update(+ with_skill=peer_score, baseline=0.4, lift=None, execution_status="failed" if peer_score is None else "succeeded"+ )+ for dimension in peer["dimensions"]:+ dimension.update(score=peer_score, with_skill=peer_score, baseline=0.4, lift=None)+ assert payload["best_agent"] == "best"+ assert len(payload["not_applicable_dimensions"]) == (4 if recorded_not_applicable else 0)+ original = deepcopy(payload)+ table = _overview(_render(result)).split('id="tier3-dimension-table"', 1)[1].split("</table>", 1)[0]+ missing_rows = [+ row+ for row in re.findall(r"<tr>(.*?)</tr>", table, re.DOTALL)+ if ("Not applicable</span>" if recorded_not_applicable else "Not measured</span>") in row+ ]+ assert len(missing_rows) == 4+ for row in missing_rows:+ cells = re.findall(r"<td(?:\s[^>]*)?>(.*?)</td>", row, re.DOTALL)+ assert [cell.strip() for cell in cells[1:4]] == ["N/A", "N/A", "N/A"]+ peer_cells = re.findall(r'<span class="t3-mad-score"[^>]*>(.*?)</span>', table)+ assert peer_cells == (["N/A"] * 6 if peer_score is None else ["0.00"] * 6)+ assert table.count('class="t3-mad-bar"') == (0 if peer_score is None else 6)+ if peer_score is None:+ assert table.count("with-skill unavailable") == 6+ assert result.metadata["agent_eval"] == originaldiff --git a/tests/reporting/test_native_harbor_fallback.py b/tests/reporting/test_native_harbor_fallback.pynew file mode 100644index 00000000..a03074f8--- /dev/null+++ b/tests/reporting/test_native_harbor_fallback.py@@ -0,0 +1,159 @@+# SPDX-License-Identifier: Apache-2.0+"""Unusable primary Harbor metadata must not hide recorded legacy links."""++from copy import deepcopy++import pytest++from skillevaluator.reporting.harbor_viewer import (+ harbor_job_links,+ normalize_agent_eval_harbor_links,+ normalize_harbor_viewer_for_display,+)+++ "primary",+ [+ {},+ {"jobs": [], "evidence_links": []},+ {"job_url": "javascript:alert(1)", "analysis_url": "data:text/html,unsafe"},+ {"job_url": "https://[invalid"},+ {"jobs": [{"url": "file:///tmp/unavailable"}, {"url": "//example.test/no-scheme"}]},+ {"evidence_links": [{"url": "javascript:alert(1)", "agent": "untrusted"}]},+ ],+ ids=["empty", "empty-lists", "unsafe-links", "malformed-url", "unusable-jobs", "unsafe-evidence"],+)+def test_unusable_primary_viewer_falls_back_to_recorded_summary_links(primary):+ summary = {+ "job_url": "https://example.test/recorded-job",+ "analysis_url": "https://example.test/recorded-analysis",+ }+ payload = {"harbor_viewer": primary, "summary": {"harbor_viewer": summary}}+ original = deepcopy(payload)++ assert normalize_harbor_viewer_for_display(payload) == summary+ projected = normalize_agent_eval_harbor_links(payload)+ assert projected["harbor_viewer"] == summary+ assert projected["summary"]["harbor_viewer"] == summary+ assert harbor_job_links(projected) == [+ {+ "url": "https://example.test/recorded-job",+ "analysis_url": "https://example.test/recorded-analysis",+ "name": "Job 1",+ }+ ]+ assert payload == original+++ ("primary", "expected"),+ [+ (+ {"job_url": "https://example.test/primary-job"},+ {"job_url": "https://example.test/primary-job"},+ ),+ (+ {"analysis_url": "https://example.test/primary-analysis"},+ {"analysis_url": "https://example.test/primary-analysis"},+ ),+ (+ {"jobs": [{"url": "https://example.test/primary-job", "name": "Recorded primary"}]},+ {+ "job_url": "https://example.test/primary-job",+ "jobs": [{"url": "https://example.test/primary-job", "name": "Recorded primary"}],+ },+ ),+ (+ {"evidence_links": [{"url": "https://example.test/primary-trial?step=4", "agent": "agent-a"}]},+ {+ "evidence_links": [+ {"url": "https://example.test/primary-trial?step=4", "agent": "agent-a", "label": "Step 4"}+ ]+ },+ ),+ ],+ ids=["job", "analysis-only", "job-list", "evidence-only"],+)+def test_usable_primary_viewer_retains_existing_precedence(primary, expected):+ payload = {+ "harbor_viewer": primary,+ "summary": {+ "harbor_viewer": {+ "job_url": "https://example.test/other-job",+ "analysis_url": "https://example.test/other-analysis",+ }+ },+ }+ original = deepcopy(payload)+ assert normalize_harbor_viewer_for_display(payload) == expected+ assert normalize_agent_eval_harbor_links(payload)["harbor_viewer"] == expected+ assert "other-job" not in repr(harbor_job_links(payload))+ assert payload == original++[email protected]("summary", [None, [], "not-a-summary", {}, {"harbor_viewer": []}])+def test_unusable_summary_does_not_create_viewer_links(summary):+ payload = {"harbor_viewer": {"job_url": "javascript:alert(1)"}, "summary": summary}+ original = deepcopy(payload)++ assert normalize_harbor_viewer_for_display(payload) == {}+ assert harbor_job_links(payload) == []+ assert "harbor_viewer" not in normalize_agent_eval_harbor_links(payload)+ assert payload == original+++def test_summary_fallback_preserves_each_job_and_recorded_evidence_association():+ payload = {+ "harbor_viewer": {"jobs": []},+ "summary": {+ "harbor_viewer": {+ "analysis_url": "https://example.test/run-analysis",+ "jobs": [+ {+ "url": "https://example.test/with-skill",+ "analysis_url": "https://example.test/shared-analysis",+ "name": "Agent A with skill",+ },+ {+ "url": "https://example.test/baseline",+ "analysis_url": "https://example.test/shared-analysis",+ "name": "Agent A baseline",+ },+ {"url": "https://example.test/baseline", "name": "Duplicate"},+ {"url": "javascript:alert(1)", "name": "Unsafe"},+ ],+ "evidence_links": [+ {+ "url": "https://example.test/with-skill/trial?step=7",+ "agent": "agent-a",+ "condition": "with_skill",+ "case_id": "case-one",+ },+ {"url": "javascript:alert(1)", "agent": "unsafe"},+ ],+ }+ },+ }+ original = deepcopy(payload)++ projected = normalize_agent_eval_harbor_links(payload)+ assert harbor_job_links(projected) == [+ {+ "url": "https://example.test/with-skill",+ "analysis_url": "https://example.test/shared-analysis",+ "name": "Agent A with skill",+ },+ {"url": "https://example.test/baseline", "name": "Agent A baseline"},+ {"name": "Run analysis", "analysis_url": "https://example.test/run-analysis"},+ ]+ assert projected["harbor_viewer"]["evidence_links"] == [+ {+ "url": "https://example.test/with-skill/trial?step=7",+ "agent": "agent-a",+ "condition": "with_skill",+ "case_id": "case-one",+ "label": "Step 7",+ }+ ]+ assert payload == originaldiff --git a/tests/reporting/test_native_overview_comparison.py b/tests/reporting/test_native_overview_comparison.pynew file mode 100644index 00000000..be420895--- /dev/null+++ b/tests/reporting/test_native_overview_comparison.py@@ -0,0 +1,455 @@+# SPDX-License-Identifier: Apache-2.0+"""Overview comparisons retain native detail without inventing scored evidence."""++from __future__ import annotations++import base64+import json+import re+from copy import deepcopy+from types import SimpleNamespace++import pytest++from skillevaluator.evaluation.tier3_report import build_agent_eval_payload+from skillevaluator.models import ValidationResult+from skillevaluator.reporting import html as html_report+from skillevaluator.reporting.html import HTMLReporter+from skillevaluator.tier3.harbor.metrics import DEFAULT_METRICS+++def _comparison(**updates):+ return {+ "status": "partial",+ "label": "Recorded token-only comparison",+ "reason": "Only the same recorded sources can be compared.",+ "reason_code": "shared_sources_only",+ "with_skill": 0.8,+ "baseline": 0.6,+ "lift": 0.15,+ "sources": ["token_efficiency"],+ "measured": {+ "with_skill": {"score": 0.7, "sources": ["skill_efficiency", "token_efficiency"]},+ "baseline": {"score": 0.6, "sources": ["token_efficiency"]},+ },+ **updates,+ }+++def _custom_payload(**updates):+ return {+ "execution_status": "succeeded",+ "best_agent": "agent",+ "agents": {"agent": {"execution_status": "succeeded", "metrics_with_skill": []}},+ "dimensions": [],+ "metric_ids": [],+ "evaluator_cards": [+ {"id": "task_quality", "label": "Custom: Task quality", "with_skill": 0.8, "baseline": 0.5, "lift": 0.2}+ ],+ **updates,+ }+++def _metric_view(payload):+ helper = getattr(html_report, "_tier3_metric_comparison_view", None)+ assert callable(helper), "The Overview needs a bounded recorded custom-metric projection"+ return helper(payload)+++def _context(monkeypatch, payload):+ result = ValidationResult(validator_name="AGENT_EVAL")+ if payload.get("execution_status") == "failed":+ result.add_error("Recorded runner did not complete")+ result.metadata["agent_eval"] = payload+ original = deepcopy(payload)+ reporter = HTMLReporter(include_timestamp=False)+ captured = {}++ def render(**values):+ captured.update(values)+ return "captured"++ monkeypatch.setattr(reporter._env, "get_template", lambda *_args, **_kwargs: SimpleNamespace(render=render))+ assert reporter.render_all([result]) == "captured"+ assert payload == original+ canonical = captured["tier3_canonical_data"]+ if captured["tier3_canonical_encoding"] == "base64":+ canonical = base64.b64decode(canonical)+ assert json.loads(canonical) == original+ return captured+++def test_incomplete_standard_metrics_keep_all_known_dimension_comparisons_unavailable():+ payload = {+ "execution_status": "failed",+ "dimensions": [],+ "best_agent": None,+ "agents": {"failed": {"execution_status": "failed", "metrics_with_skill": list(DEFAULT_METRICS)}},+ }+ original = deepcopy(payload)+ rows = html_report._tier3_html_dimensions(payload)+ assert [row["id"] for row in rows] == ["security", "correctness", "discoverability", "effectiveness", "efficiency"]+ for row in rows:+ assert all(row[key] is None for key in ("score", "with_skill", "baseline", "lift", "verdict"))+ assert row["measurement_unavailable"] is True+ assert "did not complete" in " ".join(row["reasoning_bullets"])+ assert payload == original+++ "metric,dimensions", [("accuracy", ["correctness"]), ("task_quality", []), ("token_efficiency", []), (None, [])]+)+def test_unavailable_rows_use_recorded_public_signal_mapping_only(metric, dimensions):+ payload = {"execution_status": "incomplete", "metric_ids": [metric] if metric else []}+ assert [row["id"] for row in html_report._tier3_html_dimensions(payload)] == dimensions+++def test_successful_best_agent_does_not_import_failed_peer_configuration():+ payload = {+ "execution_status": "failed",+ "best_agent": "complete",+ "dimensions": [{"id": "correctness", "score": 0.8, "baseline": 0.5, "lift": 0.2}],+ "agents": {+ "complete": {"execution_status": "succeeded", "metrics_with_skill": ["accuracy"]},+ "failed": {"execution_status": "failed", "metrics_with_skill": list(DEFAULT_METRICS)},+ },+ }+ assert html_report._tier3_html_dimensions(payload) == payload["dimensions"]+++def test_recorded_partial_comparison_keeps_its_values_without_recomputing_lift():+ raw = {+ "id": "efficiency",+ "score": 0.7,+ "baseline": None,+ "lift": None,+ "partial": True,+ "comparison": _comparison(),+ }+ original = deepcopy(raw)+ dimension = html_report._sanitize_tier3_dimension(raw)+ assert dimension["partial"] is True+ assert dimension["baseline"] is dimension["lift"] is None+ assert dimension["comparison"]["lift"] == 0.15 # Recorded paired lift, not 0.8 - 0.6.+ assert dimension["comparison"]["measured"]["with_skill"]["score"] == 0.7+ assert raw == original+++ "invalid",+ ["0.7", True, [], {}, float("nan"), float("inf"), -0.2, 1.2, 10**500],+ ids=["text", "bool", "list", "dict", "nan", "inf", "negative", "too-large", "huge"],+)+def test_native_comparison_numeric_cells_are_typed_finite_and_bounded(invalid):+ dimension = html_report._sanitize_tier3_dimension(+ {+ "comparison": _comparison(+ with_skill=invalid, baseline=invalid, lift=invalid, measured={"baseline": {"score": invalid}}+ )+ }+ )+ comparison = dimension["comparison"]+ assert comparison["with_skill"] is comparison["baseline"] is None+ expected_lift = invalid if type(invalid) in (int, float) and -1 <= invalid <= 1 else None+ assert comparison["lift"] == expected_lift+ assert comparison["measured"]["baseline"]["score"] is None++[email protected]("invalid", [None, "partial", [], 4])+def test_malformed_comparison_objects_are_not_sent_to_the_template(invalid):+ dimension = html_report._sanitize_tier3_dimension({"partial": "yes", "comparison": invalid})+ assert dimension["partial"] is False+ assert not dimension.get("comparison")+++def test_malformed_comparison_text_and_sources_fail_closed():+ dimension = html_report._sanitize_tier3_dimension(+ {"comparison": _comparison(status=[], label={}, reason=[], reason_code=False, sources="accuracy")}+ )+ comparison = dimension["comparison"]+ assert comparison["status"] == "unavailable"+ assert comparison["label"] == comparison["reason"] == comparison["reason_code"] == ""+ assert comparison["sources"] == []+ assert all(comparison[key] is None for key in ("with_skill", "baseline", "lift"))++[email protected]("status", ["not_applicable", "unavailable", "inconclusive"])+def test_noncomparable_status_does_not_restore_cached_comparison_numbers(status):+ dimension = html_report._sanitize_tier3_dimension({"comparison": _comparison(status=status)})+ assert dimension["comparison"]["status"] == status+ assert all(dimension["comparison"][key] is None for key in ("with_skill", "baseline", "lift"))+++def test_never_activated_saved_dimensions_do_not_restore_nested_causal_comparison():+ raw = {+ "best_agent": "agent",+ "agents": {+ "agent": {+ "skill_activation": {"status": "never_activated"},+ "dimensions": [{"id": "efficiency", "score": 0.7, "comparison": _comparison()}],+ }+ },+ "dimensions": [{"id": "efficiency", "score": 0.7, "comparison": _comparison()}],+ }+ original = deepcopy(raw)+ safe = html_report._sanitize_tier3_display_payload(raw)+ for dimension in (safe["dimensions"][0], safe["agents"]["agent"]["dimensions"][0]):+ assert dimension["comparison"]["lift"] is None+ assert dimension["comparison"]["status"] == "inconclusive"+ assert "never activated" in dimension["comparison"]["reason"]+ assert raw == original++[email protected]("scope", ["baseline_only", "summary_baseline_only", "agent_skipped", "root_skipped"])+def test_skipped_skill_arm_suppresses_root_and_agent_nested_comparison(scope):+ raw = {+ "best_agent": "agent",+ "agents": {"agent": {"dimensions": [{"id": "efficiency", "score": 0.7, "comparison": _comparison()}]}},+ "dimensions": [{"id": "efficiency", "score": 0.7, "comparison": _comparison()}],+ }+ if scope == "baseline_only":+ raw["mode"] = "baseline_only"+ elif scope == "summary_baseline_only":+ raw["summary"] = {"mode": "baseline_only"}+ else:+ owner = raw["agents"]["agent"] if scope == "agent_skipped" else raw+ owner["conditions"] = {"with_skill": {"execution_status": "skipped"}}+ original = deepcopy(raw)+ safe = html_report._sanitize_tier3_display_payload(raw)+ for dimension in (safe["dimensions"][0], safe["agents"]["agent"]["dimensions"][0]):+ comparison = dimension["comparison"]+ assert comparison["with_skill"] is comparison["baseline"] is comparison["lift"] is None+ assert comparison["status"] == "unavailable"+ assert (+ "Baseline-only" in comparison["reason"] if "baseline_only" in scope else "skipped" in comparison["reason"]+ )+ assert "never activated" not in comparison["reason"]+ assert comparison["measured"] == original["dimensions"][0]["comparison"]["measured"]+ assert raw == original+++def test_collected_baseline_only_report_does_not_render_cached_causal_comparison(tmp_path):+ from skillevaluator.evaluation.tier3_report import agent_eval_result_from_directory+ from skillevaluator.tier3.harbor.collector import collect_harbor_results+ from skillevaluator.tier3.harbor.metrics import DEFAULT_METRIC_SET++ skill = tmp_path / "demo"+ skill.mkdir()+ (skill / "SKILL.md").write_text("---\nname: demo\ndescription: Synthetic comparison\n---\n# Demo\n")+ jobs = tmp_path / "jobs"+ job = jobs / "demo-opencode-without"+ verifier = job / "case__attempt" / "verifier"+ verifier.mkdir(parents=True)+ reward = {+ "entry_id": "case",+ "metric_set": DEFAULT_METRIC_SET,+ "overall": 0.67,+ **dict.fromkeys(DEFAULT_METRICS, 0.67),+ }+ (verifier / "reward.json").write_text(json.dumps(reward))+ (job / "result.json").write_text(+ json.dumps(+ {+ "n_total_trials": 1,+ "stats": {+ "n_completed_trials": 1,+ "n_errored_trials": 0,+ "n_running_trials": 0,+ "n_pending_trials": 0,+ "n_cancelled_trials": 0,+ "n_retries": 0,+ "evals": {+ "agent__model___harbor-tasks": {+ "n_trials": 1,+ "n_errors": 0,+ "reward_stats": {"reward": {"0.67": ["case__attempt"]}},+ }+ },+ },+ }+ )+ )+ run_dir = tmp_path / "results"+ collected = collect_harbor_results(+ skill_name="demo",+ agents=["opencode"],+ output_dir=run_dir,+ jobs_dir=jobs,+ skip_with_skill=True,+ expected_cases=1,+ expected_case_ids=["case"],+ expected_trials=1,+ )+ result = agent_eval_result_from_directory(skill, run_dir, engine_result=collected, use_llm_judge=False)+ payload = result.metadata["agent_eval"]+ assert payload["mode"] == "baseline_only"+ best = payload["agents"][payload["best_agent"]]+ assert best["conditions"]["with_skill"]["execution_status"] == "skipped"+ for dimension in (payload["dimensions"][0], best["dimensions"][0]):+ dimension["comparison"] = _comparison()+ original = deepcopy(payload)+ reporter = HTMLReporter(include_timestamp=False)+ display = reporter._tier3_report_data([result])+ for dimension in (display["dimensions"][0], display["agents"][payload["best_agent"]]["dimensions"][0]):+ assert dimension["comparison"]["lift"] is None+ assert "Baseline-only" in dimension["comparison"]["reason"]+ assert dimension["comparison"]["measured"] == _comparison()["measured"]+ html = reporter.render_all([result])+ overview = html.split('id="tier3-page-overview"', 1)[1].split('id="tier3-page-trials"', 1)[0]+ assert "+0.15" not in overview+ assert "baseline-only" in overview.lower()+ embedded = re.search(r'<script(?P<attrs>[^>]*\bid="tier3-full"[^>]*)>(?P<data>.*?)</script>', html, re.DOTALL)+ assert embedded is not None+ canonical = embedded["data"]+ if 'data-encoding="base64"' in embedded["attrs"]:+ canonical = base64.b64decode(canonical)+ assert json.loads(canonical) == original+ assert payload == original+++def test_custom_comparison_uses_recorded_card_and_preserves_paired_lift():+ payload = _custom_payload()+ original = deepcopy(payload)+ assert _metric_view(payload) == {+ "rows": [+ {+ "id": "task_quality",+ "label": "Custom: Task quality",+ "score": 0.8,+ "baseline": 0.5,+ "lift": 0.2,+ "reason": "",+ }+ ],+ "omitted": 0,+ }+ assert html_report._tier3_html_dimensions(payload) == []+ assert payload == original+++def test_custom_metric_comparison_does_not_reconstruct_missing_baseline_from_rewards():+ payload = _custom_payload()+ payload["evaluator_cards"][0].update(baseline=None, lift=None)+ payload["agents"]["agent"]["trials_baseline"] = [{"custom_metrics": {"task_quality": 0.5}}]+ row = _metric_view(payload)["rows"][0]+ assert row["score"] == 0.8 and row["baseline"] is row["lift"] is None+ assert "baseline" in row["reason"].lower()+++def test_standard_metric_dimensions_do_not_get_a_duplicate_custom_table():+ payload = _custom_payload(metric_ids=["accuracy"])+ assert _metric_view(payload) == {"rows": [], "omitted": 0}+++def test_custom_table_has_explicit_omission_count_and_no_identifier_collisions():+ cards = [{"id": f"custom_{index}", "with_skill": 0.5} for index in range(70)]+ view = _metric_view(_custom_payload(evaluator_cards=cards))+ assert len(view["rows"]) == 64 and view["omitted"] == 6+ assert view["rows"][0]["id"] == "custom_0"+ assert view["rows"][-1]["id"] == "custom_63"+ collision = _custom_payload(+ evaluator_cards=[{"id": "Custom", "with_skill": 0.5}, {"id": "custom", "with_skill": 0.8}]+ )+ assert _metric_view(collision) == {"rows": [], "omitted": 0}+++def test_baseline_only_custom_table_does_not_restore_a_skill_score_or_lift():+ row = _metric_view(_custom_payload(mode="baseline_only"))["rows"][0]+ assert row["score"] is row["lift"] is None and row["baseline"] == 0.5+ assert "Baseline-only" in row["reason"]++[email protected]("scope", ["summary_baseline_only", "agent_skipped", "root_skipped"])+def test_custom_table_uses_the_same_explicit_skill_arm_guard(scope):+ payload = _custom_payload()+ if scope == "summary_baseline_only":+ payload["summary"] = {"mode": "baseline_only"}+ else:+ owner = payload["agents"]["agent"] if scope == "agent_skipped" else payload+ owner["conditions"] = {"with_skill": {"execution_status": "skipped"}}+ original = deepcopy(payload)+ row = _metric_view(payload)["rows"][0]+ assert row["score"] is row["lift"] is None and row["baseline"] == 0.5+ assert "Baseline-only" in row["reason"] if "baseline_only" in scope else "skipped" in row["reason"]+ assert "never activated" not in row["reason"]+ assert payload == original+++def test_never_activated_custom_table_keeps_diagnostic_scores_but_no_causal_lift():+ payload = _custom_payload()+ payload["agents"]["agent"]["skill_activation"] = {"status": "never_activated"}+ row = _metric_view(payload)["rows"][0]+ assert row["score"] == 0.8 and row["baseline"] == 0.5 and row["lift"] is None+ assert "never activated" in row["reason"] and "diagnostic" in row["reason"]+++def test_failed_custom_agent_does_not_gain_authoritative_scores_from_cached_cards():+ payload = _custom_payload(execution_status="failed")+ payload["agents"]["agent"]["execution_status"] = "failed"+ row = _metric_view(payload)["rows"][0]+ assert row["score"] is row["baseline"] is row["lift"] is None+ assert "did not complete" in row["reason"]+++def test_incomplete_context_keeps_configured_dimensions_without_mutating_canonical(monkeypatch):+ payload = {+ "execution_status": "failed",+ "verdict": "fail",+ "expected_attempts": 36,+ "scored_attempts": 28,+ "agents": {+ "agent": {+ "execution_status": "failed",+ "expected_attempts": 36,+ "scored_attempts": 28,+ "metrics_with_skill": list(DEFAULT_METRICS),+ }+ },+ }+ context = _context(monkeypatch, payload)+ assert len(context["tier3_display_dimensions"]) == 5+ assert all(row["score"] is None for row in context["tier3_display_dimensions"])+ assert context["tier3_metric_comparison_rows"] == []+ assert context["tier3_metric_comparison_omitted"] == 0+++def test_source_rejected_context_does_not_restore_untrusted_comparison_values(monkeypatch):+ payload = _custom_payload(+ execution_status="succeeded",+ verdict="pass",+ provenance={+ "source": "tier3_source_preflight",+ "source_validation": [{"path": "evals.json", "status": "error", "message": "Dataset rejected"}],+ },+ )+ context = _context(monkeypatch, payload)+ assert context["tier3_display_dimensions"] == []+ assert context["tier3_metric_comparison_rows"] == []+++def test_mixed_execution_context_keeps_recorded_completed_agent_comparisons(monkeypatch):+ agent = {+ "execution_status": "succeeded",+ "expected_attempts": 2,+ "scored_attempts": 2,+ "num_trials": 1,+ "num_trials_baseline": 1,+ "with_skill": dict.fromkeys(DEFAULT_METRICS, 0.9),+ "without_skill": dict.fromkeys(DEFAULT_METRICS, 0.5),+ "rewards": [{**dict.fromkeys(DEFAULT_METRICS, 0.9), "entry_id": "case"}],+ "rewards_baseline": [{**dict.fromkeys(DEFAULT_METRICS, 0.5), "entry_id": "case"}],+ "rewards_complete": True,+ "rewards_baseline_complete": True,+ }+ payload = build_agent_eval_payload(+ "demo",+ {+ "complete": agent,+ "failed": {"execution_status": "failed", "execution_errors": ["Runner failed"], "expected_attempts": 2},+ },+ use_llm_judge=False,+ )+ context = _context(monkeypatch, payload)+ assert context["tier3"]["execution_status"] == "failed"+ assert context["tier3"]["best_agent"] == "complete"+ assert [row["score"] for row in context["tier3_display_dimensions"]] == [0.9] * 5diff --git a/tests/reporting/test_native_report_parity.py b/tests/reporting/test_native_report_parity.pynew file mode 100644index 00000000..fc16326c--- /dev/null+++ b/tests/reporting/test_native_report_parity.py@@ -0,0 +1,284 @@+# SPDX-License-Identifier: Apache-2.0+"""Behavioral contracts for the native report and retained payload exports."""++import base64+import json+import re+from copy import deepcopy++from skillevaluator.evaluation.tier3_report import build_agent_eval_payload+from skillevaluator.models import ValidationResult+from skillevaluator.reporting.html import HTMLReporter+++def _agent_result():+ result = ValidationResult(validator_name="AGENT_EVAL")+ result.metadata["agent_eval"] = build_agent_eval_payload(+ "demo",+ {"agent": {"overall_with_skill": 0.8, "overall_without_skill": 0.4}},+ use_llm_judge=False,+ )+ return result+++def _embedded_payload(html):+ match = re.search(r'<script type="application/json" id="tier3-full"([^>]*)>(.*?)</script>', html, re.DOTALL)+ assert match+ raw = base64.b64decode(match[2]).decode() if 'data-encoding="base64"' in match[1] else match[2]+ return json.loads(raw)+++def test_native_header_and_page_geometry_replace_sidebar_workspace():+ html = HTMLReporter(include_timestamp=False).render_all([ValidationResult(validator_name="Schema")])+ assert '<div class="logo-section">' in html+ assert ">SkillEvaluator</p>" in html+ assert '<aside class="report-sidebar"' not in html+ assert "body{font-family:ui-sans-serif" not in html+ assert ".container { max-width: 1200px; margin: 0 auto; padding: 2rem; }" in html+ assert "background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);" in html+ assert re.search(r'<div class="dashboard(?:\s[^"]*)?">', html)+ assert "Validators Run" in html+++def test_retained_canonical_export_is_distinct_from_fail_closed_display():+ result = _agent_result()+ raw = result.metadata["agent_eval"]+ raw.update(verdict="neutral", execution_status="failed", empty=[], nullable=None)+ raw["summary"]["execution_status"] = "failed"+ original = deepcopy(raw)+ result.add_error("Agent arm failed")+ html = HTMLReporter(include_timestamp=False).render_all([result])+ assert _embedded_payload(html) == original+ assert result.metadata["agent_eval"] == original+ assert HTMLReporter._tier3_report_data([result])["verdict"] != original["verdict"]+ assert "Tier 3 quality:" in html+++def test_report_default_theme_is_dark_for_tier3_and_light_for_static():+ static = HTMLReporter(include_timestamp=False).render_all([ValidationResult(validator_name="Schema")])+ live = HTMLReporter(include_timestamp=False).render_all([_agent_result()])+ assert 'data-default-theme="light"' in static+ assert 'data-default-theme="dark"' in live+ assert "localStorage.getItem('skillevaluator-theme')" in live+++def test_ci_report_suppresses_retained_payload_embedding():+ html = HTMLReporter(+ include_timestamp=False, ci_context={"canonical_json_url": "https://example.com/report.json"}+ ).render_all([_agent_result()])+ assert 'href="https://example.com/report.json"' in html+ assert 'id="report-data"' not in html+ assert 'id="tier3-full"' not in html+ assert "onclick=\"tier3DownloadJson('tier3-full'" not in html+++def test_overview_links_to_full_insights_severity_cards_and_action_checks():+ result = _agent_result()+ payload = result.metadata["agent_eval"]+ payload.update(execution_status="succeeded", verdict="pass", expected_attempts=1, scored_attempts=1)+ payload["agents"]["agent"].update(execution_status="succeeded", expected_attempts=1, scored_attempts=1)+ payload["conclusions"] = [+ {"title": "Retained conclusion", "message": "Measured evidence", "severity": "pass", "source": "deterministic"}+ ]+ payload["recommendations"] = [+ {+ "title": "Retained action",+ "message": "Improve the instruction",+ "category": "Document",+ "source": "deterministic",+ "check": "Repeat the same case",+ "evidence_text": "case-one",+ }+ ]+ html = HTMLReporter(include_timestamp=False).render_all([result])+ overview = html.split('id="tier3-page-overview"', 1)[1].split('id="tier3-page-trials"', 1)[0]+ insights = html.split('id="tier3-page-suggestions"', 1)[1].split('id="tier3-page-provenance"', 1)[0]+ assert 'class="t3-sug-card ' not in overview+ assert "Retained action" in overview+ assert 'href="#tier3-page-suggestions"' in overview+ for section in (insights,):+ assert '<span class="t3-pill ok">pass</span>' in section+ assert '<span class="t3-sug-cat">Document</span>' in section+ assert "Check: Repeat the same case" in section+ assert "Evidence: case-one" in section+++def test_native_tier2_intra_and_inter_tabs_keep_similarity_evidence():+ result = ValidationResult(validator_name="Similarity Check")+ result.add_success("catalog_compared", "Compared catalog entries", catalog_entry_count=5)+ html = HTMLReporter(include_timestamp=False).render_all([result])+ assert 'id="dedup-tab-intra"' in html+ assert 'id="dedup-tab-inter"' in html+ assert 'aria-controls="dedup-intra"' in html+ assert 'aria-controls="dedup-inter"' in html+ assert 'id="dedup-intra" class="dedup-subtab"' in html+ assert 'id="dedup-inter" class="dedup-subtab"' in html+ across = html.split('id="tier2-across"', 1)[1].split("</section>", 1)[0]+ assert "Catalog entries compared" in across+ assert "Compared catalog entries" in across+++def test_failed_execution_actions_do_not_repeat_next_steps_or_expand_long_evidence():+ result = _agent_result()+ payload = result.metadata["agent_eval"]+ payload.update(execution_status="failed", verdict="fail")+ payload["next_steps"] = [+ {+ "kind": "Restore runner",+ "target": "evaluation",+ "problem": "A runner did not finish",+ "action": "Restore the runner and repeat the retained cases",+ "check": "Every case has a score",+ "evidence": "case-identity-" * 80,+ "strength": "hypothesis",+ }+ ]+ original = deepcopy(payload)+ result.add_error("Runner failed")+ html = HTMLReporter(include_timestamp=False).render_all([result])+ overview = html.split('id="tier3-page-overview"', 1)[1].split('id="tier3-page-trials"', 1)[0]+ assert re.sub(r"<[^>]+>", "", overview).count("Restore the runner and repeat the retained cases") == 1+ assert payload["next_steps"][0]["evidence"] not in overview+ assert payload["next_steps"][0]["problem"] not in overview+ for name, end in (("suggestions", "provenance"),):+ section = html.split(f'id="tier3-page-{name}"', 1)[1].split(f'id="tier3-page-{end}"', 1)[0]+ assert re.sub(r"<[^>]+>", "", section).count("Restore the runner and repeat the retained cases") == 1+ assert "Next steps for the run:" not in section+ assert "Scope: evaluation" in section+ assert "Strength: hypothesis" in section+ disclosure = re.search(+ r'<details class="t3-eval-evidence"([^>]*)>.*?<summary>Evidence</summary>(.*?)</details>',+ section,+ re.DOTALL,+ )+ assert disclosure and "open" not in disclosure[1]+ assert payload["next_steps"][0]["evidence"] in disclosure[2]+ problem = re.search(+ r'<details class="t3-eval-evidence"([^>]*)>\s*<summary>Recorded problem</summary>(.*?)</details>',+ section,+ re.DOTALL,+ )+ assert problem and "open" not in problem[1]+ assert payload["next_steps"][0]["problem"] in problem[2]+ assert _embedded_payload(html) == original+ assert payload == original+++def test_only_fully_represented_failed_steps_are_suppressed():+ from skillevaluator.reporting import html as html_module++ represented = {+ "action": "Rerun",+ "target": "agent",+ "check": "Complete",+ "evidence": "case-a",+ "strength": "hypothesis",+ "agent": "a",+ }+ different_evidence = {**represented, "evidence": "case-b"}+ different_scope = {**represented, "target": "dataset"}+ different_agent = {**represented, "agent": "b"}+ different_problem = {**represented, "problem": "A distinct authored diagnosis"}+ steps = [represented, different_evidence, different_scope, different_agent, different_problem]+ view = {+ "next_steps": steps,+ "recommendations": [+ {+ "insight_kind": "execution_action",+ "message": "Rerun",+ "metric": "agent",+ "check": "Complete",+ "evidence_text": "case-a",+ "strength": "hypothesis",+ "agent": "a",+ }+ ],+ }+ assert html_module._unrepresented_insight_steps(view, failed=True) == steps[1:]+ assert html_module._unrepresented_insight_steps(view, failed=False) == steps+++def test_failed_cards_preserve_distinct_problem_text_with_the_same_action_and_evidence():+ result = _agent_result()+ payload = result.metadata["agent_eval"]+ payload.update(execution_status="failed", verdict="fail")+ common = {+ "action": "Rerun the same case",+ "target": "evaluation",+ "check": "Every planned attempt is scored",+ "evidence": {"url": "https://example.test/shared-trace"},+ "agent": "agent",+ "case_id": "case-one",+ "condition": "with_skill",+ }+ problems = ["Runner exited; inspect <first> & retain the rest.", "Judge stopped; inspect the second cause."]+ payload["next_steps"] = [{**common, "problem": problem} for problem in problems]+ original = deepcopy(payload)+ html = HTMLReporter(include_timestamp=False).render_all([result])+ section = html.split('id="tier3-page-suggestions"', 1)[1].split('id="tier3-page-provenance"', 1)[0]+ from html import escape++ for problem in problems:+ assert escape(problem) in section+ assert "<first>" not in section+ assert section.count("<summary>Recorded problem</summary>") == 2+ assert section.count("https://example.test/shared-trace") == 2+ assert "Next steps for the run:" not in section+ assert _embedded_payload(html) == original+ assert payload == original+++def test_historical_error_blob_problem_stays_in_diagnostics():+ result = _agent_result()+ payload = result.metadata["agent_eval"]+ errors = ["RunnerError: complete historical detail; retain semicolon", "JudgeError: complete cause"]+ payload.update(execution_status="failed", verdict="fail", execution_errors=errors)+ payload["next_steps"] = [{"action": "Rerun", "problem": "; ".join(errors)}]+ original = deepcopy(payload)+ html = HTMLReporter(include_timestamp=False).render_all([result])+ insights = html.split('id="tier3-page-suggestions"', 1)[1].split('id="tier3-page-provenance"', 1)[0]+ for error in errors:+ assert error not in insights+ assert error in html.split('id="tier3-execution-errors"', 1)[1]+ assert 'href="#tier3-execution-errors"' in insights+ assert _embedded_payload(html) == original+++def test_failed_next_steps_keep_distinct_agent_case_and_condition_in_rendered_cards():+ result = _agent_result()+ payload = result.metadata["agent_eval"]+ payload.update(execution_status="failed", verdict="fail")+ common = {+ "kind": "Restore runner",+ "target": "evaluation",+ "problem": "Runner failed",+ "action": "Restore and rerun",+ "check": "Every attempt is scored",+ "evidence": "retained-log",+ "strength": "supported",+ }+ payload["next_steps"] = [+ {**common, "agent": "agent-one", "case_id": "case-one", "condition": "with_skill"},+ {**common, "agent": "agent-two", "case": "case-two", "condition": "without_skill"},+ ]+ original = deepcopy(payload)+ result.add_error("Runner failed")+ html = HTMLReporter(include_timestamp=False).render_all([result])+ overview = html.split('id="tier3-page-overview"', 1)[1].split('id="tier3-page-trials"', 1)[0]+ assert re.sub(r"<[^>]+>", "", overview).count("Restore and rerun") == 1+ for start, end in (("suggestions", "provenance"),):+ section = html.split(f'id="tier3-page-{start}"', 1)[1].split(f'id="tier3-page-{end}"', 1)[0]+ text = re.sub(r"<[^>]+>", "", section)+ assert text.count("Restore and rerun") == 2+ for association in (+ "Agent: agent-one",+ "Agent: agent-two",+ "Case: case-one",+ "Case: case-two",+ "Condition: with_skill",+ "Condition: without_skill",+ ):+ assert association in text+ assert "Next steps for the run:" not in text+ assert _embedded_payload(html) == original+ assert payload == originaldiff --git a/tests/reporting/test_plugin_evidence_report.py b/tests/reporting/test_plugin_evidence_report.pynew file mode 100644index 00000000..79044fd1--- /dev/null+++ b/tests/reporting/test_plugin_evidence_report.py@@ -0,0 +1,508 @@+# SPDX-License-Identifier: Apache-2.0+"""Passive plugin sections enter native tabs without changing retained facts."""++import importlib+import json+from copy import deepcopy++import pytest++from skillevaluator.models import ValidationResult+from skillevaluator.reporting import JSONReporter+from skillevaluator.reporting.plugin_runtime import project_plugin_runtime+from skillevaluator.reporting.plugin_static import project_plugin_static+from skillevaluator.reporting.retained import RetainedReportError, retained_results+++def api():+ return importlib.import_module("skillevaluator.reporting.plugin_evidence")+++def static_report():+ result = ValidationResult(+ validator_name="Private checks",+ metadata={+ "plugin": {+ "name": "passive-demo",+ "component_inventory": {+ "complete": True,+ "components": [{"type": "skill", "name": "member", "path": "skills/member"}],+ },+ "catalog_skill_similarity": {+ "status": "compared",+ "catalog_entries": 2,+ "matches": [{"skill": "member", "match": "catalog-member", "similarity": 0.8}],+ },+ "context_cost": {"by_component": [], "by_harness": []},+ }+ },+ )+ return project_plugin_static([result])+++def runtime_report():+ return project_plugin_runtime(+ {+ "run_dir": "/gone/retained-run",+ "execution_status": "failed",+ "runtime_evidence": {"evidence_complete": False},+ },+ provenance={"plugin": "passive-demo"},+ )+++def test_sections_are_owned_by_native_tabs_and_snapshots_stay_exact():+ static, runtime = static_report(), runtime_report()+ raw_static, raw_runtime = static.payload(), runtime.payload()+ original = deepcopy((raw_static, raw_runtime))+ evidence = api().build_plugin_evidence(static=raw_static, runtime=raw_runtime)+ assert [section["key"] for section in evidence["tier1"]] == ["inventory", "context", "context_harnesses"]+ assert [section["key"] for section in evidence["tier2"]] == ["catalog_skills"]+ assert {section["key"] for section in evidence["overview"]} == {"eligibility", "conditions"}+ assert {section["key"] for section in evidence["agents"]} == {"loading", "coverage", "signals", "mcp", "mcp_calls"}+ assert {section["key"] for section in evidence["trials"]} == {"context", "comparisons", "cost"}+ assert {section["key"] for section in evidence["provenance"]} == {"run", "diagnostics", "exclusions"}+ assert evidence["static"] == raw_static and evidence["runtime"] == raw_runtime+ assert (raw_static, raw_runtime) == original+ sections = [+ section+ for slot in ("tier1", "tier2", "overview", "agents", "trials", "provenance")+ for section in evidence[slot]+ ]+ assert len(sections) == len(raw_static["sections"]) + len(raw_runtime["sections"])+ assert all(section["owner"] in {"static", "runtime"} for section in sections)+ evidence["static"]["sections"][0]["rows"].clear()+ evidence["tier1"][0]["rows"].clear()+ assert raw_static == original[0]+ assert api().build_plugin_evidence(static=static)["static"] == original[0]++[email protected]("bad", [False, [], {"schema_version": 1}, {"schema_version": True}])+def test_malformed_payloads_are_rejected_without_guessing(bad):+ with pytest.raises(ValueError):+ api().build_plugin_evidence(static=bad)++[email protected]("mutation", ["row_width", "nonfinite", "omission", "cycle", "oversized"])+def test_invalid_sections_are_rejected_before_rendering(mutation):+ raw = static_report().payload()+ section = raw["sections"][0]+ if mutation == "row_width":+ section["rows"][0].append("extra")+ elif mutation == "nonfinite":+ section["rows"][0][0] = float("nan")+ elif mutation == "omission":+ section["omitted"] = 30+ elif mutation == "cycle":+ section["rows"][0][0] = raw+ else:+ section["rows"][0][0] = "x" * 300000+ with pytest.raises(ValueError):+ api().build_plugin_evidence(static=raw)++[email protected]("flag", [True, False])+def test_optional_skip_survives_json_retention_without_gate_changes(flag):+ result = ValidationResult(+ validator_name="Similarity Check",+ metadata={+ "gating": {"tier": 2, "blocking": False},+ "optional_skip": flag,+ "skipped": True,+ "skip_reason": "No catalog configured",+ },+ )+ reporter = JSONReporter(include_timestamp=False)+ raw = json.loads(reporter.render_all([result]))+ assert raw["results"][0]["optional_skip"] is flag+ restored = retained_results(raw)+ assert restored[0].metadata["optional_skip"] is flag+ assert json.loads(reporter.render_all(restored)) == raw++[email protected]("flag", [0, 1, "true", None])+def test_retained_optional_skip_requires_boolean(flag):+ raw = json.loads(JSONReporter(include_timestamp=False).render_all([ValidationResult(validator_name="SCHEMA")]))+ raw["results"][0]["optional_skip"] = flag+ with pytest.raises(RetainedReportError, match="optional_skip"):+ retained_results(raw)+++def test_composition_supplies_both_snapshots_before_a_single_html_render():+ from skillevaluator.reporting import HTMLReporter+ from skillevaluator.reporting.plugin_runtime_render import render_plugin_runtime_reports++ class NativeBoundaryReporter(HTMLReporter):+ def __init__(self):+ super().__init__(include_timestamp=False)+ self.calls = []++ def render_all(self, results, *, plugin_static=None, plugin_runtime=None):+ self.calls.append((results, plugin_static, plugin_runtime))+ evidence = api().build_plugin_evidence(static=plugin_static, runtime=plugin_runtime)+ # A report need not have a closing main tag to receive its context.+ return json.dumps({"static": evidence["static"], "runtime": evidence["runtime"]})++ results = [+ ValidationResult(+ validator_name="Private checks",+ metadata={+ "plugin": {"name": "composed-static", "component_inventory": {"complete": True, "components": []}}+ },+ )+ ]+ reporter = NativeBoundaryReporter()+ runtime = runtime_report()+ output = render_plugin_runtime_reports(results, report=runtime, reporters=[reporter])+ decoded = json.loads(output["html"])+ assert decoded["static"]["name"] == "composed-static"+ assert decoded["runtime"] == runtime.payload()+ assert len(reporter.calls) == 1+ assert reporter.calls[0][0] is results+++def test_native_macro_distinguishes_omitted_rows_from_shortened_text():+ from skillevaluator.reporting import HTMLReporter++ raw = static_report().payload()+ raw["truncated"] = True+ raw["sections"][0]["rows"][0][1] = "A" * 450+ raw["sections"][0]["total"] = 3+ raw["sections"][0]["omitted"] = 2+ before = deepcopy(raw)+ evidence = api().build_plugin_evidence(static=raw)+ env = HTMLReporter(include_timestamp=False)._env+ fragment = env.from_string(+ "{% from 'plugin_evidence.html.j2' import render_plugin_evidence %}"+ "{{ render_plugin_evidence(evidence, 'tier1') }}"+ ).render(evidence=evidence)+ assert "2 more rows omitted (3 total)" in fragment+ assert "Some text was shortened for display" in fragment+ assert "cannot be recovered" in fragment+ assert "A" * 450 not in fragment+ assert raw == before and evidence["static"] == before+++def test_native_html_places_each_plugin_section_once_and_exports_exact_snapshots():+ import re+ from html.parser import HTMLParser++ from skillevaluator.reporting import HTMLReporter++ class Locations(HTMLParser):+ def __init__(self):+ super().__init__()+ self.stack = []+ self.parents = {}+ self.counts = {}++ def handle_starttag(self, tag, attrs):+ node_id = dict(attrs).get("id")+ if node_id:+ self.parents[node_id] = [item_id for _, item_id in self.stack if item_id]+ self.counts[node_id] = self.counts.get(node_id, 0) + 1+ if tag not in {+ "area",+ "base",+ "br",+ "col",+ "embed",+ "hr",+ "img",+ "input",+ "link",+ "meta",+ "param",+ "source",+ "track",+ "wbr",+ }:+ self.stack.append((tag, node_id))++ def handle_endtag(self, tag):+ for index in range(len(self.stack) - 1, -1, -1):+ if self.stack[index][0] == tag:+ del self.stack[index:]+ break++ static, runtime = static_report(), runtime_report()+ document = HTMLReporter(include_timestamp=False).render_all(+ [ValidationResult(validator_name="Private checks")], plugin_static=static, plugin_runtime=runtime+ )+ locations = Locations()+ locations.feed(document)+ for node_id, panel in (+ ("plugin-static-inventory", "tab-tier1"),+ ("plugin-static-catalog_skills", "tab-tier2"),+ ("plugin-static-context", "tab-tier1"),+ ("plugin-runtime-eligibility", "tier3-page-overview"),+ ("plugin-runtime-conditions", "tier3-page-overview"),+ ("plugin-runtime-loading", "tier3-page-agents"),+ ("plugin-runtime-comparisons", "tier3-page-trials"),+ ("plugin-runtime-diagnostics", "tier3-page-provenance"),+ ("plugin-runtime-exclusions", "tier3-page-provenance"),+ ):+ assert locations.counts.get(node_id) == 1, node_id+ assert panel in locations.parents[node_id], (node_id, locations.parents[node_id])+ encoded = re.search(r'<script\b[^>]*id="report-data"[^>]*>(.*?)</script>', document, flags=re.DOTALL)+ assert encoded+ exported = json.loads(encoded[1])+ assert exported["plugin_static"] == static.payload()+ assert exported["plugin_runtime"] == runtime.payload()+ assert exported["tier3"] is None+++def test_static_only_sections_stay_visible_without_a_tier3_tab():+ from skillevaluator.reporting import HTMLReporter++ raw = static_report().payload()+ raw["sections"].append(+ {+ "key": "identity_conflicts",+ "title": "Source identity conflicts",+ "columns": ["Issue"],+ "rows": [["Retained source identities differ"]],+ "total": 1,+ "omitted": 0,+ "notes": [],+ }+ )+ evidence = api().build_plugin_evidence(static=raw)+ assert {section["key"] for section in evidence["tier1"]} == {+ "inventory",+ "context",+ "context_harnesses",+ "identity_conflicts",+ }+ assert not any(evidence[slot] for slot in ("overview", "agents", "trials", "provenance"))+ document = HTMLReporter(include_timestamp=False).render_all(+ [ValidationResult(validator_name="Private checks")], plugin_static=raw+ )+ assert 'id="tab-tier3"' not in document+ for section in raw["sections"]:+ assert document.count(f'id="plugin-static-{section["key"]}"') == 1+ assert "Retained source identities differ" in document+++class EvidenceMarkup:+ """Inspect disclosure ownership and summaries without a browser dependency."""++ def __init__(self, fragment):+ from html.parser import HTMLParser++ self.details = {}+ self.summaries = {}+ self.sources = 0+ self.text = []+ outer = self++ class Parser(HTMLParser):+ def __init__(self):+ super().__init__()+ self.stack = []+ self.summary = None++ def handle_starttag(self, tag, attrs):+ attrs = dict(attrs)+ if tag == "details":+ node_id = attrs.get("id")+ outer.details[node_id] = {"attrs": attrs, "parents": list(self.stack)}+ self.stack.append(node_id)+ elif tag == "summary":+ self.summary = self.stack[-1]+ outer.summaries[self.summary] = ""+ if "plugin-evidence-source" in attrs.get("class", "").split():+ outer.sources += 1++ def handle_endtag(self, tag):+ if tag == "details":+ self.stack.pop()+ elif tag == "summary":+ self.summary = None++ def handle_data(self, text):+ outer.text.append(text)+ if self.summary is not None:+ outer.summaries[self.summary] += text++ Parser().feed(fragment)+++def evidence_fragment(evidence, slot):+ from skillevaluator.reporting import HTMLReporter++ return (+ HTMLReporter(include_timestamp=False)+ ._env.from_string(+ "{% from 'plugin_evidence.html.j2' import render_plugin_evidence %}"+ "{{ render_plugin_evidence(evidence, slot) }}"+ )+ .render(evidence=evidence, slot=slot)+ )+++def test_passive_sections_close_and_group_neutral_empty_observations_with_stable_anchors():+ evidence = api().build_plugin_evidence(runtime=runtime_report())+ fragment = evidence_fragment(evidence, "agents")+ markup = EvidenceMarkup(fragment)+ assert all("open" not in detail["attrs"] for detail in markup.details.values())+ group = "plugin-runtime-empty-agents"+ assert group in markup.details+ assert "4 empty observations" in markup.summaries[group]+ for key in ("loading", "coverage", "mcp", "mcp_calls"):+ assert group in markup.details[f"plugin-runtime-{key}"]["parents"]+ # Method/scope notes are not classified as a neutral absence.+ assert group not in markup.details["plugin-runtime-signals"]["parents"]+ assert "Skipped expectations concern components unsupported in that arm." in fragment+ assert fragment.count("No retained observations for this section.") == 4++[email protected]("owner,slot", [("static", "tier1"), ("runtime", "agents")])+def test_each_slot_has_one_compact_source_qualification_without_repeated_run_metadata(owner, slot):+ evidence = api().build_plugin_evidence(**{owner: static_report() if owner == "static" else runtime_report()})+ fragment = evidence_fragment(evidence, slot)+ markup = EvidenceMarkup(fragment)+ assert markup.sources == 1+ assert "passive-demo" in fragment+ if owner == "static":+ assert "Static snapshot" in fragment+ assert "runtime loading or behavior" in fragment+ else:+ assert "Evidence incomplete" in fragment+ assert "execution failed" in fragment+ assert "advisory" in fragment+ assert "retained-run" not in fragment+ assert "<p>Source:" not in fragment+++def test_closed_summary_keeps_row_omission_and_display_shortening_distinct_and_notes_reachable():+ raw = static_report().payload()+ raw["truncated"] = True+ section = raw["sections"][0]+ section["rows"][0][1] = "A" * 450+ section["notes"] += ["Recorded scope limitation remains associated with inventory."]+ section["total"], section["omitted"] = 3, 2+ original = deepcopy(raw)+ evidence = api().build_plugin_evidence(static=raw)+ fragment = evidence_fragment(evidence, "tier1")+ markup = EvidenceMarkup(fragment)+ summary = markup.summaries["plugin-static-inventory"]+ assert "2 rows omitted" in summary+ assert "text shortened" in summary+ assert "Recorded scope limitation remains associated with inventory." in fragment+ assert "shortened before retention cannot be recovered" in fragment+ assert evidence["static"] == original == raw+++def test_runtime_only_html_exports_exact_snapshot_and_retains_all_grouped_anchors():+ import re++ from skillevaluator.reporting import HTMLReporter++ raw = runtime_report().payload()+ original = deepcopy(raw)+ document = HTMLReporter(include_timestamp=False).render_all(+ [ValidationResult(validator_name="Private checks")], plugin_runtime=raw+ )+ for section in raw["sections"]:+ assert document.count(f'id="plugin-runtime-{section["key"]}"') == 1+ encoded = re.search(r'<script\b[^>]*id="report-data"[^>]*>(.*?)</script>', document, flags=re.DOTALL)+ exported = json.loads(encoded[1])+ assert exported["plugin_runtime"] == original == raw+ assert exported.get("plugin_static") is None+++def test_empty_observations_with_omissions_or_scope_notes_keep_individual_qualifications():+ raw = runtime_report().payload()+ for section in raw["sections"]:+ if section["key"] == "loading":+ section["total"], section["omitted"] = 2, 2+ elif section["key"] == "mcp":+ section["notes"] = ["Source rejected; loading cannot be established from these observations."]+ evidence = api().build_plugin_evidence(runtime=raw)+ fragment = evidence_fragment(evidence, "agents")+ markup = EvidenceMarkup(fragment)+ group = "plugin-runtime-empty-agents"+ assert "2 empty observations" in markup.summaries[group]+ for key in ("loading", "mcp"):+ assert group not in markup.details[f"plugin-runtime-{key}"]["parents"]+ assert "2 rows omitted" in markup.summaries["plugin-runtime-loading"]+ assert "Source rejected; loading cannot be established from these observations." in fragment+ assert evidence["runtime"] == raw+++def test_shortened_recorded_notes_remain_complete_in_canonical_export():+ import re++ from skillevaluator.reporting import HTMLReporter++ raw = static_report().payload()+ note = "Recorded limitation " + "x" * 450+ raw["sections"][0]["notes"] = [note]+ document = HTMLReporter(include_timestamp=False).render_all(+ [ValidationResult(validator_name="Private checks")], plugin_static=raw+ )+ markup = EvidenceMarkup(document)+ assert "text shortened" in markup.summaries["plugin-static-inventory"]+ encoded = re.search(r'<script\b[^>]*id="report-data"[^>]*>(.*?)</script>', document, flags=re.DOTALL)+ exported = json.loads(encoded[1])+ assert exported["plugin_static"] == raw+ assert exported["plugin_static"]["sections"][0]["notes"] == [note]+++def test_footer_metadata_is_sanitized_independently_of_sections_and_canonical_snapshots():+ static, runtime = static_report().payload(), runtime_report().payload()+ static["sections"], runtime["sections"] = [], []+ static["name"] = "\x1b[31mStatic\x1b[0m\x00 \ud800\u202e"+ runtime["name"] = "Bearer syntheticcredential123"+ runtime["execution_status"] = "\x1b[32msucceeded\x1b[0m\x07"+ runtime["run_id"] = "run-\udfff\u202e\x00"+ runtime["source"] = {+ "manifest": "password=syntheticsecret",+ "manifest_sha256": "\x1b[31mdigest\x1b[0m\x07",+ "source_tree_sha256": "s" * 450,+ }+ original = deepcopy((static, runtime))+ evidence = api().build_plugin_evidence(static=static, runtime=runtime)+ metadata = evidence["metadata"]+ assert metadata["static"] == {+ "name": "Static \ufffd\\u202e",+ "status": static["status"],+ "truncated": static["truncated"],+ "text_shortened": False,+ "notice": None,+ }+ assert metadata["runtime"] == {+ "name": "Bearer <redacted>",+ "status": "incomplete",+ "truncated": runtime["truncated"],+ "execution_status": "succeeded",+ "run_id": "run-\ufffd\\u202e",+ "source": {+ "manifest": "password=<redacted>",+ "manifest_sha256": "digest",+ "source_tree_sha256": "s" * 299 + "…",+ },+ "text_shortened": True,+ "notice": "Some metadata text was shortened for display; the export preserves the retained snapshot.",+ }+ assert evidence["static"] == original[0] == static+ assert evidence["runtime"] == original[1] == runtime+ metadata["runtime"]["source"]["manifest"] = "changed display"+ assert evidence["runtime"] == original[1] == runtime++[email protected]("owner", ["static", "runtime"])+def test_footer_metadata_uses_none_for_absent_owners_and_marks_only_display_shortening(owner):+ raw = (static_report() if owner == "static" else runtime_report()).payload()+ raw["sections"] = []+ raw["name"] = "bounded-name"+ raw["truncated"] = True+ evidence = api().build_plugin_evidence(**{owner: raw})+ other = "runtime" if owner == "static" else "static"+ assert evidence["metadata"][other] is None+ assert evidence["metadata"][owner]["truncated"] is True+ assert evidence["metadata"][owner]["text_shortened"] is False+ assert evidence["metadata"][owner]["notice"] is None+ assert evidence[owner] == raw+ assert api().build_plugin_evidence()["metadata"] == {"static": None, "runtime": None}diff --git a/tests/reporting/test_plugin_reports_runtime_composition.py b/tests/reporting/test_plugin_reports_runtime_composition.pynew file mode 100644index 00000000..586385d7--- /dev/null+++ b/tests/reporting/test_plugin_reports_runtime_composition.py@@ -0,0 +1,85 @@+# SPDX-License-Identifier: Apache-2.0+"""The public passive hook composes retained evidence before rendering HTML."""++import json+import re+from copy import deepcopy++import pytest++from skillevaluator.models import ValidationResult+from skillevaluator.reporting import HTMLReporter+from skillevaluator.reporting.plugin_runtime import project_plugin_runtime+from skillevaluator.reporting.plugin_static import project_plugin_static+++class RecordingHTMLReporter(HTMLReporter):+ def __init__(self):+ super().__init__(include_timestamp=False, content_label="Plugin")+ self.calls = []++ def render_all(self, results, *, plugin_static=None, plugin_runtime=None):+ self.calls.append((results, plugin_static, plugin_runtime))+ return super().render_all(results, plugin_static=plugin_static, plugin_runtime=plugin_runtime)++[email protected]("entrypoint", ["render_plugin_report", "augment_plugin_report"])[email protected]("with_static", [False, True], ids=["runtime", "static-and-runtime"])+def test_retained_runtime_html_is_rendered_once_with_both_snapshots(entrypoint, with_static, monkeypatch):+ from skillevaluator.reporting import plugin_reports, plugin_runtime_io++ # Rendering a retained result must not try to recover the absent source/run.+ def unavailable(*args, **kwargs):+ raise AssertionError("HTML composition must use the retained snapshot")++ monkeypatch.setattr(plugin_runtime_io, "load_plugin_runtime_report", unavailable)+ runtime = project_plugin_runtime(+ {"run_dir": "/absent/saved-run", "execution_status": "succeeded"},+ provenance={"plugin": '<img src=x onerror="alert(1)">', "runtime_evidence": {}},+ ).payload()+ metadata = {"plugin_runtime_report": runtime}+ if with_static:+ metadata["plugin"] = {+ "name": "retained-plugin",+ "component_inventory": {"complete": True, "components": []},+ }+ results = [ValidationResult(validator_name="SCHEMA", metadata=metadata)]+ before = deepcopy(results[0].metadata)+ static = project_plugin_static(results)+ reporter = RecordingHTMLReporter()+ if entrypoint == "render_plugin_report":+ document = plugin_reports.render_plugin_report(reporter, results)+ else:+ document = plugin_reports.augment_plugin_report(reporter, "previously rendered document", results)++ assert len(reporter.calls) == 1+ assert reporter.calls[0][0] is results+ assert reporter.calls[0][1] == (static.payload() if static is not None else None)+ assert reporter.calls[0][2] == runtime+ encoded = re.search(r'<script\b[^>]*id="report-data"[^>]*>(.*?)</script>', document, flags=re.DOTALL)+ assert encoded+ exported = json.loads(encoded[1])+ assert exported["plugin_runtime"] == runtime+ if with_static:+ assert exported["plugin_static"]["name"] == "retained-plugin"+ assert document.count('id="plugin-static-inventory"') == 1+ else:+ assert "plugin_static" not in exported+ assert document.count('id="plugin-runtime-loading"') == 1+ assert "Plugin evaluation" in document+ assert '<img src=x onerror="alert(1)">' not in document+ assert results[0].metadata == before++[email protected]("entrypoint", ["render_plugin_report", "augment_plugin_report"])+def test_invalid_retained_runtime_is_rejected_before_html_rendering(entrypoint):+ from skillevaluator.reporting import plugin_reports++ results = [ValidationResult(validator_name="SCHEMA", metadata={"plugin_runtime_report": {"schema_version": 99}})]+ reporter = RecordingHTMLReporter()+ with pytest.raises(ValueError, match="runtime report schema"):+ if entrypoint == "render_plugin_report":+ plugin_reports.render_plugin_report(reporter, results)+ else:+ plugin_reports.augment_plugin_report(reporter, "previously rendered document", results)+ assert reporter.calls == []diff --git a/tests/reporting/test_private_runtime_render.py b/tests/reporting/test_private_runtime_render.pyindex 8d5d4283..d3e0cfb8 100644--- a/tests/reporting/test_private_runtime_render.py+++ b/tests/reporting/test_private_runtime_render.py@@ -6,6 +6,7 @@ from __future__ import annotationsimport htmlimport importlibimport json+import reimport subprocessimport sysfrom copy import deepcopy@@ -112,9 +113,6 @@ def test_all_six_formats_compose_static_and_runtime_without_losing_shared_facts("Plugin runtime evidence","runtime-demo","retained-run-7",- "Execution status: succeeded",- "Evidence status: incomplete",- "Advisory observations do not change scores or validation gates.","docs-server","unverified","Wrapper effect",@@ -123,6 +121,12 @@ def test_all_six_formats_compose_static_and_runtime_without_losing_shared_facts("static-demo",):assert marker in document, (name, marker)+ if name == "html":+ assert "Evidence incomplete · execution succeeded · advisory snapshot" in document+ else:+ assert "Execution status: succeeded" in document+ assert "Evidence status: incomplete" in document+ assert "Advisory observations do not change scores or validation gates." in documentassert 'id="plugin-runtime-evidence"' in output["html"]assert 'class="contributor-table plugin-runtime-table"' in output["html"]assert output["html"].count('id="plugin-static-evidence"') == 1@@ -151,9 +155,21 @@ def test_runtime_markup_stays_inert_in_html_markdown_and_rich(monkeypatch, forceraw["sections"][0]["notes"] = ['<iframe src="javascript:alert(1)"></iframe>']output = renderers().render_plugin_runtime_reports(bundle(), report=RetainedReport(raw), reporters=reporters())- fragment = output["html"].split('id="plugin-runtime-evidence"', 1)[1].split("</main>", 1)[0]+ fragment = "".join(+ re.findall(+ r'<(?:section|details)\b[^>]*\bid="plugin-runtime-[^"]+"[^>]*>.*?</(?:section|details)>',+ output["html"],+ flags=re.DOTALL,+ )+ )+ assert fragmentassert "<script>" not in fragment and "<img " not in fragment and "<iframe " not in fragment- assert "<script>" in fragment and "<img " in fragment and "<iframe " in fragment+ metadata = re.search(r'<details\b[^>]*id="run-metadata"[^>]*>.*?</details>', output["html"], re.DOTALL)+ assert metadata is not None+ assert " open" not in metadata.group().split(">", 1)[0]+ assert "<script>" in fragment and "<iframe " in fragment+ assert "<img " in metadata.group()+ assert "<script>" not in metadata.group() and "<img " not in metadata.group()for name in ("markdown", "benchmark"):runtime = output[name].split("## Plugin runtime evidence", 1)[1]assert "<script>" not in runtime and "<img " not in runtime and "<iframe " not in runtimediff --git a/tests/reporting/test_recorded_harbor_uploads.py b/tests/reporting/test_recorded_harbor_uploads.pynew file mode 100644index 00000000..88e9e1a3--- /dev/null+++ b/tests/reporting/test_recorded_harbor_uploads.py@@ -0,0 +1,333 @@+# SPDX-License-Identifier: Apache-2.0+"""Recorded upload links survive display projection and offline reconstruction."""++import base64+import json+from copy import deepcopy+from html.parser import HTMLParser+from pathlib import Path++import pytest++from skillevaluator.evaluation.tier3_report import agent_eval_result_from_directory+from skillevaluator.reporting import HTMLReporter, JSONReporter+from skillevaluator.reporting.harbor_viewer import harbor_job_links, normalize_agent_eval_harbor_links+from skillevaluator.reporting.retained import retained_results+from skillevaluator.tier3.harbor.metrics import DEFAULT_METRICS++[email protected]("status", ["succeeded", "incomplete", "failed"])+def test_upload_only_payload_keeps_each_recorded_job_in_display(status):+ payload = {+ "execution_status": status,+ "harbor_viewer": {+ "status": "partial",+ "uploads": [+ {+ "viewer_url": "https://viewer.example.test/jobs/with",+ "analysis_url": "https://viewer.example.test/review/with",+ "uploaded_job_name": "With skill",+ },+ {"error": "Upload did not complete"},+ {+ "job_url": "https://viewer.example.test/jobs/baseline?view=logs&case=one#step-2",+ "job_name": "Baseline",+ },+ {"viewer_url": "javascript:alert(1)"},+ {"viewer_url": "https://[invalid"},+ None,+ ],+ },+ }+ original = deepcopy(payload)++ displayed = normalize_agent_eval_harbor_links(payload)++ assert harbor_job_links(displayed) == [+ {+ "url": "https://viewer.example.test/jobs/with",+ "analysis_url": "https://viewer.example.test/review/with",+ "name": "With skill",+ },+ {+ "url": "https://viewer.example.test/jobs/baseline?view=logs&case=one#step-2",+ "name": "Baseline",+ },+ ]+ assert payload == original+++def test_uploads_enrich_only_the_same_job_without_replacing_canonical_metadata():+ payload = {+ "harbor_viewer": {+ "analysis_url": "https://viewer.example.test/review/run",+ "jobs": [+ {+ "url": "https://viewer.example.test/jobs/with",+ "analysis_url": "https://viewer.example.test/review/canonical",+ "name": "Canonical job",+ },+ {"url": "https://viewer.example.test/jobs/baseline", "name": "Canonical baseline"},+ ],+ "uploads": [+ {+ "viewer_url": "https://viewer.example.test/jobs/with",+ "analysis_url": "https://viewer.example.test/review/duplicate",+ "uploaded_job_name": "Duplicate name",+ },+ {+ "viewer_url": "https://viewer.example.test/jobs/baseline",+ "analysis_url": "https://viewer.example.test/review/baseline",+ },+ {"viewer_url": "https://viewer.example.test/jobs/second", "uploaded_job_name": "Second job"},+ ],+ },+ }+ original = deepcopy(payload)++ assert harbor_job_links(payload) == [+ {+ "url": "https://viewer.example.test/jobs/with",+ "analysis_url": "https://viewer.example.test/review/canonical",+ "name": "Canonical job",+ },+ {+ "url": "https://viewer.example.test/jobs/baseline",+ "analysis_url": "https://viewer.example.test/review/baseline",+ "name": "Canonical baseline",+ },+ {+ "url": "https://viewer.example.test/jobs/second",+ "name": "Second job",+ },+ {"name": "Run analysis", "analysis_url": "https://viewer.example.test/review/run"},+ ]+ assert payload == original++[email protected]("uploads", [None, [], {}, True, 1, "malformed"])+def test_malformed_uploads_do_not_hide_existing_canonical_links(uploads):+ payload = {+ "harbor_viewer": {+ "job_url": "https://viewer.example.test/jobs/retained",+ "analysis_url": "https://viewer.example.test/review/retained",+ "uploads": uploads,+ },+ }+ original = deepcopy(payload)++ assert harbor_job_links(payload) == [+ {+ "url": "https://viewer.example.test/jobs/retained",+ "analysis_url": "https://viewer.example.test/review/retained",+ "name": "Job 1",+ }+ ]+ assert payload == original+++def _write_retained_run(run: Path, viewer: object) -> Path:+ run.mkdir()+ (run / "result.json").write_text(+ json.dumps({"skill_name": "example-skill", "run_id": "retained-run", "harbor_viewer": viewer}),+ encoding="utf-8",+ )+ for arm in ("with-skill", "without-skill"):+ condition = run / "opencode" / arm+ trial = condition / "trials" / "case__trial"+ trial.mkdir(parents=True)+ scores = dict.fromkeys(DEFAULT_METRICS, 1.0)+ (condition / "summary.json").write_text(+ json.dumps(+ {+ "scores": scores,+ "metrics": list(DEFAULT_METRICS),+ "num_trials": 1,+ "num_reward_rows": 1,+ "execution_status": "succeeded",+ "expected_attempts": 1,+ "scored_attempts": 1,+ }+ ),+ encoding="utf-8",+ )+ (trial / "reward.json").write_text(json.dumps({"entry_id": "case", **scores}), encoding="utf-8")+ return run+++def test_directory_reconstruction_keeps_links_from_recorded_engine_result(tmp_path):+ run = _write_retained_run(+ tmp_path / "run",+ {"uploads": [{"viewer_url": "https://viewer.example.test/jobs/recorded", "uploaded_job_name": "Recorded"}]},+ )+ original = (run / "result.json").read_bytes()++ result = agent_eval_result_from_directory(tmp_path, run, use_llm_judge=False)++ assert result is not None+ assert harbor_job_links(result.metadata["agent_eval"]) == [+ {+ "url": "https://viewer.example.test/jobs/recorded",+ "analysis_url": "https://viewer.example.test/jobs/recorded?tab=analysis",+ "name": "Recorded",+ }+ ]+ assert (run / "result.json").read_bytes() == original++[email protected]("status", ["succeeded", "incomplete", "failed"])+def test_live_engine_links_win_per_job_and_keep_distinct_recorded_jobs(tmp_path, status):+ run = _write_retained_run(+ tmp_path / "run",+ {+ "uploads": [+ {+ "viewer_url": "https://viewer.example.test/jobs/shared",+ "analysis_url": "https://viewer.example.test/review/stale",+ "uploaded_job_name": "Recorded shared",+ },+ {+ "viewer_url": "https://viewer.example.test/jobs/baseline",+ "analysis_url": "https://viewer.example.test/review/baseline",+ "uploaded_job_name": "Recorded baseline",+ },+ ]+ },+ )+ live = {+ "execution_status": status,+ "harbor_viewer": {+ "uploads": [+ {+ "viewer_url": "https://viewer.example.test/jobs/shared",+ "analysis_url": "https://viewer.example.test/review/live",+ "uploaded_job_name": "Live shared",+ }+ ]+ },+ }+ original = deepcopy(live)++ result = agent_eval_result_from_directory(tmp_path, run, engine_result=live, use_llm_judge=False)++ assert result is not None+ assert harbor_job_links(result.metadata["agent_eval"]) == [+ {+ "url": "https://viewer.example.test/jobs/shared",+ "analysis_url": "https://viewer.example.test/review/live",+ "name": "Live shared",+ },+ {+ "url": "https://viewer.example.test/jobs/baseline",+ "analysis_url": "https://viewer.example.test/review/baseline",+ "name": "Recorded baseline",+ },+ ]+ assert live == original++[email protected]("viewer", [None, "malformed", {"uploads": True}, {"uploads": 1}])+def test_unusable_live_viewer_keeps_safe_recorded_uploads(tmp_path, viewer):+ run = _write_retained_run(+ tmp_path / "run", {"uploads": [{"viewer_url": "https://viewer.example.test/jobs/recorded"}]}+ )++ result = agent_eval_result_from_directory(+ tmp_path, run, engine_result={"harbor_viewer": viewer}, use_llm_judge=False+ )++ assert result is not None+ assert [job["url"] for job in harbor_job_links(result.metadata["agent_eval"])] == [+ "https://viewer.example.test/jobs/recorded"+ ]+++class _HarborSurfaces(HTMLParser):+ def __init__(self, html):+ super().__init__()+ self.stack = []+ self.links = {"tile": set(), "overview": set()}+ self.canonical = ""+ self.encoding = None+ self.in_canonical = False+ self.feed(html)++ def handle_starttag(self, tag, items):+ attrs = dict(items)+ if tag == "script" and attrs.get("id") == "tier3-full":+ self.in_canonical = True+ self.encoding = attrs.get("data-encoding")+ if tag == "a":+ for _, parent in self.stack:+ if "tier-card" in parent.get("class", "").split() and parent.get("data-target-tab") == "tier3":+ self.links["tile"].add(attrs.get("href"))+ if parent.get("id") == "tier3-page-overview":+ self.links["overview"].add(attrs.get("href"))+ if tag not in {+ "area",+ "base",+ "br",+ "col",+ "embed",+ "hr",+ "img",+ "input",+ "link",+ "meta",+ "param",+ "source",+ "track",+ "wbr",+ }:+ self.stack.append((tag, attrs))++ def handle_endtag(self, tag):+ if tag == "script":+ self.in_canonical = False+ for index in range(len(self.stack) - 1, -1, -1):+ if self.stack[index][0] == tag:+ del self.stack[index:]+ break++ def handle_data(self, value):+ if self.in_canonical:+ self.canonical += value++ def download(self):+ value = base64.b64decode(self.canonical) if self.encoding == "base64" else self.canonical+ return json.loads(value)++[email protected]("carrier", ["canonical-uploads", "recorded-directory"])+def test_recorded_uploads_reach_both_html_surfaces_without_changing_download(tmp_path, carrier):+ viewer = {+ "uploads": [+ {+ "viewer_url": "https://viewer.example.test/jobs/report",+ "analysis_url": "https://viewer.example.test/review/report",+ "uploaded_job_name": "Recorded report job",+ }+ ]+ }+ run = _write_retained_run(tmp_path / "run", viewer if carrier == "recorded-directory" else None)+ original_result = (run / "result.json").read_bytes()+ result = agent_eval_result_from_directory(tmp_path, run, use_llm_judge=False)+ assert result is not None+ if carrier == "canonical-uploads":+ result.metadata["agent_eval"]["harbor_viewer"] = deepcopy(viewer)+ original_payload = deepcopy(result.metadata["agent_eval"])+ retained = retained_results(json.loads(JSONReporter().render_all([result])))++ rendered = HTMLReporter(+ include_timestamp=False,+ requested_tiers=(1, 2, 3),+ displayed_tiers=(1, 2, 3),+ ).render_all(retained)++ surfaces = _HarborSurfaces(rendered)+ for links in surfaces.links.values():+ assert {"https://viewer.example.test/jobs/report", "https://viewer.example.test/review/report"} <= links+ assert surfaces.download() == original_payload+ assert retained[0].metadata["agent_eval"] == original_payload+ assert result.metadata["agent_eval"] == original_payload+ assert (run / "result.json").read_bytes() == original_resultdiff --git a/tests/reporting/test_report_browser.py b/tests/reporting/test_report_browser.pynew file mode 100644index 00000000..785c7e4c--- /dev/null+++ b/tests/reporting/test_report_browser.py@@ -0,0 +1,1553 @@+# SPDX-License-Identifier: Apache-2.0+"""Exercise standalone report behavior in Chromium, without providers or network.++Opt in with SKILLEVALUATOR_BROWSER_TESTS=1 after installing the dev extra and+``python -m playwright install chromium``. Normal unit-test runs need no browser.+"""++from __future__ import annotations++import json+import os+import re+import shutil+import sys+from copy import deepcopy+from pathlib import Path++import pytest+from browser_navigation_fixtures import _reward, _similarity_result, _tier1_results, render_fixtures+from test_telemetry_view import _payload as _native_telemetry_payload++from skillevaluator.evaluation.tier3_expectations import build_case_diagnostics+from skillevaluator.evaluation.tier3_report import advisory_skip_result, build_agent_eval_payload+from skillevaluator.models import Finding, ValidationResult+from skillevaluator.reporting.html import HTMLReporter+from skillevaluator.tier3.harbor.metrics import DEFAULT_METRICS++pytestmark = pytest.mark.skipif(+ os.environ.get("SKILLEVALUATOR_BROWSER_TESTS") != "1",+ reason="Enable the dedicated offline Chromium report checks with SKILLEVALUATOR_BROWSER_TESTS=1",+)+++def _complete_result(skill: str, names: tuple[str, str], scores: tuple[float, float]) -> ValidationResult:+ cases = [+ {+ "id": f"case-{index}",+ "prompt": f"Use {skill} to summarize fictional input {index} without network access.",+ "expected_output": f"A summary of fictional input {index}.",+ "assertions": ["Reads the skill instructions.", "Writes a concise summary."],+ "expected_skill": skill,+ }+ for index in range(1, 5)+ ]+ agents = {+ name: {+ "execution_status": "succeeded",+ "expected_attempts": 8,+ "scored_attempts": 8,+ "with_skill": dict.fromkeys(DEFAULT_METRICS, score),+ "without_skill": dict.fromkeys(DEFAULT_METRICS, 0.7),+ "rewards": [_reward(f"{case['id']}__attempt1", case["id"], score, 12) for case in cases],+ "rewards_baseline": [_reward(f"{case['id']}__baseline1", case["id"], 0.7, 20) for case in cases],+ "num_trials": 4,+ "num_trials_baseline": 4,+ }+ for name, score in zip(names, scores, strict=True)+ }+ result = ValidationResult(validator_name="AGENT_EVAL")+ result.metadata["agent_eval"] = build_agent_eval_payload(skill, agents, dataset=cases, use_llm_judge=False)+ return result+++def _edge_result(state):+ """Synthetic retained shapes shared with missing-arm/telemetry unit coverage."""+ with_rewards = [_reward("case-1__attempt1", "case-1", 0.9, 12)]+ baseline_rewards = [_reward("case-1__baseline1", "case-1", 0.7, 20)]+ info = {+ "execution_status": "succeeded",+ "expected_attempts": 2,+ "scored_attempts": 2,+ "with_skill": dict.fromkeys(DEFAULT_METRICS, 0.9),+ "without_skill": dict.fromkeys(DEFAULT_METRICS, 0.7),+ "rewards": with_rewards,+ "rewards_baseline": baseline_rewards,+ "num_trials": 1,+ "num_trials_baseline": 1,+ "rewards_complete": True,+ "rewards_baseline_complete": True,+ "conditions": {+ arm: {"execution_status": "succeeded", "expected_attempts": 1, "scored_attempts": 1}+ for arm in ("with_skill", "without_skill")+ },+ }+ agents = {"complete-peer": info}+ if state == "mixed":+ agents["failed-peer"] = {+ "execution_status": "failed",+ "expected_attempts": 2,+ "scored_attempts": 0,+ "execution_errors": ["AgentTimeoutError: failed-peer case-1 synthetic retained diagnostic"],+ "with_skill": {},+ "without_skill": {},+ "rewards": [],+ "rewards_baseline": [],+ "num_trials": 0,+ "num_trials_baseline": 0,+ }+ elif state == "custom-only":+ info.update(+ with_skill={},+ without_skill={},+ metrics_with_skill=[],+ metrics_without_skill=[],+ overall_with_skill=0.45,+ overall_without_skill=0.45,+ )+ for rewards in (with_rewards, baseline_rewards):+ rewards[0] = {+ "entry_id": "case-1",+ "metric_set": "custom-only",+ "overall": 0.45,+ "custom_metrics": {"task_quality": 0.45},+ }+ elif state == "missing-baseline":+ info.update(+ without_skill={},+ rewards_baseline=[],+ num_trials_baseline=0,+ expected_attempts=1,+ scored_attempts=1,+ conditions={+ "with_skill": {"execution_status": "succeeded", "expected_attempts": 1, "scored_attempts": 1},+ "without_skill": {"execution_status": "skipped"},+ },+ )+ elif state == "missing-telemetry":+ for rewards in (with_rewards, baseline_rewards):+ rewards[0].pop("_traj")+ result = ValidationResult(validator_name="AGENT_EVAL")+ result.metadata["agent_eval"] = build_agent_eval_payload(+ "synthetic-edge",+ agents,+ dataset=[{"id": "case-1", "prompt": "Summarize synthetic input", "expected_output": "Synthetic summary"}],+ use_llm_judge=False,+ )+ assert result.metadata["agent_eval"] is not None+ if state == "mixed":+ result.add_error("failed-peer did not complete")+ return result++[email protected](scope="module")+def reports(tmp_path_factory):+ if os.environ.get("SKILLEVALUATOR_REQUIRE_INSTALLED_REPORT") == "1":+ import skillevaluator++ assert Path(skillevaluator.__file__).resolve().is_relative_to(Path(sys.prefix).resolve())+ directory = render_fixtures(tmp_path_factory.mktemp("browser-reports"))+ agent = _complete_result("demo", ('agent"[one]/雪', "agent.two"), (0.94, 0.87))+ (directory / "full.html").write_text(+ HTMLReporter(include_timestamp=False).render_all([*_tier1_results(), _similarity_result(), agent]),+ encoding="utf-8",+ )+ native_agent = deepcopy(agent)+ native_payload = native_agent.metadata["agent_eval"]+ native_payload["harbor_viewer"] = {+ "jobs": [+ {+ "name": f"{name} / {arm}",+ "url": f"https://example.test/harbor/{index}/{arm}",+ "analysis_url": f"https://example.test/harbor/{index}/{arm}/analysis",+ }+ for index, name in enumerate(native_payload["agents"], 1)+ for arm in ("with_skill", "without_skill")+ ]+ }+ for dimension in native_payload["dimensions"]:+ if dimension["id"] == "efficiency":+ dimension.update(+ partial=True,+ comparison={+ "status": "partial",+ "label": "Recorded shared-signal comparison",+ "reason": "Only the recorded common signal is comparable.",+ "with_skill": 0.8,+ "baseline": 0.7,+ "lift": 0.1,+ },+ )+ native_static = _tier1_results()+ native_static[0].metadata["skillspector_version"] = "2.13.4"+ (directory / "native-features.html").write_text(+ HTMLReporter(include_timestamp=False).render_all([*native_static, _similarity_result(), native_agent]),+ encoding="utf-8",+ )+ uploaded_agent = deepcopy(native_agent)+ uploaded_payload = uploaded_agent.metadata["agent_eval"]+ uploaded_payload["harbor_viewer"] = {+ "uploads": [+ {"viewer_url": job["url"], "analysis_url": job["analysis_url"], "uploaded_job_name": job["name"]}+ for job in native_payload["harbor_viewer"]["jobs"]+ ]+ }+ (directory / "native-upload-features.html").write_text(+ HTMLReporter(include_timestamp=False).render_all([*native_static, _similarity_result(), uploaded_agent]),+ encoding="utf-8",+ )+ (directory / "native-upload-canonical.json").write_text(json.dumps(uploaded_payload), encoding="utf-8")+ if external := os.environ.get("SKILLEVALUATOR_BROWSER_REPORTS"):+ for name in ("full.html", "stress.html", "absent.html"):+ shutil.copyfile(Path(external) / name, directory / name)+ canonical = deepcopy(agent.metadata["agent_eval"])+ (directory / "canonical.html").write_text(+ HTMLReporter(include_timestamp=False).render_all([agent]), encoding="utf-8"+ )+ failed = deepcopy(canonical)+ errors = [f"AgentTimeoutError: retained diagnostic {index}; original detail" for index in range(34)]+ blob = "; ".join(errors)+ failed.update(+ verdict="neutral",+ execution_status="failed",+ overall_score=None,+ overall_lift=None,+ trials=[],+ cases=[],+ dimensions=[],+ evaluator_cards=[],+ execution_errors=errors,+ conclusions=[+ {"title": "Evaluation incomplete", "message": blob, "severity": "fail", "source": "deterministic"}+ ],+ recommendations=[+ {"title": "Evaluation incomplete", "message": blob, "category": "action", "source": "deterministic"}+ ],+ suggestions=[blob],+ next_steps=[+ {+ "kind": "incomplete_run",+ "target": "evaluation",+ "problem": "8 planned attempts did not produce scores.",+ "action": "Rerun the incomplete evaluation before changing the skill or cases.",+ "check": "Every planned attempt has a score.",+ "strength": "supported",+ "evidence": [],+ }+ ],+ )+ # Recorded counters are independent of the cleared quality rows.+ failed["agents"] = {+ "agent": {+ "execution_status": "failed",+ "expected_attempts": 36,+ "scored_attempts": 28,+ "num_trials": 16,+ "num_trials_baseline": 12,+ "conditions": {+ "with_skill": {"execution_status": "failed", "expected_attempts": 18, "scored_attempts": 16},+ "without_skill": {"execution_status": "failed", "expected_attempts": 18, "scored_attempts": 12},+ },+ }+ }+ failed["case_diagnostics"], _ = build_case_diagnostics(failed["dataset"], failed["agents"])+ result = ValidationResult(validator_name="AGENT_EVAL")+ result.metadata["agent_eval"] = failed+ result.add_error("Retained evaluation did not complete")+ (directory / "incomplete.html").write_text(+ HTMLReporter(include_timestamp=False).render_all([result]), encoding="utf-8"+ )+ (directory / "incomplete-full.html").write_text(+ HTMLReporter(include_timestamp=False).render_all([*_tier1_results(), result]), encoding="utf-8"+ )+ clean = ValidationResult(validator_name="Schema Check")+ clean.add_success("schema", "Valid schema")+ (directory / "tier1.html").write_text(HTMLReporter(include_timestamp=False).render_all([clean]), encoding="utf-8")+ # A second complete two-agent shape exercises a different recorded score.+ alternate = _complete_result("second-demo", ("agent-a", "agent-b"), (0.97, 0.79))+ (directory / "second.html").write_text(+ HTMLReporter(include_timestamp=False).render_all([*_tier1_results(), _similarity_result(), alternate]),+ encoding="utf-8",+ )++ def section(key, title, value):+ return {+ "key": key,+ "title": title,+ "columns": ["Recorded observation"],+ "rows": [[value]],+ "total": 1,+ "omitted": 0,+ "notes": [],+ }++ static = {+ "schema_version": 1,+ "name": "synthetic-plugin",+ "status": "passed",+ "truncated": False,+ "sections": [+ section("components", "Component inventory", "sample-skill"),+ section("catalog_skills", "Catalog comparison", "No duplicate skills"),+ ],+ }+ runtime = {+ "schema_version": 1,+ "name": "synthetic-plugin",+ "status": "complete",+ "truncated": False,+ "run_id": "fixture-run",+ "execution_status": "succeeded",+ "evidence_complete": True,+ "source": {},+ "sections": [+ section("eligibility", "Measurement eligibility", "Complete recorded measurement"),+ section("loading", "Component loading", "Recorded native delivery"),+ section("comparisons", "Paired comparisons", "Four recorded pairs"),+ section("limitations", "Evidence limitations", "Synthetic offline fixture"),+ ],+ }+ (directory / "plugin.html").write_text(+ HTMLReporter(include_timestamp=False).render_all(+ [*_tier1_results(), _similarity_result(), agent], plugin_static=static, plugin_runtime=runtime+ ),+ encoding="utf-8",+ )+ (directory / "static-plugin.html").write_text(+ HTMLReporter(include_timestamp=False).render_all([clean], plugin_static=static), encoding="utf-8"+ )+ (directory / "plugin-snapshots.json").write_text(json.dumps({"plugin_static": static, "plugin_runtime": runtime}))+ for state in ("mixed", "custom-only", "missing-baseline", "missing-telemetry"):+ (directory / f"{state}.html").write_text(+ HTMLReporter(include_timestamp=False, report_scope="tier3").render_all([_edge_result(state)]),+ encoding="utf-8",+ )+ skipped = advisory_skip_result("Synthetic retained Tier 3 explicitly skipped", skill_name="synthetic-edge")+ skipped.metadata["optional_skip"] = True+ skipped.metadata["skip_reason"] = "Synthetic retained Tier 3 explicitly skipped"+ (directory / "skipped-tier3.html").write_text(+ HTMLReporter(include_timestamp=False, requested_tiers=(1, 2, 3), displayed_tiers=(1, 2, 3)).render_all(+ [clean, skipped]+ ),+ encoding="utf-8",+ )+ incomplete_static = deepcopy(static)+ incomplete_static.update(status="incomplete", truncated=True)+ incomplete_static["sections"][0].update(+ total=3, omitted=2, notes=["Inventory incomplete; retained observation only"]+ )+ incomplete_runtime = deepcopy(runtime)+ incomplete_runtime.update(status="incomplete", execution_status="failed", evidence_complete=False)+ incomplete_runtime["sections"][0]["rows"] = [["Not eligible: incomplete recorded arms"]]+ incomplete_runtime["sections"][1]["rows"] = [[None]]+ incomplete_runtime["sections"][2]["rows"] = [["Comparison unavailable; incomplete pair"]]+ incomplete_runtime["sections"][3]["rows"] = [["Synthetic retained runtime timeout; no behavior conclusion"]]+ (directory / "incomplete-plugin.html").write_text(+ HTMLReporter(include_timestamp=False).render_all(+ [_edge_result("mixed")], plugin_static=incomplete_static, plugin_runtime=incomplete_runtime+ ),+ encoding="utf-8",+ )+ similarity = ValidationResult(validator_name="Similarity Check")+ similarity.add_success("index_built", "Indexed synthetic collection", entry_count=3, content_type="skill")+ similarity.add_finding(+ Finding(+ category="SIMILARITY",+ check_name="EXACT_DUPLICATE",+ severity="high",+ message="Synthetic collection duplicate",+ file_path="skills/a/SKILL.md",+ metadata={"path_a": "skills/a", "path_b": "skills/b"},+ )+ )+ (directory / "nonzero-similarity.html").write_text(+ HTMLReporter(include_timestamp=False).render_all([similarity]), encoding="utf-8"+ )+ native = ValidationResult(validator_name="AGENT_EVAL")+ native.metadata["agent_eval"] = build_agent_eval_payload(+ "native-telemetry",+ {+ "agent-a": {+ "execution_status": "succeeded",+ "expected_attempts": 4,+ "scored_attempts": 4,+ "with_skill": dict.fromkeys(DEFAULT_METRICS, 0.9),+ "without_skill": dict.fromkeys(DEFAULT_METRICS, 0.7),+ "rewards": [_reward(f"case-one__attempt{i}", "case-one", 0.9, 12) for i in (1, 2)],+ "rewards_baseline": [_reward(f"case-one__baseline{i}", "case-one", 0.7, 20) for i in (1, 2)],+ "num_trials": 2,+ "num_trials_baseline": 2,+ "conditions": {+ arm: {"execution_status": "succeeded", "expected_attempts": 2, "scored_attempts": 2}+ for arm in ("with_skill", "without_skill")+ },+ }+ },+ dataset=[{"id": "case-one", "prompt": "Summarize synthetic input", "expected_output": "Summary"}],+ use_llm_judge=False,+ )+ native.metadata["agent_eval"].update(_native_telemetry_payload())+ (directory / "native-telemetry.html").write_text(+ HTMLReporter(include_timestamp=False).render_all([*_tier1_results(), _similarity_result(), native]),+ encoding="utf-8",+ )+ qualityless = deepcopy(native)+ qualityless.add_error("Synthetic retained quality-agent mapping unavailable")+ qualityless.metadata["agent_eval"].update(+ agents={},+ trials=[],+ cases=[],+ dimensions=[],+ best_agent=None,+ overall_score=None,+ overall_lift=None,+ summary={},+ execution_status="failed",+ verdict="neutral",+ )+ (directory / "native-no-quality-agents.html").write_text(+ HTMLReporter(include_timestamp=False, report_scope="tier3").render_all([qualityless]), encoding="utf-8"+ )+ return directory, canonical, failed++[email protected](scope="module")+def browser():+ from playwright.sync_api import sync_playwright++ with sync_playwright() as runtime:+ instance = runtime.chromium.launch(+ executable_path=os.environ.get("SKILLEVALUATOR_TEST_BROWSER") or None, headless=True+ )+ yield instance+ instance.close()+++def page(browser, request):+ context = browser.new_context(viewport={"width": 1440, "height": 1000}, reduced_motion="reduce")+ context.route("https://**/*", lambda route: route.abort())+ context.route("http://**/*", lambda route: route.abort())+ tab = context.new_page()+ yield tab+ if destination := os.environ.get("SKILLEVALUATOR_BROWSER_SCREENSHOTS"):+ directory = Path(destination)+ directory.mkdir(parents=True, exist_ok=True)+ name = re.sub(r"[^a-zA-Z0-9_.-]", "-", request.node.name)+ tab.screenshot(path=str(directory / f"{name}.png"))+ context.close()+++def _open(page, directory: Path, name: str = "full"):+ page.goto((directory / f"{name}.html").as_uri())+ page.add_style_tag(+ content="*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}"+ )+++def _assert_readable_text(locator, *state):+ colors = locator.evaluate("""node => {+ const parse=color=>color.match(/[\\d.]+/g).map(Number);+ const blend=(front,back)=>front.slice(0,3).map((value,i)=>+ value*(front[3]??1)+back[i]*(1-(front[3]??1)));+ const ancestors=[];+ for(let current=node;current;current=current.parentElement)ancestors.unshift(current);+ let background=[255,255,255],opacity=1;+ for(const ancestor of ancestors){+ const style=getComputedStyle(ancestor);+ background=blend(parse(style.backgroundColor),background);+ opacity*=Number(style.opacity);+ }+ const foreground=parse(getComputedStyle(node).color);+ foreground[3]=(foreground[3]??1)*opacity;+ return {foreground:blend(foreground,background),background,label:node.textContent.trim()};+ }""")++ def luminance(channels):+ values = [value / 255 for value in channels]+ linear = [value / 12.92 if value <= 0.04045 else ((value + 0.055) / 1.055) ** 2.4 for value in values]+ return sum(value * weight for value, weight in zip(linear, (0.2126, 0.7152, 0.0722), strict=True))++ low, high = sorted((luminance(colors["foreground"]), luminance(colors["background"])))+ ratio = (high + 0.05) / (low + 0.05)+ assert ratio >= 4.5, (*state, colors, ratio)+++def _tier(page, name: str):+ page.locator(f'.tier-card[data-target-tab="{name}"] .tier-card-label').click()+ assert page.locator(f"#tab-{name}").is_visible()+++def _subtab(page, name: str):+ page.locator(f'[data-tier3-tab="{name}"]').click()+ assert page.locator(f"#tier3-page-{name}").is_visible()++[email protected]("width", [1440, 760, 390])+def test_native_report_hierarchy_and_every_tier_fit_viewport(page, reports, width):+ directory, _, _ = reports+ page.set_viewport_size({"width": width, "height": 1000})+ for fixture in ("full", "second", "stress"):+ _open(page, directory, fixture)+ assert page.locator(".report-sidebar").count() == 0+ assert page.locator(".main-header").is_visible()+ styles = page.evaluate("""() => ({+ font:getComputedStyle(document.body).fontSize,+ line:getComputedStyle(document.body).lineHeight,+ header:getComputedStyle(document.querySelector('.main-header')).backgroundImage+ })""")+ assert styles["font"] == "16px"+ assert float(styles["line"].removesuffix("px")) == pytest.approx(25.6)+ assert "rgb(118, 185, 0)" in styles["header"]+ if width == 1440:+ title_box = page.locator(".agent-hero-title-block").bounding_box()+ score_box = page.locator(".hero-side").bounding_box()+ assert abs(title_box["y"] - score_box["y"]) <= 8+ for tier in ("tier1", "tier2", "tier3"):+ _tier(page, tier)+ assert page.evaluate("document.documentElement.scrollWidth <= innerWidth + 1")+ if tier == "tier2":+ for scope in ("inter", "intra"):+ page.locator("#dedup-tab-" + scope).click()+ assert page.locator("#dedup-" + scope).is_visible()+ assert page.evaluate("document.documentElement.scrollWidth <= innerWidth + 1")+ for tab in ("overview", "suggestions", "agents", "trials", "dataset", "provenance"):+ _subtab(page, tab)+ assert page.evaluate("document.documentElement.scrollWidth <= innerWidth + 1")+++def test_theme_defaults_and_explicit_preference_survive_reload(page, reports):+ directory, _, _ = reports+ _open(page, directory, "tier1")+ assert page.locator("html").get_attribute("data-theme") == "light"+ _open(page, directory)+ assert page.locator("html").get_attribute("data-theme") == "dark"+ page.locator("#report-theme").select_option("light")+ assert page.locator("html").get_attribute("data-theme") == "light"+ page.reload()+ assert page.locator("html").get_attribute("data-theme") == "light"++[email protected]("width", [1440, 390])+def test_native_header_versions_and_visible_overview_comparison_are_restored(page, reports, width):+ from skillevaluator import __version__++ directory, _, _ = reports+ page.set_viewport_size({"width": width, "height": 1000})+ _open(page, directory, "native-features")+ header = page.locator(".main-header")+ assert header.locator(".header-title").evaluate(+ "node=>parseFloat(getComputedStyle(node).fontSize)"+ ) == pytest.approx(32 if width == 1440 else 26.4)+ brand = header.locator(".header-brand-row")+ assert brand.locator(".header-title").inner_text() == "SkillEvaluator"+ assert brand.locator(".header-version").inner_text() == f"v{__version__}"+ assert "SkillSpector" not in header.inner_text()+ scanner = page.locator('.tier-card[data-target-tab="tier1"] .tier-card-stats')+ assert "SkillSpector" in scanner.inner_text() and "v2.13.4" in scanner.inner_text()+ header_box = header.locator(".header-content").bounding_box()+ report_box = page.locator("main.container").bounding_box()+ assert header_box["x"] == pytest.approx(report_box["x"])+ assert header_box["width"] == pytest.approx(report_box["width"])+ if width == 1440:+ assert header_box["width"] == pytest.approx(1280)+ _tier(page, "tier3")+ comparison = page.locator("#tier3-dimension-table")+ assert comparison.is_visible()+ assert "baseline" in comparison.locator("thead").inner_text().casefold()+ assert comparison.locator("tbody tr").filter(has_text="Overall").count() == 1+ assert comparison.locator("th button[data-tier3-agent-link]").count() == 1+ assert "Recorded shared-signal comparison" in comparison.inner_text()+ assert "0.70" in comparison.inner_text() and "0.80" in comparison.inner_text()+ assert "+0.10" in comparison.inner_text()+ assert page.locator("#tier3-page-overview .t3-agent-card").count() == 2+ assert page.locator("#run-metadata").get_attribute("open") is None+ assert page.evaluate("document.documentElement.scrollWidth <= innerWidth+1")+ card = page.locator("#tier3-page-overview .t3-agent-card").last+ target_id = card.get_attribute("data-tier3-agent-link")+ card.focus()+ page.keyboard.press("Enter")+ assert page.locator("#tier3-page-agents").is_visible()+ target = page.locator("#" + target_id)+ assert target.evaluate("node=>node.closest('.t3-agent-panel').classList.contains('active')")++[email protected]("width", [1440, 390])[email protected]("fixture", ["native-features", "native-upload-features"])+def test_harbor_actions_keep_every_job_visible_in_tile_and_overview_and_work_by_keyboard(page, reports, width, fixture):+ directory, _, _ = reports+ page.context.route(+ "https://example.test/harbor/**",+ lambda route: route.fulfill(status=200, content_type="text/html", body="<title>Synthetic Harbor view</title>"),+ )+ page.set_viewport_size({"width": width, "height": 1000})+ _open(page, directory, fixture)+ for owner in ('.tier-card[data-target-tab="tier3"]', "#tier3-page-overview"):+ if owner.startswith("#"):+ _tier(page, "tier3")+ links = page.locator(owner + ' a[href^="https://example.test/harbor/"]')+ assert links.count() == 8+ assert all(link.is_visible() for link in links.all())+ expected = links.first.get_attribute("href")+ links.first.focus()+ with page.expect_popup() as popup:+ page.keyboard.press("Enter")+ popup.value.wait_for_load_state()+ assert popup.value.url == expected+ popup.value.close()+ assert page.evaluate("document.documentElement.scrollWidth <= innerWidth+1")+++def test_long_recorded_scanner_version_wraps_inside_the_mobile_tier1_tile(page, tmp_path):+ version = "2.13.4+" + "x" * 64+ result = ValidationResult(validator_name="Schema Check")+ result.add_success("schema", "Synthetic schema check passed")+ result.metadata["skillspector_version"] = version+ path = tmp_path / "long-scanner-version.html"+ path.write_text(HTMLReporter(include_timestamp=False).render_all([result]), encoding="utf-8")+ page.set_viewport_size({"width": 390, "height": 1000})+ page.goto(path.as_uri())+ label = page.locator(+ '.tier-card[data-target-tab="tier1"] [title="SkillSpector version that ran the Tier 1 security scan"]'+ )+ assert label.is_visible()+ assert label.locator("strong").inner_text() == f"v{version}"+ assert label.evaluate("""node => {+ const tile = node.closest('.tier-card').getBoundingClientRect();+ const range = document.createRange();+ range.selectNodeContents(node);+ return [...range.getClientRects()].every(rect => rect.left >= tile.left && rect.right <= tile.right);+ }""")+ assert page.evaluate("document.documentElement.scrollWidth <= innerWidth+1")+++def test_incomplete_run_keeps_the_baseline_table_with_explicit_unavailable_cells(page, reports):+ directory, _, _ = reports+ _open(page, directory, "incomplete")+ _tier(page, "tier3")+ table = page.locator("#tier3-dimension-table")+ assert table.is_visible()+ text = table.inner_text()+ assert "baseline" in text.casefold() and "N/A" in text+ assert "0.00" not in text+ assert "unavailable" in text.lower()+++def test_custom_only_overview_compares_recorded_metrics_without_inventing_dimensions(page, reports):+ directory, _, _ = reports+ _open(page, directory, "custom-only")+ _tier(page, "tier3")+ table = page.locator("#tier3-metric-comparison-table")+ assert table.is_visible()+ assert "task_quality" in table.inner_text().casefold()+ assert "0.45" in table.inner_text()+ assert "baseline" in table.inner_text().casefold()+ assert page.locator("#tier3-dimension-table").count() == 0+++def test_static_header_does_not_leave_a_sticky_navigation_offset(page, reports):+ directory, _, _ = reports+ _open(page, directory)+ page.locator(".main-header").evaluate("node=>node.style.position='static'")+ page.evaluate("reportMeasureNavigation()")+ assert (+ page.evaluate("getComputedStyle(document.documentElement).getPropertyValue('--report-header-height').trim()")+ == "0px"+ )+++def test_keyboard_navigation_reveals_nested_agent_and_finding_evidence(page, reports):+ directory, _, _ = reports+ _open(page, directory)+ _tier(page, "tier2")+ page.locator("#dedup-tab-inter").click()+ assert page.locator("#dedup-inter").is_visible()+ page.keyboard.press("Home")+ page.keyboard.press("Enter")+ assert page.locator("#dedup-intra").is_visible()+ _tier(page, "tier3")+ tabs = page.locator('[role="tab"][data-tier3-tab]')+ assert tabs.count() == 6+ tabs.nth(0).focus()+ page.keyboard.press("ArrowRight")+ page.keyboard.press("Enter")+ assert page.locator("#tier3-page-suggestions").is_visible()+ _subtab(page, "agents")+ agents = page.locator(".t3-agent-tab-btn")+ assert agents.count() == 2+ agents.nth(0).focus()+ page.keyboard.press("End")+ page.keyboard.press("Enter")+ assert agents.nth(1).get_attribute("aria-selected") == "true"+ anchor_id = page.locator(".t3-agent-anchor").nth(0).get_attribute("id")+ page.set_viewport_size({"width": 390, "height": 1000})+ page.goto((directory / "full.html").as_uri() + "#" + anchor_id)+ page.reload()+ page.wait_for_function("""() => {+ const header=document.querySelector('.main-header').getBoundingClientRect();+ const tabs=document.querySelector('.t3-subtabs').getBoundingClientRect();+ const anchor=document.querySelector('.t3-agent-panel.active .t3-agent-anchor').getBoundingClientRect();+ return tabs.top >= header.bottom - 2 && anchor.top >= header.bottom + tabs.height - 2;+ }""")+ page.set_viewport_size({"width": 1440, "height": 1000})+ _tier(page, "tier1")+ search = page.locator("#report-search")+ search.fill("a finding that does not exist")+ assert page.locator(".check-finding:visible").count() == 0+ page.get_by_role("button", name="Reset filters", exact=True).click()+ # A stored finding fragment must reveal its owning tier/card after reload.+ finding_id = page.locator(".check-finding[id]").nth(0).get_attribute("id")+ page.goto((directory / "full.html").as_uri() + "#" + finding_id)+ page.reload()+ assert page.locator("#" + finding_id).is_visible()+ assert page.evaluate("document.activeElement.id") == finding_id++[email protected]("fixture", ["canonical", "incomplete", "native-upload-features"])+def test_full_payload_download_preserves_retained_canonical_object(page, reports, fixture, tmp_path):+ directory, canonical, failed = reports+ _open(page, directory, fixture)+ _tier(page, "tier3")+ _subtab(page, "provenance")+ with page.expect_download() as event:+ page.get_by_role("button", name="Download Full Tier 3 Payload", exact=True).click()+ destination = tmp_path / "tier3.json"+ event.value.save_as(destination)+ expected = {+ "canonical": canonical,+ "incomplete": failed,+ "native-upload-features": json.loads((directory / "native-upload-canonical.json").read_text()),+ }+ assert json.loads(destination.read_text()) == expected[fixture]+++def test_incomplete_insights_are_concise_and_full_errors_stay_in_diagnostics(page, reports):+ directory, _, failed = reports+ _open(page, directory, "incomplete")+ _tier(page, "tier3")+ _subtab(page, "suggestions")+ insights = page.locator("#tier3-page-suggestions").inner_text()+ assert "8" in insights and "36" in insights+ assert "Rerun the incomplete evaluation" in insights+ assert "retained diagnostic 0" not in insights+ assert len(insights) < 2500+ _subtab(page, "provenance")+ page.locator("#tier3-page-provenance details").evaluate_all("nodes=>nodes.forEach(node=>node.open=true)")+ diagnostics = page.locator("#tier3-page-provenance").inner_text()+ assert all(error in diagnostics for error in failed["execution_errors"])+++def test_offline_charts_copy_and_json_export_work_without_browser_errors(page, reports):+ directory, _, _ = reports+ errors = []+ page.on("pageerror", lambda error: errors.append(str(error)))+ _open(page, directory)+ _tier(page, "tier3")+ _subtab(page, "overview")+ assert page.locator("#tier3-radar").is_visible()+ assert page.evaluate("typeof Chart") == "function"+ _subtab(page, "suggestions")+ copy = page.locator("#tier3-page-suggestions .t3-copy-btn").nth(0)+ copy.click()+ page.wait_for_function(+ """() => [...document.querySelectorAll('#tier3-page-suggestions .t3-copy-btn')].some(node => /copied|copy failed/i.test(node.innerText))"""+ )+ with page.expect_download() as event:+ page.locator(".export-btn").click()+ assert event.value.suggested_filename.endswith(".json")+ assert not errors+++def test_plugin_evidence_is_reachable_in_its_tiers_and_downloaded_once(page, reports, tmp_path):+ directory, _, _ = reports+ _open(page, directory, "plugin")+ page.set_viewport_size({"width": 390, "height": 1000})+ for tier, evidence in (("tier1", "plugin-static-components"), ("tier2", "plugin-static-catalog_skills")):+ _tier(page, tier)+ assert page.locator("#" + evidence).is_visible()+ assert page.locator("#" + evidence).count() == 1+ _tier(page, "tier3")+ for tab, key in (+ ("overview", "eligibility"),+ ("agents", "loading"),+ ("trials", "comparisons"),+ ("provenance", "limitations"),+ ):+ _subtab(page, tab)+ assert page.locator("#plugin-runtime-" + key).is_visible()+ assert page.evaluate("document.documentElement.scrollWidth <= innerWidth + 1")+ with page.expect_download() as event:+ page.locator(".export-btn").click()+ target = tmp_path / "report.json"+ event.value.save_as(target)+ exported = json.loads(target.read_text())+ expected = json.loads((directory / "plugin-snapshots.json").read_text())+ assert {key: exported[key] for key in expected} == expected+++def test_print_exposes_evidence_and_restores_disclosures(page, reports):+ directory, _, _ = reports+ _open(page, directory)+ page.locator("#report-search").fill("no matching finding")+ assert page.locator(".check-finding:visible").count() == 0+ _tier(page, "tier3")+ _subtab(page, "dataset")+ page.evaluate("window.closedDetails=[...document.querySelectorAll('details:not([open]):not(.raw-output)')]")+ page.evaluate("dispatchEvent(new Event('beforeprint'))")+ page.emulate_media(media="print")+ assert page.evaluate(+ "[...document.querySelectorAll('.t3-page,.t3-agent-panel,.check-finding')].every(node=>node.getClientRects().length>0)"+ )+ assert page.locator("canvas:visible").count() == 4+ page.emulate_media(media="screen")+ page.evaluate("dispatchEvent(new Event('afterprint'))")+ assert page.evaluate("window.closedDetails.every(node=>!node.open)")+ _tier(page, "tier1")+ assert page.locator("#report-search").input_value() == "no matching finding"+ assert page.locator(".check-finding:visible").count() == 0+++def test_no_javascript_keeps_all_recorded_evidence_readable(browser, reports):+ directory, _, _ = reports+ context = browser.new_context(java_script_enabled=False, viewport={"width": 390, "height": 1000})+ try:+ tab = context.new_page()+ tab.goto((directory / "full.html").as_uri())+ assert tab.evaluate(+ "[...document.querySelectorAll('.t3-page,.t3-agent-panel,.check-finding')].every(node=>node.getClientRects().length>0)"+ )+ assert tab.evaluate("document.documentElement.scrollWidth <= innerWidth + 1")+ finally:+ context.close()++[email protected]("javascript", [True, False])+def test_dimension_definitions_open_natively_beneath_each_dimension(browser, reports, javascript):+ directory, _, _ = reports+ context = browser.new_context(java_script_enabled=javascript, viewport={"width": 390, "height": 1000})+ context.route("https://**/*", lambda route: route.abort())+ context.route("http://**/*", lambda route: route.abort())+ try:+ tab = context.new_page()+ tab.goto((directory / "full.html").as_uri())+ if javascript:+ _tier(tab, "tier3")+ comparison = tab.locator("#tier3-dimension-lift")+ assert comparison.get_attribute("open") is not None+ definitions = comparison.locator("#tier3-dimension-table td:first-child > .t3-dimension-definition")+ assert definitions.count() == 5+ for definition in definitions.all():+ name = definition.locator("..").locator("strong").inner_text()+ assert definition.locator("summary").get_attribute("aria-label") == f"Definition of {name}"+ assert definition.get_attribute("open") is None+ assert not definition.locator("p").is_visible()++ security = definitions.filter(has=tab.get_by_label("Definition of Security", exact=True))+ security.locator("summary").click()+ assert security.get_attribute("open") is not None+ assert security.locator("p").is_visible()++ correctness = definitions.filter(has=tab.get_by_label("Definition of Correctness", exact=True))+ correctness.locator("summary").focus()+ tab.keyboard.press("Enter")+ assert correctness.get_attribute("open") is not None+ assert correctness.locator("p").is_visible()+ assert "Produces factually accurate output." in correctness.inner_text()+ assert tab.evaluate("document.documentElement.scrollWidth <= innerWidth + 1")+ finally:+ context.close()++[email protected]("theme", ["light", "dark"])[email protected]("width", [1440, 390])+def test_native_controls_have_readable_computed_contrast_in_each_state(page, reports, theme, width):+ directory, _, _ = reports+ page.set_viewport_size({"width": width, "height": 1000})+ _open(page, directory)+ page.locator("html").evaluate("(node, theme) => node.dataset.theme=theme", theme)+ checked = []+ for tier in ("tier1", "tier2"):+ _tier(page, tier)+ controls = page.locator(+ ".view-toggle-btn:visible,.filter-btn:visible,.severity-filter-btn:visible,.nav-tab:visible"+ )+ assert controls.count() > 0+ for control in controls.all():+ # Hover and active selectors can compete, especially on the scope tabs.+ was_active = "active" in (control.get_attribute("class") or "").split()+ for active in (False, True):+ control.evaluate("(node, active)=>node.classList.toggle('active',active)", active)+ page.mouse.move(0, 0)+ _assert_readable_text(control, theme, width, tier, active, "idle")+ control.hover()+ _assert_readable_text(control, theme, width, tier, active, "hover")+ control.evaluate("(node, active)=>node.classList.toggle('active',active)", was_active)+ checked.append(control.inner_text())+ assert len(checked) >= 8+ assert page.evaluate("document.documentElement.scrollWidth <= innerWidth + 1")++[email protected]("theme", ["light", "dark"])[email protected]("width", [1440, 390])+def test_native_status_chips_badges_and_pills_have_readable_computed_contrast(page, reports, theme, width):+ directory, _, _ = reports+ page.set_viewport_size({"width": width, "height": 1000})+ statuses = set()+ for fixture in ("full", "absent", "incomplete-full"):+ _open(page, directory, fixture)+ page.locator("html").evaluate("(node, theme)=>node.dataset.theme=theme", theme)+ chips = page.locator(".tier-card-verdict:visible")+ assert chips.count() > 0+ for chip in chips.all():+ statuses.update(chip.locator("..").locator("..").get_attribute("class").split())+ _assert_readable_text(chip, theme, width, fixture, "tier verdict")+ assert {"pass", "fail", "warn", "skipped"} <= statuses++ _tier(page, "tier3")+ # The retained legacy badge rule has no current emitter; exercise its loaded CSS explicitly.+ page.locator("#tier3-page-overview").evaluate("""node=>{+ const badge=document.createElement('span');+ badge.className='t3-incomplete-badge';+ badge.textContent='Incomplete';+ node.append(badge);+ }""")+ incomplete = page.locator(".t3-incomplete-badge:visible")+ assert incomplete.count() > 0+ for badge in incomplete.all():+ _assert_readable_text(badge, theme, width, "incomplete badge")++ _open(page, directory)+ page.locator("html").evaluate("(node, theme)=>node.dataset.theme=theme", theme)+ _tier(page, "tier1")+ for selector in (+ ".count-badge:not(.medium-count):not(.low-count)",+ ".count-badge.medium-count",+ ".count-badge.low-count",+ ):+ badges = page.locator(f"{selector}:visible")+ assert badges.count() > 0+ for badge in badges.all():+ _assert_readable_text(badge, theme, width, selector)+ for selector in (".skill-pill", ".quality-pill"):+ pills = page.locator(f"{selector}:visible")+ assert pills.count() > 0+ pill = pills.first+ page.mouse.move(0, 0)+ _assert_readable_text(pill, theme, width, selector, "idle")+ pill.hover()+ _assert_readable_text(pill, theme, width, selector, "hover")++ page.locator("#view-validator").click()+ headers = page.locator(".validator-collapsible:visible")+ assert headers.count() > 0+ header = headers.first+ for expanded in (False, True):+ if ("active" in header.get_attribute("class").split()) != expanded:+ header.click()+ assert ("active" in header.get_attribute("class").split()) == expanded+ page.mouse.move(0, 0)+ _assert_readable_text(header, theme, width, "validator header", expanded, "idle")+ _assert_readable_text(header.locator(".expand-text"), theme, width, "validator disclosure", expanded)+ header.hover()+ _assert_readable_text(header, theme, width, "validator header", expanded, "hover")++ page.evaluate("window.scrollTo(0, document.body.scrollHeight)")+ back_to_top = page.locator("#backToTop")+ back_to_top.wait_for(state="visible")+ page.mouse.move(0, 0)+ _assert_readable_text(back_to_top, theme, width, "back to top", "idle")+ back_to_top.hover()+ _assert_readable_text(back_to_top, theme, width, "back to top", "hover")++[email protected]("theme", ["light", "dark"])+def test_static_only_native_disclosures_have_shared_styles_without_chart_runtime(page, reports, theme):+ directory, _, _ = reports+ _open(page, directory, "static-plugin")+ page.locator("html").evaluate("(node, theme) => node.dataset.theme=theme", theme)+ assert page.evaluate("typeof Chart") == "undefined"+ assert page.locator("#plugin-static-components").is_visible()+ details = page.locator("details.t3-details").first+ assert details.is_visible()+ details.evaluate("node=>node.open=false")+ styles = details.evaluate("""node => {+ const detail=getComputedStyle(node), summary=getComputedStyle(node.querySelector('summary'));+ return {radius:detail.borderRadius,border:detail.borderTopWidth,padding:summary.padding,+ display:summary.display,arrow:getComputedStyle(node.querySelector('summary'),'::after').content};+ }""")+ assert styles == {"radius": "12px", "border": "1px", "padding": "14.4px 16px", "display": "flex", "arrow": '"▼"'}+ details.locator("summary").click()+ assert details.get_attribute("open") is not None+ assert page.evaluate("document.documentElement.scrollWidth <= innerWidth + 1")++[email protected]("width", [1440, 390])+ "fixture",+ [+ "mixed",+ "custom-only",+ "missing-baseline",+ "missing-telemetry",+ "skipped-tier3",+ "incomplete-plugin",+ "nonzero-similarity",+ ],+)+def test_retained_edge_state_matrix_is_truthful_accessible_and_has_no_browser_errors(page, reports, fixture, width):+ directory, _, _ = reports+ errors = []+ page.on("pageerror", lambda error: errors.append(str(error)))+ page.on("console", lambda message: errors.append(message.text) if message.type == "error" else None)+ page.set_viewport_size({"width": width, "height": 1000})+ _open(page, directory, fixture)+ if fixture == "nonzero-similarity":+ _tier(page, "tier2")+ page.locator("#dedup-tab-inter").click()+ scope = page.locator("#dedup-inter")+ assert "3 collection entries" in scope.inner_text()+ assert "Synthetic collection duplicate" in scope.inner_text()+ assert scope.locator("details").count() > 0+ scope.locator("details").evaluate_all("nodes=>nodes.forEach(node=>node.open=true)")+ assert scope.get_by_text("skills/a", exact=False).count() > 0+ assert "Changes required" in page.locator('.tier-card[data-target-tab="tier2"]').inner_text()+ elif fixture == "skipped-tier3":+ tile = page.locator('.tier-card[data-target-tab="tier3"]')+ assert "Skipped" in tile.inner_text()+ _tier(page, "tier3")+ assert (+ "Live evaluation skipped: Synthetic retained Tier 3 explicitly skipped"+ in page.locator("#tab-tier3").inner_text()+ )+ assert page.locator("#tier3-radar").count() == 0+ else:+ _tier(page, "tier3")+ overview = page.locator("#tier3-page-overview")+ if fixture in ("mixed", "incomplete-plugin"):+ assert "Other execution failures need attention" in overview.inner_text()+ assert "complete-peer" in overview.inner_text()+ _subtab(page, "agents")+ buttons = page.locator(".t3-agent-tab-btn")+ assert buttons.count() == 2+ buttons.filter(has_text="failed-peer").click()+ failed_panel = page.locator(".t3-agent-panel.active")+ assert failed_panel.get_attribute("data-tier3-agent") == "failed-peer"+ assert failed_panel.locator(".t3-kpi-value").all_text_contents() == ["N/A", "N/A", "0"]+ _subtab(page, "provenance")+ page.locator("#tier3-page-provenance details").evaluate_all("nodes=>nodes.forEach(node=>node.open=true)")+ assert (+ "AgentTimeoutError: failed-peer case-1 synthetic retained diagnostic"+ in page.locator("#tier3-page-provenance").inner_text()+ )+ elif fixture == "custom-only":+ assert "Neutral" in overview.inner_text()+ assert page.locator("#tier3-dimension-table").count() == 0+ _subtab(page, "agents")+ assert "Custom: task_quality" in page.locator("#tier3-page-agents").inner_text()+ elif fixture == "missing-baseline":+ assert "no baseline" in overview.inner_text()+ _subtab(page, "trials")+ page.locator("#tier3-page-trials details").evaluate_all("nodes=>nodes.forEach(node=>node.open=true)")+ table = page.locator("#t3-trials-table")+ assert table.is_visible()+ assert table.locator("tbody tr").count() == 1+ assert "With skill" in table.inner_text()+ assert "Without skill" not in table.inner_text()+ elif fixture == "missing-telemetry":+ _subtab(page, "trials")+ page.locator("#tier3-page-trials details").evaluate_all("nodes=>nodes.forEach(node=>node.open=true)")+ table = page.locator("#t3-trials-table")+ assert table.is_visible()+ headers = table.locator("thead th").all_text_contents()+ for label in ("Steps", "Tokens"):+ column = headers.index(label)+ assert [row.locator("td").nth(column).inner_text() for row in table.locator("tbody tr").all()] == [+ "—",+ "—",+ ]+ assert page.locator("#tier3-token-chart").count() == 0+ if fixture == "incomplete-plugin":+ _tier(page, "tier1")+ assert "Static snapshot · incomplete" in page.locator("#plugin-static-evidence").inner_text()+ inventory = page.locator("#plugin-static-components")+ assert inventory.is_visible()+ inventory.locator("summary").click()+ assert "2 more rows omitted (3 total)" in inventory.inner_text()+ _tier(page, "tier3")+ _subtab(page, "overview")+ assert (+ "Evidence incomplete · execution failed · advisory snapshot"+ in page.locator("#plugin-runtime-evidence").inner_text()+ )+ for tab, key, evidence in (+ ("overview", "eligibility", "Not eligible"),+ ("agents", "loading", "unknown"),+ ("trials", "comparisons", "Comparison unavailable"),+ ("provenance", "limitations", "no behavior conclusion"),+ ):+ _subtab(page, tab)+ section = page.locator("#plugin-runtime-" + key)+ assert section.is_visible()+ if section.get_attribute("open") is None:+ section.locator("summary").click()+ assert evidence in section.inner_text()+ for tab in ("overview", "suggestions", "agents", "trials", "dataset", "provenance"):+ _subtab(page, tab)+ assert page.evaluate("document.documentElement.scrollWidth <= innerWidth + 1")+ assert page.evaluate("document.documentElement.scrollWidth <= innerWidth + 1")+ assert not errors+++def test_chart_runtime_unavailable_exposes_fallbacks_and_linked_tables_without_errors(page, reports):+ directory, _, _ = reports+ errors = []+ page.on("pageerror", lambda error: errors.append(str(error)))+ page.on("console", lambda message: errors.append(message.text) if message.type == "error" else None)+ # Prevent the bundled inline runtime from creating Chart while all report JS executes normally.+ page.add_init_script("Object.defineProperty(window,'Chart',{get:()=>undefined,set:()=>{},configurable:false})")+ _open(page, directory)+ assert page.evaluate("typeof Chart") == "undefined"+ _tier(page, "tier3")+ token_chart = (+ "tier3-recorded-token-chart" if page.locator("#tier3-recorded-token-chart").count() else "tier3-token-chart"+ )+ for tab, chart_ids in (+ ("overview", ("tier3-radar", "tier3-metric-bar")),+ ("trials", (token_chart, "tier3-steps-chart")),+ ):+ _subtab(page, tab)+ for chart_id in chart_ids:+ canvas = page.locator("#" + chart_id)+ assert canvas.count() == 1+ canvas.evaluate("""node=>{+ for(let parent=node.parentElement;parent;parent=parent.parentElement)+ if(parent.tagName==='DETAILS')parent.open=true;+ }""")+ assert not canvas.is_visible()+ assert page.locator("#" + chart_id + "-fallback").is_visible()+ link = page.locator("#" + chart_id + "-description a")+ target = link.get_attribute("href")+ link.click()+ assert page.locator(target).is_visible()+ assert page.locator(target).locator("table").count() or page.locator(target).evaluate(+ "node=>node.tagName==='TABLE'"+ )+ assert page.evaluate("document.documentElement.scrollWidth <= innerWidth + 1")+ _subtab(page, tab)+ assert not errors++[email protected]("fixture", ["full", "incomplete", "mixed", "custom-only"])+def test_overview_is_a_concise_projection_and_full_insights_have_one_owner(page, reports, fixture):+ directory, _, _ = reports+ _open(page, directory, fixture)+ _tier(page, "tier3")+ overview = page.locator("#tier3-page-overview")+ assert overview.locator(".t3-sug-card").count() == 0+ assert overview.locator(".dashboard-card").count() <= 3+ assert page.locator("#run-metadata").get_attribute("open") is None+ assert page.locator(".nav-tab:visible").count() == 0+ assert page.locator(".header-status-badge").count() == 0+ if fixture == "incomplete":+ assert "28" in overview.inner_text() and "36" in overview.inner_text()+ assert "unavailable" in overview.inner_text().lower()+ assert overview.locator(".dashboard-card").filter(has_text="Overall Score").count() == 0+ _subtab(page, "suggestions")+ assert page.locator("#tier3-page-suggestions .t3-sug-card").count() > 0+++def test_folded_plugin_evidence_is_closed_then_revealed_by_its_existing_link_and_search(page, reports):+ directory, _, _ = reports+ _open(page, directory, "plugin")+ _tier(page, "tier1")+ component = page.locator("#plugin-static-components")+ assert component.get_attribute("open") is None+ assert not component.locator("table").is_visible()+ page.locator("#report-search").fill("sample-skill")+ assert component.locator("table").is_visible()+ assert "sample-skill" in component.inner_text()+ page.goto((directory / "plugin.html").as_uri() + "#plugin-runtime-loading")+ loading = page.locator("#plugin-runtime-loading")+ assert loading.is_visible()+ assert loading.locator("table").is_visible()+ assert "Recorded native delivery" in loading.inner_text()+++def test_mobile_overview_places_incomplete_result_and_recorded_action_before_metadata(page, reports):+ directory, _, _ = reports+ page.set_viewport_size({"width": 390, "height": 1000})+ _open(page, directory, "incomplete")+ _tier(page, "tier3")+ _subtab(page, "overview")+ overview = page.locator("#tier3-page-overview")+ overview.scroll_into_view_if_needed()+ action = overview.get_by_text("Rerun the incomplete evaluation", exact=False)+ assert action.count() == 1+ action_box = action.bounding_box()+ assert action_box is not None and action_box["y"] + action_box["height"] <= 1000+ assert page.locator(".main-header").evaluate("node=>getComputedStyle(node).position") == "static"+ assert (+ page.evaluate("getComputedStyle(document.documentElement).getPropertyValue('--report-header-height').trim()")+ == "0px"+ )+ assert "8" in overview.inner_text() and "36" in overview.inner_text()+ assert page.locator("#run-metadata").get_attribute("open") is None+ assert page.evaluate("document.documentElement.scrollWidth <= innerWidth + 1")++[email protected]("width", [1440, 390])+def test_native_recorded_telemetry_is_folded_complete_and_draws_one_condition_aware_chart(page, reports, width):+ directory, _, _ = reports+ errors = []+ page.on("pageerror", lambda error: errors.append(str(error)))+ page.set_viewport_size({"width": width, "height": 1000})+ _open(page, directory, "native-telemetry")+ page.evaluate("filterValidators('fail')")+ _tier(page, "tier3")+ _subtab(page, "trials")+ tokens = page.locator("#tier3-token-usage")+ latency = page.locator("#tier3-latency-metrics")+ assert tokens.get_attribute("open") is None and latency.get_attribute("open") is None+ tokens.locator("summary").first.click()+ text = tokens.inner_text()+ for marker in (+ "Prompt",+ "Cached",+ "Uncached prompt",+ "Completion",+ "Total",+ "Efficiency Tokens",+ "Without skill",+ "case-one",+ ):+ assert marker.lower() in text.lower()+ assert tokens.locator("table").first.is_visible()+ assert tokens.locator("tbody tr:visible").count() == 9+ assert page.locator("#tier3-token-chart").count() == 0+ chart = page.locator("#tier3-recorded-token-chart")+ page.wait_for_function("""() => {+ const canvas=document.getElementById('tier3-recorded-token-chart');+ return canvas&&!canvas.hidden&&window.Chart?.getChart(canvas);+ }""")+ data = chart.evaluate("node=>Chart.getChart(node).data")+ assert any("With skill" in label for label in data["labels"])+ assert any("Without skill" in label for label in data["labels"])+ assert [series["label"] for series in data["datasets"]] == ["Uncached prompt", "Cached prompt", "Completion"]+ assert sum(series["data"][0] for series in data["datasets"]) == 120+ latency.locator("summary").first.click()+ for marker in (+ "LLM (s)",+ "Tool (s)",+ "LLM ms/token",+ "Arm runtime (ms)",+ "partial",+ "Baseline timing is incomplete.",+ ):+ assert marker.lower() in latency.inner_text().lower()+ page.locator("#t3-trials-table").evaluate("""node=>{+ for(let parent=node.parentElement;parent;parent=parent.parentElement)+ if(parent.tagName==='DETAILS')parent.open=true;+ }""")+ assert page.locator("#t3-trials-table tbody tr:visible").count() == 4+ assert page.evaluate("document.documentElement.scrollWidth <= innerWidth + 1")+ assert not errors+++def test_native_recorded_chart_fallback_links_to_retained_table(page, reports):+ directory, _, _ = reports+ page.add_init_script("Object.defineProperty(window,'Chart',{get:()=>undefined,set:()=>{},configurable:false})")+ _open(page, directory, "native-telemetry")+ _tier(page, "tier3")+ _subtab(page, "trials")+ page.locator("#tier3-token-usage > summary").click()+ assert not page.locator("#tier3-recorded-token-chart").is_visible()+ fallback = page.locator("#tier3-recorded-token-chart-fallback")+ assert fallback.is_visible()+ fallback.locator("a").click()+ assert page.locator("#t3-recorded-token-usage-table").is_visible()+++def test_recorded_chart_loads_even_when_quality_agent_mapping_is_unavailable(page, reports):+ directory, _, _ = reports+ _open(page, directory, "native-no-quality-agents")+ _tier(page, "tier3")+ _subtab(page, "trials")+ page.locator("#tier3-token-usage > summary").click()+ assert page.evaluate("typeof Chart") == "function"+ page.wait_for_function("""() => {+ const canvas=document.getElementById('tier3-recorded-token-chart');+ return canvas&&!canvas.hidden&&window.Chart.getChart(canvas);+ }""")+ assert page.locator("#t3-recorded-token-usage-table").is_visible()+ assert page.locator("#tier3-radar").count() == 0+++def test_search_reveals_hidden_runtime_and_nested_dataset_evidence_then_restores_state(page, reports):+ directory, _, _ = reports+ _open(page, directory, "plugin")+ _tier(page, "tier1")+ page.locator("#report-search").fill("Recorded native delivery")+ loading = page.locator("#plugin-runtime-loading")+ assert page.locator("#tier3-page-agents").is_visible()+ assert loading.locator("table").is_visible()+ _tier(page, "tier1")+ page.locator("#report-search").fill("")+ assert loading.get_attribute("open") is None++ _open(page, directory, "incomplete")+ _tier(page, "tier3")+ _subtab(page, "dataset")+ cases = page.locator("#t3-dataset-list > details")+ assert cases.count() == 4+ later_case = cases.nth(1)+ assert later_case.get_attribute("open") is None+ search = page.get_by_role("searchbox", name="Filter dataset", exact=True)+ search.fill("No matched trial")+ assert later_case.get_attribute("open") is not None+ assert later_case.locator("details[open]").count() > 0+ assert "No matched trial" in later_case.inner_text()+ search.fill("")+ assert later_case.get_attribute("open") is None+++def test_global_search_reveals_dataset_attempt_body_matches_and_preserves_user_disclosures(page, reports):+ directory, _, _ = reports+ _open(page, directory, "incomplete-full")+ _tier(page, "tier3")+ _subtab(page, "dataset")+ cases = page.locator("#t3-dataset-list > details")+ attempts = cases.locator("details.t3-details")+ assert attempts.count() == 8+ # Keep a user-opened case and attempt, while later cases remain folded.+ assert cases.nth(0).get_attribute("open") is not None+ attempts.nth(0).locator("summary").click()+ initial_state = page.locator("#t3-dataset-list details").evaluate_all("nodes=>nodes.map(node=>node.open)")+ query = "No retained trial result could be matched to this case"+ assert all(query not in summary for summary in attempts.locator("summary").all_text_contents())+ assert not attempts.nth(1).locator(".t3-details-body").is_visible()++ _tier(page, "tier1")+ search = page.locator("#report-search")+ search.fill(query)+ assert page.locator("#tier3-page-dataset").is_visible()+ assert "evidence sections matched" in page.locator("#report-search-count").inner_text()+ assert not page.locator("#report-no-matches").is_visible()+ for index in range(attempts.count()):+ body = attempts.nth(index).locator(".t3-details-body")+ assert body.is_visible()+ assert query in body.inner_text()++ # A changed query also restores only what the previous search opened.+ _tier(page, "tier1")+ search.fill("a query with no matching evidence")+ assert page.locator("#t3-dataset-list details").evaluate_all("nodes=>nodes.map(node=>node.open)") == initial_state+ search.fill(query)+ assert attempts.nth(1).get_attribute("open") is not None+ _tier(page, "tier1")+ search.fill("")+ assert page.locator("#t3-dataset-list details").evaluate_all("nodes=>nodes.map(node=>node.open)") == initial_state++[email protected]("theme", ["light", "dark"])[email protected]("width", [1440, 390])[email protected]("fixture", ["incomplete", "native-features"])+def test_overview_text_links_and_insights_action_have_readable_contrast(page, reports, theme, width, fixture):+ directory, _, _ = reports+ page.set_viewport_size({"width": width, "height": 1000})+ _open(page, directory, fixture)+ page.locator("html").evaluate("(node, theme)=>node.dataset.theme=theme", theme)+ _tier(page, "tier3")+ overview = page.locator("#tier3-page-overview")+ links = overview.locator("a:visible")+ assert links.count() >= 3+ all_links = links.all() + page.locator('.tier-card[data-target-tab="tier3"] a:visible').all()+ for link in all_links:+ colors = link.evaluate("""node=>{+ const foreground=getComputedStyle(node).color;+ let parent=node,background;+ while(parent){+ background=getComputedStyle(parent).backgroundColor;+ if(background!=='rgba(0, 0, 0, 0)'&&background!=='transparent')break;+ parent=parent.parentElement;+ }+ return {foreground,background,label:node.textContent.trim()};+ }""")++ def luminance(color):+ channels = [int(value) / 255 for value in re.findall(r"[0-9]+", color)[:3]]+ linear = [value / 12.92 if value <= 0.04045 else ((value + 0.055) / 1.055) ** 2.4 for value in channels]+ return sum(value * weight for value, weight in zip(linear, (0.2126, 0.7152, 0.0722), strict=True))++ values = sorted((luminance(colors["foreground"]), luminance(colors["background"])))+ ratio = (values[1] + 0.05) / (values[0] + 0.05)+ assert ratio >= 4.5, (theme, width, colors, ratio)+++def test_mobile_incomplete_summary_keeps_coverage_in_one_full_width_owner(page, reports):+ directory, _, _ = reports+ page.set_viewport_size({"width": 390, "height": 1000})+ _open(page, directory, "incomplete")+ _tier(page, "tier3")+ summary = page.locator("#tier3-overview-summary")+ assert summary.locator(".trial-coverage").is_visible()+ assert summary.locator("#tier3-quality-unavailable").is_visible()+ assert summary.locator("#tier3-next-steps-preview").is_visible()+ assert summary.bounding_box()["width"] >= page.locator(".t3-subtabs").bounding_box()["width"] - 2+ assert page.locator('.t3-primary-metrics [data-primary-metric="coverage"]').count() == 0+ assert page.evaluate("document.documentElement.scrollWidth <= innerWidth + 1")+++def test_print_wraps_unbroken_retained_table_cells_within_the_page(page, tmp_path):+ result = ValidationResult(validator_name="Schema Check")+ result.add_success("schema_valid", "Synthetic static check")+ snapshot = {+ "schema_version": 1,+ "name": "synthetic-print",+ "status": "passed",+ "truncated": False,+ "sections": [+ {+ "key": "components",+ "title": "Component inventory",+ "columns": ["Recorded observation"],+ "rows": [["x" * 280]],+ "total": 1,+ "omitted": 0,+ "notes": [],+ }+ ],+ }+ (tmp_path / "print-table.html").write_text(+ HTMLReporter(include_timestamp=False).render_all([result], plugin_static=snapshot), encoding="utf-8"+ )+ page.set_viewport_size({"width": 794, "height": 1123})+ _open(page, tmp_path, "print-table")+ page.evaluate("dispatchEvent(new Event('beforeprint'))")+ page.emulate_media(media="print")+ bounds = page.locator("#plugin-static-components table").evaluate("""node=>({+ table:node.getBoundingClientRect().width,+ owner:node.closest('.table-scroll').getBoundingClientRect().width+ })""")+ assert bounds["table"] <= bounds["owner"] + 2, bounds+ page.emulate_media(media="screen")+ page.evaluate("dispatchEvent(new Event('afterprint'))")++[email protected]("width", [1440, 390])+def test_tier1_top_issue_labels_stay_intact_while_long_evidence_wraps(page, tmp_path, width):+ result = ValidationResult(validator_name="Synthetic Plugin Schema")+ token = "recorded-command-" + "x" * 280+ message = (+ "A recorded hook command refers outside the synthetic plugin root; "+ "review its retained target before accepting this component: " + token+ )+ result.add_finding(+ Finding(+ category="PLUGIN_SCHEMA",+ severity="medium",+ check_name="hook_target",+ message=message,+ file_path="hooks/synthetic.json",+ )+ )+ (tmp_path / "tier1-long-evidence.html").write_text(+ HTMLReporter(+ include_timestamp=False, explicit_skill_name="synthetic-component-evidence-and-catalog-search"+ ).render_all([result]),+ encoding="utf-8",+ )+ page.set_viewport_size({"width": width, "height": 1000})+ _open(page, tmp_path, "tier1-long-evidence")+ table = page.locator(".top-issues-table").first+ assert table.is_visible()+ assert table.locator(".quality-pill").count() == 1+ broken = table.locator("th,.quality-pill,.severity-tag,.count-badge").evaluate_all(r"""nodes=>{+ const broken=[];+ for(const element of nodes){+ const walker=document.createTreeWalker(element,NodeFilter.SHOW_TEXT);+ while(walker.nextNode()){+ const node=walker.currentNode;+ for(const match of node.textContent.matchAll(/[A-Za-z]{2,}|\d+/g)){+ const range=document.createRange();+ range.setStart(node,match.index);range.setEnd(node,match.index+match[0].length);+ if(new Set([...range.getClientRects()].map(rect=>Math.round(rect.top))).size>1)+ broken.push(match[0]);+ }+ }+ }+ return broken;+ }""")+ assert not broken, (width, broken)+ pill = table.locator(".quality-pill")+ assert pill.evaluate("node=>node.scrollWidth<=node.clientWidth+1")+ evidence = table.locator("tbody td").first+ assert evidence.inner_text() == message+ assert evidence.evaluate(+ """(node,token)=>{+ const text=node.firstChild,range=document.createRange(),start=text.textContent.indexOf(token);+ range.setStart(text,start);range.setEnd(text,start+token.length);+ return new Set([...range.getClientRects()].map(rect=>Math.round(rect.top))).size>1;+ }""",+ token,+ )+ assert page.evaluate("document.documentElement.scrollWidth <= innerWidth + 1")+ page.set_viewport_size({"width": 794, "height": 1123})+ page.emulate_media(media="print")+ assert table.evaluate(+ "node=>node.getBoundingClientRect().width<=node.parentElement.getBoundingClientRect().width+2"+ )++[email protected]("width", [1440, 390])+ "fixture,tab,selector",+ [+ ("full", "overview", "#tier3-dimension-table"),+ ("native-telemetry", "trials", "#tier3-token-usage table,#tier3-latency-metrics table"),+ ],+)+def test_detailed_tables_keep_short_words_and_numbers_intact_with_bounded_scrolling(+ page, reports, width, fixture, tab, selector+):+ directory, _, _ = reports+ page.set_viewport_size({"width": width, "height": 1000})+ _open(page, directory, fixture)+ _tier(page, "tier3")+ _subtab(page, tab)+ tables = page.locator(selector)+ assert tables.count() > 0+ tables.evaluate_all("""nodes=>nodes.forEach(node=>{+ for(let parent=node.parentElement;parent;parent=parent.parentElement)+ if(parent.tagName==='DETAILS')parent.open=true;+ })""")+ broken = tables.evaluate_all(r"""tables=>{+ const broken=[];+ for(const table of tables){+ const walker=document.createTreeWalker(table,NodeFilter.SHOW_TEXT);+ while(walker.nextNode()){+ const node=walker.currentNode;+ if(node.parentElement.closest('code'))continue; // Long recorded identifiers may wrap.+ for(const match of node.textContent.matchAll(/[A-Za-z]{2,}|\d[\d,]*(?:\.\d+)?/g)){+ const range=document.createRange();+ range.setStart(node,match.index);range.setEnd(node,match.index+match[0].length);+ const lines=new Set([...range.getClientRects()].map(rect=>Math.round(rect.top)));+ if(lines.size>1)broken.push(match[0]);+ }+ }+ }+ return broken;+ }""")+ assert not broken, (fixture, width, broken)+ for table in tables.all():+ bounds = table.evaluate("""node=>{+ const wrapper=node.closest('.table-scroll');+ return {width:wrapper.getBoundingClientRect().width,scroll:wrapper.scrollWidth,+ client:wrapper.clientWidth,overflow:getComputedStyle(wrapper).overflowX};+ }""")+ assert bounds["width"] <= width+ if bounds["scroll"] > bounds["client"]:+ assert bounds["overflow"] == "auto"+ assert table.evaluate(+ "node=>{const parent=node.closest('.table-scroll');parent.scrollLeft=100;return parent.scrollLeft>0}"+ )+ assert page.evaluate("document.documentElement.scrollWidth <= innerWidth + 1")diff --git a/tests/reporting/test_report_clarity.py b/tests/reporting/test_report_clarity.pynew file mode 100644index 00000000..2ff02c4b--- /dev/null+++ b/tests/reporting/test_report_clarity.py@@ -0,0 +1,278 @@+# SPDX-License-Identifier: Apache-2.0+"""Single-owner report hierarchy keeps evidence and scoped outcomes reachable."""++import json+import re+from copy import deepcopy++import pytest++from skillevaluator.evaluation.tier3_report import build_agent_eval_payload+from skillevaluator.models import ValidationResult+from skillevaluator.reporting.html import HTMLReporter+++def _result(state="complete"):+ result = ValidationResult(validator_name="AGENT_EVAL")+ payload = build_agent_eval_payload(+ "demo", {"agent": {"overall_with_skill": 0.8, "overall_without_skill": 0.4}}, use_llm_judge=False+ )+ payload.update(execution_status="succeeded", expected_attempts=2, scored_attempts=2)+ payload["agents"]["agent"].update(execution_status="succeeded", expected_attempts=2, scored_attempts=2)+ payload["conclusions"] = [+ {"title": "Authored finding", "message": "Complete authored conclusion", "severity": "pass"}+ ]+ payload["recommendations"] = [+ {+ "title": "Recorded action",+ "message": "Complete authored recommendation",+ "check": "Repeat the retained case",+ "evidence_text": "case-one",+ }+ ]+ if state in ("incomplete", "source-rejected"):+ payload.update(+ overall_score=None,+ overall_lift=None,+ best_agent=None,+ agents={},+ execution_status="failed",+ scored_attempts=0,+ )+ result.add_error("Source rejected" if state == "source-rejected" else "Execution did not finish")+ elif state == "mixed":+ payload["agents"]["failed-agent"] = {+ "execution_status": "failed",+ "execution_errors": ["Runner failed"],+ "with_skill": None,+ "baseline": None,+ }+ payload.update(execution_status="failed", expected_attempts=4)+ result.add_error("Runner failed")+ elif state == "baseline-only":+ payload.update(mode="baseline_only", overall_lift=None)+ elif state == "custom":+ payload["metric_ids"] = ["custom_metric"]+ elif state == "skipped":+ payload.update(execution_status="skipped", overall_score=None, overall_lift=None, agents={})+ result.metadata["agent_eval"] = payload+ return result+++def _page(html, name, next_name):+ return html.split(f'id="tier3-page-{name}"', 1)[1].split(f'id="tier3-page-{next_name}"', 1)[0]+++ "state", ["complete", "incomplete", "mixed", "custom", "baseline-only", "skipped", "source-rejected"]+)+def test_overview_has_one_summary_owner_and_retains_full_insights(state):+ result = _result(state)+ original = deepcopy(result.metadata["agent_eval"])+ html = HTMLReporter(include_timestamp=False).render_all([result])+ overview = _page(html, "overview", "trials")+ insights = _page(html, "suggestions", "provenance")+ assert 'class="t3-sug-card ' not in overview+ assert len(re.findall(r'class="dashboard-card(?:[ "])', overview)) <= 3+ assert "Complete authored conclusion" not in overview+ if state not in ("incomplete", "mixed", "source-rejected", "skipped"):+ assert "Complete authored conclusion" in insights+ assert "Complete authored recommendation" in insights+ assert "Check: Repeat the retained case" in insights+ assert "Evidence: case-one" in insights+ assert 'id="tier3-next-steps-preview"' in overview+ assert 'href="#tier3-page-suggestions"' in overview+ assert 'class="nav-tabs mobile-tier-nav"' not in html+ assert html.count('aria-label="Tier navigation"') == 1+ assert 'class="theme-toggle"' not in html+ assert re.search(r'<details class="run-metadata" id="run-metadata">', html)+ assert result.metadata["agent_eval"] == original+++def test_unscored_quality_uses_one_unavailable_state_with_coverage():+ html = HTMLReporter(include_timestamp=False).render_all([_result("incomplete")])+ overview = _page(html, "overview", "trials")+ assert overview.count('id="tier3-quality-unavailable"') == 1+ assert "Quality measurements unavailable" in overview+ assert "Coverage" in overview+ assert 'data-primary-metric="score"' not in overview+ assert 'data-primary-metric="lift"' not in overview+ assert "No successfully scored agent" not in overview+++def test_recorded_secondary_outcomes_share_one_compact_table():+ result = _result()+ result.metadata["agent_eval"]["correct_answers"] = {+ "with_skill": {"correct": 1, "scored": 2},+ "without_skill": {"correct": 0, "scored": 2},+ "difference": 50,+ "difference_unit": "percentage_points",+ }+ html = HTMLReporter(include_timestamp=False).render_all([result])+ overview = _page(html, "overview", "trials")+ assert 'id="tier3-secondary-outcomes"' in overview+ assert "Goals met" in overview and "1/2" in overview and "+50.0 pp" in overview+ assert "Required Checks Passed" not in overview+++def test_native_telemetry_uses_existing_chart_lifecycle_and_prepreview_input(monkeypatch):+ from skillevaluator.reporting import html as module+ from skillevaluator.reporting.telemetry_view import build_telemetry_view++ result = _result()+ totals = {"prompt_tokens": 120, "cached_tokens": 40, "uncached_prompt_tokens": 80, "completion_tokens": 20}+ scope = {+ "with_skill": {"totals": totals, "coverage": {"measured_attempts": 1, "status": "complete"}},+ "baseline": {"totals": totals, "coverage": {"measured_attempts": 1, "status": "complete"}},+ }+ result.metadata["agent_eval"]["token_usage"] = {"dataset": scope, "agents": {"agent": scope}}+ seen = []++ def project(payload):+ seen.append(deepcopy(payload.get("token_usage")))+ return build_telemetry_view(payload)++ monkeypatch.setattr(module, "build_telemetry_view", project)+ html = HTMLReporter(include_timestamp=False).render_all([result])+ assert seen == [result.metadata["agent_eval"]["token_usage"]]+ assert 'id="tier3-recorded-token-chart"' in html+ assert 'getElementById("tier3-recorded-token-chart")' in html+ assert "data: recordedTokenData" in html+ assert 'id="tier3-token-usage"' in _page(html, "trials", "agents")+++def test_tier2_missing_catalog_metadata_does_not_make_unavailable_tile_grid():+ result = ValidationResult(validator_name="Similarity Check")+ result.add_success("catalog_compared", "Compared catalog entries")+ html = HTMLReporter(include_timestamp=False).render_all([result])+ assert 'class="tier2-scope-summary"' in html+ assert '<p class="dashboard-card-value">Unavailable</p>' not in html+++def test_tier_navigation_has_one_headline_and_tier1_owns_severity_detail():+ static = ValidationResult(validator_name="Schema Check")+ static.add_error("Recorded static failure")+ similarity = ValidationResult(validator_name="Similarity Check")+ similarity.add_success("catalog_compared", "Compared catalog entries")+ html = HTMLReporter(include_timestamp=False).render_all([static, similarity, _result()])+ navigation = html.split('aria-label="Tier navigation"', 1)[1].split("</nav>", 1)[0]+ headlines = re.findall(r'<div class="tier-card-stats">(.*?)</div>', navigation, re.DOTALL)+ assert len(headlines) == 3+ assert all(len(re.findall(r"<span(?:\s[^>]*)?>", headline)) == 1 for headline in headlines)+ assert "tier-card-sev" not in navigation+ assert "Best agent score" not in navigation+ tier1 = html.split('id="tab-tier1"', 1)[1].split('id="tab-tier2"', 1)[0]+ dashboard = tier1.split('class="dashboard tier1-statistics"', 1)[1].split("</div>\n <details", 1)[0]+ assert ">Findings</h3>" in dashboard+ assert ">Tier 1 Status</h3>" not in dashboard+ assert "Each check with its results and the evidence behind them." not in html+++def test_overview_coverage_names_both_planned_and_unscored_attempts():+ result = _result("incomplete")+ result.metadata["agent_eval"]["agents"] = {+ "agent": {+ "execution_status": "failed",+ "conditions": {+ "with_skill": {"execution_status": "failed", "scored_attempts": 16, "expected_attempts": 18},+ "without_skill": {"execution_status": "failed", "scored_attempts": 12, "expected_attempts": 18},+ },+ }+ }+ html = HTMLReporter(include_timestamp=False).render_all([result])+ overview = _page(html, "overview", "trials")+ assert "28 of 36 scored" in overview+ assert "8 unscored" in overview+++def test_agent_details_owns_condition_coverage_beside_the_selected_agent():+ result = _result()+ result.metadata["agent_eval"]["agents"]["agent"]["conditions"] = {+ "with_skill": {"execution_status": "succeeded", "scored_attempts": 18, "expected_attempts": 18},+ "without_skill": {"execution_status": "failed", "scored_attempts": 12, "expected_attempts": 18},+ }+ html = HTMLReporter(include_timestamp=False).render_all([result])+ agents = _page(html, "agents", "dataset")+ assert 'class="t3-agent-coverage"' in agents+ assert "18 of 18 scored" in agents+ assert "12 of 18 scored" in agents+ assert "Without skill" in agents and "Failed" in agents+++def test_artifacts_use_recorded_agent_condition_and_keep_exact_identifiers_in_diagnostics():+ result = _result()+ payload = result.metadata["agent_eval"]+ payload["harbor_viewer"] = {"jobs": [{"name": "raw_run_123", "url": "https://example.test/job/123"}]}+ payload["trials"] = [+ {+ "agent": "agent",+ "entry_id": "case-one",+ "trial_id": "trial-one",+ "harbor_viewer": {"job_url": "https://example.test/job/123"},+ }+ ]+ html = HTMLReporter(include_timestamp=False).render_all([result])+ overview = _page(html, "overview", "trials")+ diagnostics = html.split('id="tier3-page-provenance"', 1)[1].split("</section>", 1)[0]+ assert "Harbor artifacts" not in overview+ assert "agent · With skill" in diagnostics+ assert "Artifact identifiers" in diagnostics+ assert "raw_run_123" in diagnostics+++def test_measured_resources_default_closed_and_full_methods_stay_on_demand():+ result = _result()+ html = HTMLReporter(include_timestamp=False).render_all([result])+ trials = _page(html, "trials", "agents")+ assert '<details class="t3-details" id="tier3-agent-resources">' in trials+ assert '<details class="t3-details" id="tier3-resource-methods">' in trials+ methods = trials.split('id="tier3-resource-methods"', 1)[1].split("</details>", 1)[0]+ assert (+ "Efficiency scores measure routing and productive tool use. These separate measurements show observed agent resource use, including failed task outcomes. Lower use alone does not establish improved task quality or Efficiency. Delta = with skill minus baseline; negative means less use. Judge and setup time are excluded. Deltas require complete execution evidence, complete telemetry and matching case counts in both arms. Pairing does not certify matched concurrency or budget, or judge-model agreement. Reused baseline measurements are historical, not fresh or independent evidence. LLM and tool seconds split the agent's trajectory time; inferred LLM time also includes harness and queue time."+ in methods+ )+ lead = trials.split("<summary>Measured Agent Resources</summary>", 1)[1].split('<div class="table-scroll">', 1)[0]+ assert "includes failed outcomes" in lead and "partial" in lead.lower() and "N/A" in lead+ assert "Pairing does not certify" not in lead+++def test_public_token_accounting_folds_generic_methods_but_keeps_specific_notices_beside_rows():+ from skillevaluator.reporting.tier3_token_usage import COVERAGE_NOTE, REUSED_BASELINE_NOTE, TOKEN_USAGE_NOTE++ result = _result()+ arm = {+ "totals": {"total_tokens": 120},+ "coverage": {"status": "complete", "measured_attempts": 1, "expected_attempts": 1},+ }+ result.metadata["agent_eval"]["token_usage"] = {+ "agents": {"agent": {"with_skill": arm, "baseline": arm}},+ "baseline_reused": True,+ "case_rows_omitted": 3,+ }+ html = HTMLReporter(include_timestamp=False).render_all([result])+ trials = _page(html, "trials", "agents")+ assert '<details class="t3-details" id="tier3-token-accounting">' in trials+ accounting = trials.split('id="tier3-token-accounting"', 1)[1].split("</details>", 1)[0]+ assert TOKEN_USAGE_NOTE in accounting+ table = trials.split('<div id="t3-token-usage">', 1)[1].split('id="tier3-token-accounting"', 1)[0]+ assert "120" in table+ assert COVERAGE_NOTE in table+ assert REUSED_BASELINE_NOTE in table+ assert "3 case row(s) were left out" in table+ assert TOKEN_USAGE_NOTE not in table+++def test_recorded_telemetry_loads_charts_without_quality_agent_entries():+ result = _result("incomplete")+ arm = {+ "totals": {"prompt_tokens": 120, "cached_tokens": 40, "uncached_prompt_tokens": 80, "completion_tokens": 20},+ "coverage": {"status": "complete", "measured_attempts": 1, "expected_attempts": 1},+ }+ result.metadata["agent_eval"]["token_usage"] = {"agents": {"recorded-agent": {"with_skill": arm, "baseline": arm}}}+ assert result.metadata["agent_eval"]["agents"] == {}+ html = HTMLReporter(include_timestamp=False).render_all([result])+ assert 'id="tier3-recorded-token-chart"' in html+ assert 'id="tier3-chart-runtime"' in html+ chart = json.loads(re.search(r"var recordedTokenData = (.*?);", html)[1])+ assert chart["labels"] == ["recorded-agent · With skill", "recorded-agent · Without skill"]+ assert chart["datasets"][0]["data"] == [80, 80]diff --git a/tests/reporting/test_report_efficiency.py b/tests/reporting/test_report_efficiency.pynew file mode 100644index 00000000..f3ee7446--- /dev/null+++ b/tests/reporting/test_report_efficiency.py@@ -0,0 +1,65 @@+# SPDX-License-Identifier: Apache-2.0+"""Standalone reports carry compact exports and only the data their charts consume."""++import base64+import json+import re++from browser_navigation_fixtures import _agent_result++from skillevaluator.models import ValidationResult+from skillevaluator.reporting.html import HTMLReporter+++def _script(output: str, script_id: str) -> str:+ match = re.search(r'<script\b[^>]*\bid="' + script_id + r'"[^>]*>(.*?)</script>', output, re.DOTALL)+ assert match is not None+ return match[1]+++def test_chart_projection_excludes_unconsumed_evidence_and_keeps_measurements():+ result = _agent_result("synthetic", ["agent/雪"])+ payload = result.metadata["agent_eval"]+ payload["suggestions"] = ["UNCONSUMED-CHART-EVIDENCE-" + "x" * 40_000]+ output = HTMLReporter(include_timestamp=False).render_all([result])++ literal = re.search(r"var tier3Data = (.*)", output)+ assert literal is not None+ chart_data, _ = json.JSONDecoder().raw_decode(literal[1])+ assert set(chart_data) == {"dimensions", "agents", "trials"}+ assert "UNCONSUMED-CHART-EVIDENCE" not in literal[1]+ assert len(literal[1]) < 5_000+ assert all(set(row) == {"id"} for row in chart_data["dimensions"])+ assert set(chart_data["agents"]["agent/雪"]) == {"dimensions"}+ dimensions = chart_data["agents"]["agent/雪"]["dimensions"]+ assert next(row for row in dimensions if row["id"] == "correctness")["with_skill"] == 0.8+ assert all(set(row) <= {"id", "score", "with_skill"} for row in dimensions)+ assert chart_data["trials"][0] == {+ "agent": "agent/雪",+ "tokens": {"prompt": 100, "completion": 10, "cached": 0},+ }++ # The full retained payload remains owned by its canonical download block.+ canonical = _script(output, "tier3-full")+ if 'id="tier3-full" type="application/json" data-encoding="base64"' in output:+ canonical = base64.b64decode(canonical).decode("utf-8")+ assert json.loads(canonical) == payload+ assert json.loads(_script(output, "report-data"))["tier3"] == {"$ref": "#tier3-full"}+++def test_embedded_report_json_is_compact_with_existing_ascii_and_html_escaping():+ result = ValidationResult(validator_name="SCHEMA", validator_description="雪 <script>& safety")+ result.add_success("synthetic", "雪 <script>& retained value")+ output = HTMLReporter(include_timestamp=False).render_all([result])+ raw = _script(output, "report-data")+ data = json.loads(raw)+ compact = (+ json.dumps(data, separators=(",", ":"), allow_nan=False)+ .replace("<", "\\u003c")+ .replace(">", "\\u003e")+ .replace("&", "\\u0026")+ )+ assert raw == compact+ assert "\\u96ea" in raw+ assert "\\u003cscript\\u003e\\u0026" in raw+ assert "雪 <script>& safety" in json.dumps(data, ensure_ascii=False)diff --git a/tests/reporting/test_report_efficiency_browser.py b/tests/reporting/test_report_efficiency_browser.pynew file mode 100644index 00000000..3e90e1d9--- /dev/null+++ b/tests/reporting/test_report_efficiency_browser.py@@ -0,0 +1,206 @@+# SPDX-License-Identifier: Apache-2.0+"""Offline browser regressions for chart lifecycle and complete filtered prints."""++import json+import os++import pytest+import test_report_browser as report_browser+from test_report_browser import _open, _subtab, _tier++from skillevaluator.reporting.html import HTMLReporter++browser = report_browser.browser+page = report_browser.page+reports = report_browser.reports++pytestmark = pytest.mark.skipif(+ os.environ.get("SKILLEVALUATOR_BROWSER_TESTS") != "1",+ reason="Enable offline Chromium checks with SKILLEVALUATOR_BROWSER_TESTS=1",+)+++def _track_chart_constructions(page, theme="dark"):+ page.add_init_script(+ """+ window.chartConstructions = [];+ let runtime;+ Object.defineProperty(window, 'Chart', {+ configurable: true,+ get: () => runtime,+ set: value => {+ runtime = new Proxy(value, {+ construct(target, args, newTarget) {+ chartConstructions.push({id:args[0].id,theme:document.documentElement.dataset.theme});+ return Reflect.construct(target, args, newTarget);+ }+ });+ }+ });+ try { localStorage.setItem('skillevaluator-theme', SAVED_THEME); } catch (error) {}+ """.replace("SAVED_THEME", json.dumps(theme))+ )+++def test_initial_visible_charts_apply_the_saved_theme_before_constructing(page, reports):+ directory, _, _ = reports+ _track_chart_constructions(page, theme="light")+ _open(page, directory, "canonical")+ events = page.evaluate("chartConstructions")+ assert {event["id"] for event in events} == {"tier3-radar", "tier3-metric-bar"}+ assert len(events) == 2+ assert all(event["theme"] == "light" for event in events)+++def test_hidden_charts_wait_for_visibility_and_reuse_instances_across_theme_and_tabs(page, reports):+ directory, _, _ = reports+ _track_chart_constructions(page)+ _open(page, directory)+ assert page.evaluate("chartConstructions") == []++ _tier(page, "tier3")+ page.wait_for_function("chartConstructions.length === 2")+ assert page.evaluate("chartConstructions.map(row=>row.id).sort()") == ["tier3-metric-bar", "tier3-radar"]+ assert page.evaluate("chartConstructions.every(row=>row.theme==='dark')")+ assert page.locator("#tier3-radar").evaluate("node=>Chart.getChart(node).data.datasets[0].data").count(0.94) >= 1+ dark_color = page.locator("#tier3-radar").evaluate("node=>Chart.getChart(node).options.scales.r.ticks.color")+ page.evaluate("setReportTheme('light')")+ light_color = page.locator("#tier3-radar").evaluate("node=>Chart.getChart(node).options.scales.r.ticks.color")+ assert dark_color != light_color+ _subtab(page, "agents")+ _subtab(page, "overview")+ assert page.evaluate("chartConstructions.length") == 2+ _subtab(page, "trials")+ # The recorded token chart stays folded until its disclosure opens.+ page.locator("#tier3-page-trials canvas").evaluate_all("""nodes=>nodes.forEach(canvas=>{+ for(let node=canvas.parentElement;node;node=node.parentElement)+ if(node.tagName==='DETAILS')node.open=true;+ })""")+ page.wait_for_function("chartConstructions.length === 4")+ _subtab(page, "overview")+ _subtab(page, "trials")+ assert page.evaluate("chartConstructions.length") == 4+++def test_folded_native_chart_is_lazy_and_print_draws_all_charts_synchronously(page, reports):+ directory, _, _ = reports+ _track_chart_constructions(page)+ _open(page, directory, "native-telemetry")+ assert page.evaluate("chartConstructions") == []+ _tier(page, "tier3")+ _subtab(page, "trials")+ assert page.evaluate("!Chart.getChart(document.getElementById('tier3-recorded-token-chart'))")+ page.locator("#tier3-token-usage > summary").click()+ page.wait_for_function("Chart.getChart(document.getElementById('tier3-recorded-token-chart'))")+ assert page.evaluate("chartConstructions.filter(row=>row.id==='tier3-recorded-token-chart').length") == 1+ colors = page.evaluate("""() => {+ const root=document.documentElement;+ const dark=getComputedStyle(root).getPropertyValue('--chart-label').trim();+ root.setAttribute('data-theme','light');+ const light=getComputedStyle(root).getPropertyValue('--chart-label').trim();+ root.setAttribute('data-theme','dark');+ return {dark,light};+ }""")+ assert colors["dark"] != colors["light"]+ page.evaluate("dispatchEvent(new Event('beforeprint'))")+ page.emulate_media(media="print")+ assert page.evaluate("""[...document.querySelectorAll('canvas[id^=tier3-]')].every(canvas=>{+ const chart=Chart.getChart(canvas);+ return chart && chart.width>0 && chart.height>0 && chart.options.animation===false;+ })""")+ assert (+ page.locator("canvas[id^=tier3-]").evaluate_all(+ "nodes=>nodes.map(canvas=>Chart.getChart(canvas).options.plugins.legend.labels.color)"+ )+ == [colors["light"]] * page.locator("canvas[id^=tier3-]").count()+ )+ assert page.evaluate("new Set(chartConstructions.map(row=>row.id)).size === chartConstructions.length")+ page.emulate_media(media="screen")+ page.evaluate("dispatchEvent(new Event('afterprint'))")+ assert page.locator("html").get_attribute("data-theme") == "dark"+ assert (+ page.locator("#tier3-recorded-token-chart").evaluate(+ "canvas=>Chart.getChart(canvas).options.plugins.legend.labels.color"+ )+ == colors["dark"]+ )+ assert page.evaluate("new Set(chartConstructions.map(row=>row.id)).size === chartConstructions.length")+++def test_legacy_token_chart_keeps_totals_and_unknown_cached_measurements(page, tmp_path):+ result = report_browser._complete_result("synthetic", ("first", "second"), (0.94, 0.87))+ payload = result.metadata["agent_eval"]+ payload.pop("token_usage", None)+ payload["trials"][0]["tokens"]["cached"] = None+ (tmp_path / "legacy-tokens.html").write_text(+ HTMLReporter(include_timestamp=False).render_all([result]), encoding="utf-8"+ )+ _open(page, tmp_path, "legacy-tokens")+ _subtab(page, "trials")+ chart = page.locator("#tier3-token-chart")+ assert chart.is_visible()+ assert page.locator("#tier3-recorded-token-chart").count() == 0+ data = chart.evaluate("node=>Chart.getChart(node).data")+ assert data["labels"] == ["first", "second"]+ assert {row["label"]: row["data"] for row in data["datasets"]} == {+ "Prompt (total)": [400, 400],+ "Completion": [40, 40],+ "Cached (included in prompt)": [None, 0],+ }++[email protected]("fixture", ["full", "native-telemetry"])+def test_print_builds_charts_in_unvisited_tiers_synchronously(page, reports, fixture):+ directory, _, _ = reports+ _track_chart_constructions(page)+ _open(page, directory, fixture)+ assert page.evaluate("chartConstructions") == []+ assert page.evaluate("""() => {+ dispatchEvent(new Event('beforeprint'));+ return [...document.querySelectorAll('canvas[id^=tier3-]')].every(canvas=>{+ const chart=Chart.getChart(canvas);+ return chart && chart.ctx && chart.width>0 && chart.height>0 && chart.options.animation===false;+ });+ }""")+ page.emulate_media(media="print")+ assert page.evaluate("""[...document.querySelectorAll('canvas[id^=tier3-]')].every(canvas=>{+ const chart=Chart.getChart(canvas);+ return !canvas.hidden && chart.width>0 && chart.height>0;+ })""")+ assert page.evaluate("new Set(chartConstructions.map(row=>row.id)).size === chartConstructions.length")+ page.emulate_media(media="screen")+ page.evaluate("dispatchEvent(new Event('afterprint'))")+ assert page.locator("html").get_attribute("data-report-printing") is None+ assert page.locator("#tab-tier1").is_visible()+ assert not page.locator("#tab-tier3").is_visible()++[email protected]("canvas_available", [True, False])+def test_dataset_search_prints_every_case_and_restores_filter_and_disclosures(page, reports, canvas_available):+ directory, _, _ = reports+ errors = []+ page.on("pageerror", lambda error: errors.append(str(error)))+ if not canvas_available:+ page.add_init_script("HTMLCanvasElement.prototype.getContext=()=>null")+ _open(page, directory)+ _tier(page, "tier3")+ _subtab(page, "dataset")+ search = page.get_by_role("searchbox", name="Filter dataset", exact=True)+ search.fill("case-2")+ cards = page.locator("#t3-dataset-list > details")+ assert cards.count() == 4+ assert page.locator("#t3-dataset-list > details:visible").count() == 1+ state = cards.evaluate_all("nodes=>nodes.map(node=>({open:node.open,display:node.style.display}))")+ page.evaluate("dispatchEvent(new Event('beforeprint'))")+ page.emulate_media(media="print")+ assert page.locator("#t3-dataset-list > details:visible").count() == 4+ assert cards.evaluate_all(+ "nodes=>nodes.every(node=>node.open && node.querySelector('.t3-ds-body').getClientRects().length)"+ )+ page.emulate_media(media="screen")+ page.evaluate("dispatchEvent(new Event('afterprint'))")+ assert page.locator("html").get_attribute("data-report-printing") is None+ assert search.input_value() == "case-2"+ assert cards.evaluate_all("nodes=>nodes.map(node=>({open:node.open,display:node.style.display}))") == state+ assert page.locator("#t3-dataset-list > details:visible").count() == 1+ assert not errorsdiff --git a/tests/reporting/test_report_markup_assertions.py b/tests/reporting/test_report_markup_assertions.pynew file mode 100644index 00000000..8b828094--- /dev/null+++ b/tests/reporting/test_report_markup_assertions.py@@ -0,0 +1,72 @@+# SPDX-License-Identifier: Apache-2.0+"""Parser-based assertions keep visible markup and evidence attributes in scope."""++import pytest+from report_markup_assertions import text_content, without_scripts++from skillevaluator.models import ValidationResult+from skillevaluator.reporting import HTMLReporter+++def test_script_extraction_preserves_unsafe_nonscript_attributes_and_original_markup():+ before = "<!--outside comment--><style>.sample{opacity:0.99}</style>\n"+ script = '<ScRiPt type="application/json" data-note="x > y">{"probe":"script-only"}</sCrIpT >'+ after = '<a href="javascript:alert(1)" data-artifact="file:///tmp/unsafe">A & B</a>'+ outside = without_scripts(before + script + after)+ assert outside == before + after+ assert 'href="javascript:alert(1)"' in outside+ assert 'data-artifact="file:///tmp/unsafe"' in outside+ assert "0.99" in outside+ assert "script-only" not in outside++[email protected]("newline", ["\n", "\r\n"])+def test_multiple_script_ranges_preserve_line_endings_and_nested_looking_strings(newline):+ outside = f'<p title="x > y">before</p>{newline}'+ middle = f'<span data-copy-text="0.99">middle</span>{newline}'+ end = "<p>after</p>"+ document = outside + '<script>const value = "<b>not visible</b>";</script>' + middle+ document += '<SCRIPT type="application/json">{"score":0.99}</SCRIPT>' + end+ assert without_scripts(document) == outside + middle + end+++ "fragment",+ ["<script>payload", '<script>payload</script invalid><a href="javascript:alert(1)">tail</a>', "<script/>"],+)+def test_unsupported_script_structure_fails_instead_of_hiding_following_evidence(fragment):+ with pytest.raises(AssertionError, match="script"):+ without_scripts(fragment)+++def test_text_content_decodes_rendered_entities_and_ignores_quoted_attribute_angles():+ fragment = '<button title="score > baseline" data-key="attribute-only">A & B <recorded></button>'+ assert text_content(fragment) == "A & B <recorded>"+++def test_native_comparison_text_uses_a_parser_without_changing_visible_reason_text():+ from native_comparison_assertions import _text++ assert (+ _text('<span title="score > baseline"> no baseline <b>lift</b> & evidence </span>')+ == "no baseline lift & evidence"+ )+++def test_real_renderer_scripts_are_excluded_while_header_markup_and_text_remain():+ result = ValidationResult(validator_name="AGENT_EVAL")+ result.add_error("Synthetic recorded failure")+ result.metadata["agent_eval"] = {+ "verdict": "fail",+ "execution_status": "failed",+ "canonical_probe": "embedded-only-marker",+ "execution_errors": ["Synthetic recorded failure"],+ }+ report = HTMLReporter(include_timestamp=False, explicit_skill_name="Synthetic & encoded").render_all([result])+ assert "embedded-only-marker" in report+ outside = without_scripts(report)+ assert '<header class="main-header">' in outside+ assert 'id="report-title"' in outside+ assert "embedded-only-marker" not in outside+ assert "Synthetic & encoded" in text_content(outside)+ assert "Synthetic recorded failure" in outsidediff --git a/tests/reporting/test_report_navigation.py b/tests/reporting/test_report_navigation.pyindex 408af59c..6ffa5c01 100644--- a/tests/reporting/test_report_navigation.py+++ b/tests/reporting/test_report_navigation.py@@ -81,7 +81,7 @@ def test_displayed_absent_tiers_are_navigable_without_fabricated_checks():def test_targeted_reports_keep_only_their_tier_navigation():doc = Document(HTMLReporter(include_timestamp=False).render_all([static_result()]))- assert {element["data-report-tier"] for element in doc.elements if "data-report-tier" in element} == {"tier1"}+ assert {element["data-target-tab"] for element in doc.elements if "data-target-tab" in element} == {"tier1"}def test_evidence_destination_is_outside_hidden_tier_panels():@@ -175,23 +175,12 @@ def test_hero_reason_keeps_advisory_results_separate_within_a_mixed_tier(tier, i]-def test_nojs_dark_fallback_mirrors_every_hard_coded_dark_override():- import re- from pathlib import Path-- templates = Path(__file__).resolve().parents[2] / "src/skillevaluator/reporting/templates"- report = (templates / "report.html.j2").read_text(encoding="utf-8")- styles = (templates / "report_ui.css.j2").read_text(encoding="utf-8")- overrides = re.findall(r'^\s*@media screen \{ \[data-theme="dark"\] (.*\}) \}\s*$', report, re.MULTILINE)- assert overrides, "expected hard-coded dark overrides in report.html.j2"- fallback = next(- block- for block in re.findall(r"@media screen and \(prefers-color-scheme:dark\)\{(.*)\}$", styles, re.MULTILINE)- if not block.startswith(":root:not([data-theme]){")- )- for rule in overrides:- mirrored = ":root:not([data-theme]) " + rule.replace('[data-theme="dark"]', ":root:not([data-theme])")- assert mirrored in fallback, rule+def test_nojs_reports_have_explicit_native_report_theme():+ static = HTMLReporter(include_timestamp=False).render_all([static_result()])+ live = HTMLReporter(include_timestamp=False).render_all([agent_result()])+ assert 'data-default-theme="light" data-theme="light"' in static+ assert 'data-default-theme="dark" data-theme="dark"' in live+ assert '[data-theme="dark"]' in livedef test_browser_check_fixtures_render_every_target_the_checks_use(tmp_path):diff --git a/tests/reporting/test_report_readability.py b/tests/reporting/test_report_readability.pynew file mode 100644index 00000000..062faaa6--- /dev/null+++ b/tests/reporting/test_report_readability.py@@ -0,0 +1,172 @@+# SPDX-License-Identifier: Apache-2.0+"""Concise reporting keeps unavailable measurements and evidence truthful."""++import json+import re+from copy import deepcopy+from html import unescape+from html.parser import HTMLParser++import pytest+from tests.reporting.browser_navigation_fixtures import _agent_result++from skillevaluator.models import ValidationResult+from skillevaluator.reporting import HTMLReporter+++def _text(markup):+ return " ".join(unescape(re.sub(r"<[^>]*>", " ", markup)).split())+++def _reliability(markup):+ return _text(re.search(r'<table class="summary-table pass-at-k-table".*?</table>', markup, re.DOTALL)[0])+++def _render(result):+ return HTMLReporter(include_timestamp=False).render_all([result])+++class _DisclosureText(HTMLParser):+ def __init__(self):+ super().__init__()+ self.closed = []+ self.text = []++ def handle_starttag(self, tag, attrs):+ if tag == "details":+ self.closed.append("open" not in dict(attrs))++ def handle_endtag(self, tag):+ if tag == "details":+ self.closed.pop()++ def handle_data(self, data):+ if not any(self.closed):+ self.text.append(data)+++def test_comparison_keeps_measurements_visible_and_recorded_reasoning_expandable():+ result = _agent_result("demo", ["agent"])+ explanation = "Detailed recorded evaluator reasoning remains available for inspection."+ for dim in result.metadata["agent_eval"]["dimensions"]:+ dim["reasoning_bullets"] = [explanation]+ markup = _render(result)+ table = re.search(r'<table[^>]*id="tier3-dimension-table".*?</table>', markup, re.DOTALL)[0]+ visible = _DisclosureText()+ visible.feed(table)+ text = " ".join(visible.text)+ assert explanation not in text+ assert explanation in table+ for label in ("Security", "Correctness", "Discoverability", "Effectiveness", "Overall"):+ assert label in text+ assert "0.80" in text and "0.40" in text and "+0.40" in text+++def test_attempt_coverage_does_not_invent_pass_rate_or_pass_counts():+ result = _agent_result("demo", ["agent"])+ payload = result.metadata["agent_eval"]+ agent = payload["agents"]["agent"]+ agent["pass_at_k"] = {+ "with_skill": {"attempts_used": 16, "max_attempts_possible": 18},+ "without_skill": {"attempts_used": 12, "max_attempts_possible": 18},+ "lift": {},+ }+ payload["pass_at_k"] = deepcopy(agent["pass_at_k"])+ original = deepcopy(payload)++ markup = _render(result)+ table = _reliability(markup)+ assert "0%" not in table+ assert "0 of 0" not in table+ assert "0 of 16" not in table+ assert "16 scored" in table and "12 scored" in table+ assert "N/A" in table+ exported = re.search(r'<script[^>]*id="tier3-full"[^>]*>(.*?)</script>', markup, re.DOTALL)[1]+ assert json.loads(exported) == original+ assert payload == original+++def test_recorded_zero_reliability_is_preserved():+ result = _agent_result("demo", ["agent"])+ payload = result.metadata["agent_eval"]+ branch = {+ "rate": 0.0,+ "passed_cases": 0,+ "total_cases": 2,+ "attempts_used": 2,+ "cases": {name: {"attempts": [{"passed": False, "score": 0.0}]} for name in ["case-1", "case-2"]},+ }+ payload["agents"]["agent"]["pass_at_k"] = {"with_skill": branch}+ payload["pass_at_k"] = {"with_skill": deepcopy(branch)}+ table = _reliability(_render(result))+ assert "0%" in table+ assert "0 of 2" in table++[email protected]("attempts", [None, [{"passed": True}], [{"passed": "false"}]])+def test_partial_or_untyped_attempt_outcomes_do_not_invent_a_pass_count(attempts):+ result = _agent_result("demo", ["agent"])+ payload = result.metadata["agent_eval"]+ case = {"attempts_used": 16}+ if attempts is not None:+ case["attempts"] = attempts+ branch = {"attempts_used": 16, "cases": {"case-1": case}}+ payload["agents"]["agent"]["pass_at_k"] = {"with_skill": branch}+ payload["pass_at_k"] = {"with_skill": deepcopy(branch)}+ table = _reliability(_render(result))+ assert "0 of 16" not in table and "1 of 16" not in table+ assert "N/A · 16 scored" in table+++def test_agent_does_not_call_a_completed_baseline_absent_when_aggregate_is_missing():+ result = _agent_result("demo", ["agent"])+ agent = result.metadata["agent_eval"]["agents"]["agent"]+ agent["baseline"] = None+ agent["lift"] = None+ markup = _render(result)+ details = markup.split('id="tier3-page-agents"', 1)[1].split('id="tier3-page-dataset"', 1)[0]+ strip = details.split('class="t3-kpi-strip"', 1)[1].split('class="t3-dim-strip"', 1)[0]+ assert "Overall baseline unavailable" in _text(strip)+ assert "Skill Lift compares Overall" not in strip+++def test_one_tier2_skip_notice_retains_both_affected_checks():+ results = [+ ValidationResult(validator_name=name, metadata={"skipped": True, "skip_reason": "No local catalog supplied"})+ for name in ["CONTEXT_DEDUP", "CONTEXT_OPTIMIZATION"]+ ]+ markup = HTMLReporter(include_timestamp=False).render_all(results)+ within = markup.split('id="tier2-within"', 1)[1].split('id="dedup-inter"', 1)[0]+ assert within.count("No local catalog supplied") == 1+ assert "CONTEXT_DEDUP" in within and "CONTEXT_OPTIMIZATION" in within+++def test_unknown_tier2_scope_keeps_skipped_check_identity_and_reason():+ result = ValidationResult(+ validator_name="UNKNOWN_CATALOG_CHECK",+ metadata={"gating": {"tier": 2}, "skipped": True, "skip_reason": "Unique retained skip explanation"},+ )+ markup = _render(result)+ other = markup.split('id="tier2-other"', 1)[1].split("</section>", 1)[0]+ assert "Unique retained skip explanation" in other and "UNKNOWN_CATALOG_CHECK" in other+ ids = re.findall(r'\bid="([^"]+)"', markup)+ assert len(ids) == len(set(ids))+++def test_harbor_display_labels_use_only_recorded_job_associations():+ from skillevaluator.reporting.harbor_viewer import harbor_job_display_links++ source = {+ "harbor_viewer": {+ "jobs": [+ {"name": "very-long-opaque-job-id", "url": "https://example.test/jobs/1"},+ {"name": "another-opaque-job-id", "url": "https://example.test/jobs/2"},+ ]+ },+ "agents": {"agent": {"trials": [{"harbor_viewer": {"job_url": "https://example.test/jobs/1"}}]}},+ }+ before = deepcopy(source)+ jobs = harbor_job_display_links(source)+ assert [job["display_label"] for job in jobs] == ["agent · With skill", "Job 2"]+ assert jobs[0]["name"] == "very-long-opaque-job-id"+ assert source == beforediff --git a/tests/reporting/test_report_redesign.py b/tests/reporting/test_report_redesign.pyindex 4fb553ca..7db01137 100644--- a/tests/reporting/test_report_redesign.py+++ b/tests/reporting/test_report_redesign.py@@ -1,11 +1,14 @@# SPDX-License-Identifier: Apache-2.0"""HTML report layout: header, executive summary, Fix first, vocabulary, print and accessibility."""+import jsonimport refrom html.parser import HTMLParserfrom itertools import pairwisefrom pathlib import Path+import pytest+from skillevaluator.evaluation.tier3_report import build_agent_eval_payloadfrom skillevaluator.models import Finding, ValidationResultfrom skillevaluator.reporting.html import HTMLReporter, fix_first_for_results, plain_check_name@@ -250,10 +253,8 @@ def test_header_shows_one_verdict_and_skill_name_is_the_only_h1() -> None:html = _render(_results())header = html.split('<header class="main-header">', 1)[1].split("</header>", 1)[0]- assert re.findall(r'class="header-status-badge verdict-badge (\w+)" data-verdict="(\w+)"', header) == [- ("fail", "fail")- ]- assert "Changes required" in header+ assert 'class="header-status-badge' not in header+ assert 'class="hero-command-status verdict-chip fail">Changes required</p>' in htmlassert "Download JSON" in headerassert re.findall(r"<h1[^>]*>([^<]+)</h1>", html) == ["demo"]@@ -265,10 +266,7 @@ def _gated(results: list[ValidationResult], tier: int, *, blocking: bool = True)def _header_verdict(html: str) -> list[tuple[str, str]]:- header = html.split('<header class="main-header">', 1)[1].split("</header>", 1)[0]- return re.findall(- r'data-verdict="(\w+)">.*?<span class="sr-only">Verdict: </span>([^<]+)</span>', header, re.DOTALL- )+ return re.findall(r'<p class="hero-command-status verdict-chip (\w+)">([^<]+)</p>', html)def _tier_card_verdicts(html: str) -> list[tuple[str, str]]:@@ -379,7 +377,7 @@ def test_theme_selector_has_a_name_and_system_light_dark_choices() -> None:assert '<select id="report-theme"' in htmlassert all(f'<option value="{theme}">' in html for theme in ("system", "light", "dark"))assert "matchMedia('(prefers-color-scheme: dark)')" in html- assert "localStorage.removeItem('skillevaluator-theme')" in html+ assert "localStorage.setItem('skillevaluator-theme', reportThemePreference)" in htmldef test_tier3_charts_are_redrawn_with_print_colors() -> None:@@ -402,12 +400,15 @@ def test_tier3_charts_are_redrawn_with_print_colors() -> None:# A canvas keeps the colors it was drawn with, so printing redraws every# chart with the light (print) colors and restores the theme afterwards.- assert 'window.addEventListener("beforeprint", function(){ redrawForPrint(true); });' in script+ # Print mode is enabled first; the shared disclosure handler then redraws+ # after it exposes inactive chart containers for synchronous measurement.+ assert 'window.addEventListener("beforeprint", function(){ printing = true; });' in scriptassert 'window.addEventListener("afterprint", function(){ redrawForPrint(false); });' in scriptassert 'window.matchMedia("print")' in scriptassert 'if (printing && theme === "dark") root.setAttribute("data-theme", "light");' in script# All four chart types' print redraw, colors and theme restoration are- # executed in test_chart_dependency rather than counting constructor sites.+ # executed in test_chart_dependency and the offline browser efficiency+ # tests rather than counting constructor sites.def _rules(css: str):@@ -443,14 +444,11 @@ def _rules(css: str):def test_dark_colors_never_reach_print() -> None:- html = _render(_results())- css = "\n".join(re.findall(r"<style>(.*?)</style>", html, flags=re.DOTALL))- dark_rules = [(media, selector, body) for media, selector, body in _rules(css) if 'data-theme="dark"' in selector]-- assert dark_rules- for media, selector, body in dark_rules:- literal_colors = re.search(r"#[0-9a-fA-F]{3,8}\b|rgba?\(", body)- assert not literal_colors or any(query.startswith("@media screen") for query in media), selector+ css = (TEMPLATES / "report_ui.css.j2").read_text(encoding="utf-8")+ print_rules = [(selector, body) for media, selector, body in _rules(css) if "@media print" in media]+ palette = next(body for selector, body in print_rules if "[data-theme=dark]" in selector)+ assert "--bg:#fff" in palette and "--dark-text:#1e293b" in palette+ assert "--badge-fail-bg:#fee2e2" in palettedef test_print_shows_the_header_and_one_results_view() -> None:@@ -460,64 +458,167 @@ def test_print_shows_the_header_and_one_results_view() -> None:hidden = " ".join(selector for selector, body in print_rules if "display:none" in body)assert ".main-header" in shown- assert ".header-brand .se-logo" in shownassert ".header-controls" in hidden and ".skip-link" in hidden- assert "#results-by-validator>.validator-card" in hidden+ assert ".results-view:not(#results-by-skill)" in hidden-def test_logo_is_in_the_sidebar_and_the_header_with_unique_ids() -> None:+def test_native_brand_header_replaces_sidebar_and_decorative_logo() -> None:html = _render(_results())+ header = html.split('<header class="main-header">', 1)[1].split("</header>", 1)[0]+ assert '<div class="logo-section">' in header+ assert '<p class="header-title">SkillEvaluator</p>' in header+ assert '<aside class="report-sidebar"' not in html+ assert len(_outline(html).ids) == len(set(_outline(html).ids))- assert html.count('class="se-logo"') == 2- assert 'class="brand-mark"' not in html- # Both copies sit next to the visible name, so they are decorative and carry no ids.- assert len(re.findall(r'<svg class="se-logo"[^>]*aria-hidden="true"', html)) == 2- assert ' id="se-logo' not in html---def test_no_workspace_font_size_is_below_eleven_pixels() -> None:- css = (TEMPLATES / "report_ui.css.j2").read_text(encoding="utf-8")- sizes = [float(size) for size in re.findall(r"font-size:(\d+(?:\.\d+)?)px", css)]- assert sizes- assert min(sizes) >= 11+def test_native_body_uses_readable_sixteen_pixel_default() -> None:+ html = _render(_results())+ body = re.search(r"body\s*\{([^}]+)\}", html).group(1)+ assert "line-height: 1.6" in body+ assert "font-family: -apple-system" in body+ assert "font-size:" not in body # Browser default is 16px; no workspace shrink.def _px(value: str, unit: str) -> float:return float(value) * (16 if unit == "rem" else 1)-def test_template_text_under_eleven_pixels_is_overridden_or_unused() -> None:- """Every small size in report.html.j2 is unused or raised to 11 px by the workspace stylesheet."""+def _style_block_digests() -> list[str]:+ from hashlib import sha256+template = (TEMPLATES / "report.html.j2").read_text(encoding="utf-8")- workspace = (TEMPLATES / "report_ui.css.j2").read_text(encoding="utf-8")- styles = "\n".join(re.findall(r"<style[^>]*>(.*?)</style>", template, flags=re.DOTALL))- markup = re.sub(r"<style[^>]*>.*?</style>", "", template, flags=re.DOTALL)- size = r"font-size:\s*(\d*\.?\d+)(px|rem)\b"- raised = {- re.findall(r"\.([\w-]+)", part)[-1]- for _media, selector, body in _rules(workspace)- if any(_px(value, unit) >= 11 for value, unit in re.findall(size, body))+ # Comments are stripped, so only declarations change a digest.+ blocks = [+ re.sub(r"/\*.*?\*/", "", block, flags=re.DOTALL)+ for block in re.findall(r"<style>(.*?)</style>", template, re.DOTALL)+ ]+ return [sha256(block.encode()).hexdigest() for block in blocks]+++def test_report_style_blocks_match_recorded_digests() -> None:+ """Snapshot of this template's style blocks: a CSS edit must update the digests on purpose."""+ assert _style_block_digests() == [+ "e09704d0a4a030b3fd7de5e063a5247c0770733ad8c5b380a24e194829c0364e",+ "2f7d5555e6ff116aa4f95c0e3a4b620a549267c9ec38c95a7dd3a30fd9a04bc6",+ "f02e0b64bdb8ebe7e9fd65c6fd45cace436a961a60a0b6552d18a06db7780cba",+ "1997da9ee6f5b7cdefabbebffe2fa3d0101fce091f533e2f59403c2e2ce58875",+ ]+++def test_presentation_manifest_matches_the_template_and_its_checks() -> None:+ root = TEMPLATES.parents[3]+ manifest = json.loads((root / "docs" / "report-presentation-port.json").read_text(encoding="utf-8"))+ assert (root / manifest["template"]).samefile(TEMPLATES / "report.html.j2")+ base, tier3, *_ = _style_block_digests()+ recorded = {entry["block"]: entry["comment_free_sha256"] for entry in manifest["native_styles"]}+ assert recorded == {"base": base, "tier3": tier3}+ for check in manifest["drift_checks"]:+ path, _, name = check.partition("::")+ source = root / path+ assert source.is_file(), check+ assert not name or f"def {name}(" in source.read_text(encoding="utf-8"), check+++def _contrast_ratio(foreground: str, background: str) -> float:+ def luminance(color: str) -> float:+ channels = [int(color[index : index + 2], 16) / 255 for index in (1, 3, 5)]+ linear = [value / 12.92 if value <= 0.04045 else ((value + 0.055) / 1.055) ** 2.4 for value in channels]+ return 0.2126 * linear[0] + 0.7152 * linear[1] + 0.0722 * linear[2]++ high, low = sorted((luminance(foreground), luminance(background)), reverse=True)+ return (high + 0.05) / (low + 0.05)+++def _hex_color(value: str) -> str:+ color = value.replace("!important", "").strip().lower()+ color = {"white": "#ffffff"}.get(color, color)+ if re.fullmatch(r"#[0-9a-f]{3}", color):+ color = "#" + "".join(char * 2 for char in color[1:])+ assert re.fullmatch(r"#[0-9a-f]{6}", color), f"not a plain colour: {value!r}"+ return color+++def _screen_rules(html: str) -> list[tuple[str, str]]:+ """Every screen style rule in document order, as (selector, declarations)."""+ styles = "\n".join(re.findall(r"<style[^>]*>(.*?)</style>", html, re.DOTALL))+ css = re.sub(r"/\*.*?\*/", "", styles, flags=re.DOTALL)+ return [+ (re.sub(r"\s+", " ", part.replace('"', "")).strip(), body)+ for media, selector, body in _rules(css)+ if all(prelude == "@media screen" for prelude in media)for part in selector.split(",")- if re.search(r"\.[\w-]+", part)- }- too_small = set()- for _media, selector, body in _rules(styles):- if not any(_px(value, unit) < 11 for value, unit in re.findall(size, body)):- continue- for part in selector.split(","):- name = re.findall(r"\.([\w-]+)", part)[-1]- if name not in raised and re.search(rf'class="[^"]*(?<![\w-]){re.escape(name)}(?![\w-])', markup):- too_small.add(name)- inline = [_px(value, unit) for value, unit in re.findall(r'style="[^"]*?' + size, markup)]+ ]- assert not too_small- assert inline- assert min(inline) >= 11+def _specificity(selector: str) -> tuple[int, int]:+ return (+ len(re.findall(r"#[\w-]+", selector)),+ len(re.findall(r"\.[\w-]+|\[[^\]]+\]|(?<!:):[\w-]+", selector)),+ )-def test_short_table_cells_do_not_break_mid_word() -> None:- css = (TEMPLATES / "report_ui.css.j2").read_text(encoding="utf-8")- assert "td,th{overflow-wrap:anywhere}" not in css- assert "td,th{overflow-wrap:break-word}th{white-space:nowrap}" in css+def _resolved_colors(rules: list[tuple[str, str]], theme: str, matching: list[str]) -> tuple[str, str]:+ """Foreground and background the cascade gives an element that `matching` selectors select."""+ variables: dict[str, str] = {}+ for selector, body in rules:+ if selector == ":root" or (theme == "dark" and selector == "[data-theme=dark]"):+ variables.update(re.findall(r"(--[\w-]+)\s*:\s*([^;]+)", body))++ def resolve(value: str) -> str:+ while match := re.search(r"var\((--[\w-]+)\)", value):+ value = value.replace(match.group(0), variables[match.group(1)])+ return _hex_color(value)++ applies = [+ selector+ for selector in matching+ if not selector.startswith("[data-theme=") or selector.startswith(f"[data-theme={theme}]")+ ]+ winners: dict[str, tuple[tuple[int, int, int], str]] = {}+ for order, (selector, body) in enumerate(rules):+ if selector not in applies:+ continue+ for prop, value in re.findall(r"(?:^|[;\s])(color|background|background-color)\s*:\s*([^;]+)", body):+ key = "color" if prop == "color" else "background"+ rank = (*_specificity(selector), order)+ if key not in winners or rank >= winners[key][0]:+ winners[key] = (rank, value)+ assert winners.keys() == {"color", "background"}, (matching, winners)+ return resolve(winners["color"][1]), resolve(winners["background"][1])+++_CHIP_AND_BADGE_SELECTORS = {+ "pass tier chip": [".tier-card.pass .tier-card-verdict"],+ "fail tier chip": [".tier-card.fail .tier-card-verdict"],+ "warn tier chip": [".tier-card.warn .tier-card-verdict"],+ "skipped tier chip": [".tier-card.skipped .tier-card-verdict"],+ "issue count badge": [".count-badge"],+ "medium issue count badge": [".count-badge", ".count-badge.medium-count"],+ "low issue count badge": [".count-badge", ".count-badge.low-count", "[data-theme=dark] .count-badge.low-count"],+ "incomplete badge": [".t3-incomplete-badge"],+ "hovered skill pill": [".skill-pill", ".skill-pill:hover"],+ "hovered quality pill": [".quality-pill", ".quality-pill:hover"],+ "expanded validator header": [".validator-collapsible", ".validator-collapsible.active"],+ "back to top button": ["#backToTop"],+ "hovered back to top button": ["#backToTop", "#backToTop:hover"],+}+++def test_contrast_helper_matches_the_published_ratios() -> None:+ assert round(_contrast_ratio("#ffffff", "#22c55e"), 2) == 2.28+ assert round(_contrast_ratio("#ffffff", "#eab308"), 2) == 1.92+ assert round(_contrast_ratio("#ffffff", "#ef4444"), 2) == 3.76++[email protected]("theme", ["light", "dark"])[email protected]("name", _CHIP_AND_BADGE_SELECTORS)+def test_status_chips_and_badges_have_readable_text(name: str, theme: str) -> None:+ rules = _screen_rules(_render(_results()))+ foreground, background = _resolved_colors(rules, theme, _CHIP_AND_BADGE_SELECTORS[name])+ assert _contrast_ratio(foreground, background) >= 4.5, (name, theme, foreground, background)+++def test_table_overflow_is_scoped_to_scroll_containers() -> None:+ css = (TEMPLATES / "report_ui.css.j2").read_text(encoding="utf-8")+ assert ".table-scroll,.table-container,.summary-table-container,.top-issues-content,.contributor-content" in css+ assert "max-width:100%;overflow-x:auto" in cssdiff --git a/tests/reporting/test_report_version_placement.py b/tests/reporting/test_report_version_placement.pynew file mode 100644index 00000000..3f031662--- /dev/null+++ b/tests/reporting/test_report_version_placement.py@@ -0,0 +1,96 @@+# SPDX-License-Identifier: Apache-2.0+"""Tool versions identify the brand and the tier that recorded their evidence."""++from copy import deepcopy++import pytest+from browser_navigation_fixtures import _agent_result+from test_report_navigation import Document++from skillevaluator import __version__+from skillevaluator.models import ValidationResult+from skillevaluator.reporting.html import HTMLReporter+++class _VersionDocument(Document):+ def handle_data(self, data):+ for element in self.stack:+ element.setdefault("text", []).append(data)++ def with_class(self, class_name):+ return [element for element in self.elements if class_name in element.get("class", "").split()]+++def _text(element):+ return " ".join("".join(element.get("text", [])).split())+++def _static(version=None):+ result = ValidationResult(validator_name="Schema Check")+ result.add_success("schema", "valid")+ if version is not None:+ result.metadata["skillspector_version"] = version+ return result+++def _render(results):+ original = deepcopy(results)+ document = _VersionDocument(HTMLReporter(include_timestamp=False).render_all(results))+ assert results == original+ return document+++def test_renderer_version_is_read_with_the_brand_instead_of_the_controls():+ document = _render([_static("2.13.4")])++ brands = document.with_class("header-brand-row")+ assert len(brands) == 1+ assert _text(brands[0]) == f"SkillEvaluator v{__version__}"+ versions = document.with_class("header-version")+ assert len(versions) == 1+ assert any(parent is brands[0] for parent in versions[0]["parents"])+ assert not any("header-meta" in parent.get("class", "").split() for parent in versions[0]["parents"])+ assert "SkillSpector" not in _text(document.with_class("main-header")[0])++[email protected]("include_tier3", [False, True])+ ("versions", "expected"),+ [+ (["2.13.4"], "SkillSpector v2.13.4"),+ (["2.13.4", "2.12.0", "2.13.4"], "SkillSpector v2.13.4, v2.12.0"),+ ],+)+def test_recorded_scanner_versions_belong_to_the_tier1_tile(include_tier3, versions, expected):+ results = [_static(version) for version in versions]+ if include_tier3:+ results.append(_agent_result("demo", ["agent"]))+ document = _render(results)++ tiles = [element for element in document.with_class("tier-card") if element.get("data-target-tab") == "tier1"]+ assert len(tiles) == 1+ assert _text(tiles[0]).count(expected) == 1+ scanner_labels = [+ element+ for element in document.elements+ if element.get("title") == ("SkillSpector version that ran the Tier 1 security scan")+ ]+ assert len(scanner_labels) == 1+ assert _text(scanner_labels[0]) == expected+ assert any(parent is tiles[0] for parent in scanner_labels[0]["parents"])+ assert any("tier-card-stats" in parent.get("class", "").split() for parent in scanner_labels[0]["parents"])+ assert "SkillSpector" not in _text(document.with_class("main-header")[0])++[email protected]("standalone_tier3", [False, True])+def test_unrecorded_scanner_version_is_not_invented(standalone_tier3):+ result = _agent_result("demo", ["agent"]) if standalone_tier3 else _static()+ if standalone_tier3:+ # An unrelated Tier 3 metadata value is not a recorded Tier 1 scan.+ result.metadata["skillspector_version"] = "9.9.9"+ document = _render([result])++ assert all("SkillSpector" not in _text(element) for element in document.with_class("tier-card"))+ assert "SkillSpector" not in _text(document.with_class("main-header")[0])+ if standalone_tier3:+ assert not any(element.get("data-target-tab") == "tier1" for element in document.with_class("tier-card"))diff --git a/tests/reporting/test_reporters.py b/tests/reporting/test_reporters.pyindex f8cf106f..c833149c 100644--- a/tests/reporting/test_reporters.py+++ b/tests/reporting/test_reporters.py@@ -397,7 +397,8 @@ class TestCLIReporter:output = stream.getvalue()# Syntax highlighting can hide values against PowerShell's blue background.- assert "Quality score: 84.5/100 (grade=B, skill_type=script-based, count=3)" in output+ # TERM=dumb may wrap even an explicit width; keep ANSI while joining lines.+ assert "Quality score: 84.5/100 (grade=B, skill_type=script-based, count=3)" in " ".join(output.split())if colored:assert "\x1b[32m[OK]\x1b[0m" in output@@ -1114,9 +1115,11 @@ def test_tier1_dashboard_reconciles_only_tier1_findings() -> None:assert html_data["summary"]["total_issues"] == 2assert html_data["finding_counts"]["raw_occurrences"] == 4assert _findings_kpi(html) == ("1", "1 unique finding / 2 occurrences / 3 raw records / 1 duplicate reconciled")- tier_cards = html.split('class="tier-cards', 1)[1].split('<section class="exec-summary', 1)[0]+ tier_cards = html.split('class="tier-cards', 1)[1].split("</nav>", 1)[0]assert re.search(r"<strong>1</strong> finding</span>", tier_cards)- assert '<span class="tier-card-sev-pill high">1 high</span>' in tier_cards+ assert "tier-card-sev-pill" not in tier_cards+ dashboard = html.split('id="tab-tier1"', 1)[1].split('<details class="t3-details">', 1)[0]+ assert '<p class="dashboard-card-subtitle">1 high</p>' in dashboardassert re.search(r"<strong>1</strong> finding\(s\)</span>", tier_cards)# The gate policy counts each tier's unique findings.gate_policy = html.split('class="gate-policy"', 1)[1].split("</div>", 1)[0]@@ -2171,7 +2174,11 @@ class TestGatingSplit:report_data = _html_report_data(output)assert reports_passed is Falseassert 'data-target-tab="tier2"' in output- assert "<strong>0</strong> of 1 checks passed" in output+ tier2_card = output.split('data-target-tab="tier2"', 1)[1].split("</nav>", 1)[0]+ assert 'class="tier-card-verdict">Changes required</span>' in tier2_card+ assert "<strong>1</strong> finding(s)</span>" in tier2_card+ tier2 = output.split('id="tab-tier2"', 1)[1]+ assert re.search(r'Reported checks</h3>\s*<p class="dashboard-card-value">1</p>', tier2)assert report_data["gating"] == {"blocking_tiers": ["tier1", "tier2"],"advisory_tiers": ["tier3"],@@ -2460,7 +2467,7 @@ class TestHTMLReporter:assert "Harbor analysis" in outputassert "View Step 9" in outputassert "log-analyzer-001?step=9" in output- assert "javascript:alert" not in output+ assert not re.search(r'href=[\'"]javascript:', output)def test_failed_tier3_html_renders_na_without_top_performer(self) -> None:payload = build_agent_eval_payload(@@ -2483,9 +2490,9 @@ class TestHTMLReporter:output = HTMLReporter(include_timestamp=False).render_all([result])- assert "No successfully scored agent is available" in output+ assert "Quality measurements unavailable" in outputassert "Default agent is the top performer" not in output- assert "Best Performing Agent" in output+ assert 'data-primary-metric="score"' not in outputassert ">N/A<" in outputassert "performing well across evaluated dimensions" not in output@@ -2587,7 +2594,7 @@ class TestHTMLReporter:).read_text(encoding="utf-8")assert ">N/A<" in output- assert "No successfully scored agent" in output+ assert "Quality measurements unavailable" in outputassert "Missing reward for case-001" in outputassert "-1.00" not in output@@ -2905,9 +2912,9 @@ class TestSkillSpectorVersionReporting:# The version must not depend on the timestamped header line.html = HTMLReporter(include_timestamp=False, target_path="skills/example").render_all([first, second])- tier1_card = html.split("Security & Static Validation", 1)[1].split("</section>", 1)[0]+ run_details = html.split('id="run-metadata"', 1)[1].split("</details>", 1)[0]- assert "SkillSpector <strong>v2.12.0</strong>" in tier1_card+ assert "SkillSpector <strong>v2.12.0</strong>" in run_detailsassert _html_report_data(html)["skillspector_versions"] == ["2.12.0"]@pytest.mark.parametrize("raw_version", [None, "", "unknown", "v2.12.0", "2.12.0<script>", 212])@@ -3060,7 +3067,10 @@ def test_all_harbor_jobs_are_navigable_without_attribution_guessing(reporter):assert "https://harbor.example.test/jobs/third" in outputassert "Job 3" in outputassert "Results" in output- assert "javascript:alert(99)" not in output+ if reporter is HTMLReporter:+ assert not re.search(r'href=[\'"]javascript:', output)+ else:+ assert "javascript:alert(99)" not in outputif reporter is HTMLReporter:assert "<job>[bad](x)" in outputassert "<job>" not in outputdiff --git a/tests/reporting/test_retained_html.py b/tests/reporting/test_retained_html.pyindex b8020b90..e90cc64f 100644--- a/tests/reporting/test_retained_html.py+++ b/tests/reporting/test_retained_html.py@@ -253,7 +253,16 @@ def test_reporters_share_one_environment_and_compile_each_template_once(payload,assert plain.render_all(results) == first# Pages built outside report.html.j2, such as the CI index, reuse the same compiled logo.assert html_module.render_logo("one") != html_module.render_logo("two")- assert sorted(loads) == ["logo.svg.j2", "report.html.j2", "report_ui.css.j2", "report_ui.js.j2"]+ assert sorted(loads) == [+ "dataset_diagnostics.html.j2",+ "logo.svg.j2",+ "native_evidence.html.j2",+ "plugin_evidence.html.j2",+ "report.html.j2",+ "report_ui.css.j2",+ "report_ui.js.j2",+ "telemetry.html.j2",+ ]def test_shared_environment_renders_identically_from_many_threads(payload):diff --git a/tests/reporting/test_shared_run_status.py b/tests/reporting/test_shared_run_status.pyindex f44d8c58..a4ffb4ea 100644--- a/tests/reporting/test_shared_run_status.py+++ b/tests/reporting/test_shared_run_status.py@@ -73,9 +73,12 @@ def test_report_surfaces_share_failure_precedence():terminal = re.sub(r"\x1b\[[0-9;]*m", "", CLIReporter().render_all([result]))assert "[FAIL]" in terminalassert "**Status:** ❌ FAILED" in MarkdownReporter().render_all([result])- assert '"status": "failed"' in HTMLReporter().render_all([result]) or "FAILED" in HTMLReporter().render_all(- [result]- )+ html = HTMLReporter().render_all([result])+ embedded = re.search(r'<script id="report-data" type="application/json">(.*?)</script>', html, re.DOTALL)+ assert embedded is not None+ html_data = json.loads(embedded.group(1))+ assert html_data["summary"]["status"] == "failed"+ assert html_data["results"][0]["status"] == "failed"sarif = json.loads(SARIFReporter().render_all([result]))assert sarif["runs"][0]["properties"]["status"] == "failed"diff --git a/tests/reporting/test_telemetry_view.py b/tests/reporting/test_telemetry_view.pynew file mode 100644index 00000000..90f7ca43--- /dev/null+++ b/tests/reporting/test_telemetry_view.py@@ -0,0 +1,368 @@+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0+"""Recorded telemetry stays scoped, bounded and distinct from missing evidence."""++import copy+import json+import re+from pathlib import Path++import pytest+from jinja2 import Environment, FileSystemLoader, select_autoescape+++def _view(payload):+ from skillevaluator.reporting.telemetry_view import build_telemetry_view++ return build_telemetry_view(payload)+++def _render(view):+ root = Path(__file__).parents[2] / "src/skillevaluator/reporting/templates"+ env = Environment(loader=FileSystemLoader(root), autoescape=select_autoescape(default=True))+ return env.get_template("telemetry.html.j2").module.render_telemetry(view)+++def _arm(totals, *, status="complete", measured=2, reasons=None):+ return {+ "totals": totals,+ "coverage": {+ "expected_attempts": 2,+ "observed_attempts": 2,+ "measured_attempts": measured,+ "partial_attempts": 2 - measured,+ "status": status,+ "reason_codes": reasons or [],+ "llm_timing_sources": ["atif", "step_timestamps"],+ },+ }+++def _payload():+ token_scope = {+ "with_skill": _arm(+ {+ "prompt_tokens": 100,+ "cached_tokens": 40,+ "uncached_prompt_tokens": 60,+ "completion_tokens": 20,+ "total_tokens": 120,+ "efficiency_tokens": 80,+ }+ ),+ "baseline": _arm(+ {+ "prompt_tokens": 200,+ "cached_tokens": 20,+ "uncached_prompt_tokens": 180,+ "completion_tokens": 40,+ "total_tokens": 240,+ "efficiency_tokens": 220,+ }+ ),+ "delta": {+ "prompt_tokens": -100,+ "cached_tokens": 20,+ "uncached_prompt_tokens": -120,+ "completion_tokens": -20,+ "total_tokens": -120,+ "efficiency_tokens": -140,+ "total_tokens_change_percent": -50.0,+ "status": "available",+ "reason_codes": [],+ },+ }+ latency_scope = {+ "with_skill": _arm({"llm_s": 10.5, "tool_exec_s": 0, "llm_ms_per_token": 87.5}),+ "baseline": _arm(+ {"llm_s": 20, "tool_exec_s": None, "llm_ms_per_token": 83.33},+ status="partial",+ measured=1,+ reasons=["missing_timing_evidence"],+ ),+ "delta": {+ "llm_s": None,+ "tool_exec_s": None,+ "llm_ms_per_token": None,+ "llm_s_change_percent": None,+ "llm_ms_per_token_change_percent": None,+ "status": "unavailable",+ "reason": "Baseline timing is incomplete.",+ "reason_codes": ["baseline_partial"],+ },+ }+ payload = {}+ for key, scope in (("token_usage", token_scope), ("latency_metrics", latency_scope)):+ agent = copy.deepcopy(scope)+ agent["cases"] = [{"entry_id": "case-one", **copy.deepcopy(scope)}]+ agent["arm_runtime_ms"] = {+ "with_skill": {"duration_ms": 35000},+ "without_skill": {"duration_ms": 50000},+ }+ payload[key] = {+ "source": "recorded_native",+ "schema_version": "1.0",+ "dataset": copy.deepcopy(scope),+ "agents": {"agent-a": agent},+ }+ return payload+++def test_native_tables_keep_all_recorded_columns_scopes_conditions_and_reasons():+ view = _view(_payload())+ html = _render(view)+ assert view["has_tokens"] and view["has_latency"]+ for label in (+ "Dataset",+ "agent-a",+ "case-one",+ "With skill",+ "Without skill",+ "Change",+ "Prompt",+ "Cached",+ "Uncached prompt",+ "Completion",+ "Total",+ "Efficiency Tokens",+ "LLM (s)",+ "Tool (s)",+ "LLM ms/token",+ "LLM timing",+ "Arm runtime (ms)",+ "120",+ "240",+ "-120",+ "-50.00%",+ "10.5",+ "87.5",+ "35,000",+ "50,000",+ "native (ATIF)",+ "inferred (timestamps)",+ "1/2",+ "partial",+ "missing_timing_evidence",+ "baseline_partial",+ "Baseline timing is incomplete.",+ ):+ assert label in html+ assert 'id="tier3-token-usage"' in html and 'id="tier3-latency-metrics"' in html+ assert 'id="tier3-recorded-token-chart"' in html+ assert "<script" not in html+++def test_native_telemetry_rows_do_not_enter_the_tier1_summary_filter_scope():+ html = _render(_view(_payload()))+ tables = re.findall(r"<table\b[^>]*>", html)+ assert len(tables) == 4+ # Tier 1's global .summary-table tbody tr filter hides rows without its+ # validator status attributes. These are resource measurements instead.+ assert all('class="contributor-table"' in table for table in tables)+ assert all("summary-table" not in table for table in tables)+ assert 'id="t3-recorded-token-usage-table"' in html+ assert 'id="t3-latency-table"' in html+++def test_token_chart_uses_both_arms_without_counting_cached_reads_twice():+ chart = _view(_payload())["token_chart"]+ assert chart == {+ "labels": ["agent-a · With skill", "agent-a · Without skill"],+ "datasets": [+ {"label": "Uncached prompt", "data": [60, 180]},+ {"label": "Cached prompt", "data": [40, 20]},+ {"label": "Completion", "data": [20, 40]},+ ],+ }+++def test_chart_fallback_is_visible_until_the_shared_lifecycle_draws_chart():+ html = _render(_view(_payload()))+ canvas = re.search(r'<canvas\b[^>]*id="tier3-recorded-token-chart"[^>]*>', html).group()+ fallback = re.search(r'<p\b[^>]*id="tier3-recorded-token-chart-fallback"[^>]*>', html).group()+ assert " hidden" in canvas+ assert " hidden" not in fallback+ assert 'id="t3-recorded-token-usage-table"' in html+ assert 'id="t3-token-usage-table"' not in html+ for paragraph_id in ("tier3-recorded-token-chart-description", "tier3-recorded-token-chart-fallback"):+ paragraph = re.search(rf'<p\b[^>]*id="{paragraph_id}"[^>]*>.*?</p>', html).group()+ assert 'href="#t3-recorded-token-usage-table"' in paragraph+ assert ""#" not in paragraph+ description = re.search(r'<p\b[^>]*id="tier3-recorded-token-chart-description"[^>]*>', html).group()+ assert 'class="chart-description"' in description+++def test_zero_is_recorded_but_unknown_counters_and_unavailable_deltas_stay_na():+ payload = _payload()+ scope = payload["token_usage"]["dataset"]+ scope["with_skill"]["totals"] = {"total_tokens": 0, "completion_tokens": 0}+ scope["baseline"]["coverage"] = {}+ scope["delta"].update(status="unavailable", reason="Scopes differ.", total_tokens=999)+ html = _render(_view(payload))+ dataset = html.split("Dataset", 1)[1].split("agent-a", 1)[0]+ assert ">0<" in dataset+ assert "N/A" in dataset and "?/?" in dataset+ assert "Scopes differ." in dataset and "999" not in dataset+++def test_partial_token_groups_are_labelled_and_missing_chart_components_remain_unknown():+ payload = _payload()+ arm = payload["token_usage"]["agents"]["agent-a"]["with_skill"]+ arm["coverage"].update(status="partial", measured_attempts=1, reason_codes=["missing_tokens"])+ chart = _view(payload)["token_chart"]+ assert chart["labels"][0] == "agent-a · With skill (partial)"+ del arm["totals"]["uncached_prompt_tokens"]+ chart = _view(payload)["token_chart"]+ assert chart["datasets"][0]["data"][0] is None+ assert "missing_tokens" in _render(_view(payload))+++def test_recorded_timing_precision_is_preserved_without_recalculation():+ payload = _payload()+ payload["latency_metrics"]["dataset"]["with_skill"]["totals"]["llm_ms_per_token"] = 87.123456789+ assert "87.123456789" in _render(_view(payload))+++def test_native_partial_delta_preserves_absolute_change_when_percent_is_unavailable():+ payload = _payload()+ delta = payload["token_usage"]["dataset"]["delta"]+ delta.update(+ status="partial",+ total_tokens=120,+ total_tokens_change_percent=None,+ reason="Baseline is zero; percentage unavailable.",+ reason_codes=["baseline_zero"],+ )+ html = _render(_view(payload))+ dataset = html.split("Dataset", 1)[1].split("agent-a", 1)[0]+ assert "+120" in dataset and "baseline_zero" in dataset+ assert "Baseline is zero; percentage unavailable." in dataset+ assert "%" not in dataset+++def test_view_preserves_each_family_within_byte_limit_for_escape_heavy_text():+ payload = _payload()+ for family in ("token_usage", "latency_metrics"):+ agent = payload[family]["agents"].pop("agent-a")+ for scope in (agent, agent["cases"][0], payload[family]["dataset"]):+ for condition in ("with_skill", "baseline"):+ scope[condition]["coverage"]["reason_codes"] = ["\U0001f600<>\"'&" * 100] * 100+ scope["delta"]["reason"] = "\U0001f600<>\"'&" * 100+ agent["cases"] *= 1000+ payload[family]["agents"] = {f"agent-{i}" + "\U0001f600<>\"'&" * 100: agent for i in range(1000)}+ view = _view(payload)+ assert len(json.dumps(view).encode()) <= 256 * 1024+ assert len(_render(view).encode()) <= 512 * 1024+ assert "Display text shortened" in _render(view)+++def test_combined_projection_byte_bound_includes_unicode_agent_labels_and_chart():+ payload = _payload()+ for family in ("token_usage", "latency_metrics"):+ agent = payload[family]["agents"]["agent-a"]+ agent["cases"] *= 1000+ payload[family]["agents"] = {"\U0001f600" * 240 + str(i): agent for i in range(32)}+ view = _view(payload)+ assert len(json.dumps(view).encode()) <= 256 * 1024+++def test_html_expansion_of_escape_heavy_reasons_stays_bounded():+ payload = _payload()+ for family in ("token_usage", "latency_metrics"):+ agent = payload[family]["agents"]["agent-a"]+ for scope in (agent, agent["cases"][0], payload[family]["dataset"]):+ for condition in ("with_skill", "baseline"):+ scope[condition]["coverage"]["reason_codes"] = ["<" * 240] * 8+ scope["delta"]["reason"] = "<" * 240+ agent["cases"] *= 1000+ payload[family]["agents"] = {f"agent-{i}": agent for i in range(32)}+ html = _render(_view(payload))+ assert len(html.encode()) <= 512 * 1024+ assert "omitted" in html+++ "bad",+ [float("nan"), float("inf"), -1, True, "123", {}, 10**10000],+ ids=["nan", "infinite", "negative", "boolean", "string", "mapping", "huge-int"],+)+def test_bad_numeric_values_never_become_recorded_measurements(bad):+ payload = {+ "token_usage": {"dataset": {"with_skill": _arm({"total_tokens": bad})}},+ "latency_metrics": {"dataset": {"with_skill": _arm({"llm_s": bad})}},+ }+ html = _render(_view(payload))+ assert "N/A" in html+ assert ">nan<" not in html and ">inf<" not in html and ">True<" not in html+ assert ">123<" not in html and ">-1<" not in html+++def test_untrusted_text_is_escaped_and_projection_has_no_mutable_canonical_aliases():+ payload = _payload()+ attack = '<img src=x onerror="alert(1)">\ud800'+ payload["token_usage"]["agents"][attack] = payload["token_usage"]["agents"].pop("agent-a")+ payload["latency_metrics"]["dataset"]["delta"]["reason"] = attack+ before = copy.deepcopy(payload)+ view = _view(payload)+ html = _render(view)+ assert "<img" not in html and "<img" in html+ assert "\ud800" not in html+ json.dumps(view, ensure_ascii=False, allow_nan=False).encode("utf-8")+ view["token_chart"]["datasets"][0]["data"].append(12345)+ view["token_sections"].clear()+ assert payload == before+++def test_all_telemetry_text_is_redacted_before_shortening_and_controls_are_removed():+ payload = _payload()+ secret = "syntheticcredential123"+ unsafe = f"\x1b[31mBearer {secret}\x1b[0m\x00\ud800\u202e"+ for family in ("token_usage", "latency_metrics"):+ usage = payload[family]+ usage["agents"][unsafe] = usage["agents"].pop("agent-a")+ agent = usage["agents"][unsafe]+ usage["source"] = unsafe+ agent["cases"][0]["entry_id"] = unsafe+ for condition in ("with_skill", "baseline"):+ agent[condition]["coverage"]["reason_codes"] = [unsafe]+ usage["dataset"]["delta"]["reason"] = "x " * 110 + f" api_key={secret}"+ before = copy.deepcopy(payload)+ view = _view(payload)+ html = _render(view)+ projected = json.dumps(view, ensure_ascii=False)+ assert secret not in projected and secret not in html+ assert "redacted" in projected and "redacted" in html+ assert "\x1b" not in projected and "\x00" not in projected and "\ud800" not in projected+ assert "\u202e" not in projected+ assert payload == before+++def test_large_inputs_are_bounded_without_walking_all_cases_or_extra_payloads():+ class BoundedCases(list):+ def __iter__(self):+ raise AssertionError("unbounded list traversal")++ payload = _payload()+ agent = payload["token_usage"]["agents"]["agent-a"]+ agent["cases"] = BoundedCases([{"entry_id": "x" * 10000, **copy.deepcopy(agent["cases"][0])}] * 100000)+ payload["token_usage"]["agents"] = {f"agent-{i}": agent for i in range(1000)}+ payload["token_usage"]["source"] = "x" * 1000000+ payload["irrelevant"] = {"recursive": payload}+ view = _view(payload)+ assert len(json.dumps(view).encode()) <= 256 * 1024+ assert len(_render(view).encode()) <= 512 * 1024+ assert "omitted" in _render(view).lower()+ assert len(view["token_chart"]["labels"]) <= 64++[email protected]("payload", [None, [], "oops", {}, {"agents": {"agent-a": {"resources": {"tokens": 0}}}}])+def test_absent_native_telemetry_keeps_public_resources_separate(payload):+ view = _view(payload)+ assert view == {+ "token_sections": [],+ "latency_sections": [],+ "token_chart": None,+ "has_tokens": False,+ "has_latency": False,+ }+ assert _render(view).strip() == ""diff --git a/tests/reporting/test_tier3_completed_agent_docs.py b/tests/reporting/test_tier3_completed_agent_docs.pyindex 2e285767..3c7d6a97 100644--- a/tests/reporting/test_tier3_completed_agent_docs.py+++ b/tests/reporting/test_tier3_completed_agent_docs.py@@ -141,19 +141,18 @@ def test_documented_labels_match_a_run_with_a_failed_peer() -> None:for text in ("summary.overall_score", "summary.overall_lift", "`neutral`"):assert text in sectionfor label in (- "Completed-agent result. Other execution failures need attention","Completed Agent Score",- "Quality Verdict","Tier 3 quality","Run details & provenance",- "Best performing agent","Skill Lift","Best-agent lift",):assert label in sectionassert label in html+ assert "Completed-agent result; other execution failures need attention" in html+ assert result.metadata["agent_eval"]["best_agent"] in html# The standalone quality labels follow the run; completed-agent details keep its score.- assert "card follow the run's verdict" in section+ assert "status follows the run's verdict" in sectionassert "Tier 3 quality: Changes required" in htmlassert "Changes required" in sectionassert _hero_command_status(raw) == "Changes required"@@ -216,7 +215,8 @@ def test_no_fallback_to_a_lower_complete_agent() -> None:# The HTML still names the best agent and shows its lift.assert "even when its evidence is incomplete" in sectionassert payload["summary"]["overall_lift"] == pytest.approx(0.4)- assert "Best performing agent: opencode" in html+ assert "Recorded best agent: opencode" in html+ assert 'data-primary-metric="score"' not in rawassert "Skill Lift +0.40" in htmlassert "Best-agent lift: +0.40" in _run_details(raw)diff --git a/tests/reporting/test_tier3_incomplete_arms.py b/tests/reporting/test_tier3_incomplete_arms.pyindex 6be9b236..c1328f75 100644--- a/tests/reporting/test_tier3_incomplete_arms.py+++ b/tests/reporting/test_tier3_incomplete_arms.py@@ -194,6 +194,20 @@ def test_incomplete_arm_states_and_counts(scored: int | None, expected: int, sta(["Missing scored attempts for cases: ParseError", "Scored attempt coverage is 1/2"], None),(["Excess scored attempts for cases: ParseError", TIMEOUT_ERROR], "agent timeout error"),(["Unexpected scored cases: ValueError"], None),+ (+ [+ "Harbor evaluation statistics account for 1/2 completed trials; "+ "trial case-1__attempt2 recorded RewardFileNotFoundError: reward.json missing",+ TIMEOUT_ERROR,+ ],+ "reward file not found error",+ ),+ (+ ["Without skill aggregate job: trial case-1 recorded harbor.trial.errors.VerifierTimeoutError"],+ "verifier timeout error",+ ),+ (["trial case-1 recorded reward.json missing"], None),+ (["trial FakeError recorded reward.json missing"], None),(["Scored attempt coverage is 1/2", "Unscoreable reward in case-1__attempt2: judge failed"], None),("AgentTimeoutError: not a list", None),],@@ -503,7 +517,7 @@ def test_compact_validate_view_leaves_coverage_notes_to_the_report_files_and_theassert notice["message"] not in compactassert "baseline incomplete" not in compact- docs = _doc_block("docs/reports.mdx", "The HTML report lists each message under **Agent coverage notes**")+ docs = _doc_block("docs/reports.mdx", "The HTML report keeps a short coverage cue near the Tier 3 result")changelog = _doc_block("CHANGELOG.md", "- Tier 3 reports no longer say `baseline not run`")for name, text in (("docs/reports.mdx", docs), ("CHANGELOG.md", changelog)):assert "`validate --verbose`" in text, name@@ -512,8 +526,8 @@ def test_compact_validate_view_leaves_coverage_notes_to_the_report_files_and_theassert "`validate` prints" not in text, name-def test_html_agent_details_label_a_failed_baseline_like_a_skipped_one_and_the_docs_say_so() -> None:- """Only the callout tells a baseline that ran and failed from one that was skipped."""+def test_html_agent_details_distinguish_an_unavailable_baseline_from_a_skipped_one() -> None:+ """Unavailable aggregate quality must not imply the recorded baseline never ran."""_, _, _, report = _render({"claude-code": _agent(baseline=_condition("failed", 1, errors=[TIMEOUT_ERROR])),@@ -523,13 +537,15 @@ def test_html_agent_details_label_a_failed_baseline_like_a_skipped_one_and_the_dkpi_subs = re.findall(r'<div class="t3-kpi-sub">(.*?)</div>', report)assert kpi_subs.count("baseline N/A") == 2- assert kpi_subs.count("no baseline") == 2+ assert kpi_subs.count("no baseline") == 1+ assert kpi_subs.count("Overall baseline unavailable") == 1(note,) = _html_coverage_notes(report)assert note.startswith("claude-code baseline incomplete")definition = _doc_block("docs/reports.mdx", "When the HTML report has no lift for an agent or dimension")- assert "**no baseline** means" in definition- assert "a baseline arm that ran but failed" in definition+ assert "**Overall baseline unavailable**" in definition+ assert "**no baseline**" in definition+ assert "aggregate quality score is missing" in definitionassert "**Agent coverage notes**" in definition- details = _doc_block("docs/reports.mdx", "The HTML report lists each message under **Agent coverage notes**")- assert "**no baseline** and `baseline N/A`" in details+ details = _doc_block("docs/reports.mdx", "The HTML report keeps a short coverage cue near the Tier 3 result")+ assert "**Overall baseline unavailable**" in details and "`baseline N/A`" in detailsdiff --git a/tests/reporting/test_tier3_source_validation_reporting.py b/tests/reporting/test_tier3_source_validation_reporting.pyindex 692b191a..2e9214bb 100644--- a/tests/reporting/test_tier3_source_validation_reporting.py+++ b/tests/reporting/test_tier3_source_validation_reporting.py@@ -328,23 +328,17 @@ def test_compact_tier3_panel_projects_source_errors_to_one_safe_line(tmp_path: P@pytest.mark.parametrize("error_count", [0, 1, 2, 13, 100])-def test_html_report_shows_source_errors_in_preview_and_full_insights(tmp_path: Path, error_count: int) -> None:+def test_html_report_links_source_error_scope_and_preserves_full_insights(tmp_path: Path, error_count: int) -> None:result = _source_result(tmp_path, _entry_errors(error_count))html = HTMLReporter(include_timestamp=False).render_all([result])preview = _html_section(html, "tier3-next-steps-preview")insights = _html_section(html, "tier3-page-suggestions")- assert "Open Full Insights</button>" in preview+ assert 'href="#tier3-page-suggestions">View insights</a>' in previewassert "Create or fix the Tier 3 source" in previewassert "Create or fix the Tier 3 source" in insights- if error_count == 1:- assert f"Source validation error: entry case-1: {_MESSAGE}" in preview- elif error_count > 1:- assert f"{error_count} source validation errors found. Open Full Insights to review the details." in preview- assert "entry case-" not in preview- else:- assert "Source validation error" not in preview- assert "source validation errors found" not in preview+ assert "entry case-" not in preview+ assert "Source validation error:" not in previewif error_count:assert f"Source Validation Errors ({error_count})" in insights@@ -361,7 +355,8 @@ def test_html_report_escapes_source_errors(tmp_path: Path) -> None:insights = _html_section(html, "tier3-page-suggestions")error_text = escape("entry <b>&: Expected <script>alert(1)</script>.")- assert f"Source validation error: {error_text}" in preview+ assert error_text not in preview+ assert 'href="#tier3-page-suggestions"' in previewassert f"<li>{error_text}</li>" in insightsassert "<script>alert(1)" not in htmldiff --git a/tests/reporting/test_tier3_token_usage_reports.py b/tests/reporting/test_tier3_token_usage_reports.pyindex f3203e7d..ffc96466 100644--- a/tests/reporting/test_tier3_token_usage_reports.py+++ b/tests/reporting/test_tier3_token_usage_reports.py@@ -603,9 +603,15 @@ def _failed_case_findings(agent: str, cases: int) -> dict[str, Any]:def _verdict(html: str) -> str:- """The HTML hero's Tier 3 verdict chip, the reason for an incomplete verdict, and the score."""- hero = html.split('class="verdict-chip', 1)[1].split(">", 1)[1].split('<div class="agent-hero-detail"', 1)[0]- return " ".join(re.sub(r"<[^>]+>", " ", hero).split())+ """Read the quality chip and its reason inside the hero, without trailing page content."""+ hero = html.split('<section class="agent-hero"', 1)[1].split("</section>", 1)[0]+ quality = re.search(r'<span class="verdict-chip [^"]+">(Tier 3 quality:.*?)</span>', hero, re.DOTALL)+ assert quality+ reasons = re.findall(r'<p class="hero-reason">(.*?)</p>', hero, re.DOTALL)+ score = re.search(r'data-primary-metric="score">.*?<p class="dashboard-card-value">(.*?)</p>', html, re.DOTALL)+ return " ".join(+ re.sub(r"<[^>]+>", " ", " ".join([quality[1], *reasons, score[1] if score else "unavailable"])).split()+ )@pytest.mark.parametrize("reuse_saved_feedback", [False, True], ids=["fresh-feedback", "saved-feedback"])diff --git a/tests/reporting/test_tier3_unavailable_lift_labels.py b/tests/reporting/test_tier3_unavailable_lift_labels.pyindex d53bb5dc..12d1ef77 100644--- a/tests/reporting/test_tier3_unavailable_lift_labels.py+++ b/tests/reporting/test_tier3_unavailable_lift_labels.py@@ -7,6 +7,8 @@ from __future__ import annotationsimport re+from native_comparison_assertions import dimension_lift_labels+from skillevaluator.constants import DIMENSION_MAPPINGfrom skillevaluator.evaluation.tier3_report import _validation_result_from_payload, build_agent_eval_payloadfrom skillevaluator.reporting import HTMLReporter@@ -58,16 +60,10 @@ def _text(fragment: str) -> str:return re.sub(r"\s+", " ", re.sub(r"<[^>]+>", "", fragment)).strip()-def _matrix_labels(html: str, agents: list[str]) -> dict[str, list[str]]:- # The grid interleaves one cell per agent for every dimension, then Overall.- labels = [_text(label) for label in re.findall(r'<span class="t3-mad-lift"[^>]*>(.*?)</span>', html, re.DOTALL)]- assert len(labels) == len(agents) * (len(DIMENSION_MAPPING) + 1)- return {name: labels[index :: len(agents)] for index, name in enumerate(agents)}---def _scorecard_labels(html: str) -> list[str]:- pattern = r'<div class="t3-agent-score"[^>]*>.*?</div>\s*<div[^>]*>(.*?)</div>'- return [_text(label) for label in re.findall(pattern, html, re.DOTALL)]+def _matrix_labels(html: str, agents: list[str], best_agent: str) -> dict[str, list[str]]:+ labels = dimension_lift_labels(html, agents, best_agent)+ assert all(len(values) == len(DIMENSION_MAPPING) + 1 for values in labels.values())+ return labelsdef _lift_kpi_labels(html: str) -> list[str]:@@ -82,13 +78,13 @@ def test_mixed_judge_comparison_is_unavailable_not_missing_baseline() -> None:assert (mixed["baseline"], mixed["lift"]) == (0.5, None)assert (correctness["baseline"], correctness["lift"]) == (0.5, None)- labels = _matrix_labels(html, list(payload["agents"]))+ labels = _matrix_labels(html, list(payload["agents"]), payload["best_agent"])assert all(re.fullmatch(r"[+-]\d+\.\d{2} lift", label) for label in labels["matched"])dimension_labels = dict(zip(DIMENSION_MAPPING, labels["mixed"], strict=False))assert dimension_labels["correctness"] == "comparison unavailable"assert dimension_labels["security"] == "+0.40 lift"assert labels["mixed"][-1] == "comparison unavailable"- assert _scorecard_labels(html) == ["+0.40 lift", "comparison unavailable"]+ assert re.findall(r'class="t3-agent-score"[^>]*>(.*?)</div>', html) == ["0.90", "0.90"]assert _lift_kpi_labels(html) == ["positive", "comparison unavailable"]assert "no baseline" not in html@@ -104,7 +100,7 @@ def test_score_policy_mismatch_is_unavailable_not_missing_baseline() -> None:payload, html = _html({"codex": agent})assert (payload["agents"]["codex"]["baseline"], payload["agents"]["codex"]["lift"]) == (0.5, None)assert "baseline 0.50" in html- assert _scorecard_labels(html) == ["comparison unavailable"]+ assert re.findall(r'class="t3-agent-score"[^>]*>(.*?)</div>', html) == ["0.90"]assert _lift_kpi_labels(html) == ["comparison unavailable"]assert "no baseline" not in html@@ -112,8 +108,8 @@ def test_score_policy_mismatch_is_unavailable_not_missing_baseline() -> None:def test_skipped_baseline_keeps_no_baseline_labels() -> None:payload, html = _html({"compared": _agent(), "skipped": _agent(baseline=False)})assert payload["agents"]["skipped"]["baseline"] is None- labels = _matrix_labels(html, list(payload["agents"]))+ labels = _matrix_labels(html, list(payload["agents"]), payload["best_agent"])assert labels["skipped"] == ["no baseline lift"] * (len(DIMENSION_MAPPING) + 1)- assert _scorecard_labels(html) == ["+0.40 lift", "no baseline"]+ assert re.findall(r'class="t3-agent-score"[^>]*>(.*?)</div>', html) == ["0.90", "0.90"]assert _lift_kpi_labels(html) == ["positive", "no baseline"]assert "comparison unavailable" not in htmldiff --git a/tests/reporting/test_unified_tier3_report.py b/tests/reporting/test_unified_tier3_report.pyindex 6c9b1a2f..1acacb5d 100644--- a/tests/reporting/test_unified_tier3_report.py+++ b/tests/reporting/test_unified_tier3_report.py@@ -11,6 +11,7 @@ from html import unescapefrom pathlib import Pathimport pytest+from report_markup_assertions import text_contentfrom skillevaluator.evaluation.tier3_report import (_attach_harbor_evidence_to_conclusions,@@ -849,8 +850,16 @@ def test_no_skill_baseline_dimension_na_explains_why_in_html() -> None:cell_start = html.index(f'<td title="{title}">')cell_end = html.index("</td>", cell_start)cell = html[cell_start:cell_end]- assert "N/A" in cell- assert '<div class="t3-dim-hint">baseline not scored</div>' in cell+ assert '<span title="baseline quality unavailable">N/A</span>' in cell+ row_start = html.rfind("<tr>", 0, cell_start)+ row_end = html.index("</tr>", cell_end)+ details = re.search(+ r'<details class="t3-table-detail"><summary>Details</summary>(.*?)</details>',+ html[row_start:row_end],+ re.DOTALL,+ )+ assert details is not None+ assert "baseline quality unavailable" in text_content(details.group(1))def test_trial_report_omits_token_chart_for_incomplete_agent_telemetry() -> None:@@ -1027,7 +1036,8 @@ def test_trial_charts_preserve_token_and_step_counter_semantics() -> None:html = _render_agent_payload(payload)trials_html = _tier3_page(html, "trials", "agents")- assert 'id="tier3-token-chart"' in trials_html+ assert 'id="tier3-recorded-token-chart"' in trials_html+ assert 'id="tier3-token-chart"' not in trials_htmlassert '{ label: "Prompt (total)"' in htmlassert '{ label: "Cached (included in prompt)"' in htmlsteps_chart = re.search(r"function stepsByCaseDatasets\(\) \{.*?var chart = (.*?);\n", html, re.DOTALL)@@ -1540,8 +1550,8 @@ def test_canonical_report_prefers_agentskills_dataset_fields() -> None:dataset_html = _tier3_page(_render_agent_payload(payload), "dataset", "suggestions")- assert "<h2>AgentSkills Dataset</h2>" in dataset_html- assert "1 AgentSkills eval case used for this Tier 3 run." in dataset_html+ assert "<h2>Evaluation Dataset</h2>" in dataset_html+ assert "1 eval case used for this Tier 3 run." in dataset_htmlassert '<span class="t3-ds-label">Prompt</span>' in dataset_htmlassert '<span class="t3-ds-label">Expected Output</span>' in dataset_htmlassert '<span class="t3-ds-label">Assertions</span>' in dataset_html@@ -1577,7 +1587,7 @@ def test_standalone_report_loads_staged_legacy_dataset_with_agentskills_labels(treport = render_agent_eval_html_report(skill, run_dir, use_llm_judge=False)dataset_html = _tier3_page(report.read_text(encoding="utf-8"), "dataset", "suggestions")- assert "<h2>AgentSkills Dataset</h2>" in dataset_html+ assert "<h2>Evaluation Dataset</h2>" in dataset_htmlassert '<span class="t3-ds-label">Prompt</span>' in dataset_htmlassert '<span class="t3-ds-label">Expected Output</span>' in dataset_htmlassert '<span class="t3-ds-label">Assertions</span>' in dataset_html@@ -3138,7 +3148,7 @@ def test_standalone_failed_tier3_report_shows_error_without_score(tmp_path: Pathhtml = report.read_text(encoding="utf-8")assert "No Harbor job result" in html- assert "No successfully scored agent is available" in html+ assert "Quality measurements unavailable" in htmlassert ">N/A<" in htmlassert "Default agent is the top performer" not in htmlassert 'onclick="tier3CopyText(this, "' not in html@@ -3328,11 +3338,11 @@ def _render_paired_comparison(paired_comparison: object) -> str:@pytest.mark.parametrize("paired_comparison", [[1], "bad"], ids=["list", "string"])def test_pass_at_k_render_drops_nonmapping_paired_comparison(paired_comparison: object) -> None:html = _render_paired_comparison(paired_comparison)- sanitized = _embedded_tier3_payload(html)+ retained = _embedded_tier3_payload(html)assert "Paired cases:" not in htmlassert "Exact McNemar p=" not in html- assert "paired_comparison" not in sanitized["agents"]["codex"]["pass_at_k"]["lift"]+ assert retained["agents"]["codex"]["pass_at_k"]["lift"]["paired_comparison"] == paired_comparison@pytest.mark.parametrize(@@ -3564,7 +3574,7 @@ def test_pass_at_k_render_derives_paired_delta_from_validated_outcomes() -> Nonepaired = embedded["agents"]["codex"]["pass_at_k"]["lift"]["paired_comparison"]assert "Paired pass-rate delta: +25.0%." in html- assert paired["paired_rate_delta"] == 0.25+ assert paired["paired_rate_delta"] == -1.0 # Export preserves original; visible delta above is validated.def test_pass_at_k_render_preserves_rounded_subnormal_mcnemar_probability() -> None:@@ -3829,7 +3839,13 @@ def test_pass_at_k_final_column_has_a_narrow_viewport_scroll_contract() -> None:assert re.search(r"<th>Pass-rate difference</th>\s*</tr>", region.group("table"))assert "Pass@1 (supporting reliability)" in htmlassert "attempt passes at Overall ≥ 0.50" in html- assert SKILL_LIFT_DEFINITION in html+ number_key = re.search(r'<details[^>]*id="tier3-number-key">(.*?)</details>', html, re.DOTALL)+ assert number_key is not None+ assert "<summary>What each number means</summary>" in number_key.group(1)+ lift_note = re.search(r"<li><strong>Skill Lift</strong>:(.*?)</li>", number_key.group(1), re.DOTALL)+ assert lift_note is not None+ assert text_content(lift_note.group(1)).strip().startswith(SKILL_LIFT_DEFINITION.removeprefix("Skill Lift "))+ assert '<a href="#tier3-number-key">How lift is measured</a>' in htmlassert ".table-scroll { max-width: 100%; overflow-x: auto;" in htmlassert ".pass-at-k-table { min-width: 720px; }" in htmldiff --git a/tests/test_harbor_html_report_failures.py b/tests/test_harbor_html_report_failures.pyindex 7c71add6..b41ff1ec 100644--- a/tests/test_harbor_html_report_failures.py+++ b/tests/test_harbor_html_report_failures.py@@ -65,7 +65,7 @@ def _overall_kpi_values(output: str) -> list[str]:def _overall_matrix_html(output: str) -> str:- match = re.search(r"<td><strong>Overall</strong></td>(.*?)</tr>", output, re.DOTALL)+ match = re.search(r"<td><strong>Overall</strong>.*?</td>(.*?)</tr>", output, re.DOTALL)assert match is not Nonereturn match.group(1)@@ -224,9 +224,13 @@ def test_failed_agent_has_no_synthetic_score_in_comparison_or_html(tmp_path: Patassert all(dimension["score"] is None and dimension["baseline"] == 0.4 for dimension in failed_dimensions)overall_matrix = _overall_matrix_html(output)- assert _visible_text_by_class(overall_matrix, "t3-mad-score") == ["N/A", "0.80"]+ # The native table puts the best agent in Score/Baseline/Lift, followed+ # by the other agents. The failed peer keeps its own unavailable cell.+ assert 'class="metric-value"' in overall_matrix and ">0.80</span>" in overall_matrix+ assert _visible_text_by_class(overall_matrix, "t3-mad-score") == ["N/A"]assert '<span class="t3-mad-score" style="color:var(--text-secondary);">N/A</span>' in overall_matrix- assert overall_matrix.count('class="t3-mad-bar"') == 1+ assert overall_matrix.count('class="mini-bar"') == 1+ assert overall_matrix.count('class="t3-mad-bar"') == 0assert _visible_text_by_class(output, "t3-agent-score") == ["N/A", "0.80"]assert _visible_text_by_class(output, "t3-tab-score") == ["N/A", "0.80 (+0.30)"]assert _overall_kpi_values(output) == ["N/A", "0.80"]@@ -234,7 +238,8 @@ def test_failed_agent_has_no_synthetic_score_in_comparison_or_html(tmp_path: Patassert output.count('<span class="t3-mad-score" style="color:var(--text-secondary);">N/A</span>') >= 6# Five dimension cells plus overall matrix, scorecard, and lift KPI must# distinguish an unavailable with-skill score from a missing baseline.- assert output.count("with-skill unavailable") == 8+ assert "with-skill unavailable" in overall_matrix+ assert "with-skill unavailable" in output.split('id="tier3-agent-scorecards"', 1)[1].split("</details>", 1)[0]assert "no baseline" not in output@@ -576,8 +581,10 @@ def test_successful_agent_with_legitimate_zero_score_renders_numeric_zero(tmp_paassert payload["agents"]["zero"]["with_skill"] == 0.0overall_matrix = _overall_matrix_html(output)- assert _visible_text_by_class(overall_matrix, "t3-mad-score") == ["0.80", "0.00"]- assert overall_matrix.count('class="t3-mad-bar"') == 2+ assert 'class="metric-value"' in overall_matrix and ">0.80</span>" in overall_matrix+ assert _visible_text_by_class(overall_matrix, "t3-mad-score") == ["0.00"]+ assert overall_matrix.count('class="mini-bar"') == 1+ assert overall_matrix.count('class="t3-mad-bar"') == 1assert _visible_text_by_class(output, "t3-agent-score") == ["0.80", "0.00"]assert _visible_text_by_class(output, "t3-tab-score") == ["0.80", "0.00"]assert _overall_kpi_values(output) == ["0.80", "0.00"]diff --git a/tests/test_judge_lift_integrity.py b/tests/test_judge_lift_integrity.pyindex fec57b1d..f846f38a 100644--- a/tests/test_judge_lift_integrity.py+++ b/tests/test_judge_lift_integrity.py@@ -718,12 +718,14 @@ def test_attempt_counts_stay_null_unless_the_load_identifies_every_left_out_caseassert basis["excluded_cases"] == excluded_casesassert basis["case_ids"] == ["case-1" if excluded_cases == 2 else "mixed"]assert (basis["excluded_attempts"], basis["contributing_attempts"]) == (None, None)- card_html = _card_html(_render(payload), "Accuracy")+ card_html = _text(_card_html(_render(payload), "Accuracy"))noun = "1 case was" if excluded_cases == 1 else "2 cases were"+ # A matching-judge case can still exist, so the note does not say none remains.assert (- f"No lift: {noun} scored by different judge models and no comparable result remains; "+ f"No lift: {noun} scored by different judge models and the loaded results cannot confirm the comparison; "f"the arm scores include {'it' if excluded_cases == 1 else 'them'}."- ) in _text(card_html)+ ) in card_html+ assert "no comparable result remains" not in card_htmldef test_lift_note_mentions_arm_scores_only_when_both_arms_have_one() -> None:diff --git a/tests/test_public_benchmark_gate.py b/tests/test_public_benchmark_gate.pyindex a910e41b..ca6dce2f 100644--- a/tests/test_public_benchmark_gate.py+++ b/tests/test_public_benchmark_gate.py@@ -1235,7 +1235,7 @@ _DESTRUCTIVE_FINDING = {}_TIER3_CARD_VERDICT = r'tier-card-label">Tier 3</span>\s*<span class="tier-card-verdict">([^<]+)</span>'# The Tier 3 overview lead of a run whose attempts were all scored.-_TIER3_LEAD_VERDICT = r"Verdict at a glance:</strong>\s*([^<]+?) with an overall score"+_TIER3_LEAD_VERDICT = r"<strong>Live quality: ([^<]+)\.</strong>"# What the lead says when another execution failure needs attention._TIER3_ATTENTION_NOTICE = "Other execution failures need attention"diff --git a/tests/test_tier3_next_steps.py b/tests/test_tier3_next_steps.pyindex e49c47a4..724dd52b 100644--- a/tests/test_tier3_next_steps.py+++ b/tests/test_tier3_next_steps.py@@ -199,20 +199,24 @@ def test_cli_prints_next_steps_after_the_case_summary(tmp_path: Path) -> None:assert "check: With 5 or more skill cases the verdict keeps its direction." in output-def test_html_report_shows_next_steps_under_the_case_fixes(tmp_path: Path) -> None:+def test_html_insights_owns_full_next_steps_under_case_fixes(tmp_path: Path) -> None:run = _run(tmp_path, goal_accuracy=1.0)html = render_agent_eval_html_report(tmp_path, run, use_llm_judge=False).read_text(encoding="utf-8")- preview = " ".join(- html.split('id="tier3-next-steps-preview"', 1)[1].split("</ol>\n </div>", 1)[0].split()+ insights = " ".join(+ html.split('id="tier3-page-suggestions"', 1)[1].split('id="tier3-page-provenance"', 1)[0].split())- assert preview.index("Nothing to fix in the available case evidence.") < preview.index("Next steps for the run:")+ assert insights.index("Nothing to fix in the available case evidence.") < insights.index("Next steps for the run:")assert ("<strong>each case ran once, so a single attempt decides every pass or fail mark</strong> [evaluation]:"- in preview+ in insights)- assert "Check: With 5 or more skill cases the verdict keeps its direction. Evidence: case" in preview+ assert "Check: With 5 or more skill cases the verdict keeps its direction. Evidence: case" in insights+ preview = html.split('id="tier3-next-steps-preview"', 1)[1].split('id="tier3-number-key"', 1)[0]+ assert 'href="#tier3-page-suggestions"' in preview+ assert "Next steps for the run:" not in preview+ assert "each case ran once, so a single attempt decides every pass or fail mark" not in previewdef test_markdown_report_renders_next_step_strength() -> None:diff --git a/tests/tier3/test_baseline_timeouts.py b/tests/tier3/test_baseline_timeouts.pyindex 1bd99f48..9af70630 100644--- a/tests/tier3/test_baseline_timeouts.py+++ b/tests/tier3/test_baseline_timeouts.py@@ -13,6 +13,7 @@ from __future__ import annotationsimport jsonfrom datetime import UTC, datetime, timedelta+from html.parser import HTMLParserfrom pathlib import Pathfrom typing import Anyfrom uuid import uuid4@@ -795,8 +796,8 @@ def test_reports_rank_tolerated_agents_below_their_complete_peer(tmp_path: Path)assert ".t3-overview-lead .tolerated-baseline { display:block;" in htmlfor agent in ("claude-code", "opencode"):assert f"Baseline incomplete for <strong>{agent}</strong> (1 of 2 attempts scored)" in html- assert html.count("<code>--tolerate-baseline-timeouts</code>, so its baseline and uplift are not reported.") == 2- assert "not reported.</span><span" not in html+ assert html.count("<code>--tolerate-baseline-timeouts</code>; baseline and uplift unavailable.") == 2+ assert "unavailable.</span><span" not in htmldef test_reports_never_fall_back_to_a_tolerated_agent(tmp_path: Path) -> None:@@ -867,15 +868,45 @@ def test_verdict_comes_from_the_complete_peer_not_a_tolerated_agent(assert f"> **Tier 3 completed-agent result: {verdict.upper()}**" in benchmarkassert f"| Tier 3 | Live agent evaluation | **{verdict.upper()}** |" in benchmarkassert lead in html- # The HTML overview says once that the tolerated baseline needs attention:- # in the completed-agent lead, or in its own note when the lead reads- # inconclusive, as BENCHMARK.md does in both cases.- overview = html.split('<div class="t3-overview-lead">', 1)[1].split("</div>", 1)[0]- lead_attention = "Other execution failures need attention."- tolerated_attention = "<strong>Needs attention:</strong> baseline timeouts were tolerated."++ # The completed-agent lead names other execution failures when its verdict+ # fails. Each tolerated baseline keeps one scoped coverage/limitation cue,+ # including when another complete agent never activated the skill.+ class OverviewSummary(HTMLParser):+ def __init__(self) -> None:+ super().__init__()+ self.depth = 0+ self.matches = 0+ self.parts: list[str] = []++ def handle_starttag(self, tag: str, attrs: list[tuple[str, str | None]]) -> None:+ if tag == "div" and (self.depth or dict(attrs).get("id") == "tier3-overview-summary"):+ if not self.depth:+ self.matches += 1+ self.depth += 1++ def handle_endtag(self, tag: str) -> None:+ if tag == "div" and self.depth:+ self.depth -= 1++ def handle_data(self, data: str) -> None:+ if self.depth:+ self.parts.append(data)++ # The summary includes nested divs before the tolerated-baseline notice.+ summary = OverviewSummary()+ summary.feed(html)+ summary.close()+ assert summary.matches == 1+ assert summary.depth == 0+ overview = " ".join("".join(summary.parts).split())+ assert lead.removeprefix("<strong>").removesuffix("</strong>") in overview+ lead_attention = "Other execution failures need attention;"+ tolerated_attention = "baseline timeouts were tolerated by"assert (lead_attention in overview) is (verdict == "fail")- assert (tolerated_attention in overview) is (verdict == "inconclusive")- assert "Baseline incomplete for <strong>opencode</strong> (1 of 2 attempts scored)" in overview+ assert overview.count(tolerated_attention) == 1+ assert "Baseline incomplete for opencode (1 of 2 attempts scored)" in overview+ assert "--tolerate-baseline-timeouts; baseline and uplift unavailable." in overviewassert "**Needs attention:** other execution failures remain." in benchmarkif verdict == "inconclusive":# The tolerated agent did activate the skill, so Insights names whose trials never did.@@ -1376,9 +1407,8 @@ def test_reports_name_tolerated_agents_without_a_completed_agent_result(tmp_pathassert benchmark.count("**Needs attention:**") == 1assert "Baseline incomplete for <strong>opencode</strong> (1 of 2 attempts scored)" in htmlattention = "**Needs attention:** baseline timeouts were tolerated."- html_attention = (- '<span class="tolerated-baseline"><strong>Needs attention:</strong> baseline timeouts were tolerated.</span>'- )+ html_attention = "baseline timeouts were tolerated by"+ assert html.count(html_attention) == 1if codex_short:# Nothing before the note names other failures, so it names the cause.assert "Completed agent: **codex**" not in benchmark@@ -1395,9 +1425,9 @@ def test_reports_name_tolerated_agents_without_a_completed_agent_result(tmp_path# The completed-agent lead already says that other failures need attention.assert "Completed agent: **codex**" in benchmarkassert "**Needs attention:** other execution failures remain." in benchmark- assert "Other execution failures need attention. This is not a whole-run or publication PASS." in html+ assert "Other execution failures need attention; not a whole-run or publication PASS." in htmlassert attention not in benchmark- assert html_attention not in html+ assert "<strong>Needs attention:</strong> baseline timeouts were tolerated." not in html# -- pure rules -----------------------------------------------------------------diff --git a/tests/tier3/test_skip_with_skill.py b/tests/tier3/test_skip_with_skill.pyindex fad7ec08..5af6318d 100644--- a/tests/tier3/test_skip_with_skill.py+++ b/tests/tier3/test_skip_with_skill.py@@ -559,10 +559,10 @@ def test_html_report_explains_the_baseline_only_run(tmp_path: Path, skill: Path)assert "Baseline-only calibration:" in htmlassert "Baseline calibration (no with-skill arm)" in html- assert "No skill verdict: baseline-only run" in html+ assert "No with-skill arm; no skill lift measured." in htmlassert "Verdict at a glance:" not in html- assert '<span class="hero-score-label">Best agent score (baseline)</span>' in html- assert "no with-skill arm, so no skill lift was measured." in html+ assert 'data-primary-metric="score"' in html+ assert ">Baseline Score</h3>" in htmlassert re.search(r"<td><strong>Goal Accuracy</strong></td>\s*<td>skipped</td>\s*<td>0\.67</td>", html)diff --git a/tests/validators/test_rubric_eval.py b/tests/validators/test_rubric_eval.pyindex 09b4c555..f871d12d 100644--- a/tests/validators/test_rubric_eval.py+++ b/tests/validators/test_rubric_eval.py@@ -5,6 +5,7 @@import jsonimport os+import reimport sysfrom pathlib import Pathfrom unittest.mock import MagicMock, patch@@ -868,7 +869,9 @@ class TestRubricEvalValidator:finding.check_name == "rubric_overall" and finding.severity.value == "high" for finding in result.findings)html = HTMLReporter(include_timestamp=False).render_all([result])- assert '"would_block": true' in html+ match = re.search(r'<script id="report-data" type="application/json">(.*?)</script>', html, re.DOTALL)+ assert match is not None+ assert json.loads(match.group(1))["gating"]["would_block"] is Truedef test_empty_checks_use_local_incomplete_diagnostic(self, tmp_path):skill_dir = _write_skill(tmp_path)@@ -1335,9 +1338,12 @@ class TestInvalidReplyRetry:result, requests = _validate_with(tmp_path, _reply(checks), _reply(checks))- problem = requests[1]["user"].removeprefix(requests[0]["user"]).removeprefix(- f"\n{_RETRY_MARKER}"- ).removesuffix(f". {_RETRY_TAIL}")+ problem = (+ requests[1]["user"]+ .removeprefix(requests[0]["user"])+ .removeprefix(f"\n{_RETRY_MARKER}")+ .removesuffix(f". {_RETRY_TAIL}")+ )assert "invented" in problem and "FORGED" in problemassert problem.isprintable()assert " " not in problemdiff --git a/uv.lock b/uv.lockindex 330b37de..2e8391b2 100644--- a/uv.lock+++ b/uv.lock@@ -817,6 +817,53 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/d5/0c/043d5e551459da400957a1395e0febbf771446ff34291afcbe3d8be2a279/fsspec-2026.4.0-py3-none-any.whl", hash = "sha256:11ef7bb35dab8a394fde6e608221d5cf3e8499401c249bebaeaad760a1a8dec2", size = 203402, upload-time = "2026-04-29T20:42:36.842Z" },]+[[package]]+name = "greenlet"+version = "3.5.6"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/3e/6e/0091f175ccd02b02bc8811bbcbcc6ac2e980be116e3b2f7a736ca322bf84/greenlet-3.5.6.tar.gz", hash = "sha256:8e67c43bdfc88d5fee6db0d3e40175b362fc95fb85f0412d233b9b203c53a575", size = 207653, upload-time = "2026-09-14T15:42:51.806Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/72/18/3fc6d951466ae9a2a688edcddde3b2e388da0a8244e0caf7117bbeb0eb95/greenlet-3.5.6-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:a5876d0a60355af98d535c47f6cd6eb0f8a432396dab26845d380b92f8412422", size = 295668, upload-time = "2026-09-14T14:22:33.241Z" },+ { url = "https://files.pythonhosted.org/packages/27/89/366d2af5061eeefa5012f510d95a99c8620dcc457609838db4d538820318/greenlet-3.5.6-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e85880b538e59a59f55117b81f208a6660ad5ac328aad9305f812d9b8bc67a0f", size = 611700, upload-time = "2026-09-14T15:12:01.962Z" },+ { url = "https://files.pythonhosted.org/packages/54/1c/07f133f865fd58ae593dd2bbec3144acaee9b04ffe2eb48c6e121747ceef/greenlet-3.5.6-cp312-cp312-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f0ba7c2a329d650628f4c8572fd1db29f0a59dd70a3e3e0710dcf18a35cce9d8", size = 624223, upload-time = "2026-09-14T15:20:42.459Z" },+ { url = "https://files.pythonhosted.org/packages/a7/f2/844dc823ff2752ad049caa6b59d57e4572f9c445934b02d3518f4c67197c/greenlet-3.5.6-cp312-cp312-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ee7d9da3bf493909cf811a3f038840cb34fab5ae2956b8a263919f6e289ab188", size = 629529, upload-time = "2026-09-14T15:25:06.354Z" },+ { url = "https://files.pythonhosted.org/packages/66/6a/1594f3869c57c149abdb380492529e04d4c0229b5e4d79572c5bd0aaa673/greenlet-3.5.6-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:975736b002ed080d124cf81a79cb7e05cb26d6b3f5c7a7b651c0fcce70353aa1", size = 621404, upload-time = "2026-09-14T14:35:59.027Z" },+ { url = "https://files.pythonhosted.org/packages/c0/42/b1f8dbc89a53b9e77859fc1ad1627d106fc361daa3ea4bdf43a91ebb4338/greenlet-3.5.6-cp312-cp312-manylinux_2_39_riscv64.whl", hash = "sha256:71890d5247020c25c21a6b65202782bfc281d4e6e244842419d30e3492bb6dcc", size = 432385, upload-time = "2026-09-14T15:28:37.369Z" },+ { url = "https://files.pythonhosted.org/packages/a2/f5/33e5c9e48178b9259fd000f8f45caa4a65036f65d3d0c06a602f570f025d/greenlet-3.5.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:0616b8f878098c5681fd8f0dc92d887551717402342a70f0abcbfea5f5ad8a44", size = 1584998, upload-time = "2026-09-14T15:10:06.653Z" },+ { url = "https://files.pythonhosted.org/packages/ef/31/9b4e140bc24d0ad7927ebd651f5608b0acc2334d061748c3b6ad19085cfa/greenlet-3.5.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3dbb4596a6a4e5d47121a33ff20533a81e60f302d9e67b69909a8bc21a43f0a7", size = 1647568, upload-time = "2026-09-14T14:35:49.787Z" },+ { url = "https://files.pythonhosted.org/packages/c3/71/d79f1791f824f8ff15c2978746640467ae932a2365e0201069f7f272395f/greenlet-3.5.6-cp312-cp312-win_amd64.whl", hash = "sha256:7ac4abb3877c43af320392c664774eef6fa2cc063c79a55fc02d844a3cbe7395", size = 324203, upload-time = "2026-09-14T14:22:54.504Z" },+ { url = "https://files.pythonhosted.org/packages/63/af/42aca4d56e8cb321912203069d8d34734cb288222f10ad2ae102718cc577/greenlet-3.5.6-cp312-cp312-win_arm64.whl", hash = "sha256:301102a49120b095e72a7838792b41233975fc1c155daec6d98f81c00c9280e0", size = 308310, upload-time = "2026-09-14T14:24:03.008Z" },+ { url = "https://files.pythonhosted.org/packages/f1/a1/e720a38852366c589e1a46cf570b886507ad2cf591050c203365638baab0/greenlet-3.5.6-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:f96f0e30b5a95c7631b12bfe214cbc90ec8fe8cfa36920596c10514a65743519", size = 294627, upload-time = "2026-09-14T14:24:40.102Z" },+ { url = "https://files.pythonhosted.org/packages/eb/c3/58187858df41354a11e6a55b421e7af9059798abdab3a384cc51b8567c38/greenlet-3.5.6-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c75116c9de79949de23006e2d9b35ee82874c594fcf5c0311b439acaa14b8441", size = 614356, upload-time = "2026-09-14T15:12:03.399Z" },+ { url = "https://files.pythonhosted.org/packages/ce/b9/3a7e67d5f05c9760b1ad411fa52264bd69cc08e22a2ebfb4018b90628ced/greenlet-3.5.6-cp313-cp313-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:cad5782f93f7f738b62c6527b6f32a60694d924029f299a8b524758cfa53d815", size = 626756, upload-time = "2026-09-14T15:20:44.269Z" },+ { url = "https://files.pythonhosted.org/packages/c6/7c/40400455f5b5a65bb83e94fde66d1be9e5ec518638113f8083ace746c309/greenlet-3.5.6-cp313-cp313-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a93ee7c6e8fd0f8a83525a51bd777be57ee17787e91d805bd8d6faf9dcada18e", size = 632632, upload-time = "2026-09-14T15:25:07.813Z" },+ { url = "https://files.pythonhosted.org/packages/85/cb/ab0c123c514ed4e94c0dc9ee2e86362633e6b998cfc05de7fc9ac2eb9690/greenlet-3.5.6-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f98e8215e172f567ce80eeaed9107fb4d32b6c44f26983d9b8334658136a205a", size = 623779, upload-time = "2026-09-14T14:36:01.104Z" },+ { url = "https://files.pythonhosted.org/packages/f9/67/1f35cff30a6c51c3f23b63d4afcc7313ab4f97490ba3676fa78178984b27/greenlet-3.5.6-cp313-cp313-manylinux_2_39_riscv64.whl", hash = "sha256:7f731ebac68ea06d628658295cb2d217b10186329fcf9a3b6a149045059bf92e", size = 434933, upload-time = "2026-09-14T15:28:38.858Z" },+ { url = "https://files.pythonhosted.org/packages/a5/26/fda8a5a06e7073333ccb038133c5893b9e0c4fe29d5992a17e83c241bc6e/greenlet-3.5.6-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:df19e2d0b1620039af5102563fbd96e8938c7f5c3f5828528d641d9fc585525e", size = 1584930, upload-time = "2026-09-14T15:10:08.234Z" },+ { url = "https://files.pythonhosted.org/packages/2f/37/50f8813163148d6234e08b23dcad6a9e37f01d148c8ec976e4c44ea2d918/greenlet-3.5.6-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:06c0e933290fba8ffe53ead4ae1b8044b0e9754b75cebf381aa2bc3e50d82fac", size = 1647590, upload-time = "2026-09-14T14:35:51.173Z" },+ { url = "https://files.pythonhosted.org/packages/86/da/b7669b09586365654083a62bd0724cf06cb74bd5085a15cdd161271f992f/greenlet-3.5.6-cp313-cp313-win_amd64.whl", hash = "sha256:5b602b4201b965a8354d74e232364a66ff243dd142e350d035f46169bb36e13d", size = 324086, upload-time = "2026-09-14T14:23:48.428Z" },+ { url = "https://files.pythonhosted.org/packages/e5/5d/c9663cfe84a2a9e0aa96f066f5b0594c227ea4c647511e087e2e11d4ac0a/greenlet-3.5.6-cp313-cp313-win_arm64.whl", hash = "sha256:876077e7ebb8c84ed068e2b23d4c62ebb010d60df84b9591af1be2f39010ffb2", size = 308211, upload-time = "2026-09-14T14:28:01.634Z" },+ { url = "https://files.pythonhosted.org/packages/66/c0/d254544ae2b8bdd311aef000fafc02828c2771b17d994b3075620ea7cc6e/greenlet-3.5.6-cp314-cp314-macosx_11_0_universal2.whl", hash = "sha256:8cddea1b8339451c2fb3388e138347b6126744f33b611bdb55b7357361cfef46", size = 295221, upload-time = "2026-09-14T14:25:11.583Z" },+ { url = "https://files.pythonhosted.org/packages/18/18/eb54be16b9cc3971e09ca5b73334e1b8c804a4630d9addaaf218a4fe300f/greenlet-3.5.6-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c59acfa8eb73a1e0d484392dc002bdf001fd4ce73394e0132df3d1ab6093d7cb", size = 660992, upload-time = "2026-09-14T15:12:04.876Z" },+ { url = "https://files.pythonhosted.org/packages/8f/b4/e193efe65671dcf294bc51fcc59efb52d154adf8612c4ea016da0d2c486c/greenlet-3.5.6-cp314-cp314-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a3b4a01c6da07ef9f80d4fe8933b994bc99747bcea3eab0330a9c34d3c12655b", size = 673428, upload-time = "2026-09-14T15:20:45.756Z" },+ { url = "https://files.pythonhosted.org/packages/fd/21/631bb45fafde1dca782152377c0676d182ec924820064047f533a3627b28/greenlet-3.5.6-cp314-cp314-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:dd0b83bed3405b586a3133629f1d1a5bc7bfd64822a3b7ab342bdc68e6dbc61b", size = 677688, upload-time = "2026-09-14T15:25:09.279Z" },+ { url = "https://files.pythonhosted.org/packages/45/ac/28fa7a9e50f2859466214c4ac584d776db52c1604ad4dd158960a5af2a1f/greenlet-3.5.6-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9a09d59bef1db94f384b5bcc2d523694d338f3df6b757aeeaf7baca5d0c0be88", size = 670773, upload-time = "2026-09-14T14:36:02.577Z" },+ { url = "https://files.pythonhosted.org/packages/40/30/2b0a73e68e1e18e30b601d0d183cfdfc2beca4de5a6843c630f0fc9fb90c/greenlet-3.5.6-cp314-cp314-manylinux_2_39_riscv64.whl", hash = "sha256:fdacf26402389bdd89857ad3c045a26fe8f3314f9a8b28226f82f88463a65b77", size = 480475, upload-time = "2026-09-14T15:28:40.741Z" },+ { url = "https://files.pythonhosted.org/packages/c3/cd/fb7d6cdd86ff3427c1494854f0e35437eba05142be91f530f6da75e09e19/greenlet-3.5.6-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:8b7c73d1cef3d9ae963e9ff03f6222df43efbb9054ffd2f1969c935b7fc84c02", size = 1631900, upload-time = "2026-09-14T15:10:09.745Z" },+ { url = "https://files.pythonhosted.org/packages/f6/40/143bdbb20a516628cb15074ae52ed17d850b450292609c7a6fccac6dbece/greenlet-3.5.6-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:8b27df301f56e3b3d2298095c8f7d6b68f2521f6b1693e901fa039bdbae34424", size = 1693740, upload-time = "2026-09-14T14:35:52.959Z" },+ { url = "https://files.pythonhosted.org/packages/c9/9e/019642432e6ae283301df1361227d47610709d2dc69a38f95edef266d713/greenlet-3.5.6-cp314-cp314-win_amd64.whl", hash = "sha256:f8f0bd690e1a41294ac87905e8121c81a3761ec2583c768f13467428606c8c7a", size = 327473, upload-time = "2026-09-14T14:28:12.948Z" },+ { url = "https://files.pythonhosted.org/packages/e9/7f/8aafc7bf70c948786dba7221d0dc0838e5329bebc6d434ef2208b4f0e760/greenlet-3.5.6-cp314-cp314-win_arm64.whl", hash = "sha256:8cda13494d86a4f12429641117cb6ac4bbbc9c30a33f711f7d3a2e5fbe4b0b7e", size = 311095, upload-time = "2026-09-14T14:28:00.7Z" },+ { url = "https://files.pythonhosted.org/packages/14/7e/7a205688a5b3074933b18a906608d46d106e9a79d776bdab5a4abf4b4feb/greenlet-3.5.6-cp314-cp314t-macosx_11_0_universal2.whl", hash = "sha256:97c5a53e8c1754df58e73f047a99e287d4da1bdfe64b0072fb25c87000897951", size = 305352, upload-time = "2026-09-14T14:21:31.962Z" },+ { url = "https://files.pythonhosted.org/packages/78/cb/9c4a57a9d9dd0256e20b8f7f4f06554c2c92badebf0ab73ce344321b78b9/greenlet-3.5.6-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fea4427d1ffdb3b523d7daa6712038428a4c16c450b9777bdd1221cfee0eab49", size = 672671, upload-time = "2026-09-14T15:12:06.347Z" },+ { url = "https://files.pythonhosted.org/packages/97/52/c6729681ebbd298f4decd28746815acc8a0b0a0fde21d2df33776fd4d042/greenlet-3.5.6-cp314-cp314t-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:73a29b5ba642e35433166a03a3e02935e7238c4b3467fbd77523b99edea23e5b", size = 679489, upload-time = "2026-09-14T15:20:47.291Z" },+ { url = "https://files.pythonhosted.org/packages/71/76/3c11c21e0716b1f1dc7c1a4b3d690abb1d3b448c69a9d32049fecb64010a/greenlet-3.5.6-cp314-cp314t-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:61a61b4a95a4f97922c3a6f5606d3e360851584bd47e500a5161373c53810e3d", size = 681303, upload-time = "2026-09-14T15:25:11.088Z" },+ { url = "https://files.pythonhosted.org/packages/58/c5/2b6c721ba8b8963da42d5a0f57f25b8aaeb1fe9bdd156875e57f3be648a2/greenlet-3.5.6-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:460e70b033aba8ed47e2ac9b5d0d2157b05a34fbfa30a241400aef4118902cdc", size = 676608, upload-time = "2026-09-14T14:36:03.959Z" },+ { url = "https://files.pythonhosted.org/packages/3f/26/3ae402202452cd5941bbbd483e5a74297e2397e7aa3182c2a5e3ab7d5666/greenlet-3.5.6-cp314-cp314t-manylinux_2_39_riscv64.whl", hash = "sha256:fe3170a69fe039b18ad18171e66faa9a75f6fe9d78f968fd9b54e09fbd714d81", size = 510112, upload-time = "2026-09-14T15:28:42.112Z" },+ { url = "https://files.pythonhosted.org/packages/b2/04/0d018e0d05bcdde19a0fcb907834155f1fc853a9bedd3f3f5e6acadcae19/greenlet-3.5.6-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:ca80a49b53ed1d22f7282da7255f7bb2fd1935fd0f623d8613fda38745f18961", size = 1641479, upload-time = "2026-09-14T15:10:11.216Z" },+ { url = "https://files.pythonhosted.org/packages/59/bb/f02ef9073919158f6403fe3701d4ed4403d646720e7201dfc6e9d264bac3/greenlet-3.5.6-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:916f92f2a8db10508f739d0b5e00b83defe5d1115a997c54532a6d7cf8c95404", size = 1698758, upload-time = "2026-09-14T14:35:54.336Z" },+ { url = "https://files.pythonhosted.org/packages/08/a5/1f48fe647473a2dcccfd1839b2ff2c78eb57009be776b4da071e901c9bff/greenlet-3.5.6-cp314-cp314t-win_amd64.whl", hash = "sha256:886bcf1870af74c32bc310fd00a6b803445e17e51b7d5a107c7b35c0f362cc16", size = 331574, upload-time = "2026-09-14T14:27:18.451Z" },+]+[[package]]name = "h11"version = "0.16.0"@@ -1762,6 +1809,25 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/81/e6/cd9575ac904136b3cbf7aa7ee819ef86eedb7274e46f230e94ea4342e729/platformdirs-4.10.0-py3-none-any.whl", hash = "sha256:fb516cdb12eb0d857d0cd85a7c57cea4d060bee4578d6cf5a14dfdf8cbf8784a", size = 22743, upload-time = "2026-05-28T03:32:52.175Z" },]+[[package]]+name = "playwright"+version = "1.65.2"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "greenlet" },+]+sdist = { url = "https://files.pythonhosted.org/packages/b9/33/151d28773e930d0d438b73e5dcd29b418da65150f9ad05ddd772b275395e/playwright-1.65.2.tar.gz", hash = "sha256:8b031f81de9cdbe8550d8fe8b58dba47d96239e53177ee4cd47dab0fff07a87e", size = 10225683, upload-time = "2026-11-14T00:29:11.246Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/9d/aa/17f3761bf5ef3f900a395b8962aa273736ec949e8d644f246e9094a8f071/playwright-1.65.2-py3-none-macosx_10_13_x86_64.whl", hash = "sha256:99dd0de21173375cded45f4e26a9e19b862d748b06cbb11376313758cedc220e", size = 50334186, upload-time = "2026-11-14T00:28:39.723Z" },+ { url = "https://files.pythonhosted.org/packages/ef/fe/0a7f9109a7fd33631b271893fc311928dc568d1a5f3b3b3f18b90ed95561/playwright-1.65.2-py3-none-macosx_11_0_arm64.whl", hash = "sha256:2e03da7fd7cd6ea92d22524be147e5803649ab0ae9b362b9a78efa869c2f57c7", size = 48816324, upload-time = "2026-11-14T00:28:43.533Z" },+ { url = "https://files.pythonhosted.org/packages/4f/29/68e20008d28e39778c724d69f28b19177a6a39539ea488aa0df9d4f26718/playwright-1.65.2-py3-none-macosx_11_0_universal2.whl", hash = "sha256:3bb758e12b963bf32f7fba5c4b86994f060126feb32d47f236589f53fe09746f", size = 50334188, upload-time = "2026-11-14T00:28:47.364Z" },+ { url = "https://files.pythonhosted.org/packages/de/c3/2fc4b7da0496401ecf35c3fba50235e7f2cdbe141b42be83eb2d93f08fc5/playwright-1.65.2-py3-none-manylinux1_x86_64.whl", hash = "sha256:58932d35f56767ab7ebcdd3d4a733bfb3e62a1a5bc43c08e28b9fa9b3e61cf33", size = 53474566, upload-time = "2026-11-14T00:28:51.558Z" },+ { url = "https://files.pythonhosted.org/packages/e8/eb/378dbf6da1a76aea9aa9ec3f39b60a03651a8f32ce8b7ca5a8a890b4d21c/playwright-1.65.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd3e54b6a926fc6510f272797eec0707dc34ae04d564e74a7056c4a813e53270", size = 53146329, upload-time = "2026-11-14T00:28:55.903Z" },+ { url = "https://files.pythonhosted.org/packages/7a/e7/9fa224de4a94d7754a0654b369170fa5069274036061d0393b3a2f6a6c17/playwright-1.65.2-py3-none-win32.whl", hash = "sha256:4476703bcdd1a2db06f5db5136af7c02552b1bb519d5fa4b94a8eead2a6a41ba", size = 42673857, upload-time = "2026-11-14T00:29:00.608Z" },+ { url = "https://files.pythonhosted.org/packages/51/9b/f071a3f3250017941a9d0ae27b8fe4deb141ce37b6b9fa176ff5bf8f34df/playwright-1.65.2-py3-none-win_amd64.whl", hash = "sha256:d0aec9e1c97b6f497f3d9f2ad6e1b7f299968e61239d71f100298b0690f3c776", size = 42673865, upload-time = "2026-11-14T00:29:04.628Z" },+ { url = "https://files.pythonhosted.org/packages/3e/fe/ac7ee06f2a674f51577c4fa3690151e3c9147510cc1e08c8ad69eef35c03/playwright-1.65.2-py3-none-win_arm64.whl", hash = "sha256:33a224fba3fb72c5fa7eda49535b265c292f1fb87949c769754f9fcd0f5be2de", size = 38405357, upload-time = "2026-11-14T00:29:08.463Z" },+]+[[package]]name = "pluggy"version = "1.6.0"@@ -2592,6 +2658,7 @@ dashboard = [dev = [{ name = "build" },{ name = "httpx" },+ { name = "playwright" },{ name = "pyjwt", extra = ["crypto"] },{ name = "pytest" },{ name = "pytest-cov" },@@ -2646,6 +2713,7 @@ requires-dist = [{ name = "openai", marker = "extra == 'llm'", specifier = ">=2.21.0" },{ name = "packaging", specifier = ">=24" },{ name = "pip-audit", marker = "extra == 'security'", specifier = ">=2.10.0" },+ { name = "playwright", marker = "extra == 'dev'", specifier = "==1.65.2" },{ name = "pydantic", specifier = ">=2.11.0" },{ name = "pyjwt", extras = ["crypto"], marker = "extra == 'publisher'", specifier = ">=2.13.0" },{ name = "pyjwt", extras = ["crypto"], marker = "extra == 'tier3'", specifier = ">=2.13.0" },