Skip to content

Add single-process live engine runner#10

Merged
Mathews-Tom merged 4 commits into
mainfrom
feat/live-engine-runner
May 16, 2026
Merged

Add single-process live engine runner#10
Mathews-Tom merged 4 commits into
mainfrom
feat/live-engine-runner

Conversation

@Mathews-Tom

Copy link
Copy Markdown
Owner

Summary

This PR closes the first operational gap from the current development state: Augur now has a single-process runner that can drive the existing in-process extraction engine from checked-in configuration. It also aligns the detector config with the strict Pydantic schema and updates repo-facing documentation so the project is framed as a structured prediction-market signal pipeline rather than generic anomaly detection.

Changes

Engine runner

  • Adds scripts/run_engine.py as the local monolith entrypoint.
  • Loads AUGUR_CONFIG_DIR or defaults to config/.
  • Validates config/markets.toml with a strict local schema.
  • Fails fast when no active markets exist.
  • Builds the existing in-process extraction stack:
    • DuckDB store
    • detector registry
    • manipulation detector
    • cluster merge
    • in-process bus
    • context assembler
    • feature pipeline
  • Creates platform pollers only for platforms present in the active watchlist.
  • Keeps Polymarket-only operation credential-free.
  • Preserves Kalshi fail-fast behavior through KalshiPoller, which requires KALSHI_API_KEY when active Kalshi markets exist.
  • Emits canonical SignalContext JSON to stdout via augur_format.deterministic.json_feed.

Config contract

  • Updates config/detectors.toml to match DetectorsConfig field names.
  • Converts documentation-era keys such as hazard, fire_probability_threshold, top_levels, and cross_market_divergence into the strict runtime schema fields.
  • Adds a checked-in config regression test so detector config drift is caught by normal tests.

Documentation and product framing

  • Updates README.md and root package metadata to describe Augur as structured intelligence signals from prediction markets.
  • Documents the single-process runner as a current runnable surface.
  • Updates docs/operations/manual-testing.md with:
    • runner commands
    • runtime contract
    • current expected fail-fast behavior while the watchlist only contains an inactive placeholder
    • remaining known gaps

Local state hygiene

  • Adds /.cocoindex_code/ to .gitignore so local CocoIndex state remains local and cannot be accidentally committed.

Tests

  • Adds tests/signals/test_run_engine.py covering:
    • empty active watchlist failure
    • remapping platform market IDs to configured market IDs
  • Extends tests/signals/test_config.py to validate the checked-in detector config.

Validation

Ran the full local gate:

uv run ruff check .
uv run ruff format --check .
uv run mypy --strict src/
uv run pytest
uv run python scripts/export_schemas.py --check

Results:

  • ruff check: passed
  • ruff format --check: passed
  • mypy --strict src/: passed
  • pytest: 368 passed, total coverage about 86 percent
  • schema export check: passed

Runner smoke:

uv run python scripts/run_engine.py --help
uv run python scripts/run_engine.py --once
  • --help works.
  • --once fails fast as expected because config/markets.toml currently has no active markets.

Follow-up

The next branch should replace the inactive placeholder in config/markets.toml with a small Polymarket-only active watchlist, run uv run python scripts/run_engine.py --once, and verify snapshots land in data/augur.duckdb before implementing scripts/backtest.py.

@Mathews-Tom Mathews-Tom merged commit 1858250 into main May 16, 2026
2 checks passed
@Mathews-Tom Mathews-Tom deleted the feat/live-engine-runner branch May 16, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant