You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ Detailed how-to guides for common tasks are maintained as skill files under `.gi
12
12
|`.github/skills/build.md`| Building the project (CMake configure, compile, flags) |
13
13
|`.github/skills/testing.md`| Running, filtering, and debugging unit tests |
14
14
|`.github/skills/pytest-infra.md`| Migrating tests to pytest, modifying pytest/hub infrastructure, verifying Jenkins CI results |
15
+
|`.github/skills/pr-review.md`| Opening a pull request, updating its description, replying to review comments |
15
16
16
17
If a skill file exists for the task at hand, follow its instructions precisely. New skills may be added to this folder over time — check its contents before assuming none applies.
Keep the TL;DR jargon-free. Put tables (behavior change, latency, benchmarks) in the body, never in the TL;DR.
26
+
27
+
If you **know** which Jira ticket the PR is tracking (the user told you, or you opened the ticket yourself this session), append a `Tracked on [RSDEV-1234]` line right after the TL;DR — bare text, no link:
28
+
29
+
```markdown
30
+
**TL;DR:** <1-2 sentences>
31
+
32
+
Tracked on [RSDEV-1234]
33
+
```
34
+
35
+
Only add this line when you are sure. If you only suspect a ticket is related, ask the user before adding it — never guess.
36
+
37
+
## Before Every Push — Description Audit
38
+
39
+
Re-read the PR description before `git push`. If any concrete detail in the description (iteration counts, timeouts, file paths, marker lists, behavior tables, referenced PR numbers) no longer matches what's actually on the branch, update the description in the same push (`gh pr edit <num> --body ...`).
40
+
41
+
The description and the diff must stay in sync.
42
+
43
+
## Responding to Review Comments
44
+
45
+
-**One reply per thread.** Don't summarise multiple threads in one comment.
46
+
- Cite the commit SHA that addresses the comment (`✅ Fixed in <sha>. <one-line summary>`).
47
+
- For deferred items: `⏸ Deferred — <reason>`.
48
+
- For disagreements: give a concrete reason (worked example, edge case) before declining.
49
+
- Don't auto-resolve threads — let the reviewer decide when their concern is settled.
50
+
51
+
## Handling Automated Review Bots
52
+
53
+
| Bot | How to respond |
54
+
|---|---|
55
+
|**Aikido** (`aikido-pr-checks[bot]`) | Fix and reply with commit SHA, or reply `@AikidoSec ignore: <reason>` if the suggestion is wrong or the pattern is intentional. |
56
+
|**rs-agentic-bot** (posts as a teammate) | Treat as a real reviewer: fix or defer; reply per thread. |
57
+
|**Copilot suggestions**| Apply only if they preserve intent; reply with rationale if declined. |
Copy file name to clipboardExpand all lines: .github/skills/pytest-infra.md
+20-15Lines changed: 20 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -139,43 +139,48 @@ When migrating a legacy `test-*.py` to `pytest-*.py`:
139
139
140
140
## Handling `on_fail=test.ABORT`
141
141
142
-
The legacy framework supported `with test.closure('Name', on_fail=test.ABORT):` — if that closure failed, all subsequent closures were skipped. In pytest, use the**`pytest-dependency`**plugin (already in`requirements.txt`and`plugins.py`).
142
+
The legacy framework supported `with test.closure('Name', on_fail=test.ABORT):` — if that closure failed, all subsequent closures were skipped. In pytest, use a**module-level state dict**with`pytest.skip()`.
143
143
144
-
**Pattern**: mark the prerequisite test with`@pytest.mark.dependency(scope='module')`, and each dependent test with`@pytest.mark.dependency(scope='module', depends=["prerequisite_name"])`. If the prerequisite fails oris skipped, all dependents are automatically skipped.
144
+
>**Why not`pytest-dependency`?** The plugin requires exact test-name matching, but `pytest_generate_tests` (used by `device_each`) appends parametrized suffixes like `[D455-1234567890]`. The plugin cannot match `"test_foo"` against `"test_foo[D455-1234567890]"` — no regex, glob, or prefix support exists. The module-state pattern is zero-dependency and works regardless of parametrization.
145
+
146
+
**Pattern**: the prerequisite test sets a flag in a module-level dict on success. Dependent tests check the flag and`pytest.skip()`if missing.
145
147
146
148
```python
147
-
# Prerequisite test — asserts (hard fail if condition not met), registers as a dependency
**`scope='module'`**: limits dependency resolution to the current test file, so identically-named tests in other files do not interfere.
162
-
163
-
**Parametrized tests**: when both the prerequisite and dependent tests share the same parametrization (e.g., `device_each`), `pytest-dependency` automatically matches per-parameter — `test_set_depth_control[D455-SN]`is only skipped if`test_advanced_mode_support[D455-SN]` specifically failed, notif a different device's run failed.
164
-
165
-
**Chain of ABORTs**: if a file has multiple `on_fail=test.ABORT` closures in sequence, listall prerequisite names in`depends=`:
164
+
**Chain of ABORTs**: if a file has multiple prerequisite tests in sequence, each sets its own flag. Dependents check the deepest prerequisite (which implicitly requires all prior ones to have passed):
166
165
167
166
```python
168
-
@pytest.mark.dependency(scope='module')
167
+
_module_state = {}
168
+
169
169
def test_advanced_mode_support(...): # first ABORT
The SDK no longer ships a bundled firmware blob, so `test-fw-update`**requires** a custom firmware path for the device under test. Without one it logs a warning and skips. Download a signed `.bin` from <https://dev.realsenseai.com/docs/firmware-updates>, then:
0 commit comments