{"id":47307396,"url":"https://github.com/hummbl-dev/hybrid-inference","last_synced_at":"2026-03-17T08:49:45.305Z","repository":{"id":339416271,"uuid":"1161789506","full_name":"hummbl-dev/hybrid-inference","owner":"hummbl-dev","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-19T18:57:29.000Z","size":41,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-19T19:08:34.890Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hummbl-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":"GOVERNANCE.md","roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-19T14:19:28.000Z","updated_at":"2026-02-19T18:56:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hummbl-dev/hybrid-inference","commit_stats":null,"previous_names":["hummbl-dev/hybrid-inference"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/hummbl-dev/hybrid-inference","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hummbl-dev%2Fhybrid-inference","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hummbl-dev%2Fhybrid-inference/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hummbl-dev%2Fhybrid-inference/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hummbl-dev%2Fhybrid-inference/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hummbl-dev","download_url":"https://codeload.github.com/hummbl-dev/hybrid-inference/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hummbl-dev%2Fhybrid-inference/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30619228,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T08:10:05.930Z","status":"ssl_error","status_checked_at":"2026-03-17T08:10:04.972Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-03-17T08:49:44.631Z","updated_at":"2026-03-17T08:49:45.289Z","avatar_url":"https://github.com/hummbl-dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hybrid-inference\n\nPolicy-driven hybrid inference router for local-first (Ollama) with Anthropic/OpenAI fallback paths.\n\n## v0.2.2 goals\n- Deterministic routing contract.\n- Local health gating.\n- Single heavy local inference slot.\n- EDR (Execution Decision Record) artifact emission on every request path.\n- Uncaught exception EDR fallback and atomic EDR persistence.\n\n## Quick start\n```bash\nbash scripts/bootstrap_test_env.sh\nuvicorn src.router.main:app --host 127.0.0.1 --port 8088\n```\n\n## Deterministic test bootstrap (local == CI)\n```bash\nbash scripts/bootstrap_test_env.sh\nbash scripts/run_ci_local_gates.sh\n```\n\nCI runs the same `scripts/run_ci_local_gates.sh` sequence after bootstrap to preserve local/CI parity.\n\n## EDR artifacts\nEach request writes a schema-validated EDR artifact to:\n\n`artifacts/edr/YYYY/MM/DD/\u003cdecision_core_hash\u003e.json`\n\nSchema `EDR_v1.0.0` is hash-pinned in tests to enforce immutability.\n\n## Governance\nCAES: `governance/CAES_SPEC.md` (v1.0.0, hash-pinned).\n\n## EDR replay\nReplay and verify an EDR artifact offline:\n\n```bash\nscripts/edr-replay artifacts/edr/YYYY/MM/DD/\u003cdecision_core_hash\u003e.json\n```\n\nSafety defaults:\n- Refuses replay when `side_effects != \"none\"` unless `--allow-side-effects`.\n- Refuses replay for networked providers unless `--allow-network`.\n- Uses deterministic local replay only (no external provider calls).\n- Writes replay reports to `artifacts/replay/YYYY/MM/DD/\u003cdecision_core_hash\u003e.json`.\n- Replay report schema is pinned at `schemas/replay/REPLAY_REPORT_v1.0.0.json`.\n- CI runs adversarial replay invariant gates (`tests/test_edr_replay.py`) before full suite.\n- CI enforces replay reason-code contract lock:\n  - `REFUSED`: `SIDE_EFFECTS_NOT_ALLOWED`, `NETWORK_NOT_ALLOWED`\n  - `ERROR`: `REPLAY_NOT_REPLAYABLE`, `INPUT_POINTER_MISSING`, `PROVIDER_NOT_SUPPORTED`, `EXECUTION_ERROR`\n  - `DIVERGED`: `INPUT_HASH_MISMATCH`, `OUTPUT_HASH_MISMATCH`, `DECISION_CORE_MISMATCH`, `EDR_HASH_MISMATCH`, `ENVIRONMENT_MISMATCH`\n- Operator details and remediation playbook: `docs/replay-reason-codes.md`.\n\n## Authority + lease boundary\n`/v1/chat/completions` accepts optional typed `authority`:\n\n```json\n{\n  \"issued_by\": \"ops\",\n  \"scope\": [\"chat:completions\", \"metrics:read\"],\n  \"ttl\": 60,\n  \"lease_id\": \"lease-123\"\n}\n```\n\n`scope` may be a single string or an array of strings.  \nWhen `routing_contract.authority_required` is `true`, missing/invalid authority is rejected at router boundary (`403`) and emitted as EDR failure type `authority_violation`.\n\nCI runs authority adversarial invariant gates (`tests/test_authority.py`) to guard replay-safe lease handling and strict authority validation failures.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhummbl-dev%2Fhybrid-inference","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhummbl-dev%2Fhybrid-inference","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhummbl-dev%2Fhybrid-inference/lists"}