Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

fix-issue

/fix-issue

Prowadzi naprawę zgłoszonego błędu w monorepo Patrol: odtworzenie, znalezienie właściwego pakietu, poprawka bez regresji, weryfikacja i otwarcie pull requesta.

Repozytorium
patrol ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
27.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Prowadzi naprawę zgłoszonego błędu w monorepo Patrol: odtworzenie, znalezienie właściwego pakietu, poprawka bez regresji, weryfikacja i otwarcie pull requesta.

Wyzwalacze z opisu

fix issue #3101
Oryginalny opis (EN)

Workflow for fixing a reported bug in the Patrol monorepo — reproduce, locate the right package, fix without regressions, verify, and open a PR. Use when asked to fix a GitHub issue (e.g. "fix issue #3101"), investigate a reported Patrol bug, or turn a bug report into a tested PR.

Jak działa

  1. 1. Understand the issue
  2. 2. Reproduce locally
  3. 3. Fix without regressions
  4. 4. Verify
  5. 5. Changelog + PR
  6. Later (separate run): addressing review
Sekcje z nagłówków SKILL.md, w oryginale · 130 linii, 904 słów
Podgląd SKILL.md
---
name: fix-issue
description: Workflow for fixing a reported bug in the Patrol monorepo — reproduce, locate the right package, fix without regressions, verify, and open a PR. Use when asked to fix a GitHub issue (e.g. "fix issue #3101"), investigate a reported Patrol bug, or turn a bug report into a tested PR.
---

# Fixing a Patrol issue

A checklist for turning a Patrol bug report into a verified, review-ready PR.
This skill is **orchestration + repo-specific knowledge**. For canonical rules
that may change, read [`CONTRIBUTING.md`](../../../CONTRIBUTING.md) — do not
duplicate it from memory.

Work through the phases in order. Don't skip reproduction: a fix you can't
reproduce failing first is a fix you can't prove works.

## 1. Understand the issue

1. Read the issue (`gh issue view <n> --repo leancodepl/patrol`, including
   comments). Extract: exact command/API, config used, versions, and the
   expected vs actual behaviour.
2. **Don't change the Flutter/Dart SDK version** to reproduce unless the issue
   is specifically about a version. Reproduce on the versions the reporter used.
3. Map the bug to the right package under `packages/` before touching code:

   | Symptom | Package |
   |---|---|
   | `patrol test` / `patrol build` / `patrol develop`, bundle generation, CLI flags, device handling | `patrol_cli` |
   | `PatrolTester`/`$`/finders behaviour | `patrol_finders` |
   | Native automation (permissions, notifications), `PatrolBinding`, platform channels | `patrol` (+ its `android/` Kotlin & `darwin/` Swift) |
   | DevTools extension | `patrol_devtools_extension` |
   | Test run logs / reporting | `patrol_log` |
   | MCP server | `patrol_mcp` |
   | Native method contracts (generated) | edit `schema.dart`, run `./gen_from_schema` — see CONTRIBUTING |

## 2. Reproduce locally

Prefer the repo's existing fixtures over hand-built throwaway projects:

- **`dev/e2e_app`** — a ready-made Flutter app wired for Patrol. Use it as the
  target project when reproducing CLI/runtime bugs (it's the `cwd` in the
  documented VS Code / Android Studio launch configs).
- **`dev/cli_tests`** — Dart-driven CLI integration tests
  (e.g. `patrol_develop_test.dart`). A good place to add an end-to-end repro.

Only scaffold a separate minimal project when the bug needs a layout the
fixtures don't have (e.g. a pub workspace, a custom `test_directory`, paths
containing unusual characters). Keep it minimal and delete it afterwards.

### Running your local patrol_cli (the important gotcha)

Per CONTRIBUTING, two ways to run a local build:

```bash
# A) activate from the working tree as the global `patrol`
dart pub global activate --source path packages/patrol_cli
# B) run directly without activating
dart run packages/patrol_cli <command...>
```

⚠️ **`dart pub global activate --source path` snapshots the code at activation
time.** After every change to `patrol_cli`, re-run it or your `patrol` binary
still runs the old code. `dart run` (B) always uses current sources — prefer it
while iterating.

To let a teammate test a branch without checking it out:

```bash
dart pub global activate --source git https://github.com/leancodepl/patrol.git \
  --git-ref <branch> --git-path packages/patrol_cli
```

## 3. Fix without regressions

1. Read the **whole** target file and its existing tests before editing — the
   tests encode behaviour you must not break (e.g. `test_bundler_test.dart`
   pins relative-path, absolute-path, and web-bundle output).
2. Make the smallest change that fixes the root cause. Match surrounding style.
3. Follow existing conventions in the file/package — e.g. `patrol_cli` resolves
   relative paths against the **project root**, not the process CWD
   (see `TestFinder`).
4. Branch name: `fix/<short-description>` (created off `master`).

## 4. Verify

In order of strength:

1. **Unit tests** for the changed package:
   `cd packages/<pkg> && dart test test/<area>_test.dart` — then the package's
   full suite. Add a test that **fails before** your fix and **passes after**;
   cover the edge case from the issue plus the previously-working cases.
2. `dart analyze` and `dart format` on changed files (CI enforces both).
3. **Exercise the real code path** when behaviour depends on the filesystem or
   environment: a tiny harness that drives the actual classes (e.g.
   `TestFinder` → `TestBundler`) against a real `LocalFileSystem`, optionally
   with `Directory.current` set elsewhere, is stronger than in-memory tests for
   CWD/path bugs.
4. **End-to-end** with `dev/e2e_app` (or your repro) using your local CLI
   (`patrol build <platform>` / `patrol test`) to confirm the user-facing
   symptom is gone and untouched configs still work.

## 5. Changelog + PR

1. **Required:** add an entry to the changed package's `CHANGELOG.md` under
   `## Unreleased` (create that heading if missing). The number in brackets is
   the **PR number**, not the issue: `- Fix ... (#<PR>)`. The issue is linked
   from the PR description instead. Since the PR number isn't known until the
   PR exists, add the entry first, open the PR, then amend the entry with the
   real PR number.
2. Commit (`fix(<package>): <summary>`), then open the PR against `master`:
   `gh pr create --base master`. In the body, link the issue it resolves
   (e.g. `Closes #<issue>`) and summarise the change and how you verified it.
3. Note from CONTRIBUTING: the Android emulator workflows fail for outside
   contributors due to permissions and must be re-run by a maintainer — don't
   panic if those are red.

Opening the PR is the end of this workflow. **Stop here — don't wait on
review.**

## Later (separate run): addressing review

Review is **asynchronous** — an automated **Gemini Code Assist** review lands a
few minutes after the PR opens, and human reviewers later still. Don't poll or
idle waiting for it inside the same run; come back when notified (or when the
user asks to address comments). When you do:

- For each comment, first decide whether it's *correct* (check the code/flow),
  then either fix it and reply pointing at the commit, or reply explaining why
  it doesn't apply. Don't silently apply suggestions you can't justify — the
  bot is sometimes wrong.
- Read comments / reply in-thread:
  - `gh pr view <pr> --json reviews` and
    `gh api repos/leancodepl/patrol/pulls/<pr>/comments`
  - `gh api repos/leancodepl/patrol/pulls/<pr>/comments/<comment_id>/replies -f body="..."`

Wersje

RepozytoriumWynikLicencja
Ta strona · leancodepl/patrol100Apache-2.0
yonatangross/orchestkit100MIT
pytorch/pytorch100BSD-3-Clause
nvidia/nemo100Apache-2.0
boogy/iam-policy-validator100MIT
umep-dev/suews100MPL-2.0
mysticaltech/terraform-hcloud-kube-hetzner100MIT
viknesh20-20/claude-code-tool-kit100MIT
stxrmik/antigravity-plus90MIT

Migawka bazy z 13.11.2026 · wersja paczki 4bad09fe1db9 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100fix-bug
    Naprawia zgłoszony błąd w React Router na podstawie zgłoszenia GitHub: pobiera issue, znajduje reprodukcję, pisze nieprzechodzący test i implementuje poprawkę.
  • 100hatch3r-bug-fix
    Prowadzi naprawę błędu krok po kroku: diagnoza przyczyny źródłowej, minimalna poprawka i test regresji.
  • 96fix-a-bug
    Zleca agentowi Rush w chmurze odtworzenie błędu, jego naprawę i pull request z testem na podstawie zgłoszenia lub logu.
  • 100workflow-fix-and-ship
    Prowadzi jeden cykl naprawy błędu: triage, odtworzenie, debugowanie, test regresji, poprawka, kontrola na żywo, pull request i opcjonalna weryfikacja wdrożenia.
  • 100acp-bug-fix
    Prowadzi przez naprawę błędu: odtworzenie, izolacja, najmniejsza poprawka i weryfikacja, zamiast zgadywania przyczyny i łatania kodu na chybił trafił.
  • 100dx-bug-all
    Prowadzi pełny przepływ pracy nad błędem ADO w jednym poleceniu: triage, odtworzenie w przeglądarce, poprawka i pull request.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.