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
{{ message }}
Repository navigation
Commit df33740
Browse filesBrowse the repository at this point in the historyBrowse files
- JSDOM focus layout (`offsetParent` and viewport-sized body bounds). Disconnected elements and `display: none` ancestors have no simulated layout; visibility and disabled checks remain intact. This does not simulate positioning or actual dimensions.
329
+
330
+
For modal timer regressions, use fake timers with `userEvent.setup({ advanceTimers: jest.advanceTimersByTime })` and advance timers inside `act`. Keep normal accessible-role queries; querying hidden dialogs or extending timeouts can mask focus-management failures.
331
+
After navigating from a modal, wait for an accessible element on the destination page, not just a test ID. Restoring background accessibility is also deferred.
Copy file name to clipboardExpand all lines: .github/instructions/output.instructions.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ When reviewing: reject any `CentralMemory` import in a non-leaf file (`pretty.py
26
26
27
27
### Sinks must use async I/O
28
28
29
-
Sink implementations must not block the event loop. Use `asyncio.to_thread()` or native async libraries for I/O operations. `FileSink` uses an `asyncio.Lock` to prevent concurrent write races.
29
+
Sink implementations must not block the event loop. Use `asyncio.to_thread()` or native async libraries for I/O operations. `FileSink` uses a `threading.Lock`inside its worker thread to prevent concurrent write races, including when one sink is reused across event loops.
30
30
31
31
When reviewing: reject synchronous `open()`, `write()`, or network calls inside a sink's `write_async`.
- Key fixtures from `tests/unit/conftest.py`: `patch_central_database`, `sqlite_instance`
30
+
- Key memory fixtures from `tests/unit/conftest.py`:
31
+
- Use `patch_central_database` for tests that access `CentralMemory` or construct targets, scorers, or attacks. Declare it explicitly even in constructor, validation, or identifier tests that do not directly query memory.
32
+
- Use `sqlite_instance` when the test needs to interact with the real isolated SQLite backend.
33
+
- Do not rely on memory or singleton state left behind by another test. Each test must declare its own memory dependency.
34
+
- When changing shared memory fixtures, install all optional dependencies with `uv sync --extra all` and run `make unit-test`. Optional component tests must also exercise fixture isolation.
31
35
- No network calls should ever happen in unit tests, but file access is okay
32
36
- Unit tests should be fast and can be run in parallel.
0 commit comments