Current section
Files
Jump to
Current section
Files
rebar.config
%% -*- mode: erlang -*-
%% rebar3 configuration for hecate_om
{erl_opts, [debug_info, warnings_as_errors]}.
{deps, [
{macula, "~> 10.0"},
{cowboy, "~> 2.12.0"},
{jsx, "~> 3.1.0"},
%% Pulled in so hecate_om_store can wire CMD/PRJ services
%% canonically (reckon_db_sup:start_store +
%% evoq_store_subscription:start_link). Services that don't
%% use a store (e.g. producer-only clients) inherit these
%% deps but pay only image-size cost; nothing starts unless
%% the service module exports store_id/0 + data_dir/0.
{reckon_db, "~> 5.4"},
{evoq, "~> 1.21"},
{reckon_evoq, "~> 2.6"},
%% Pulled in so hecate_om_read_model can open a barrel_docdb-backed
%% read-model store (the persistent, queryable replacement for a
%% service's own hand-rolled ETS projections). Same "everyone pays,
%% only starts if declared" shape as the reckon_db line above; note
%% this one carries a real native cost too (rocksdb's C++ build), it
%% is not a free/pure-Erlang dep. Only barrel_docdb, not the full
%% barrel/barrel_vectordb umbrella — a service that wants vector or
%% hybrid search in its read model adds that itself, same as
%% hecate-rag does today.
{barrel_docdb, "~> 1.3"}
]}.
{project_plugins, [
rebar3_hex,
rebar3_ex_doc,
rebar3_lint
]}.
%% meck: test-only, used across test/ to stand a real macula_client
%% pool in for hecate_om:mesh_handles/0, so outcomes are genuine SDK
%% results without needing hecate_om_identity's own seed config.
{profiles, [
{test, [
{deps, [
{meck, "~> 0.9"}
]}
]},
%% test_live/*.erl hit a real demo-fleet station
%% (station-de-frankfurt.macula.io) over the network -- genuinely
%% valuable (they've caught three real bugs no unit test could
%% have), but NOT safe as an unconditional CI gate: the demo fleet
%% is documented, disposable dev infra with no uptime guarantee, so
%% a station blip must never block an unrelated PR. `test/` is
%% rebar3's own default eunit/ct discovery path, so the safe
%% default -- a new test file is part of the always-run, CI-gated
%% suite unless someone deliberately puts it in test_live/ -- comes
%% from directory placement alone, not a maintained exclusion list
%% that can silently go stale as files are added. Run explicitly:
%% rebar3 as live_test eunit --dir test_live
{live_test, [
{extra_src_dirs, ["test_live"]}
]}
]}.
%% Elvis. The org runs a focused ruleset that targets structural smells rather
%% than the full erl_files set: deep nesting (HARD limit, one meaningful level),
%% nested try/catch, and if-expressions (we pattern-match clauses instead). Run
%% via `rebar3 lint`. hecate_om is a flat lib (src/), not an umbrella.
{elvis, [
{rulesets, #{
macula_min => [
{elvis_style, no_deep_nesting, #{level => 2}},
{elvis_style, no_nested_try_catch, #{}},
{elvis_style, no_if_expression, #{}}
]
}},
{config, [
#{files => ["src/**/*.erl"], ruleset => macula_min}
]}
]}.
%% The macula + reckon-db stacks ship to hex WITHOUT debug_info (NIF-heavy
%% libs), so dialyzer can't read their Core Erlang ("Could not get Core
%% Erlang code for ...") and hard-fails on OTP 28. Exclude them from the PLT
%% + analysis; keep the well-behaved deps (cowboy/jsx/ranch) so handler +
%% JSON call sites still type-check. hecate_om's own modules are analysed.
{dialyzer, [
%% no_unknown: the excluded deps' functions (macula:*, reckon_db_*, evoq_*)
%% are necessarily "unknown" once their debug_info-less apps are excluded;
%% suppress those notes while still analysing hecate_om's own code.
%%
%% no_undefined_callbacks: this module also implements three macula
%% behaviours (macula_publisher, macula_feeder, macula_download).
%% `no_unknown' only covers unknown-function/type warnings; "callback
%% info about the X behaviour is not available" is tagged
%% ?WARN_UNDEFINED_CALLBACK internally (dialyzer_behaviours.erl), a
%% distinct warning class -- NOT the same as `no_behaviours', which
%% instead silences ?WARN_BEHAVIOUR and left this warning showing
%% (verified directly against dialyzer 5.4's source before picking
%% this option). Emitted once the behaviour's own defining module is
%% excluded from the PLT above. Confirmed pre-existing at macula
%% 10.0.0 too (not introduced by the 10.10.0 bump); the behaviours'
%% actual -callback specs are unchanged and correct in macula's
%% source -- this is purely a consequence of excluding a
%% debug_info-less dep.
{warnings, [no_unknown, no_undefined_callbacks]},
{exclude_apps, [
macula, macula_envy, macula_mdns,
reckon_db, reckon_evoq, reckon_gater, evoq,
khepri, ra, horus, aten, seshat, gen_batch_server,
gproc, msgpack, any
]}
]}.
{shell, [
{apps, [hecate_om]}
]}.
{hex, [
{name, hecate_om},
{doc, #{provider => ex_doc}},
{licenses, ["Apache-2.0"]},
{links, #{
<<"GitHub">> => <<"https://github.com/hecate-services/hecate-om">>
}},
{description, "Hecate-over-mesh: shared substrate for hecate-services/hecate-* daemons"}
]}.
{ex_doc, [
{source_url, <<"https://github.com/hecate-services/hecate-om">>},
{extras, ["README.md", "CHANGELOG.md", "LICENSE",
"guides/service_anatomy.md",
"guides/mesh_native_services.md",
"guides/identity_model.md",
"guides/container_deployment.md"]},
{main, "README.md"}
]}.