finds.dev

fireside25a-beep/-deterministic-lead-processor

Portable C11 lead-processing engine combining deterministic business rules with OpenAI-compatible LLMs. Parses CSV leads, validates structured JSON, applies pricing and routing policies, supports retries, mock/live modes, and produces normalized JSONL output with comprehensive testing and validation.

View on GitHub

★ 1CMITupdated Jul 2026

// the take

A single-author C11 demo app that wraps an OpenAI-compatible chat completion in a deterministic validation layer for a fictional flooring/lead-intake business: the model interprets free-text inquiries, and hand-written C code owns area math, pricing, service-area checks, and routing. It's aimed at developers curious about hybrid LLM/deterministic architectures, not at anyone who needs an actual lead router.

The core idea is sound and actually executed: model output has to pass strict JSON schema validation before it can touch pricing or routing, so a malformed or creative response gets retried or routed to manual review instead of silently corrupting a quote. Area/unit extraction (square footage, metric conversion, '20 by 30 feet' parsing) is done in C rather than trusted to the model, which is the right call for anything downstream math depends on. The offline mock mode with JSONL fixtures means the whole pipeline can be tested in CI without a live key, and there's a real contract test against a local HTTP server that checks the actual libcurl request shape (bearer auth, response_format, message structure) rather than just mocking the client. For a C project touching untrusted input, it also runs AddressSanitizer/UBSan and avoids system()/popen() entirely on lead text and model output.

It's a one-domain demo (garage/flooring leads) dressed up as a general-purpose 'lead processor' — the pricing table, service-area list, and routing rules are all sample data for this one scenario, so adopting it for a real business means rewriting most of the policy layer anyway. Service-area enforcement is a flat list of city-name strings with no geocoding, which is brittle for anything beyond a demo. The build has real native dependencies (libcurl, cJSON, pkg-config) with no Windows support in the Makefile, more setup than most people will want for what is ultimately one HTTP call plus a JSON validator. And with one contributor, one star, and a README that spends more words grading its own validation runs than showing real-world use, there's no external signal yet that the architecture holds up outside the author's own test suite.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
1
Forks
0
Language
C
License
MIT
Last commit
20 Jul 2026

// nearby

If -deterministic-lead-processor isn't quite it.

All repos →