diff --git a/cli/src/m2_market/__pycache__/cli.cpython-312.pyc b/cli/src/m2_market/__pycache__/cli.cpython-312.pyc new file mode 100644 index 0000000..b8f3f5f Binary files /dev/null and b/cli/src/m2_market/__pycache__/cli.cpython-312.pyc differ diff --git a/cli/src/m2_market/__pycache__/output.cpython-312.pyc b/cli/src/m2_market/__pycache__/output.cpython-312.pyc new file mode 100644 index 0000000..cb525fe Binary files /dev/null and b/cli/src/m2_market/__pycache__/output.cpython-312.pyc differ diff --git a/cli/src/m2_market/apply/__pycache__/local.cpython-312.pyc b/cli/src/m2_market/apply/__pycache__/local.cpython-312.pyc new file mode 100644 index 0000000..e9ed668 Binary files /dev/null and b/cli/src/m2_market/apply/__pycache__/local.cpython-312.pyc differ diff --git a/cli/src/m2_market/apply/__pycache__/m2core_sync.cpython-312.pyc b/cli/src/m2_market/apply/__pycache__/m2core_sync.cpython-312.pyc new file mode 100644 index 0000000..06a7b0e Binary files /dev/null and b/cli/src/m2_market/apply/__pycache__/m2core_sync.cpython-312.pyc differ diff --git a/cli/src/m2_market/apply/m2core_sync.py b/cli/src/m2_market/apply/m2core_sync.py index a358eed..e9af9d2 100644 --- a/cli/src/m2_market/apply/m2core_sync.py +++ b/cli/src/m2_market/apply/m2core_sync.py @@ -17,7 +17,7 @@ _MSG = ( ) -class M2CoreSyncAdapter: +class M2CoreSyncApplyAdapter: name = "m2core-sync" def plan(self, bundle: Path, state: InstallState) -> Changeset: diff --git a/cli/tests/__pycache__/test_cli_install.cpython-312-pytest-9.1.1.pyc b/cli/tests/__pycache__/test_cli_install.cpython-312-pytest-9.1.1.pyc new file mode 100644 index 0000000..01b2939 Binary files /dev/null and b/cli/tests/__pycache__/test_cli_install.cpython-312-pytest-9.1.1.pyc differ diff --git a/indexer/src/m2_market_indexer/__pycache__/__init__.cpython-312.pyc b/indexer/src/m2_market_indexer/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..3c3b22f Binary files /dev/null and b/indexer/src/m2_market_indexer/__pycache__/__init__.cpython-312.pyc differ diff --git a/indexer/src/m2_market_indexer/__pycache__/client.cpython-312.pyc b/indexer/src/m2_market_indexer/__pycache__/client.cpython-312.pyc new file mode 100644 index 0000000..8860ebd Binary files /dev/null and b/indexer/src/m2_market_indexer/__pycache__/client.cpython-312.pyc differ diff --git a/indexer/src/m2_market_indexer/__pycache__/config.cpython-312.pyc b/indexer/src/m2_market_indexer/__pycache__/config.cpython-312.pyc new file mode 100644 index 0000000..5da27b8 Binary files /dev/null and b/indexer/src/m2_market_indexer/__pycache__/config.cpython-312.pyc differ diff --git a/indexer/src/m2_market_indexer/__pycache__/reindex.cpython-312.pyc b/indexer/src/m2_market_indexer/__pycache__/reindex.cpython-312.pyc new file mode 100644 index 0000000..caa62f6 Binary files /dev/null and b/indexer/src/m2_market_indexer/__pycache__/reindex.cpython-312.pyc differ diff --git a/indexer/tests/__pycache__/test_reindex_flow.cpython-312-pytest-9.1.1.pyc b/indexer/tests/__pycache__/test_reindex_flow.cpython-312-pytest-9.1.1.pyc new file mode 100644 index 0000000..072a837 Binary files /dev/null and b/indexer/tests/__pycache__/test_reindex_flow.cpython-312-pytest-9.1.1.pyc differ diff --git a/ledger/src/m2_ledger/__pycache__/api.cpython-312.pyc b/ledger/src/m2_ledger/__pycache__/api.cpython-312.pyc new file mode 100644 index 0000000..30a6459 Binary files /dev/null and b/ledger/src/m2_ledger/__pycache__/api.cpython-312.pyc differ diff --git a/specs/001-market-first-wedge/tasks.md b/specs/001-market-first-wedge/tasks.md index c89814e..88b32e5 100644 --- a/specs/001-market-first-wedge/tasks.md +++ b/specs/001-market-first-wedge/tasks.md @@ -50,10 +50,10 @@ published listing - [x] T010 [P] [US1] Implement tx + grant models and derived-balance queries in `ledger/src/m2_ledger/models.py` (SQLite WAL, append-only invariants, data-model.md Transaction/LicenseGrant) - [x] T011 [P] [US1] Implement X-API-Key auth (service/admin key classes) in `ledger/src/m2_ledger/auth.py` -- [ ] T012 [US1] Implement API routes `/health`, `/balance/{op}`, `/tx/install`, `/tx/refund`, `/tx`, `/license/{op}/{listing}` in `ledger/src/m2_ledger/api.py` (402/409 semantics, all-or-nothing install tx, idempotent by ref) +- [x] T012 [US1] Implement API routes `/health`, `/balance/{op}`, `/tx/install`, `/tx/refund`, `/tx`, `/license/{op}/{listing}` in `ledger/src/m2_ledger/api.py` (402/409 semantics, all-or-nothing install tx, idempotent by ref) - [ ] T013 [US1] Ledger unit + property tests in `ledger/tests/test_properties.py`: balance==fold(log) under generated sequences; no grant without tx; install atomicity; duplicate-ref 409 - [ ] T014 [US1] Dockerfile + Coolify deployment for m2-ledger on the `coolify` network in `ledger/Dockerfile` + `ledger/README.md` deploy notes; verify `GET /health` from the network -- [ ] T015 [US1] Create `market:catalog` partition and implement indexer `indexer/src/m2_market_indexer/reindex.py` + `watch.py` per contracts/catalog-index.md (registry → memory-api upsert, tenant_visibility payload, delist removal) +- [x] T015 [US1] Create `market:catalog` partition and implement indexer `indexer/src/m2_market_indexer/reindex.py` + `watch.py` per contracts/catalog-index.md (registry → memory-api upsert, tenant_visibility payload, delist removal) ### CLI (contracts/cli.md) @@ -62,11 +62,11 @@ published listing - [x] T018 [P] [US1] Registry client in `cli/src/m2_market/registry.py` (fetch listing dirs, download release bundle, verify content_hash) - [x] T019 [P] [US1] Catalog client in `cli/src/m2_market/catalog.py` (memory-api semantic query, server-side tenant filter param) - [x] T020 [P] [US1] ApplyAdapter protocol + InstallState in `cli/src/m2_market/apply/base.py` per contracts/apply-adapter.md (Changeset, plan/apply/verify/rollback, state.json read/write) -- [ ] T021 [US1] Local adapter in `cli/src/m2_market/apply/local.py`: recipe.yaml-driven file placement into agent-home, post-install checks, idempotent re-apply, rollback from backups +- [x] T021 [US1] Local adapter in `cli/src/m2_market/apply/local.py`: recipe.yaml-driven file placement into agent-home, post-install checks, idempotent re-apply, rollback from backups - [x] T022 [US1] `m2core_sync` stub adapter in `cli/src/m2_market/apply/m2core_sync.py` raising RailsNotLanded (exit 6) -- [ ] T023 [US1] `search` + `show` commands in `cli/src/m2_market/cli.py` (catalog query → table/JSON; show renders evidence/price/permissions diff) -- [ ] T024 [US1] `install` command in `cli/src/m2_market/cli.py`: the FR-005 sequence (confirm → debit → fetch → apply → verify → refund-on-failure → state → entrypoint hint) per contracts/cli.md -- [ ] T025 [US1] `wallet` command in `cli/src/m2_market/cli.py` (balance + recent tx) +- [x] T023 [US1] `search` + `show` commands in `cli/src/m2_market/cli.py` (catalog query → table/JSON; show renders evidence/price/permissions diff) +- [x] T024 [US1] `install` command in `cli/src/m2_market/cli.py`: the FR-005 sequence (confirm → debit → fetch → apply → verify → refund-on-failure → state → entrypoint hint) per contracts/cli.md +- [x] T025 [US1] `wallet` command in `cli/src/m2_market/cli.py` (balance + recent tx) - [ ] T026 [US1] CLI integration tests in `cli/tests/test_install_flow.py` against a local ledger instance + fixture registry/catalog: funded install, insufficient funds (no side effects), idempotent re-run, apply-failure refund **Checkpoint**: Scenario B/C pass end-to-end with a fixture listing (SC-003/005 held locally)