← Back to Pull requests

feat(logs): read, search and download run logs inside pipedash #179

Open
unknown opened this pull request with 441 lines diff across 5 files
View on GitHub
unknown unknown commented on Oct 26, 2026 23:53 UTC
Author

Changes


The run dialog only linked out to the provider for logs. It now has a Logs tab where users read, search and download a run's job logs without leaving Pipedash, on desktop, web and the iPhone shell. GitHub Actions is the first provider.

  • Viewer: a job list (a Select on narrow web, a Jobs list on iPhone). It opens the failed job at its first error. Steps and ##[group] blocks are collapsible sections, and ANSI colors map to theme tokens. Search is text or regex, with match-only filtering. You can move between errors (F8), use the overview ruler, copy, download, and turn on wrap or timestamps. A custom virtual scroller keeps logs with millions of lines smooth.

  • Core: LogService and a process-wide LogStore. Each job log is downloaded once, split into lines, sections and styles, and cached on disk as lz4 blocks under <data_dir>/cache/run-logs. The disk budget is 2 GiB (512 MiB on iOS), with a 30-day idle expiry. Revisions are immutable and leased while being read. Saving or removing a provider purges its logs, and shutdown cancels in-flight work.

  • Steps: step boundaries come from dialect markers (##[group]Run …, Post job cleanup.), with step start times as the fallback.

  • Plugin API: providers opt in with capabilities.logs and three methods: fetch_log_nodes, read_log (streams bytes into a LogSink) and log_dialect. GitHub uses /actions/jobs/{id}/logs. Running jobs show as pending, because GitHub serves no log until a job finishes.

  • Transports: Tauri commands and Axum routes have the same names and payloads. Web downloads stream through single-use 60 s tickets, so the API token never appears in the URL. Ticket paths are redacted from request traces.

  • Settings > Cache: a Run logs row shows the cache size and can clear it.

  • Misc: the .gitignore rule logs is now /logs, because the unanchored rule ignored src/components/logs/. The logs dialog uses a new full modal size, 96% of the window.
  • Checklist before merging:


  • I have reviewed my own code.

  • I have tested the changes (if applicable).

  • I have updated the documentation (if applicable).

  • My changes do not break any existing functionalities.
  • Anything else?


    Checks that passed:
  • cargo test --workspace

  • cargo clippy --workspace --all-targets --all-features -- -D warnings

  • cargo +nightly fmt --check

  • the CI cargo package command with K8S_OPENAPI_ENABLED_VERSION=1.32

  • bun run test: 223 pass

  • tsc, knip

  • bun run lint: no new findings
  • Perf test (cargo test -p pipedash-core --release run_logs::perf -- --ignored, 3M lines):

    | Measurement | Result |
    |---|---|
    | Ingest | 416 MB/s |
    | Page read p99 | 0.32 ms |
    | Search, literal / regex | 44 ms / 53 ms |
    | Disk | 23.6% of raw |
    | Memory growth | 43 MiB |

    Tested end to end on the web build against real GitHub:

  • A 154-line Dependabot job.

  • A 2,000,040-line job (100 MB raw). It took ~21 s to ingest, opened at the error and searched across the whole log. Download streamed 2,000,040 lines in 2.3 s.

  • Clearing the cache.

  • Ticket reuse returns 404.
  • Not tested:

  • Tauri desktop (native save dialog).

  • The iOS simulator (Dynamic Type, status-bar tap, share sheet, swipe to dismiss).

  • A running job turning from pending into its log.

  • Locking the vault during a download.
  • Open item: search once showed no results in the UI even though the backend had returned matches. I couldn't reproduce it after the viewer fixes, so the cause is unknown.

    Diff: 441 lines (+330 / -111) across 5 files Reviewer: greptile-apps[bot] Review duration: 8m
    All Vouch review confidence checks passed
    Residual risk 0.28 = Change Risk (0.45) × (1 − Review Confidence (0.38)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 441 lines diff across 5 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 80% · Reviewer familiarity: 35%
    38%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.364
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #179"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 38% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 45.3% (MEDIUM) · Higher = larger blast radius
    45.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 38% · Lower = rushed or shallow review
    38%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 28.1% · Safe to merge
    28.1%