Skip to content

Report page naming, timeline deps, JUnit status fix, fast-mount AMI - #172

Merged
maxknv merged 13 commits into
mainfrom
runner-disk-fast-mount
Nov 26, 2026
Merged

maxknv merged 13 commits into
mainfrom
runner-disk-fast-mount

Conversation

@maxknv

@maxknv maxknv commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Summary

A batch of report and runner-infra improvements.

  • Report page naming. Serve/reference the report viewer page as {PROJECT_SLUG}.html via Settings.get_report_page_name() (overridable with the new HTML_PAGE_NAME setting), instead of the local praktika.html basename. Test uploads get a _test.html variant. Touches settings.py, html_prepare.py, info.py, report_page.py.
  • Report timeline job dependencies. The timeline now shows each job's needs: dependencies on hover. The dependency graph is stashed on the summary ext (job_requires) so it survives report updates as per-job rows are replaced. Rows are drawn thicker when a workflow has under 100 jobs. Touches hook_html.py, praktika.html.
  • JUnit status fix. Result.create_from now honors a partial parse failure (parse_error set) by applying the parsed-aggregate ERROR status, so a dropped/malformed shard can't report green off the cases that happened to parse. Mirrors the existing from_junit_run behavior. Touches result.py.
  • Fast-mount runner AMI. Bake ext4 fast-mount defaults (journal_data_writeback, nobarrier) into the runner root fs superblock via tune2fs at image-build time, with a tune2fs -l readback test. ~10x faster fsync (measured on real runners); safe only because runner AMIs are disposable, single-tenant, and never resurrected (not for stateful hosts like the CIDB server). Recipe bumped to 1.0.23. See docs/proposals/runner-disk-fast-mount.md. Touches image_builder.py, ci/infrastructure/projects.py.
  • AI review auto-approve. The native review job gains --enable-approve: when set and the model verdict is no_issues, it submits a GitHub APPROVE review via a dedicated GH.approve_pr helper (separate from the COMMENT-only post_pr_review). Wired into the PR Code Review job command. Touches ai_review.py, gh.py, __main__.py, ci/workflows/praktika_pr_advanced.py.
  • Bump praktika to 0.1.31.

Testing

  • Fast-mount: requires an Image Builder rebuild + boot verification on a real instance before merge (slow turnaround).
  • Report/JUnit changes are code-only.

🤖 Generated with Claude Code


Note

Medium Risk
AMI mount tuning and autoscaler scale-up behavior affect runner provisioning and disk durability assumptions; optional GitHub APPROVE on AI review changes merge automation semantics.

Overview
Standardizes the CI report viewer as report.html (via Settings.HTML_PAGE_NAME) everywhere uploads and report URLs are built, replacing the old praktika.html basename so cross-project and workflow links stay consistent.

The report timeline now carries a job_requires graph on the summary ext and highlights upstream/downstream jobs on hover (with thicker rows when there are fewer than 100 jobs). JUnit aggregation treats a partial parse failure as ERROR so a bad shard cannot show green. Runner AMIs bake ext4 fast-mount defaults (journal_data_writeback, nobarrier) at image-build time (recipe 1.0.23); docs consolidate this under docs/performance-tuning.md. Pool autoscaler gains per-pool scale_coefficient (default 0.3; 1.0 closes the whole backlog per tick). AI Code Review can --enable-approve and call GH.approve_pr on clean verdicts. Adds the cortage jobs design proposal (no runtime implementation in this diff). Bumps praktika to 0.1.31.

Reviewed by Cursor Bugbot for commit d93d512. Bugbot is set up for automated code reviews on this repo. Configure here.

- Report page served/referenced as {PROJECT_SLUG}.html via Settings.get_report_page_name (HTML_PAGE_NAME override); _test.html variant for test uploads.

- Report timeline: show each job's needs/dependencies on hover (job_requires on the summary ext); draw thicker rows when under 100 jobs.

- JUnit: honor partial-parse ERROR in Result.create_from so a dropped or malformed shard cannot report green off the cases that happened to parse.

- Bake ext4 fast-mount defaults (journal_data_writeback, nobarrier) into runner AMIs via tune2fs, with a tune2fs -l readback test; recipe 1.0.23.

- Bump praktika to 0.1.31.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@praktika-gh

praktika-gh Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [d93d512]

Summary: ✅


Code Review

Result: ⚠️ Issues found

What changed: This PR standardizes report viewer URLs, adds dependency visualization to report timelines, fixes partial JUnit parse status propagation, and tunes ext4 runner images for faster fsync. It also adds configurable autoscaler ramp-up, opt-in AI review approvals, infrastructure documentation, and a version bump.

  • The existing unresolved thread on praktika/ai_review.py remains applicable: after this bot submits an APPROVE, a later non-clean review on the same commit only posts a COMMENT review and does not supersede the approval. I did not add a duplicate inline finding.

Investigation: 7/13 rounds, 48 tool calls.

@praktika-gh

praktika-gh Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [90c5529]

Comment thread praktika/hook_html.py Resolved
praktika-gh Bot and others added 2 commits November 25, 2026 10:35
…ka/info

Remove unused `pathlib.Path` import flagged by ruff in praktika/info.py, and gate the root-fs tune2fs fast-mount tuning so it only runs on ext2/3/4 filesystems (skipping XFS, used by AL2023 AMIs), fixing the blocking AI-review finding without touching the ext4 Ubuntu path's behavior.

AI-Session-Round: 479cb40d87a7
Report timeline (praktika.html): hover a job to see its name and the
jobs it needs (tooltip), and highlight related rows - amber for upstream
needs, blue for downstream dependents. Lines/gaps render 2x thicker under
100 jobs.

hook_html: emit job_requires on the summary ext using the parsed workflow
`needs` (resolved to job names) instead of raw `requires` (artifact names),
so every edge maps to a real timeline row.

Pool autoscaler: add a per-pool scale-up pacing mode - "gradual" (default
30%/min ramp off the outstanding gap) or "eager" (close the whole backlog
in one invocation). Validated at config build time.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment thread praktika/settings.py Resolved
maxknv and others added 2 commits November 25, 2026 15:10
Mirror the "needs" list in the job hover tooltip with a "required by"
section listing jobs that depend on the hovered one, matching the blue
highlight. Reuses the already-computed hoveredRequiredBy set.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Addresses PR review: place the new RunnerPool.scale_mode field just before
ext rather than mid-struct. ext stays the last init field by convention;
these config dataclasses are built with keyword args, so the positional shift
is acceptable.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

AI review gate — Cursor Bugbot found issues

  • Cursor Bugbot found issues that are not resolved (check concluded 'neutral').

Unresolved findings (1):

What to do:

  • Fix the findings and push. The reviewer re-reviews the new commit and the gate re-runs by itself.
  • Finding wrong, or reviewer stuck? Ask a human with write access who is not the PR author to approve this exact commit, then re-run the gate. Their approval stands in for the AI review (a new push needs a new approval).

Re-run the gate with “Re-run jobs” after an approval or a finished review. A push re-runs it automatically.

Drop the optional per-project rename (PROJECT_SLUG-based name + HTML_PAGE_NAME
override + get_report_page_name()). The report viewer is now always uploaded
and referenced as a single constant, Settings.HTML_PAGE_NAME = "report.html".

A fixed name keeps cross-project (downstream) links valid without carrying a
per-project page name in sync metadata: the downstream href in praktika.html
now points at /report.html unconditionally, fixing the stale/missing-object
link that the slug-based rename would have caused.

Local source file stays praktika.html; only the uploaded object name and
report URLs change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@maxknv
maxknv force-pushed the runner-disk-fast-mount branch from 4022020 to 37325d8 Compare November 25, 2026 15:04
The tune2fs -l readback in _image_test_component is wired only into the Ubuntu (ext4) config today, but tune2fs cannot run on XFS, so the unguarded check would fail the build if the test ever ran on an XFS root (AL2023). Mirror the case guard already on the bake command: assert on ext2/3/4, skip with a log otherwise.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@maxknv

maxknv commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Measured on real runners (dd fsync probe, eu-north-1)

Runner / fs fsync 4k oflag=dsync small-file create+fsync
Ubuntu ext4, default mount (no bake) ~3.0 ms/op 3.0 ms/file, 331/s
AL2023 XFS, default (bake N/A) ~1.9 ms/op 2.1 ms/file, 468/s
GHA ext4, nobarrier,data=writeback ~0.28 ms/op sub-ms

Note: AL2023 mounts /tmp as tmpfs — probes must write to the real root fs (e.g. /var/tmp), otherwise fsync looks fake-fast (~0.002 ms = RAM).

Fast-mount is ext4-only (not valid for XFS)

  • data=writeback — inapplicable: XFS never journals file data, so there is no ordered-vs-writeback mode to relax.
  • nobarrier — removed from XFS (deprecated kernel 4.10, deleted); AL2023 kernel 6.1 always flushes for log integrity.
  • tune2fs — ext2/3/4-only; errors (exit 1) on XFS (confirmed live).

So the lever helps the Ubuntu x86 pool (ext4). The AL2023 pool (arm64 + AL2023 x86) uses XFS and stays at ~1.9 ms — no mount-option fix possible (would need an ext4 root or the local-NVMe lever).

XFS safety

  • The bake command is already case-guarded to ext2/3/4 (no-op on XFS) — the AL2023 1.0.23 AMI builds clean.
  • The tune2fs -l readback test runs only in the Ubuntu (ext4) config, but was the last unguarded tune2fs; now guarded the same way (18f6a29).
  • The Ubuntu 1.0.23 build's readback test passed, confirming journal_data_writeback,nobarrier are in the ext4 superblock. Runtime dd on that pool is pending — the x86 Ubuntu runners have no SSM agent.

The fast-mount lever it proposed is now baked into the runner AMIs (ext4 only, via tune2fs); the proposal doc has served its purpose.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@maxknv
maxknv force-pushed the runner-disk-fast-mount branch from 480170d to f49bd76 Compare November 25, 2026 16:43
leshikus
leshikus previously approved these changes Nov 25, 2026

@leshikus leshikus left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good. Would be nice to have some feature which updates report.html on merge

Swap the discrete gradual/eager mode for a continuous scale_coefficient in
(0, 1]: the fraction of the outstanding demand gap the autoscaler closes each
iteration. 0.3 (default) reproduces the historical gradual ramp exactly; 1.0
covers the whole backlog at once (lowest queue wait, higher chance of transient
over-provisioning). The iteration period remains the global autoscaler schedule
(pool_autoscaler_interval_seconds, default 60s).

Validated in (0, 1] at config-build time on both RunnerPool and
PoolAutoscaler.Pool so a bad value fails the deploy.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@security-ai-gate-reviewer

Copy link
Copy Markdown

AI review gate — auto-approval withheld

The AI review gate is green, but the approver did not approve 0e2b828b: it changes paths that always require a human reviewer: .github/workflows/ignition_dispatch.yml, .github/workflows/ignition_schedule.yml (commit 90c5529 has no verified signature; commit 90c5529 has no verified signature); @praktika-gh[bot] also pushed to the branch: only the author's own pushes build on an earlier approval.

What to do: ask someone with write access who is not the PR author to approve this pull request.

History (latest 5 heads, newest first)

  • 0e2b828bb161 withheld — it changes paths that always require a human reviewer: .github/workflows/ignition_dispatch.yml, .github/workflows/ignition_schedule.yml (commit 90c5529 has no verified signature; commit 90c5529 has no verified signature); @praktika-gh[bot] also pushed to the branch: only the author's own pushes build on an earlier approval

The native review job can now submit a GitHub APPROVE review when
--enable-approve is set and the model verdict is no_issues. Adds a
dedicated GH.approve_pr helper (separate from the COMMENT-only
post_pr_review), a _apply_approve step folded into the review error
aggregation, the CLI flag, and the flag in the PR workflow command.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a4362c6. Configure here.

Comment thread praktika/ai_review.py Resolved
Comment thread praktika/ai_review.py Resolved
maxknv and others added 3 commits November 25, 2026 21:00
Broadens auto-approve to the nits_only verdict (nits are advisory, not
blocking) and gates it on not usage.exhausted, so an acknowledged
incomplete review (investigation budget exhausted) can no longer approve
the PR even with a clean verdict. Addresses the review comment on #172.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ll via state.json)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@maxknv
maxknv merged commit 903d7b5 into main Nov 26, 2026
12 of 14 checks passed

@leshikus leshikus left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good

please double check _apply_approve() does not happen, when there are human threads which block approval

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants