Migration identity#
- Canonical identifier:
S06.2(GitHub issue type: subtask). - Legacy identifier:
C06.2(retained asold_identifier). - Parent epic:
E06. - Milestone:
M1 — IntentGuard Weekend MVP.
Objective#
Load one immutable transformer artifact at startup and implement health plus accepted/abstained prediction responses using its persisted threshold.
Rationale#
Serving parity and readiness must be tied to the exact evaluated artifact.
Parent identifier#
E06.
Source task#
T-006.
Traceability#
Primary: FR-006, FR-007, AC-006, AC-007, AC-009. Secondary: FR-008, AC-010.
Prerequisites#
C06.1 contract stable; U04 artifact and U05 evaluation identity available.
Likely files#
src/intentguard/predictor.py, src/intentguard/api.py, tests/integration/test_api.py, tests/unit/test_artifacts.py.
Implementation boundary#
Single-process read-only inference; no training, threshold changes, background mutation, or external state.
MUST scope#
Startup load/failure, health readiness/artifact ID, tokenization parity, deterministic argmax/tie rule, confidence, threshold comparison, accept/abstain response.
Explicit non-goals#
Batching, queue, database, dynamic artifact swap, mock-only production path, or cloud serving.
Acceptance criteria#
Health reflects artifact readiness; accepted and abstained fixtures return contract-compliant 200 responses; invalid artifact startup fails honestly; artifact/threshold identity matches U05.
Validation commands#
uv run pytest tests/integration/test_api.py tests/unit/test_artifacts.py -q.
Expected evidence#
Health, accept, abstain, startup-failure, and serving-parity test output with artifact ID.
Fallback and status consequence#
Deterministic predictor is Mocked and test/degraded-only. Without the real artifact path, U06 fails strict MVP.
Stop condition#
Stop for artifact mismatch, threshold mutation, training at startup, nondeterministic ties, or misleading readiness.
Definition of ready#
Schema, artifact, preprocessing, request-ID, and tie rules are frozen.
Definition of done#
FR-006/007 and AC-006/007/009 pass for the real artifact implementation.
Labels#
type:subtask, priority:MUST, area:api
Estimate#
1.0 hour.