Repository navigation
perf(ci): faster Tier 1 scans and a clearer HTML report - #256
Merged
Merged
Conversation
The runtime stage now copies only the three virtual environments, gitleaks, ci/ and the license files into a fresh copy of the pinned base. uv, its cache, curl and the source tree stay in the build stages. The hash-locked installs, the non-root user, the entrypoint and the version checks are unchanged. Scanner environments now install before any SkillEvaluator source. The locked dependencies install from pyproject.toml and uv.lock alone, and the project installs into its own overlay layer. A source edit therefore rebuilds and ships only that small layer instead of every scanner layer. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
The image runs with a read-only root filesystem and PYTHONDONTWRITEBYTECODE, and shipped no .pyc files, so every tool start in every skill scan compiled its imports again. uv now compiles the three environments and the project at install time, and compileall covers the standard library and ci/. PYTHONDONTWRITEBYTECODE stays set at runtime. The .pyc files use unchecked hashes. They do not embed source mtimes, so the same inputs give the same bytes (checked across hash seeds and file mtimes), and imports skip the source check because installed files never change in the image. Measured on arm64 against the 1aee274 image, with the stage split from the previous commit. One-skill scan through the image entrypoint with the evaluate-skills.yml docker flags and --cpus=4, 5 interleaved runs, medians: - skill with requirements.txt: 23.8 s to 12.7 s (1.87x) - skill without requirements.txt: 18.5 s to 10.0 s (1.86x) Verdicts were identical. Compressed image 326.0 MB to 348.0 MB (+6.7%); the .pyc files add 61.1 MB of that and the stage split removes about 39 MB. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
Neither the Tier 1 image nor the root image reads tests/, docs/, fern/, scripts/, .github/, config/ or the community files at the repository root. Excluding them shrinks the build context from 13.65 MB to 5.96 MB (508 to 214 files), and edits to them no longer invalidate the root image's COPY layer. A wheel still builds from the remaining context. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
Builds now use buildx with a GitHub Actions layer cache. Every run reads the cache, and only runs on main write it, so a pull request cannot replace the layers that main and release builds reuse. GitHub also keeps caches written by pull request runs out of main's scope, and no workflow here runs pull request input in main's scope; a test keeps it that way. Pushes to main that touch the image inputs now build and smoke-test the image, which seeds the cache. A release dispatch used to build and smoke-test the image in the verify job, then build and smoke-test it again in the publish job before pushing. The publish job now builds once, smoke-tests that local image and pushes the same image; the verify job skips release dispatches. The labels, the immutable tag check and the onboarding job are unchanged. The build time on GitHub runners is not measured here. With the stage split, a source edit misses the cache only for the project layer and the steps after it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
The publish job read the layer cache that main writes. BuildKit keys a RUN by its command text and parent layer, not by the package index, so the runtime stage's apt layer kept the git and ca-certificates of whichever main build first wrote it. Every main and pull request build reads that entry, so it never ages out. The release also trusted layers written by any job that ran on main. The release build now sets no-cache and has no cache-from, so apt installs the packages current at release time and no earlier job's layers reach the published image. It still writes the cache, which refreshes the layers that later verify builds read. Releases are rare and already built once. test_image_build.py pinned the release cache-from to the verify job's; that assertion is replaced by a test that the release reads no cache and still writes it. ci/README.md says release builds do not reuse cached layers. Checked locally with buildx: --no-cache together with --cache-from re-ran the RUN step, and --cache-to still exported the freshly built layer. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
The Changed bullet compared the image with an earlier Tier 1 image, but no release has shipped one: the image arrives in this same Unreleased section with the GitHub Actions onboarding entry under Added. The 1.9x and 7% figures also came from one arm64 machine under heavy load. The Added entry now states the final layout instead: a multi-stage build with precompiled bytecode that ships only the locked environments, Gitleaks, ci/ and the license files, and a release that builds without cached layers and pushes the image it smoke-tested. The measurements stay in the commit messages and the PR description. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
The publisher and the PR comment helper each had their own GitHubAPI, _NoRedirect and strict JSON loader, and the copies had drifted. ci/github_api.py now holds one client, one bounded reader and one JSON policy. It is standard library only, so the comment job can still run it with the runner's system Python. Where the copies disagreed, the stricter rule wins: - Endpoints must be /repos/<repo> or start with /repos/<repo>/. The publisher used to accept a sibling such as /repos/<repo>-fork. The exact /repos/<repo> path stays allowed because the publisher reads the default branch from it. - API responses are capped at 16 MiB (the publisher used 32 MiB) and a larger Content-Length is rejected before reading in both tools. - NaN and Infinity are rejected in both tools, including in publication.json. The '..' and backslash path guard is moved unchanged, including its one exception: a commit comparison between two full SHAs, which the publisher uses to find the caller workflow's merge base. The shared client applies it to both tools. The 40-hex commit SHA, owner/repository and GHCR digest patterns are shared by publish_reports.py, comment_report.py and render_templates.py. The workflow copies that run before the tools are checked out stay inline; a test pins them to the shared patterns. The publisher's report member pattern now reuses its report directory pattern. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
The publisher wrote site files with write_text, which truncates the old file before writing. A failed write left an empty or partial file in the gh-pages checkout. Writes now go to an exclusive temporary file in the same directory, which then replaces the target. The symlink checks on the target and every ancestor are unchanged, and new files keep the umask-based mode that write_text used. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
The publisher downloaded the whole scan artifact but parsed only summary.json and each skill's skillevaluator-tier1.json, about 11% of its bytes. HTML, Markdown, SARIF and logs also counted against the 64 MiB download and expanded-size caps, so a large run could be rejected for files the publisher never opens. The scan workflow now also uploads <artifact-name>-evidence-attempt-<N>, which holds only those JSON files. The publisher selects only that artifact. It keeps every check it applied to the full artifact: run id and head SHA provenance, the attempt-bound name, the attempt time window, expiry, size and ambiguity checks, and the member checks in read_artifact. The unsuffixed legacy name is no longer accepted. A scan without the evidence artifact fails with a message naming the artifact and asking for a rerun. The test that pinned the old "no current report artifact" text now matches the new message. At 99 fixture skills the zipped download is 461,095 bytes instead of 4,205,456, and the expanded bytes counted against the 64 MiB cap drop from 30.1 MB (45%) to 3.6 MB (5%). read_artifact time is unchanged (per-report validation dominates): 0.135-0.166 s median for both. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
The deploy job ran after every successful prepare job, even when the publish loop found nothing to commit. That happens when the same run attempt is republished and is already the newest history entry. The publish step now writes committed=true only after a successful push and committed=false otherwise. deploy runs when something was committed, for manual workflow_dispatch runs, and for any re-run attempt. The last two keep a re-run after a failed deploy from skipping a deploy that is still needed. The comment job still requires a successful deploy for new content, and also accepts a skipped deploy when nothing was committed. A publication skipped as stale (its PR closed or moved after the scan) still never deploys or comments, even when an earlier attempt in the same job already wrote the PR outputs. Tests run the real publish step shell with stand-ins for git and the publisher, and evaluate both job conditions. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
The privileged prepare job ran python3 -m pip install on the runner's system Python to get uv. It now creates a private venv under RUNNER_TEMP and installs uv there from the same hash-locked ci/requirements/uv.txt, with --no-deps and --only-binary :all:. That uv then runs the same uv sync --frozen --no-dev --no-editable as before. The system Python and its pip are never modified, and PEP 668 markers on the runner image do not matter. No dependency cache is added. Other workflows on the default branch can write this job's Actions cache scope, a restored cache archive can write outside its path, and uv installs files from its cache without checking them again (checked locally: a changed file in the uv cache was installed under --require-hashes). That is not safe in a job that can push to gh-pages. The test that pinned the old install line now pins the new one and that the job uses no cache action. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
Both the prepare and comment jobs checked out the whole tools repository (511 files, 13.6 MB at this commit). prepare now uses a cone-mode sparse checkout of ci and src. Cone mode always keeps root files, so pyproject.toml, uv.lock, README.md and the license files that the package build reads stay present even if that list changes: 226 files, 6.1 MB (44%). The comment job checks out only ci/comment_report.py and ci/github_api.py: 2 files, 15 KB. Tests rebuild each job's sparse tree from git ls-files. For prepare they check the pyproject build inputs and import the publisher modules from that tree. For comment they run comment_report.py from just its two files with no site-packages. The stdlib-only check moves there from test_github_api.py. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
Add an Unreleased changelog entry for the JSON-only evidence artifact, the skipped no-change deploy, the private uv install, the sparse tool checkouts, atomic site writes and the shared GitHub client. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
Sharing bounded_read gave both tools the publisher's text, "The downloaded artifact or API response exceeds its size limit." The PR comment helper never downloads artifacts, so its diagnostic now mentioned one. At 1aee274 it said "The GitHub API response exceeded its size limit." bounded_read now takes the message. GitHubAPI API calls use "The GitHub API response exceeds its size limit." in both tools. The publisher's artifact download uses "The downloaded artifact exceeds its size limit." The comment helper's text differs from 1aee274 only in tense. The publisher's API text no longer mentions an artifact. Tests pin the exact text for API responses in both tools and for a declared and an actual oversized artifact download. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
When the selected scan attempt had no evidence artifact, the publisher told the user to rerun the scan with an evaluator revision that uploads it. That is wrong in the common case. Failed, cancelled and timed out scans can be published, and some upload nothing: the image pull or image check fails before any report exists, the run is cancelled before the scan job, or a re-run of failed jobs does not rerun the scan. At 1aee274 these cases got the neutral "no current report artifact" text. The message now names the artifact and the three causes: the scan stopped before writing reports, the artifact expired, or the scan used an evaluator revision that does not upload it. The test that pinned the old text now pins the new message in full and adds a scan that uploaded no artifacts. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
ci/README.md said to rerun a scan whose evaluator revision does not upload the evidence artifact, and CHANGELOG.md said such a scan must be rerun before it can be published. A re-run cannot fix it. GitHub re-runs use the original commit and its caller workflow, and the caller pins the evaluator by SHA (ci/templates/skill-checks.yml), so the re-run runs the same evaluator and again uploads no evidence artifact. Both now say such a scan cannot be published. The README says to update the scan caller to a release that uploads the artifact, approve that evaluator SHA and the new caller blob, and start a new scan. The changelog paragraph is rewrapped. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
The deploy skip lets the comment job run when deploy was skipped and prepare committed nothing. committed=false means another publisher run already pushed this scan attempt's content, either one that won the push race or an earlier one. That run's deploy may still be queued (deploy uses queue: max) or may have failed, so the comment could link to a report that is not live yet. At 1aee274 every comment followed this run's own deploy. The comment job again requires needs.deploy.result == 'success'. The deploy skip is unchanged. The run that pushed the content owns both its deploy and its comment, and when committed=false that run exists by construction. Manual runs and re-runs still always deploy, so they still comment after it. The comment condition test now expects no comment for a skipped deploy with nothing committed. A new test runs the real publish step through a lost push race (diffs 1,0; pushes 1) and checks that an automatic first attempt neither deploys nor comments, while a manual run or re-run deploys and then comments. ci/README.md and the changelog say the skipped run leaves both to the run that pushed the content. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
native_reports renders every skill page from the retained JSON and replaces the CLI's HTML, so the CLI's own render was discarded work. The runner now requests json, markdown and sarif only. The test pins the format list and checks that each skill still gets a native page. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
Tier 1 scans spend most of their time waiting on scanner processes, so the runner now scans up to SCAN_WORKERS skills at once (default 4, range 1 to 16). The reusable workflow exposes it as the scan-workers input. 1 keeps the old one-at-a-time behaviour. The default is a fixed number, not os.cpu_count(), which reports host CPUs inside a container limited by --cpus. Workers only run processes. The main thread owns rows, logs and report files: - Each skill's log lines and annotations are printed in skill order, so the annotation budget and logs match a sequential run. - Every finished result is checkpointed at once, even before earlier skills end. A worker starts its next skill only after its last result is saved, so one worker behaves exactly like before. - Each worker gets its own HOME and TMPDIR subdirectory. - The scan time budget is shared. When it runs out, running scans stop at the deadline and skills not yet started stay "Not evaluated". A timed-out skill now also gets a result line with its reason. Each scan keeps the credential redaction path: the evaluator writes into a private directory under its worker's TMPDIR, only redacted files reach the skill's report directory, and a report that contradicts its row still becomes an error row for that skill alone. The private directory name carries the skill's report directory, so concurrent scans are traceable. The credential preflight still runs before any worker starts and shares the scan time budget. Tests that assumed call order now key fake responses by skill, and the existing timeout test pins SCAN_WORKERS=1 for its snapshot checks. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
run_tier1 and select_changed_skills each parsed SKILL_PATHS with their own rules. Full scans had no root count or length bound. Both now use skill_roots/skill_root from select_changed_skills.py: 1 to 100 roots, 16 KiB of text, relative paths without traversal, backslashes, colons, control characters or symlinked components. has_control_character is the one control-character rule for roots and Git paths. It keeps the DEL (0x7f) rejection that both scripts already apply to configured roots and changed-mode Git paths. The changed-mode tree check passes the selected directories as a list, not as SKILL_PATHS text, so the SKILL_PATHS bounds do not apply to it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
Changed-mode selection compared every skill directory with every changed or remaining file. It now builds, once per file list, the set of every path and each directory that contains one, and answers each skill with a set lookup. Results are the same; a seeded test checks the set against the old pairwise rule on random path trees. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
Selection ran four git rev-parse processes: the top level, the base, the head and HEAD. One call now prints all four. A trailing "--" makes Git reject any argument that is not a revision, so a file named like a requested revision cannot be read as a path. The checks and messages are unchanged; tests pin the single call, annotated tag rejection and the revision-shaped file name. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
The scan job always cloned every commit and file version. Full scans now check out only the scanned commit (fetch-depth 1). Changed mode still needs every commit and tree to find the merge base, but never reads old file contents, so it uses a blobless clone (filter blob:none). SCAN_MODE moves to the job env so the checkout can use it. The fetch-depth expression puts 1 before 0 because 0 is falsy in GitHub expressions. New selection tests run on a real blobless clone, check that a base-only blob stays missing (selection runs Git with protocol.allow=never, so it cannot fetch one), and check that a shallow clone fails changed selection instead of scanning everything. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
Scans run in worker threads, which never see Ctrl-C, and Docker sends the signal only to the runner (PID 1). So one SIGINT left every running scan going: the runner exited only when they ended, up to the 3000 s budget, even with SCAN_WORKERS=1. An error in the main thread, such as a full report disk, also waited for those scans before it surfaced. The default executor is now run_scan: - It starts the evaluator in its own process group. - When the run stops early on an interrupt or error, it sends SIGTERM to that group, then SIGKILL after 5 s. - A timeout kills the whole group. Before, subprocess.run killed only the evaluator, so scanner tools it started could keep running. Injected execute callables still work, so the existing tests are unchanged. New tests cover a real SIGINT sent only to the runner, an error while saving a result, the SIGKILL fallback and a timeout. Each checks that the scan and its background tool have ended. The runner tests read a scan's PIDs from its private scanner directory under TMPDIR, where the evaluator writes before redaction. Measured with a shim scan that sleeps 40 s and one SIGINT to the runner only: before, it exited 38.4 s after SIGINT; now 0.1 s, with 4 workers and with 1. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
A worker waited with no bound for the main thread to checkpoint its result. A second Ctrl-C stopped the main thread's drain, so nothing set that event again. Each worker whose scan then ended waited forever, and interpreter shutdown joined those non-daemon threads, so the runner never exited. In Docker, pressing Ctrl-C twice left the container running until it was killed. This also happened with SCAN_WORKERS=1. Workers now check every 0.1 s and stop waiting once the run is ending. The main thread joins the workers instead of counting their events. A repeated Ctrl-C during that join is held until the workers have exited, at most the 5 s stop grace, and is then raised. The new test sends two SIGINTs to the runner while its scans ignore SIGTERM, so the second one lands while the runner still waits for them. Measured with two SIGINTs 1 s apart to the runner only and scans that sleep 40 s: before, the runner was still running after 120 s, with 4 workers and with 1. Now it exits with -2 at once. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
The runner kept every parsed child report in `results` until the run ended. Reports can be up to 32 MiB, so 100 skills could hold hundreds of MB to GBs of parsed JSON. Logging needs a report only until its result is printed, so flush_logs now pops it. Before parallel scans, only the current skill's report was alive. The new test tracks each parsed report with a weak reference. With one worker, only the latest report may still be referenced when the next scan starts. Before this change, all earlier reports were. Peak RSS, 40 skills with 15.3 MB reports, checkpoint and final rendering stubbed out, 3 interleaved runs each, median: - SCAN_WORKERS=1: 669 MiB before, 157 MiB after. - SCAN_WORKERS=4: 626 MiB before, 309 MiB after. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
worker_environment accepted an existing worker directory whatever its owner or mode: mkdir(mode=0o700, exist_ok=True) sets the mode only when it creates the directory. With TMPDIR unset, as in a run outside Docker on Linux, the scanner temp root is the fixed shared path /tmp/skillevaluator-worker-N. Another local user could create it first and then swap scanner temp files, such as the generated gitleaks config. The Docker workflow was not affected: TMPDIR=/audit-tmp and /tmp are private tmpfs mounts there. After mkdir, the runner now checks each worker home and temp directory with lstat. It must be a real directory owned by the current user, with no group or other permissions. Otherwise the run stops with a configuration error before any scan. The check skips owner and mode on Windows, which has no POSIX modes. New tests cover a symlinked, world-writable or foreign-owned worker directory, reuse of a private one, and a symlinked TMPDIR worker directory that stops run() before any scan. The symlink check had no test before. The configuration error message changes to name the new rule. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
A worker turns an unexpected exception from a scan into a row error instead of crashing. No test covered it: narrowing `except Exception` left every runner test green. Without the fallback the worker thread dies with no "finished" event. With one worker, later skills never run. With more, final logging stops at the unfinished skill, so later skills' results are never logged. The new test raises RuntimeError with untrusted text for the first skill, with 1 and with 4 workers. It checks the row error, that later skills run and are logged, the exit code, and that the text appears in no log, traceback or report. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
Each HTMLReporter built its own Environment, so every report recompiled report.html.j2 and its two includes. The CI render path creates one reporter per skill and pays that compile cost for every skill. Build the environment once per process and reuse it. The loader serves fixed package templates and the filters are pure functions, so reporters with different options can share it. Jinja environments are safe to share between threads once configured. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
Add an HTML report section to the reports guide, list the verdict words the CI pages use, and replace "quality scores and the pass/fail decision are separate": a score below the minimum fails the Quality score check. Add a Changed entry for the redesign. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
The Tier 3 insight source and suggestion category pills were 10.4 and 10.9 px, and the LLM pill was #8b5cf6 on its tint (3.9:1 light, 4.1:1 dark). They are now 11 px, and the LLM pill text uses a violet token that meets AA in both themes and in print. The Tier 3 tab has its own later style block, so the rules carry a .tab-content prefix. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
Opening a report at a #f- or #c- link scrolled the card under the sticky filter bar, because the browser's own fragment jump ran after the DOMContentLoaded handler. The handler now runs after load, check and finding cards get a scroll margin below the bar, and the opened card is outlined for two seconds so the reader can find it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
…pped When a check had any finding, every error line folded into a collapsed "Scanner output" block that does not print. The line saying why the scan stopped went with it. Fix first and the summary then blamed a missing scanner, even when the scanner ran and timed out. Only the lines that repeat a finding card fold away now. Scanner diagnostics and gate failures always show and always print. Fix first and the summary use the scanner's own reason, and ask for an install only when the scanner is missing. The test that pinned "gitleaks unavailable" now expects the scanner name with no cause, because its fixture records no diagnostic. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
The guard that an incomplete HTML report never claims a pass asserted that "All Passed" is absent. The redesigned report never prints those words, so the guard could not fail. It now checks the header verdict and the summary verdict for Incomplete, checks that no Passed verdict is shown, and covers an incomplete check among passing checks. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
Only the HTML report, the CI index and the Pages history use the new verdict words. The Markdown report, BENCHMARK.md and the CI summary and PR comment still use their own status words, so "every surface" was wrong. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
The first screen could still show two verdicts. When every Tier 1 check was skipped, the header said Passed while the summary said Skipped. When a tier failed under a gate that does not block, such as deduplication with --no-block-on-dedup, the header said Passed and the tier card said Changes required. The header now uses the summary's rule: Skipped when no Tier 1 or Tier 2 check ran. A failing tier whose results are all non-blocking shows "Failed (advisory)" on its card, and for Tier 3 also in the hero, the tab and a Tier 3 only header. A blocking failure still says Changes required. test_html_tier2_failure_stays_failed_when_cli_gate_is_nonblocking now expects "Failed (advisory)". The card keeps its fail class, so the tier still shows as failed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
The changelog says no report text is smaller than 11 px, but confidence badges stayed at 0.6rem (9.6 px). Every medium or low confidence finding in a failed check shows one. The low confidence badge also measured 4.39:1 in the light theme and 4.06:1 in the dark theme. The badges now use 11 px and the palette's badge colors (6.6:1 or more in both themes). A new test checks that every font size under 11 px in report.html.j2 is either unused or raised by the workspace stylesheet, and that inline sizes are 11 px or more. The old test only read px values in report_ui.css.j2. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
The report follows the OS theme, so a reader in OS dark mode gets the dark theme. Tier 3 charts are canvases drawn with the dark theme's label and tick colors, and nothing redrew them for print, so their labels, legend and ticks printed near white on white paper. Charts now redraw on beforeprint and on a change of the print media query, with the light colors and without animation, and redraw with the screen theme after printing. beforeprint fires while screen styles still apply, so the colors are read with the light theme set for that moment. Checked in headless Chrome with the OS in dark mode: through beforeprint and through print media, all four charts are drawn with #24292f labels and #59636e ticks, and return to the dark colors afterwards. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
For a skill at the repository root (CI row path "."), Fix first took the last part of the display name as the skill folder. "/./" never matches, so Code Risk Analysis findings, which carry absolute scan paths such as /workspace/scripts/fetch.py, kept the container path. The same file and line was then listed twice, once per scanner. The report and fix_first_for_results take an optional scan root, the folder the scanners ran on, and strip it from finding paths. The CI pages pass /workspace joined with the row path, so a root skill and a skill under skills/ show the same relative locations. Without a scan root the old rule still applies. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
Describe the Fix first entry for a scan that did not finish, which now carries the scanner's own reason, and that scanner diagnostics and gate failures are always shown and printed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
Two test parameter lists added while combining the shared GitHub client and the deploy skip with the compare endpoint and stale-run handling were longer than the line limit. ruff format wraps them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
The redesigned report imports logo.svg.j2, so one HTML render now loads four templates. The shared-environment test still checks that each one compiles once across reporters. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
…ironment render_logo built a new Jinja environment and compiled logo.svg.j2 on every call. The CI index renders it at every checkpoint, so a 100-skill run compiled the partial once per saved result. It now uses the reporter's shared environment, which has the same loader and autoescaping, so the partial compiles once per process. The shared environment test covers both callers. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
has_control_character now rejects DEL itself, so the extra check for 0x7f in scanned file and directory names repeated it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
requested review from
chrisknvidia,
mosheabr and
rmalani-nv
as code owners
October 29, 2026 21:33
CodeQL flags the case-sensitive <script> regex. The redesign test now collects inline scripts with the HTML parser it already uses. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
…aries Signed-off-by: Christopher Kevin <[email protected]>
chrisknvidia
enabled auto-merge (squash)
October 30, 2026 00:16
This was referenced Oct 30, 2026
chrisknvidia
pushed a commit
that referenced
this pull request
Oct 30, 2026
* perf(ci): split the Tier 1 image into build and runtime stages * perf(ci): precompile Tier 1 image bytecode * build(ci): keep tests, docs and tooling out of the image build context * perf(ci): build the Tier 1 image once with a layer cache from main * docs: note the Tier 1 image build changes in the changelog * fix(ci): build release images without cached layers * docs: describe the Tier 1 image in its onboarding changelog entry * refactor(ci): share one GitHub client and identity patterns * fix(ci): write publisher site files atomically * perf(ci): publish from a small JSON-only evidence artifact * perf(ci): skip the Pages deploy when publication commits nothing * fix(ci): install the publisher's uv without the system pip * perf(ci): check out only the tools each publisher job needs * docs: record publisher evidence artifact and workflow changes * fix(ci): name the API response or the artifact in size-limit errors * fix(ci): name every cause when a scan has no evidence artifact * docs: say a new scan, not a re-run, publishes an old evaluator's scan * fix(ci): comment on a PR only after this run's own Pages deploy * perf(ci): stop asking the Tier 1 CLI for HTML reports * perf(ci): scan skills in parallel with a bounded worker pool * refactor(ci): share skill-root validation between full and changed scans * perf(ci): match changed files to skills with an ancestor set * perf(ci): resolve changed-mode commits with one rev-parse call * perf(ci): fetch full history only for changed-skill selection * fix(ci): end running scans when a Tier 1 run is interrupted * fix(ci): never leave scan workers waiting after an interrupted run * perf(ci): release each skill report once its result is logged * fix(ci): reuse scan worker directories only when they are private * test(ci): cover the scan worker fallback for unexpected errors * perf(report): share one Jinja environment across HTML reporters * perf(ci): stop embedding unused report JSON in CI-native pages * perf(ci): stop escaping details.md evidence past its size limit * refactor(ci): read each skill report once per render and reuse statuses * perf(ci): validate scanned reports without copying their metadata * docs: note faster CI report rendering in the changelog * fix(ci): count lone surrogates past the details.md cut without raising * test: check CSP hashes against a page that embeds the report JSON * docs: describe final CI report behaviour in the changelog * feat(report): add the inline SkillEvaluator logo partial * style(report): one palette with AA contrast and an 11 px type floor * feat(report): lead the HTML report with the verdict and what to fix first * feat(ci): logo, verdict words and the report's first fix on CI pages * docs: describe the redesigned HTML report and its verdict words * style(report): Tier 3 pills meet the 11 px floor and AA contrast * fix(report): finding links land below the sticky filter bar * fix(report): keep scanner diagnostics visible and name why a scan stopped * test: pin the Incomplete verdict in the redesigned header and summary * docs: scope the shared verdict words to the HTML surfaces * fix(report): one verdict for skipped runs and advisory tiers * style(report): confidence badges meet the 11 px floor and AA contrast * fix(report): print Tier 3 charts with print colors * fix(ci): show Fix first locations relative to the scan root * docs: say that unfinished scans give their reason and diagnostics print * style(ci): format the shared client and publisher workflow tests * test: count the logo partial among the shared environment's templates * perf(report): render the standalone logo from the shared template environment * refactor(ci): drop the duplicate DEL check from skill tree walks * style: format reporting files after the rebase onto main * test: read report scripts with the HTML parser instead of a regex Signed-off-by: Narendran Raghavan <[email protected]>
10 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #238. This speeds up the Tier 1 CI scan and report publishing, and redesigns the HTML report around a clear verdict, with the SkillEvaluator logo. The changes come from a measured review of #238's CI path and an audit of the HTML report across the CLI report, the Tier 3 report, the CI per-skill pages and the hosted index.
What changes
Scan image (
ci/Dockerfile.tier1,publish-tier1-image.yml)Runner and selection (
ci/run_tier1.py,ci/select_changed_skills.py,evaluate-skills.yml)rev-parse, and full history is fetched only for changed-skill selection.Rendering (
reporting/html.py,reporting/retained.py,ci/native_reports.py,ci/report_views.py)Publisher (
ci/publish_reports.py,ci/comment_report.py,publish-skill-reports.yml)HTML report redesign
Measured results
render_native_reports, 100 reportsMedians of interleaved runs on an arm64 Mac; timings on GitHub runners are not measured yet. The compressed image is 22 MB larger (+6.7%): bytecode adds about 61 MB and the stage split saves about 39 MB.
Testing
ci/smoke_image.pypassed all five cases on the rebuilt image (arm64).Not in this PR
🤖 Generated with Claude Code