circuitforge-core/tests
pyr0ball 22bad8590a fix(tasks): fix VRAM accounting race, lock scope, type annotations
- C1: Remove _reserved_vram decrement from _scheduler_loop reaper; sole
  responsibility now belongs to _batch_worker's finally block, eliminating
  the double-decrement race that could drive _reserved_vram negative.
- C2: Move TaskScheduler construction (including VRAM detection httpx call)
  outside _scheduler_lock in get_scheduler(); lock is now only held for the
  final singleton assignment, preventing 2s lock contention on first call.
- I1: Add RunTaskFn type alias (Callable[...]) and use it in __init__ and
  get_scheduler() instead of bare Callable.
- I2: Replace namedtuple TaskSpec with typed NamedTuple class.
- I3: Parameterize _queues annotation as dict[str, deque[TaskSpec]].
- I4: Wrap _queues read in start() with self._lock.
- I5: Replace time.sleep() ordering assertion in test_vram_budget_blocks_second_type
  with event-based synchronization using type_a_started/type_b_started events.
- M2: Use sqlite3.connect() as context manager in _load_queued_tasks.
- M3: Strengthen weak assertion in test_enqueue_returns_false_when_queue_full.
- M4: Add test_reserved_vram_zero_after_task_completes to catch C1 regression.
2026-03-31 09:15:09 -07:00
..
test_resources test(resources): add integration tests for full lease/eviction cycle 2026-03-30 22:37:06 -07:00
test_tasks fix(tasks): fix VRAM accounting race, lock scope, type annotations 2026-03-31 09:15:09 -07:00
__init__.py feat: scaffold circuitforge-core package 2026-03-25 11:02:26 -07:00
test_config.py feat: add config module and vision router stub 2026-03-25 11:08:03 -07:00
test_db.py feat: add db base connection and migration runner 2026-03-25 11:03:35 -07:00
test_llm_router.py feat: add LLM router (extracted from Peregrine) 2026-03-25 11:06:29 -07:00
test_stubs.py feat: add wizard and pipeline stubs 2026-03-25 11:09:40 -07:00
test_tiers.py feat: add generalised tier system with BYOK and local vision unlocks 2026-03-25 11:04:55 -07:00