Written inline after two headless workers died on API errors. Tests caught a
real cross-slice bug: ledger grants stored the full install ref as listing_id,
breaking GET /license/{op}/{listing} — fixed by parsing the listing prefix per
the ref convention in contracts/ledger-api.md. Also pinned the indexer test's
schema path (venv-installed package resolved outside the repo) — its earlier
pass was vacuous without jsonschema installed. 27 tests green.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
T013 worker found record_install violating CHECK(amount>0) when platform_pct
rounds cut or seller_amount to zero (unhandled IntegrityError -> HTTP 500).
Fixed: skip zero rows, grant references the paying tx; regression test added.
9 ledger tests green.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Verified on master: 14 tests green (schemas+cli+indexer); ledger API exercised
end-to-end via TestClient (grant admin-only, install 200/409/402, refund
restores balance, auth 401); adapter factory resolves local + raises
RailsNotLanded on the stub.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Registry (Forgejo) + memory-api clients under m2_market_indexer.client, with
memory-api paths/creds as env-overridable constants (config.py). reindex.py
drops market:catalog and rebuilds from published listings on main, skipping
schema-invalid ones. watch.py polls the registry tip commit against a cached
state.json and upserts changed/new published listings, deletes delisted ones.
Rail-independence is the plan's spine: fedlearn rails verified NOT landed
(no m2/m2-core, no capture/curator CLIs), so the wedge builds against frozen
interfaces — m2/market-registry as registry of record, ApplyAdapter seam with
local adapter now / m2core-sync stub, schemas frozen here with a fedlearn
coordination note. Constitution check passed (1 justified deviation).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Working title m2-market. Seeds: unified concept paper (work store, Solutions,
credits, Solution Scout, cargstore-as-storefront) and a verified map of how
m2-gpt (bifrost gateway, tenancy/metering), agent.memory.system (memory-api/
Qdrant/BGE-M3), and the m2o Coolify fleet (Hermes primary agent, herdr, RDP,
openclaw-open) actually connect. specs/ awaits discovery output.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>