feat: add wizard and pipeline stubs

This commit is contained in:
pyr0ball 2026-03-25 11:09:40 -07:00
parent e09622729c
commit 56042dffba
5 changed files with 65 additions and 0 deletions

View file

@ -0,0 +1,3 @@
from .staging import StagingDB
__all__ = ["StagingDB"]

View file

@ -0,0 +1,26 @@
"""
SQLite-backed staging queue for CircuitForge pipeline tasks.
Full implementation deferred stub raises NotImplementedError.
"""
from __future__ import annotations
from typing import Any
class StagingDB:
"""
Staging queue for background pipeline tasks (search polling, score updates, etc.)
Stub: raises NotImplementedError until wired up in a product.
"""
def enqueue(self, task_type: str, payload: dict[str, Any]) -> None:
"""Add a task to the staging queue."""
raise NotImplementedError(
"StagingDB.enqueue() is not yet implemented. "
"Background task pipeline is a v0.2+ feature."
)
def dequeue(self) -> tuple[str, dict[str, Any]] | None:
"""Fetch the next pending task. Returns (task_type, payload) or None."""
raise NotImplementedError(
"StagingDB.dequeue() is not yet implemented."
)

View file

@ -0,0 +1,3 @@
from .base import BaseWizard
__all__ = ["BaseWizard"]

View file

@ -0,0 +1,18 @@
"""
First-run onboarding wizard base class.
Full implementation is net-new per product (v0.1+ for snipe, etc.)
"""
from __future__ import annotations
class BaseWizard:
"""
Base class for CircuitForge first-run wizards.
Subclass and implement run() in each product.
"""
def run(self) -> None:
"""Execute the onboarding wizard flow. Must be overridden by subclass."""
raise NotImplementedError(
"BaseWizard.run() must be implemented by a product-specific subclass."
)

15
tests/test_stubs.py Normal file
View file

@ -0,0 +1,15 @@
import pytest
from circuitforge_core.wizard import BaseWizard
from circuitforge_core.pipeline import StagingDB
def test_wizard_raises_not_implemented():
wizard = BaseWizard()
with pytest.raises(NotImplementedError):
wizard.run()
def test_pipeline_raises_not_implemented():
staging = StagingDB()
with pytest.raises(NotImplementedError):
staging.enqueue("job", {})