Skip to content

GitHub Action — Bowire PR-comment bot with delta + findings + perf #183

Closed

Description

@thomas-stegemann

Problem

Bowire runs locally on the developer's machine. When the developer pushes a PR, the reviewer sees the code diff — and nothing about the API impact. Bowire's value (regressions, security findings, perf deltas) stays invisible to reviewers. Without surfacing that on the PR, "continuous" stays aspirational.

Proposal

A GitHub Action kuestenlogik/bowire-action that:

  1. Runs bowire test against the head commit
  2. Runs bowire scan --suite=all
  3. Computes the diff vs. the base branch (schema delta, regression delta, finding delta)
  4. Posts a single PR comment with the summary:
**Bowire PR Report**

🟢 API: 2 methods added, 0 removed, 0 signature-changed
🟡 Tests: 47 passed, 2 failed (1 new failure since main)
🔴 Security: 3 new findings (1 high, 2 medium)
📈 Perf: p95 +12ms on GetUser (vs. baseline)

→ View full report: [bowire.json](artifact url)
  1. Sets PR check status accordingly (fail-on configurable)
  2. Updates the comment in place on push (not a new comment per push)

The Action runs entirely inside the runner — no callback to Bowire infrastructure, no secrets shared.

Acceptance

  • kuestenlogik/bowire-action repository in the org
  • Action runs bowire test + bowire scan + diff vs. base
  • Single PR comment, updated on each push
  • Per-section status: API delta, test results, security findings, perf delta
  • Configurable fail-on thresholds per section
  • Artifact upload of full bowire.json report
  • Sample workflow added to docs/setup/

Related

  • v2.5 — Continuous integration
  • Requires test CLI (v2.2) + scan CLI (v2.3) + schema diff (v2.4)
  • This is what makes the whole pillar story visible

Activity

  1. moved this to Backlog in Bowireon Jun 15, 2026
  2. thomas-stegemann commented on Aug 17, 2026

    @thomas-stegemann
    MemberAuthor

    Prototype landed (in-repo)

    The PR bot is prototyped in the main repo at .github/actions/bowire-pr/ (composite action) so it can stabilise against the real CLI before being split into its own kuestenlogik/bowire-action repo. Shipped on main:

    • API schema delta — new Core bowire diff (BowireSchemaDiff, a faithful C# port of the Schema-watch diff view — show what changed since last visit #185 workbench classifier) + bowire diff snapshot capture. Emits JSON or markdown, --fail-on none|breaking|any. 11 unit tests + CLI smoke, CI-green.
    • Action — runs the API / Tests / Security lanes, assembles one marker-based comment (upserted in place; falls back to the run summary when there is no PR), per-section fail-on gating, artifact upload of the full report.
    • Self-test (bowire-pr-selftest.yml, workflow_dispatch) drives the action end-to-end against a local bowire mock — verified: real discovery snapshot, valid delta JSON, bowire scan report, assembled report to the summary, all gates green.
    • Docs — docs/setup/pr-bot.md with the two-step base→head sample workflow.

    Still open

    • kuestenlogik/bowire-action repo split (deferred until the prototype settles).
    • Comment upsert validated on a live PR (only the summary path is exercised so far).
    • Perf section (p95 delta vs. baseline) — deferred to a follow-up.
  3. thomas-stegemann commented on Aug 19, 2026

    @thomas-stegemann
    MemberAuthor

    The Perf section is wired — all four report sections are now live, and the acceptance boxes above are ticked except the repo split.

    Perf without a benchmark runner. bowire test --junit already times every testcase (JUnitReport writes per-case seconds), so the latency delta is a diff over two reports the pipeline already produces. The operator points test-baseline at the base branch's JUnit exactly the way they point scan-baseline at its SARIF — no second runner, no benchmark engine, nothing new to learn.

    Two thresholds, deliberately. A test is only reported when it moves past both perf-threshold-pct (default 20) and perf-threshold-ms (default 5). The absolute floor is the point: a 2 ms test drifting to 4 ms is +100% and pure runner noise, and a comment full of those rows is a comment nobody reads. Regressions lead the table; a few improvements follow so a genuine speed-up stays visible. fail-on-perf gates the check (default never).

    Verified on a real runner, not just locally. The self-test now writes a flow against the mock, captures a baseline JUnit, and asserts the report carries the section. The assembled report from the green run:

    | Perf | 🟢 |
    ## Perf
    **Perf:** no test moved more than 20% across 1 compared test(s).
    

    — i.e. the comparison actually ran (1 compared test) rather than silently skipping, which is the failure mode a "green" check would otherwise hide.

    A real bug the unit tests could not catch. Run as a CLI the script did nothing at all: the direct-invocation guard string-built a file:// URL, producing file://C:/… against Node's file:///C:/…. It would have worked by luck on Linux runners and never on Windows. It now compares real filesystem paths, with two CLI-level tests guarding that path. 18 node tests total.

    Also fixed: the self-test only triggered on pull_request, but this repo's work lands straight on main — so every change to the action, including this one, shipped unexercised. It now triggers on push to main as well (the run above is that trigger firing).

    Remaining: the standalone kuestenlogik/bowire-action repository, tracked as #582 — an org-level decision (creating and publishing a public repo), not code. Everything else the ticket asks for is in and green.

  4. moved this from Backlog to In review in Bowireon Aug 19, 2026
  5. thomas-stegemann commented on Aug 24, 2026

    @thomas-stegemann
    MemberAuthor

    Der letzte offene Acceptance-Punkt ist erfüllt: kuestenlogik/bowire-action existiert — public, v1.0.0 getaggt mit beweglichem v1-Alias, CI grün, Release veröffentlicht.

    https://github.com/Kuestenlogik/bowire-action

    Der Comment-Upsert, den der Prototyp nie gegen eine echte PR ausgeführt hatte, ist in bowire-action#1 nachgewiesen: zwei Läufe, ein Kommentar.

    Damit ist #183 aus meiner Sicht abgeschlossen. Was noch offen ist, gehört zu #582 und nicht hierher:

    • Die Marketplace-Listung (manueller Schritt im Release-UI — API und gh bieten das Häkchen nicht).
    • Der Wechsel von build-from-source auf die veröffentlichte CLI. Blockiert, weil bowire diff am 2026-08-17 landete, der v2.4.0-Tag aber vom 2026-08-07 ist — kein veröffentlichtes Tool kennt das Kommando.
  6. thomas-stegemann commented on Aug 24, 2026

    @thomas-stegemann
    MemberAuthor

    Erledigt — 2026-08-24.

    Der letzte offene Punkt war das eigene Repo; die Action ist jetzt veröffentlicht und im Marketplace gelistet.

    https://github.com/marketplace/actions/bowire-pr-report

    Acceptance

    • kuestenlogik/bowire-action repository in the org
    • Action runs bowire test + bowire scan + diff vs. base
    • Single PR comment, updated on each push — nachgewiesen in bowire-action#1: zwei Läufe auf derselben PR, danach genau ein Kommentar. Der Prototyp hatte nur den Run-Summary-Pfad erreicht, der Upsert war bis dahin ungetestet.
    • Per-section status: API delta, tests, security findings, perf delta
    • Configurable fail-on thresholds per section
    • Artifact upload of the full report
    • Sample workflow in docs/setup/pr-bot.md

    Was unterwegs auffiel

    Der erste CI-Lauf im neuen Repo hat zwei Fehler in meinem Selbsttest aufgedeckt, die beide lautlos sind: ein nicht existierender Input (fail-on-findings statt fail-on-scan) wird von einer Composite Action nur als Warnung gemeldet, und eine getippte Output-Referenz (outputs.status statt outputs.overall-status) liefert still einen leeren String. Ohne den Selbsttest wären beide in v1.0.0 gelandet — eine Composite Action hat keinen Compiler, ihre Verdrahtung wird nur durch Ausführen geprüft.

    Offen, aber nicht hier

    Der Wechsel von build-from-source auf die veröffentlichte CLI gehört zu #582 und ist blockiert: bowire diff landete am 2026-08-17, der v2.4.0-Tag ist vom 2026-08-07 — kein veröffentlichtes Tool kennt das Kommando. Bis zum nächsten Release braucht die API-Delta-Sektion build-from-source: true; alle anderen Sektionen laufen gegen die veröffentlichte CLI.

  7. moved this from In review to Done in Bowireon Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    • Status
      Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions