# Darano Refactoring Task Tracker This is the authoritative execution tracker for the refactor. Work is performed sequentially, with no more than one task marked `STARTED` at a time. ## Status rules | Status | Meaning | |---|---| | `TODO` | Ready or waiting on an earlier task. | | `STARTED` | The single task currently being executed. | | `DONE` | Implemented and verified against its acceptance checks. | | `FAILED` | Attempted but not completed; failure evidence and a follow-up task must be recorded. | | `CHANGED` | The task or scope changed after it was recorded; the reason must be retained. | ## Scope | ID | Status | Task | Acceptance check / note | |---|---|---|---| | S001 | `DONE` | Read root `AGENTS.md`, `REFACTORING-PLAN.md`, and RTK instructions. | Governing instructions incorporated into the tracker. | | S002 | `CHANGED` | Refactor every repository originally listed in the plan. | Scope changed: `ui`, `docs`, and `DevOps` are excluded; new `GL` is included by user request. | | S003 | `CHANGED` | Define active repositories. | Active scope changed to `api`, `auth`, `wallet`, `AdminPanel`, `proto`, and `GL`. | | S004 | `DONE` | Create `feat/refactor-v1` in every active repository. | Branch exists and is checked out in all six active repositories. | | S005 | `DONE` | Restore excluded repositories after the scope change. | `ui` is on `stage`, `docs` is on `dev`, and `DevOps` is on `m2`; their temporary refactor branches were removed without changing their files. | ## Phase 0 — Baseline and safety | ID | Status | Task | Acceptance check / note | |---|---|---|---| | B001 | `DONE` | Audit active repositories and reconcile plan claims with actual code. | Findings recorded in `REFACTORING-AUDIT.md`, including corrected config and connection-lifecycle claims. | | B002 | `DONE` | Record toolchain and dependency baselines. | Versions and committed dependency sources recorded in `REFACTORING-AUDIT.md`; no upgrades performed. | | B003 | `DONE` | Run `proto` baseline checks. | Build/lint pass; existing format differences and missing generation plugins recorded; active tree and binary preserved. | | B004 | `DONE` | Run `auth` baseline checks. | Generation, tests, and build pass in a clean temporary clone; generated stubs are reproducible. | | B005 | `DONE` | Run `wallet` baseline checks. | Generation is reproducible; Redis lock test and build pass serially with no diff. | | B006 | `DONE` | Run `api` baseline checks. | Proto/Swagger outputs are reproducible; tests and full build pass with no diff. | | B007 | `DONE` | Run `AdminPanel` baseline checks. | System/compile/migration checks pass; zero-test Debug Toolbar failure and deploy warnings recorded. | | B008 | `DONE` | Produce the baseline report and lock the first migration slice. | Baseline and exact `C001` compatibility-facade migration are documented in `REFACTORING-AUDIT.md`. | ## Phase 1 — Configuration standardization | ID | Status | Task | Acceptance check / note | |---|---|---|---| | C001 | `DONE` | Refactor `auth` config loading into `infrastructure/config`. | Koanf loader/facade tests, race tests, generation, full tests, and build pass; committed as `29b7e07`. | | C002 | `DONE` | Replace `auth` global config reads with constructor injection. | No global/legacy reads remain; tests, race tests, generation, tidy, and build pass; committed as `1bd5559`. | | C003 | `DONE` | Refactor `wallet` config loading into `infrastructure/config`. | Fig defaults and all five configs verified; tests/race/build pass; committed as `7958530`. | | C004 | `DONE` | Replace `wallet` global config reads with constructor injection. | Config is injected through commands, services, repositories, use cases, adapters, cron, logger, and Stellar; the legacy facade is removed; full tests/race/vet/build pass; completed in the series ending at `4d192a6`. | | C005 | `DONE` | Move `api` config loading into `infrastructure/config`. | Pure koanf/TOML loading and baked-in defaults are preserved under `infrastructure/config`; loader tests pass; completed in `44d56d3`. | | C006 | `DONE` | Replace `api` global config reads with constructor injection. | Command, logger, middleware, handlers, services, Swagger, profiling, and clients receive explicit config; no legacy global reads/imports remain; tests/race/vet/build pass; completed in `44d56d3`. | ## Priority workstream — General Ledger (`GL`) | ID | Status | Task | Acceptance check / note | |---|---|---|---| | L001 | `DONE` | Define GL invariants, transaction mapping, failure semantics, and service boundary. | `GL/DESIGN.md` defines the append-only double-entry model, mappings, outbox delivery, controlled failover modes, and gRPC ownership; committed as `1863de1`. | | L002 | `DONE` | Add backward-compatible internal GL protobuf contracts. | Added isolated `ledger.v1` append, event, query, balance, health, and replay contracts; Buf format/lint/build pass; committed as `b4bb506`. | | L003 | `DONE` | Scaffold `GL` as an independent Go gRPC service. | Added generated consumers, explicit composition, pure koanf config, health RPC, bounded graceful shutdown, and tests; generation/test/race/vet/build pass; committed as `b1e0b01`. | | L004 | `DONE` | Implement GL PostgreSQL persistence and migrations. | Exact fixed-point domain values, transactional idempotent append, per-asset seal checks, immutable tables/triggers, migrations, and repository tests pass; committed as `0b3eaa0`. | | L005 | `DONE` | Implement GL application use cases and gRPC adapters. | Append/event/query/balance/replay RPCs, canonical hashes, exact reversals, status mapping, persistence queries, and tests pass; committed as `76905ab`. | | L006 | `DONE` | Add a wallet-owned ledger port and GL gRPC adapter. | Wallet owns transport-neutral journal/event types; adapter maps them to generated GL messages with deadlines/TLS options and tests; committed as `9d91f8f`. | | L007 | `DONE` | Add a durable wallet outbox for ledger delivery. | Transactional enqueue, locked claiming, stale recovery, retry/backoff, quarantine/replay, dispatcher, and commit/rollback tests pass; committed as `379dbc2`. | | L008 | `CHANGED` | Integrate ledger recording into every wallet transaction path. | Scope split after implementation: all Wallet-owned deposit, withdrawal, transfer, buy, redeem, commission, market, IPG, stream, lock/release, and lifecycle paths are mapped and dispatched (`ff31c87`, `d1aa339`); AdminPanel direct writes remain under `P006`/`P008`. | | L009 | `DONE` | Implement reconciliation and disaster-read tooling. | Read-only journal integrity scans, external settlement evidence comparison, duplicate detection, account/balance reconstruction, and explorer reads are implemented and tested; commits `3f5fd86`, `b14c5e2`, and `d5c9b33`. | | L010 | `DONE` | Run outage, replay, ordering, concurrency, and recovery verification. | Replay/idempotency, rollback, ordering, conservation, concurrent load scenarios, and recovery behavior are covered by GL tests/load tests; full tests/race/vet/build pass. | ## Priority workstream — Publisher-backed ICO purchases | ID | Status | Task | Acceptance check / note | |---|---|---|---| | I001 | `DONE` | Map the current `CalcBuyAsset`, `BuyAsset`, role/permission, market-order, and settlement paths. | Compatibility boundary and exact market-owned implementation are recorded in `REFACTORING-AUDIT.md`. | | I002 | `DONE` | Add the `token-publisher` auth role and expose stable role keys in IAM. | Additive proto committed as `2d7d3ff`; idempotent custom-role bootstrap and stable role-key tests committed as `7c3b3b6`; auth tests/race/build pass. | | I003 | `DONE` | Add a backward-compatible publisher ICO order contract and persistence linkage. | Additive proto committed as `286b8e5`; role-gated ICO sell-order designation and agreement maker linkage committed as `25d0f03`. | | I004 | `DONE` | Refactor `CalcBuyAsset` to quote against the publisher's live sell order. | Market selects the best live publisher order, verifies the publisher role and remaining volume, calculates taker pricing, and wallet delegates; committed as `5a0f3d7`. | | I005 | `DONE` | Refactor `BuyAsset` to create the user taker side and invoke the market settlement path. | Claim-once agreement, taker creation, maker-wide serialization, fresh-state checks, shared `settleOrder`, and synchronous hashes committed as `ef2e4ae`. | | I006 | `DONE` | Verify publisher-backed ICO authorization, limits, quoting, settlement, ledger, and regressions. | Publisher/order/volume and claim tests pass; proto lint/build, reproducible generation, full auth/wallet/api tests, race tests, and builds pass; verification is `3555a5f`, with deterministic best-price selection corrected in `0d7c820`. | ## Priority workstream — Transaction event pipeline | ID | Status | Task | Acceptance check / note | |---|---|---|---| | E001 | `DONE` | Map every transaction write, existing RabbitMQ code, GL outbox, transaction consumer, and alert boundary. | All transaction inserts/updates converge in the PostgreSQL transaction repository; direct AMQP publishing is legacy and inactive; the durable DB outbox is the required publication boundary. | | E002 | `DONE` | Define transaction event identity, per-type topics, durable outbox, inbox, and deadbox persistence. | All 17 enum values have unique topics; transaction ID is the event identity; atomic outbox, inbox claim states, and deadbox models/repositories are tested and committed as `5dfb223`. | | E003 | `DONE` | Replace the legacy AMQP channel wrapper with Watermill publisher/subscriber adapters. | Application code depends only on transport-neutral ports; AMQP connection ownership is centralized and can be replaced by another Watermill backend; full Wallet tests pass in `25fdb37`. | | E004 | `DONE` | Add per-transaction-type handlers with idempotent inbox processing. | Every declared transaction type has a channel; duplicate delivery cannot repeat processing; pending executable transactions use the existing transaction processor; tests/race tests pass in `951cd02`. | | E005 | `DONE` | Add retry, success notification, and deadbox routing. | Handler errors retry with bounded backoff; successful handling notifies alert; exhausted messages enter a persistent deadbox with transaction/event/error metadata; tests/race tests pass in `c9a9101`. | | E006 | `DONE` | Integrate dispatcher/router lifecycle and verify the full event pipeline. | Wallet-mode-only startup/shutdown is bounded; outbox recovery, duplicate delivery, all 17 per-type routes, retry, deadbox, Alert success, generation, tests, race tests, vet, and build pass in `b5784b7`. | ## Priority workstream — Go 1.26 toolchain | ID | Status | Task | Acceptance check / note | |---|---|---|---| | T001 | `DONE` | Inventory active Go modules, builders, and version pins while excluding docs, DevOps, and UI. | Four Go modules found; API/Auth/Wallet builders already use the official Go 1.26 Bookworm image; GL has no Dockerfile. | | T002 | `DONE` | Upgrade API module metadata to Go 1.26 and verify its existing Docker builder. | Generation, tests, vet, and native build pass in `fb6ad38`; Docker proxy default changed in `ed8da2f`; Dockerfile check passes. | | T003 | `DONE` | Upgrade Auth module metadata to Go 1.26 and verify its existing Docker builder. | Generation, tests, vet, and native build pass in `b2d6686`; Docker proxy default changed in `736a716`; Dockerfile check passes. | | T004 | `DONE` | Upgrade Wallet module metadata to Go 1.26 and verify its existing Docker builder. | Generation, tests, full race tests, vet, and native build pass in `f5243a8`; Docker proxy default changed in `fc96120`; Dockerfile check passes. | | T005 | `DONE` | Upgrade GL module metadata to Go 1.26 and add its missing Go 1.26 Dockerfile. | Scoped upgrade and new multi-stage image committed in `ce5f8b4`; Dockerfile check passes. Current-tree build validation changed because separate uncommitted GL explorer work is missing generated components. | | T006 | `DONE` | Perform cross-repository version and clean-tree audit. | All four active Go modules and builders declare Go 1.26; all six active repositories use `feat/refactor-v1`; unrelated GL work and the known proto binary remain preserved. | | T007 | `DONE` | Standardize in-scope Go Docker builders on the Darano Go proxy. | All four builders default to `https://go.reg.darano.ir`; Dockerfile checks pass. A cold API image build was stopped after repeated delayed proxy 404s for historical transitive metadata; no public fallback was added. | | T008 | `DONE` | Execute full Docker image builds for every in-scope Go service. | GL passes and produced image `sha256:717c75dfa91f843acdb8d56b4dd111224e5ee45d060dcd4731e5d472ff2c8f69`; API, Auth, and Wallet are blocked in `go mod download` by repeated 300-second `504 Gateway Timeout` responses from `go.reg.darano.ir` for `google.golang.org/api` metadata. | | T009 | `DONE` | Add Gitea CI/CD configuration to GL. | Seven action/workflow YAML files parse successfully; the exact buildx action produced both GL OCI tags using the mandated proxy; committed as `675def5`. | | T010 | `DONE` | Commit outstanding workspace work and centralize root Markdown files in `dev-procfile` with root symlinks. | Pending work committed in DevOps (`665fd6b`), docs (`2c49a92`), Kuknos Node scripts (`c114c13`), and proto (`c778fda`); all eight root Markdown paths resolve through relative symlinks to tracked files in `dev-procfile`. | | T011 | `DONE` | Document commands for cloning the complete Darano workspace on another machine. | `README.md` now has copy-paste commands for all 12 repositories with configured origins, pins the current branches, recreates all eight root Markdown symlinks, and identifies `private-chain` as lacking a clone URL. | | T012 | `DONE` | Push every committed project branch required for cross-machine continuation. | All 12 top-level repositories with configured origins are synchronized; AdminPanel, Auth, and Proto refactor branches now have upstreams; `dev-procfile` uses SSH for non-interactive access; `private-chain` remains local because it has no remote. | ## Phase 2 — `auth` architecture | ID | Status | Task | Acceptance check / note | |---|---|---|---| | A001 | `DONE` | Map every auth RPC to business operations and dependencies. | Method-level migration map is recorded in `REFACTORING-AUDIT.md`; completed on `2026-08-30`. | | A002 | `DONE` | Introduce auth domain entities, value objects, errors, and repository ports. | Added pure Auth entities/value objects, domain errors, and inward-facing repository/cache ports with no gRPC, GORM, Redis, or framework imports; committed as `32f182b`/`d292822`. | | A003 | `DONE` | Move auth persistence and Redis implementations into infrastructure. | PostgreSQL and Redis implementations now live directly under `infrastructure`; legacy implementation packages and the unused Mongo placeholder are removed; full tests/race/vet/build pass. | | A004 | `DONE` | Extract OTP application use cases and thin gRPC adapters. | OTP primitives, persistence/provider adapters, runtime/template wiring, and thin gRPC registration adapters are in place; full Auth tests pass. | | A005 | `DONE` | Extract authentication/JWT application use cases and adapters. | Token policies, JWT verification, cached/persistent session reads, and session writes are extracted and runtime-wired while preserving access/refresh expiry semantics. | | A006 | `DONE` | Extract identity and permission use cases and adapters. | Permission policy/read paths and identity storage, validation, and external verification boundaries are extracted/runtime-wired; full tests and vet pass. | | A007 | `DONE` | Replace auth bootstrap with explicit dependency composition. | Auth bootstrap constructs a typed dependency graph for OTP, JWT/session, permission, and identity boundaries; full tests and vet pass. | | A008 | `DONE` | Remove superseded auth packages and compatibility shims. | Removed the legacy constructor and all runtime nil/fallback branches superseded by explicit OTP, JWT/session, permission, and identity dependencies; full tests/race/vet pass. | | A009 | `DONE` | Audit and remove auth-side federation coupling. | Confirmed federation has no live Auth responsibility and removed the commented/dead wallet federation client; identity remains the owner of identity and national-ID data. | ## Phase 3 — `wallet` architecture | ID | Status | Task | Acceptance check / note | |---|---|---|---| | W001 | `DONE` | Map wallet, market, alert, internal-wallet, cron, stream, DB, Redis, queue, and Stellar dependencies. | Process/operation-family map, repository ownership, active queue topology, peer/provider dependencies, Stellar coupling, and migration order are recorded in `REFACTORING-AUDIT.md`. | | W002 | `DONE` | Introduce wallet domain entities, value objects, errors, and repository ports. | Added transport/persistence-independent wallet entities, filters, value objects, domain errors, repositories, cache/UoW, blockchain, identity, notification, PSP, and event ports; focused/full tests and focused vet pass. | | W003 | `DONE` | Move PostgreSQL, Redis, RabbitMQ, external client, and Stellar adapters into infrastructure. | PostgreSQL/Redis, RabbitMQ Watermill, external service, and Stellar/Horizon implementations are infrastructure-owned; legacy implementation imports are removed; full tests, race tests, vet, and build pass. | | W004 | `DONE` | Extract read-only wallet use cases and gRPC adapters. | Asset, commission, network, price, health, balance, check-balance, transaction-list, asset-catalog, and blockchain-balance reads delegate through `application/walletread`; protobuf conversion and error mapping remain compatible. Wallet-balance synchronization is an explicit mutation deferred to later wallet work. | | W005 | `DONE` | Extract wallet initialization and asset/trustline use cases. | `application/walletinit` owns identity/key/trustline policies and orchestration; wallet and trustline-transaction persistence is atomic and shared unit-of-work finalization propagates commit/rollback failures. | | W006 | `DONE` | Extract deposit, withdrawal, and transaction use cases. | Deposit, withdrawal, transfer, settlement-status, balance coordination, locking, idempotent event/outbox, and failure-state behavior are application-owned. Post-settlement fulfillment failures are persisted; the active PSP exposes no reversal operation to call. | | W007 | `DONE` | Extract market use cases and adapters. | Pricing, validation, order construction/lifecycle, cancellation release, contract policy, and settlement transitions use application services; settlement is synchronous and persists failures deterministically. | | W008 | `DONE` | Extract alert use cases and adapters. | Alert validation/presentation and context-aware email retry/SMS delivery are application-owned; gRPC is a thin asynchronous delivery adapter. | | W009 | `DONE` | Extract internal-wallet use cases and adapters. | `application/walletlock` owns load/mutate/save/journal workflow; gRPC retains transaction scope and protocol error mapping through injected persistence/ledger ports. | | W010 | `DONE` | Separate cron and stream bootstrap from business operations. | Cron and stream have dedicated process composition; stream payment filtering/idempotency/locking/transaction construction is application-owned, and cron receives only its required dependencies. | | W011 | `DONE` | Replace wallet bootstrap with explicit dependency composition. | Wallet, market, alert, internal-wallet, cron, and stream use explicit named dependency profiles; legacy generic strict/safe setup entry points are removed. | | W012 | `DONE` | Remove superseded `core/*Imp` packages and shims. | Runtime adapters live under `interface/grpc` and `interface/process`; `core/*Imp`, legacy package names, duplicate helpers, and compatibility shims are removed. | | W013 | `DONE` | Remove redundant wallet federation creation/model. | Removed federation creation and lookup, wallet federation fields, federation persistence/repository adapters, transaction federation fields/filters, federation protobuf messages, and API documentation/routes. Wallet/Auth/API contracts regenerate and tests pass. | ## Phase 4 — `api` architecture | ID | Status | Task | Acceptance check / note | |---|---|---|---| | G001 | `DONE` | Inventory routes, middleware, response contracts, WebSocket, Swagger, metrics, profiling, and gRPC clients. | `ARCHITECTURE-COMPATIBILITY.md` records 57 versioned routes, four auxiliary endpoints, middleware order, envelopes, metadata, Swagger, pprof, WebSocket, and intended peer lifecycle. | | G002 | `DONE` | Move upstream clients into `infrastructure/grpcclient`. | Generated clients use a lazy connection interface with serialized dialing, active-call tracking, configurable inactivity closure (two-minute default), reconnection, health checks, explicit close, and focused lifecycle tests. | | G003 | `DONE` | Move middleware into `interface/http/middleware`. | The exact APM → profiling → Prometheus → CORS → JSON → i18n → error → optional logger order is centralized and tested; non-verbose profiling now continues the handler chain. | | G004 | `DONE` | Move public HTTP handlers and routes into `interface/http`. | Public handlers/routes live under `interface/http/handler`; the complete method/path matrix is asserted and response behavior remains unchanged. | | G005 | `DONE` | Move authenticated client/admin handlers and routes. | Client/admin handlers and authorization routing share the interface boundary; JWT/IAM, header metadata, errors, and all authenticated method/path contracts remain intact. | | G006 | `DONE` | Move WebSocket and auxiliary endpoints into interface adapters. | `interface/http` owns router, health, metrics, Swagger URL selection, WebSocket, main HTTP server, pprof server, and graceful shutdown; auxiliary contracts are tested. | | G007 | `DONE` | Replace API bootstrap with explicit dependency composition. | `cmd/apiRuntime` explicitly owns clients, handlers, router, HTTP servers, permission synchronization, shutdown, and client closure; composition and route-count tests pass. | | G008 | `DONE` | Remove superseded API packages and shims. | Legacy root `service`, `handler`, `middlewares`, enum-generator/mock shells, dead handler comments, and obsolete dependency are removed; no duplicate clients or handlers remain. | ## Phase 5 — AdminPanel write service layer | ID | Status | Task | Acceptance check / note | |---|---|---|---| | P001 | `DONE` | Inventory every direct AdminPanel write, delete, inline, bulk action, validation, and side effect. | `ADMIN-MUTATION-INVENTORY.md` maps every mutation surface and side effect to its owner or a read-only decision. | | P002 | `DONE` | Compare required AdminPanel mutations with existing internal RPCs. | The inventory proves asset administration is the only sufficiently specified missing contract. | | P003 | `DONE` | Add reusable authenticated, deadline-aware gRPC client infrastructure. | Typed BetterProto/grpclib adapter uses token metadata and configurable deadlines; tests cover success, timeout, unavailable, permission, validation, and status handling. | | P004 | `DONE` | Add asset application use cases and route asset writes through wallet RPCs. | Wallet owns upsert/deactivate; AdminPanel never saves or deletes an asset through its ORM, preserves asset access checks, and surfaces RPC failures. | | P005 | `DONE` | Move token-policy validation and metadata generation to Go-owned operations. | Wallet validates activation/amount policy and derives metadata/token type; duplicate Django logic and related-row auto-generation were removed. | | P006 | `DONE` | Add wallet and transaction use cases and migrate writes. | Inventory found no valid administrative CRUD: existing Wallet workflows remain the only mutation path and wallet/transaction projections are strictly read-only. | | P007 | `DONE` | Add market and remaining mutable aggregate use cases. | Existing lifecycle RPCs remain authoritative; speculative CRUD was rejected and all remaining projections/imports/inlines are read-only. | | P008 | `DONE` | Make legacy unmanaged ORM models explicitly read-only. | Base admin fails closed for unmanaged models; save/delete/bulk/inline/import bypasses are disabled, with a registry-wide regression test. | | P009 | `DONE` | Fix `no_migartion` to `no_migration` with router tests. | Router tests prove `coreLogic` never migrates on either database and managed apps remain allowed. | | P010 | `DONE` | Verify every affected admin page and permission tier. | Thirteen focused tests cover registry-wide permissions, asset create/update/deactivate, bulk rejection, service failure, client statuses, and router behavior; Django checks pass. | ## Phase 6 — Protobuf contracts | ID | Status | Task | Acceptance check / note | |---|---|---|---| | R001 | `DONE` | Decide whether existing internal RPCs cover all required AdminPanel writes. | Evidence in `ADMIN-MUTATION-INVENTORY.md` limits new contracts to typed asset administration and rejects generic table mutation. | | R002 | `DONE` | Add backward-compatible internal RPCs only for proven gaps. | Additive upsert/deactivate messages and methods pass Buf lint, build, and breaking checks against the prior commit. | | R003 | `DONE` | Regenerate only active Go and Python consumers. | Wallet Go stubs and the AdminPanel's local typed message subset are reproducibly generated; required Go JSON field presence is retained. | ## Phase 7 — Shared types and final verification | ID | Status | Task | Acceptance check / note | |---|---|---|---| | F001 | `DONE` | Evaluate shared ID and monetary types after service boundaries stabilize. | `SHARED-TYPES-EVALUATION.md` records the semantic matrix: no candidate has identical cross-context invariants. | | F002 | `DONE` | Introduce approved shared types incrementally, if justified. | No shared source type is justified. Wallet scale-7 and GL scale-18 values remain local with canonical decimal-string conversion at their versioned boundary. | | F003 | `DONE` | Run final generation, tests, builds, and architecture checks. | Proto, generated consumers, Django checks/tests, and all Go normal/race/vet/build gates pass; final generation gaps and one test synchronization defect were corrected. | | F004 | `DONE` | Review every active repository diff for generated/manual/unrelated changes. | All six active code repositories are clean on `feat/refactor-v1`; regeneration diffs were scoped generated consumers, and the only manual verification diff was the race-test synchronization fix. | | F005 | `DONE` | Prepare reviewable per-repository commits and final migration report. | Scoped API/Auth/Wallet commits are verified and `FINAL-MIGRATION-REPORT.md` records the complete outcome, gates, configuration, and handoff. | ## Execution log Append one row whenever a task changes status. Existing rows are never rewritten, so failed or changed work remains visible. | Time | Task | From | To | Evidence / reason | |---|---|---|---|---| | 2026-08-14 | S001 | `TODO` | `DONE` | Read and incorporated repository instructions and refactoring plan. | | 2026-08-14 | S002 | `TODO` | `CHANGED` | User excluded `docs`, `DevOps`, then `ui`. | | 2026-08-14 | S003 | `TODO` | `DONE` | Active scope reduced to five repositories. | | 2026-08-14 | S004 | `TODO` | `DONE` | Created and checked out `feat/refactor-v1` in all active repositories. | | 2026-08-14 | S005 | `TODO` | `DONE` | Restored excluded repositories and removed temporary branches. | | 2026-08-14 | B001 | `TODO` | `STARTED` | Began code-backed architecture and repository audit. | | 2026-08-14 | B001 | `STARTED` | `DONE` | Recorded repository state, actual config libraries/globals, architecture boundaries, AdminPanel writes, proto gaps, generated outputs, and plan discrepancies in `REFACTORING-AUDIT.md`. | | 2026-08-14 | B002 | `TODO` | `STARTED` | Began read-only toolchain and dependency baseline capture. | | 2026-08-14 | B002 | `STARTED` | `DONE` | Recorded Go, Python, uv, Django, Buf, protoc/plugin, generator, and committed dependency baselines; noted missing root proto plugins and sandbox-blocked API module metadata lookup. | | 2026-08-14 | B003 | `TODO` | `STARTED` | Began proto lint/build/generation baseline checks with existing untracked binary protected. | | 2026-08-14 | B003 | `STARTED` | `DONE` | Buf build/lint passed; format drift and missing root generation plugins recorded from non-mutating checks and a temporary clone. | | 2026-08-14 | B004 | `TODO` | `STARTED` | Began auth generation, test, and build baseline. | | 2026-08-14 | B004 | `STARTED` | `DONE` | Auth generation reproduced committed stubs; tests and build passed in a temporary clone. | | 2026-08-14 | B005 | `TODO` | `STARTED` | Began serialized wallet generation, test, and build baseline. | | 2026-08-14 | B005 | `STARTED` | `DONE` | Wallet generation reproduced committed stubs; tests and full build passed with no tracked diff. | | 2026-08-14 | B006 | `TODO` | `STARTED` | Began API generation, test, Swagger, and build baseline. | | 2026-08-14 | B006 | `STARTED` | `DONE` | API generation, tests, Swagger generation, and full build passed with reproducible outputs. | | 2026-08-14 | B007 | `TODO` | `STARTED` | Began non-database-mutating AdminPanel system and test baseline checks. | | 2026-08-14 | B007 | `STARTED` | `DONE` | System, compile, and migration-drift checks passed; deploy warnings and zero-test Debug Toolbar failure recorded. | | 2026-08-14 | B008 | `TODO` | `STARTED` | Consolidated baseline results and selected the smallest compatibility-preserving first migration slice. | | 2026-08-14 | B008 | `STARTED` | `DONE` | Locked C001 to pure koanf loader ownership plus a temporary legacy facade and synthetic tests. | | 2026-08-14 | C001 | `TODO` | `STARTED` | Began auth config loader migration without global injection changes. | | 2026-08-14 | C001 | `STARTED` | `DONE` | Added infrastructure-owned koanf loader, compatibility facade, and tests; generation/tests/race/build pass; committed as `29b7e07`. | | 2026-08-14 | C002 | `TODO` | `STARTED` | Began auth global-config dependency inventory and constructor-injection migration. | | 2026-08-14 | C002 | `STARTED` | `DONE` | Removed global config and legacy facade; injected config through auth boundaries; full verification passed; committed as `1bd5559`. | | 2026-08-14 | C003 | `TODO` | `STARTED` | Began wallet config default/key/serve-mode compatibility inventory. | | 2026-08-14 | C003 | `STARTED` | `DONE` | Reproduced measured fig defaults, validated all service configs, and passed generation/tests/race/build; committed as `7958530`. | | 2026-08-14 | C004 | `TODO` | `STARTED` | Began wallet global-config dependency inventory across five modes, repositories, use cases, and Stellar adapters. | | 2026-08-14 | C004 | `STARTED` | `CHANGED` | User prioritized a new disaster-recovery general-ledger service and wallet adapter; config injection will resume after its boundary is established. | | 2026-08-14 | S003 | `DONE` | `CHANGED` | Added `GL` to active scope; excluded repositories remain unchanged. | | 2026-08-14 | S004 | `DONE` | `DONE` | Created and checked out `GL/feat/refactor-v1`; all six active repositories now use the requested branch. | | 2026-08-14 | L001 | `TODO` | `STARTED` | Began evidence-backed GL design from existing wallet transaction and Stellar paths. | | 2026-08-14 | L001 | `STARTED` | `DONE` | Defined immutable double-entry invariants, mappings, transactional outbox delivery, controlled outage modes, and service ownership; committed in GL as `1863de1`. | | 2026-08-14 | L002 | `TODO` | `STARTED` | Began the internal `ledger/v1` protobuf contract from the accepted GL boundary. | | 2026-08-14 | L002 | `STARTED` | `DONE` | Added a new package without changing existing contracts; isolated-cache Buf format/lint/build checks pass; committed in proto as `b4bb506`. | | 2026-08-14 | L003 | `TODO` | `STARTED` | Began the independent Go service scaffold and generated-consumer setup. | | 2026-08-14 | L003 | `STARTED` | `DONE` | Scaffold generation is reproducible and tests/race/vet/build pass; committed in GL as `b1e0b01`. | | 2026-08-14 | L004 | `TODO` | `STARTED` | Began the immutable PostgreSQL schema, decimal domain values, and transactional repository. | | 2026-08-14 | L004 | `STARTED` | `DONE` | Domain and PostgreSQL enforce exact, balanced, sealed, immutable, idempotent journal storage; tests/race/vet/build pass; committed in GL as `0b3eaa0`. | | 2026-08-14 | L005 | `TODO` | `STARTED` | Began application commands, persistence queries/events, reversal validation, and complete gRPC method adapters. | | 2026-08-14 | L005 | `STARTED` | `DONE` | Added complete application/gRPC operations, exact reversal and canonical idempotency behavior, queries, error mapping, and tests; committed in GL as `76905ab`. | | 2026-08-14 | L006 | `TODO` | `STARTED` | Began the wallet-owned ledger port, transaction mapper, generated client, and gRPC adapter. | | 2026-08-14 | L006 | `STARTED` | `DONE` | Added the Wallet-owned ledger boundary, config, generated client, and tested gRPC adapter; full tests/race/build pass; committed in wallet as `9d91f8f`. | | 2026-08-14 | L007 | `TODO` | `STARTED` | Began the wallet-local transactional outbox, claim/retry semantics, and dispatcher. | | 2026-08-14 | L007 | `STARTED` | `DONE` | Added atomic enqueue, safe claiming, retry/backoff, quarantine/replay, dispatcher, and rollback/commit tests; committed in wallet as `379dbc2`. | | 2026-08-14 | L008 | `TODO` | `STARTED` | Began per-call-site transaction-effect mapping and outbox integration. | | 2026-08-14 | L008 | `STARTED` | `STARTED` | Checkpoint: lifecycle events now commit atomically with every transaction repository insert/update; full tests/race/build pass; committed in wallet as `ff31c87`; monetary journals remain. | | 2026-08-14 | L008 | `STARTED` | `CHANGED` | Completed and tested all Wallet-owned financial/lifecycle paths plus dispatcher bootstrap in `d1aa339`; split AdminPanel's direct-write bypass into the already tracked `P006`/`P008` scope instead of treating it as a Wallet adapter path. | | 2026-08-14 | I001 | `TODO` | `STARTED` | Began mapping the public buy-asset compatibility endpoints to auth publisher permissions and the existing market settlement transaction. | | 2026-08-14 | I001 | `STARTED` | `DONE` | Recorded the additive contract, IAM role-key, publisher-order, pinned-agreement, and shared-settlement migration boundary in `REFACTORING-AUDIT.md`. | | 2026-08-14 | I002 | `TODO` | `STARTED` | Began idempotent token-publisher bootstrap and stable IAM role-key propagation. | | 2026-08-14 | I002 | `STARTED` | `DONE` | Added additive IAM role keys (`2d7d3ff`) and idempotent token-publisher bootstrap with focused tests (`7c3b3b6`); auth tests, race tests, and build pass. | | 2026-08-14 | I003 | `TODO` | `STARTED` | Began additive ICO order designation, quote/settlement service contracts, and agreement-to-maker persistence linkage. | | 2026-08-14 | I003 | `STARTED` | `DONE` | Added additive ICO order/quote/settlement fields and RPCs (`286b8e5`), role-gated hidden maker/sell orders, filtering, and agreement-to-maker persistence (`25d0f03`). | | 2026-08-14 | I004 | `TODO` | `STARTED` | Began market-owned live publisher-order selection and BuyAsset quote delegation. | | 2026-08-14 | I004 | `STARTED` | `DONE` | Delegated wallet quotes to market; live ICO selection verifies role, status, side, IRT pair, price, and remaining volume; agreement generation pins the maker; committed as `5a0f3d7`. | | 2026-08-14 | I005 | `TODO` | `STARTED` | Began claim-once ICO confirmation, taker creation, and shared synchronous order settlement. | | 2026-08-14 | I005 | `STARTED` | `DONE` | Removed the legacy direct ICO transfers; added claim-once agreement handling, taker orders, maker-wide locking/fresh reads, shared synchronous `settleOrder`, response hashes, and claim tests; committed as `ef2e4ae`. | | 2026-08-14 | I006 | `TODO` | `STARTED` | Began focused authorization/order/claim tests, consumer regeneration, full test/race/build verification, and clean-tree review. | | 2026-08-14 | I006 | `STARTED` | `DONE` | Verified high-volume role-gated publisher orders, IRT/side/participant constraints, overfill prevention, claim idempotency, and shared settlement; Buf checks, consumer generation, full auth/wallet/api tests, race tests, and builds pass; generated consumers committed as `a06c736`/`d2660f5`, wallet verification as `3555a5f`. | | 2026-08-14 | I006 | `DONE` | `DONE` | Final review found the generic query's default newest-first order preceding ICO price order; replaced it with a dedicated best-price/oldest-order query and reverified tests/race/build in `0d7c820`. | | 2026-08-14 | E001 | `TODO` | `STARTED` | Began mapping all transaction writes and the existing RabbitMQ, GL outbox, consumer, and alert paths. | | 2026-08-14 | E001 | `STARTED` | `DONE` | Confirmed every active transaction insert/update converges in `repository/db/postgres/transaction.go`, which already atomically enqueues GL records; legacy direct AMQP publication is inactive and unsuitable for loss-free delivery. | | 2026-08-14 | E002 | `TODO` | `STARTED` | Began the transport-neutral event envelope, per-type topic registry, transaction outbox/inbox/deadbox schema, and repository ports. | | 2026-08-14 | E002 | `STARTED` | `DONE` | Added one stable event per transaction ID, unique topics for every transaction enum, atomic outbox enqueue, reclaimable inbox, persistent deadbox, migrations, and rollback/idempotency tests in `5dfb223`. | | 2026-08-14 | E003 | `TODO` | `STARTED` | Began replacing the direct streadway AMQP channel with Watermill publisher/subscriber ownership and transport-neutral application ports. | | 2026-08-14 | E003 | `STARTED` | `DONE` | Replaced the unused streadway wrapper with a shared Watermill AMQP connection, publisher/subscriber adapters, delivery confirmations, durable queues, and a retrying outbox dispatcher; full Wallet tests pass in `25fdb37`. | | 2026-08-14 | E004 | `TODO` | `STARTED` | Began the transport-neutral transaction loader/processor boundary and idempotent inbox-backed event handler for all per-type channels. | | 2026-08-14 | E004 | `STARTED` | `DONE` | Added topic/type validation, persisted inbox claims, duplicate-safe processing, existing processor delegation, final-status verification, claim-loss checks, and focused race coverage in `951cd02`. | | 2026-08-14 | E005 | `TODO` | `STARTED` | Began bounded Watermill retry composition, persistent handler deadbox routing, and successful-transaction alert notification. | | 2026-08-14 | E005 | `STARTED` | `DONE` | Added one Watermill handler per transaction topic, bounded retry/recovery, persistent deadbox-before-ack behavior, and Alert success notification without repeating completed financial effects in `c9a9101`. | | 2026-08-14 | E006 | `TODO` | `STARTED` | Began wallet-mode-only Watermill dispatcher/router lifecycle integration, configuration defaults, graceful shutdown, and end-to-end verification. | | 2026-08-14 | E006 | `STARTED` | `DONE` | Wired Wallet-only startup after all 17 durable subscriptions are ready, bounded handler/startup/shutdown timeouts, lazy Alert/Auth gRPC connections, graceful closure, and an in-memory dispatcher-to-router duplicate test; proto generation, full tests/race tests, vet, and build pass in `b5784b7`. | | 2026-08-14 | T001 | `TODO` | `DONE` | Confirmed Go 1.26 is released, the official `golang:1.26-bookworm` tag exists, four active Go modules still declare 1.24, three existing Go builders already use 1.26, and GL lacks a Dockerfile. | | 2026-08-14 | T002 | `TODO` | `STARTED` | Began the API module directive upgrade and isolated Go 1.26 verification. | | 2026-08-14 | T002 | `STARTED` | `DONE` | Upgraded API to Go 1.26, removed behaviorally unreachable logger code exposed by vet, and passed generation, tests, vet, and build with the existing Go 1.26 Docker builder in `fb6ad38`. | | 2026-08-14 | T003 | `TODO` | `STARTED` | Began the Auth module directive upgrade and isolated Go 1.26 verification. | | 2026-08-14 | T003 | `STARTED` | `DONE` | Upgraded Auth to Go 1.26, removed behaviorally unreachable logger code, fixed the newsletter timeout lifecycle exposed by vet, and passed generation, tests, vet, and build in `b2d6686`. | | 2026-08-14 | T004 | `TODO` | `STARTED` | Began the Wallet module directive upgrade and isolated Go 1.26 verification. | | 2026-08-14 | T004 | `STARTED` | `DONE` | Upgraded Wallet to Go 1.26; module tidy and generation produced no extra drift; full tests, race tests, vet, and binary build pass in `f5243a8`. | | 2026-08-14 | T005 | `TODO` | `STARTED` | Began the GL module upgrade and creation of its missing Go 1.26 multi-stage Dockerfile. | | 2026-08-14 | T005 | `STARTED` | `CHANGED` | Separate GL explorer/web changes appeared during verification; preserved them and isolated the Go directive/Dockerfile commit from that work. | | 2026-08-14 | T007 | `TODO` | `STARTED` | User required `HTTP_PROXY` and `HTTPS_PROXY` unset for `go get` and selected `https://go.reg.darano.ir` as the Go proxy. | | 2026-08-14 | T007 | `STARTED` | `DONE` | Updated all four Go Docker proxy defaults in per-repository commits and passed Dockerfile checks; cold API build exposed delayed 404 coverage gaps in the selected proxy, so no fallback was introduced. | | 2026-08-14 | T005 | `CHANGED` | `DONE` | Committed the isolated GL Go 1.26 directive and new multi-stage Dockerfile as `ce5f8b4`; current working directive remains 1.26 while unrelated explorer/dependency changes stay uncommitted. | | 2026-08-14 | T006 | `TODO` | `STARTED` | Began final branch, module directive, Docker builder, proxy, and worktree audit across active repositories. | | 2026-08-14 | T006 | `STARTED` | `DONE` | Confirmed all Go modules/builders use 1.26, all Go builders use the Darano proxy, all active branches are correct, and user-owned proto/GL work remains untouched. | | 2026-08-14 | T008 | `TODO` | `STARTED` | Began sequential full image builds for API, Auth, Wallet, and GL using the configured Darano Go proxy. | | 2026-08-15 | T008 | `STARTED` | `DONE` | GL built successfully as `darano-gl:go1.26`; API/Auth/Wallet independently reproduced Darano registry gateway timeouts before compilation, with no proxy fallback or source changes introduced. | | 2026-08-15 | T009 | `TODO` | `STARTED` | Began adapting the established Go-service Gitea actions and three environment workflows for GL. | | 2026-08-15 | T009 | `STARTED` | `DONE` | Added local build/login/deploy/notify actions plus main/dev/stage workflows; YAML parsing and the exact cached buildx command pass; committed in GL as `675def5`. | | 2026-08-30 | C004 | `CHANGED` | `STARTED` | Resumed Wallet constructor injection after the GL adapter boundary stabilized. | | 2026-08-30 | C004 | `STARTED` | `DONE` | Removed all active global config reads and the legacy facade; injected configuration through every runtime boundary; full tests/race/vet/build pass in the commit series ending at `4d192a6`. | | 2026-08-30 | C005 | `TODO` | `STARTED` | Began API configuration ownership migration. | | 2026-08-30 | C005 | `STARTED` | `DONE` | Moved the pure koanf/TOML loader and compatibility-preserving defaults to `api/infrastructure/config`; loader and full verification pass in `44d56d3`. | | 2026-08-30 | C006 | `TODO` | `STARTED` | Began API global configuration dependency migration. | | 2026-08-30 | C006 | `STARTED` | `DONE` | Removed the API `Cfg` singleton and legacy config package; injected configuration through runtime boundaries; full tests/race/vet/build pass in `44d56d3`. | | 2026-08-30 | L009 | `TODO` | `STARTED` | Began GL reconciliation and disaster-read completion review. | | 2026-08-30 | L009 | `STARTED` | `DONE` | Verified read-only reconciliation, external evidence comparison, duplicate detection, explorer balance reconstruction, and focused tests; implementation commits are `3f5fd86`, `b14c5e2`, and `d5c9b33`. | | 2026-08-30 | L010 | `TODO` | `STARTED` | Began GL outage, replay, ordering, concurrency, and recovery verification. | | 2026-08-30 | L010 | `STARTED` | `DONE` | Full GL tests, race tests, vet, and build pass; replay/idempotency, rollback, conservation/load, ordering, and recovery paths are covered. | | 2026-08-30 | A001 | `TODO` | `STARTED` | Began the method-level Auth RPC and dependency migration map before package moves. | | 2026-08-30 | A001 | `STARTED` | `DONE` | Mapped every public/internal RPC to its use-case operation, persistence ports, external providers, cache, wallet, notification, and configuration dependencies in `REFACTORING-AUDIT.md`. | | 2026-08-30 | A002 | `TODO` | `STARTED` | Began the pure Auth domain model and port foundation. | | 2026-08-30 | A002 | `STARTED` | `DONE` | Added transport/persistence-independent entities, NationalID/Mobile/BirthDate value objects, domain errors, and repository/cache ports; focused and full Auth tests pass in `32f182b`/`d292822`. | | 2026-08-30 | A003 | `TODO` | `STARTED` | Added infrastructure persistence mappings between legacy database records and the new Auth domain entities; mapping tests and full Auth tests pass in `58f6a43`. | | 2026-08-30 | A003 | `STARTED` | `STARTED` | Added remaining persistence mappings and domain-port adapters for sessions, permissions, roles, role-permissions, bank information, and OTP templates; full Auth tests pass in `e6e8e34`. Legacy repository implementations still require relocation/integration. | | 2026-08-30 | A004 | `TODO` | `STARTED` | Extracted OTP code generation and expiration constant into `application/otp`, retained compatible use-case behavior, and added focused tests in `0c92b14`. | | 2026-08-30 | A004 | `STARTED` | `STARTED` | Extracted OTP template parameter decoding into `application/otp`; full Auth tests pass in `62fb1b1`. Legacy template lookup and delivery composition remain. | | 2026-08-30 | A004 | `STARTED` | `STARTED` | Extracted OTP retry/verification policy into `application/otp`; full Auth tests pass in `133fcc3`. Legacy persistence and gRPC composition remain. | | 2026-08-30 | A004 | `STARTED` | `STARTED` | Added transport-independent OTP store and sender contracts in `application/otp`; full Auth tests pass in `8fbfcff`. Concrete Redis/provider adapters remain. | | 2026-08-30 | A004 | `STARTED` | `STARTED` | Added concrete Redis-backed OTP store and Kavenegar sender adapters under `infrastructure/otp`; full Auth tests pass in `cde73ef`. Runtime wiring and gRPC adapter extraction remain. | | 2026-08-30 | A004 | `STARTED` | `STARTED` | Wired OTP store/sender adapters into Auth runtime and use-case paths with legacy fallback retained; full Auth tests pass in `c951875`. | | 2026-08-30 | A004 | `STARTED` | `STARTED` | Wired the OTP template repository port and infrastructure adapter into runtime composition and TFA processing; full Auth tests pass in `741415b`. | | 2026-08-30 | A004 | `STARTED` | `DONE` | Added thin gRPC registration adapters and routed Auth service registration through them; full Auth tests pass in `b56d54c`. | | 2026-08-30 | A005 | `TODO` | `STARTED` | Extracted bearer-token normalization into `application/auth`; full Auth tests pass in `1d72faa`. | | 2026-08-30 | A005 | `STARTED` | `STARTED` | Extracted refresh-token marker validation into `application/auth`; full Auth tests pass in `4225332`. | | 2026-08-30 | A005 | `STARTED` | `STARTED` | Added application JWT verifier contract and infrastructure adapter for access/refresh claims; full Auth tests pass in `ad6f5cc`. | | 2026-08-30 | A005 | `STARTED` | `STARTED` | Injected the JWT verifier into IAM and refresh-token flows with compatibility fallback; full Auth tests pass in `6c5b8cc`. | | 2026-08-30 | A005 | `STARTED` | `STARTED` | Extracted active/expiry session policy into `application/auth`; focused and full Auth tests pass in `424741c`. | | 2026-08-30 | A005 | `STARTED` | `STARTED` | Added and runtime-wired the authentication session-store boundary for IAM retrieval while preserving Redis-expiry behavior; full Auth tests pass in `d744ffc`. | | 2026-08-30 | A005 | `STARTED` | `STARTED` | Routed login and refresh session writes through the authentication session-store boundary with compatibility fallback; full Auth tests and vet pass in `c15bcff`. | | 2026-08-30 | A005 | `STARTED` | `DONE` | Routed refresh lookup through the persistent session boundary (distinct from access-session cache lookup); full Auth tests and vet pass in `016d705`. | | 2026-08-30 | A006 | `TODO` | `STARTED` | Extracted case-insensitive route/method and privileged-role permission policy into `application/permission`; full Auth tests pass in `9f97cec`. | | 2026-08-30 | A006 | `STARTED` | `STARTED` | Runtime-wired the permission repository port for route lookup/creation and super-admin permission listing; full Auth tests pass in `5b61adf`. | | 2026-08-30 | A006 | `STARTED` | `STARTED` | Added and runtime-wired a role-permission reader preserving the existing Redis/Postgres behavior; full Auth tests pass in `24722cb`. | | 2026-08-30 | A006 | `STARTED` | `STARTED` | Added and runtime-wired an identity store over existing cache/persistence behavior, routing identity reads and writes through pure domain models; full Auth tests pass in `113faef`. | | 2026-08-30 | A006 | `STARTED` | `STARTED` | Extracted identity Persian-digit normalization plus birth-date, national-ID, postal-code, and email validation into `application/identity`; full Auth tests pass in `2d5ab3d`. | | 2026-08-30 | A006 | `STARTED` | `DONE` | Added and runtime-wired identity ownership/person-verification boundaries with real/fake provider selection preserved; full Auth tests and vet pass in `75c2e0d`. | | 2026-08-30 | A007 | `TODO` | `DONE` | Replaced the positional Auth constructor with a typed dependency graph assembled explicitly in bootstrap; full Auth tests and vet pass in `7d7871b`. | | 2026-08-30 | A008 | `TODO` | `DONE` | Removed the legacy constructor and superseded runtime fallback implementations across OTP, JWT/session, permission, and identity paths; full Auth tests/race/vet pass in `a9b11a3`. | | 2026-08-30 | A003 | `STARTED` | `DONE` | Relocated all PostgreSQL and Redis implementation files from `repository/db` into `infrastructure`, removed wrapper indirection and the empty Mongo placeholder, and verified no legacy implementation imports remain; full tests/race/vet/build pass in `1323aa4`. | | 2026-08-30 | W001 | `TODO` | `DONE` | Mapped all six wallet runtime modes and their PostgreSQL, Redis, RabbitMQ/outbox, internal/external client, Stellar, availability, cryptography, observability, and shutdown dependencies in `REFACTORING-AUDIT.md`. | | 2026-08-30 | W002 | `TODO` | `DONE` | Added pure wallet entities/value objects, domain errors, filters, repository/cache/UoW ports, and blockchain/internal/external adapter boundaries; focused and full tests plus focused vet pass in `ac649d2`. | | 2026-08-30 | W003 | `TODO` | `STARTED` | Relocated all wallet PostgreSQL and Redis adapter implementations (including tests) from `repository/db` into `infrastructure/postgres` and `infrastructure/redis`; updated bootstrap imports and full Wallet tests pass in `d2580cd`. RabbitMQ, external service, and Stellar adapters remain. | | 2026-08-30 | W003 | `STARTED` | `DONE` | Relocated external service clients to `infrastructure/service` and Stellar/Horizon adapters to `infrastructure/stellar`; updated wallet, market, stream, and bootstrap imports; no legacy implementation imports remain; full tests, race tests, vet, and build pass in `d121fc9`. | | 2026-08-30 | W004 | `STARTED` | `DONE` | Added the `application/walletread` boundary and routed asset, commission, network, price, health, balance, check-balance, transaction-list, asset-catalog, and blockchain-balance reads through it; protobuf conversion and error mapping remain compatible; full Wallet tests pass in `5b17c82`. Wallet-balance synchronization is a mutation deferred to later wallet work. | | 2026-08-30 | W005 | `TODO` | `STARTED` | Added `application/walletinit` for identity preconditions, trustline-limit calculation, key recovery, trustline submission, wallet-code generation, wallet-draft construction, repository-backed find-or-create orchestration, trustline transaction construction, and tested commit/rollback plus existing/create wallet paths; initialization now propagates commit failures; focused Wallet tests pass in `f9a0262`. | | 2026-08-30 | A009 | `TODO` | `DONE` | Removed Auth's commented/dead wallet federation client; Auth tests pass with writable cache in `508a239`. | | 2026-08-30 | W013 | `TODO` | `STARTED` | Removed automatic federation creation and federation lookup from wallet initialization; new wallet records no longer receive a federation assignment; full Wallet tests pass in `97dd9d9`. Remaining schema/API/transaction-field cleanup is pending. | | 2026-08-30 | W013 | `STARTED` | `DONE` | Removed federation persistence/model code, wallet and transaction federation fields, federation protobuf messages, stale API route/docs, and remaining runtime references; regenerated Wallet contracts for Wallet/Auth/API; Wallet, Auth, and API tests pass. Wallet `a38501d`/`7ae90cc`, Auth `446e875`, API `c450264`/`c2c076c`. | | 2026-08-30 | W006 | `TODO` | `STARTED` | Added `application/withdrawal`, `application/deposit`, `application/transfer`, and `application/transaction`; routed IRT reconciliation, IPG conversion/settlement/payer identity, transfer validation, transaction construction/completion, balance-change display policy, deterministic wallet-lock ordering, insufficient-balance failure policy, Stellar status updates, and transaction-event support through application boundaries; invalid event inputs and unsupported transaction types now close safely; focused Wallet tests pass in `66d271e`. Business failure/refund orchestration remains. | | 2026-08-30 | W007 | `TODO` | `STARTED` | Added typed `application/market` policies for agreement tolerance, available amount, raw conversion, positive order inputs, ICO publisher validation, order status codes, and market pricing calculation; market ICO/order validation and calculation delegate through compatibility mapping. Synchronous settlement/stream locking fixed in `3004bb9`; order lifecycle, settlement, contract generation, and adapter extraction remain. | | 2026-08-30 | W008 | `TODO` | `STARTED` | Added `application/alert` level/source label and subject policies plus nil/incomplete-event validation; alert delivery keeps existing asynchronous email/SMS retry behavior. Focused Wallet tests pass in `b3e1dbc`. Delivery, retry, persistence, and adapter extraction remain. | | 2026-08-30 | W010 | `TODO` | `STARTED` | Added `application/cron.Retry`, `application/stream.IsNew`, stream external-deposit transaction policy, and dedicated `SetupCronRepository`/`SetupStreamRepository` paths; cron now avoids nil error telemetry on successful jobs and reads configurable `Cron.Schedule` timing. Focused Wallet tests pass in `5f37e56`. Remaining process composition work remains. | | 2026-08-30 | W009 | `TODO` | `STARTED` | Added `application/walletlock` lock/release mutation policies with frozen/available balance tests; internal RPC retains transaction scope, ledger journaling, persistence, and error mapping, validates incomplete IAM requests safely, and returns explicit success statuses. Focused Wallet tests pass in `0920702`. Remaining internal-wallet operations stay at the service boundary. | | 2026-08-30 | W011 | `TODO` | `STARTED` | Added dedicated alert, market, internal-wallet, stream, cron, and wallet repository setup entry points; each mode now declares its bootstrap profile. Command/core tests pass in `cf13a58`. Dependency internals and superseded bootstrap cleanup remain. | | 2026-08-30 | W012 | `TODO` | `STARTED` | Removed redundant market amount/agreement, IPG amount/payer-ID, referral-commission, redeem-allocation, contract-rounding, and agreement-ID implementations; discount, referral, redeem arithmetic, and contract policies now live in application packages. Focused Wallet tests pass in `dc0bdf4`. Remaining core implementation cleanup is pending. | | 2026-08-31 | W005 | `STARTED` | `DONE` | Completed wallet initialization/trustline orchestration, atomic trustline-transaction persistence, and shared unit-of-work finalization; all Wallet validation gates pass through `240b8d0`. | | 2026-08-31 | W006 | `STARTED` | `DONE` | Extracted transaction balance processing, deterministic locking and status transitions, persisted post-PSP fulfillment failures, and retained idempotent transaction/ledger outboxes. The active Vandar contract has no refund/reversal operation, so no speculative provider call was introduced; all validation gates pass through `240b8d0`. | | 2026-08-31 | W007 | `STARTED` | `DONE` | Extracted market order lifecycle and settlement transitions, made settlement synchronous, persisted failures, and released canceled maker balances; all validation gates pass through `240b8d0`. | | 2026-08-31 | W008 | `STARTED` | `DONE` | Extracted context-aware alert delivery and retry behavior behind application ports and reduced gRPC to transport/adaptation; all validation gates pass through `240b8d0`. | | 2026-08-31 | W009 | `STARTED` | `DONE` | Extracted lock/release persistence and ledger-journal workflow behind function ports while retaining transaction and protocol mapping at the gRPC boundary; all validation gates pass through `240b8d0`. | | 2026-08-31 | W010 | `STARTED` | `DONE` | Extracted the Stellar stream payment workflow, narrowed cron/stream composition, and removed duplicate cron registration; all validation gates pass through `240b8d0`. | | 2026-08-31 | W011 | `STARTED` | `DONE` | Replaced generic bootstrap internals with explicit process dependency profiles and removed legacy strict/safe setup names; all validation gates pass through `240b8d0`. | | 2026-08-31 | W012 | `STARTED` | `DONE` | Moved adapters out of `core`, removed duplicate helpers/shims, renamed legacy `*Imp` packages to interface-owned names, and verified no legacy core/bootstrap references remain; all validation gates pass through `240b8d0`. | | 2026-08-31 | G001 | `TODO` | `DONE` | Recorded the pre-move route, middleware, envelope, metadata, auxiliary endpoint, Swagger/pprof/WebSocket, and peer lifecycle compatibility matrix in API `95c4264`. | | 2026-08-31 | G002 | `TODO` | `DONE` | Added the application upstream port and lazy reconnecting gRPC infrastructure with inactivity and explicit-close tests in API `0edea98`. | | 2026-08-31 | G003 | `TODO` | `DONE` | Moved middleware below `interface/http`, centralized/tested its exact order, and fixed the non-verbose chain stop in API `1d9b6ca`. | | 2026-08-31 | G004 | `TODO` | `DONE` | Moved public handlers/routes below `interface/http/handler` and locked the public method/path matrix in API `41fac0c`. | | 2026-08-31 | G005 | `TODO` | `DONE` | Moved authenticated client/admin handlers and authorization routing into the same tested interface boundary in API `41fac0c`. | | 2026-08-31 | G006 | `TODO` | `DONE` | Extracted router, health, metrics, Swagger, WebSocket, HTTP/pprof server ownership, and graceful shutdown into `interface/http` in API `380aad4`. | | 2026-08-31 | G007 | `TODO` | `DONE` | Added explicit typed API runtime composition with startup permission synchronization and owned cleanup in API `163114f`. | | 2026-08-31 | G008 | `TODO` | `DONE` | Removed legacy service/handler/middleware packages, generated enum/mock shims, dead shells, and unused dependencies in API `31e3043`; protobuf/Swagger regeneration, tests, race, vet, build, and whitespace checks pass. | | 2026-08-31 | P001–P002 / R001 | `TODO` | `DONE` | Audited every AdminPanel mutation surface and existing internal RPC, documenting why asset administration is the sole proven contract gap and why arbitrary wallet, transaction, market, auth, and configuration CRUD must remain disabled. | | 2026-08-31 | R002–R003 | `TODO` | `DONE` | Added additive authenticated asset upsert/deactivate contracts, passed Buf lint/build/breaking checks, regenerated Wallet Go stubs, and made the AdminPanel Python subset locally reproducible. | | 2026-08-31 | P003–P010 | `TODO` | `DONE` | Added the deadline/token-aware Wallet client; moved asset policy and persistence into Wallet; made every other unmanaged admin, inline, import, delete, and signal path fail closed; fixed the migration router; full Wallet tests plus thirteen AdminPanel boundary tests and Django checks pass. | | 2026-09-01 | F001 | `TODO` | `STARTED` | Began a code-backed comparison of identifier and monetary semantics across Proto, Auth, Wallet, API, and GL before approving any shared representation. | | 2026-09-01 | F001 | `STARTED` | `DONE` | Documented differing Wallet/GL precision, arithmetic, persistence, identifier ownership, signedness, and opaque-ID semantics in `SHARED-TYPES-EVALUATION.md`; no universal type is safe. | | 2026-09-01 | F002 | `TODO` | `DONE` | Concluded that no new shared implementation is justified; retained independently versioned domain types and the existing lossless canonical decimal-string service boundary. | | 2026-09-01 | F003 | `TODO` | `STARTED` | Began final reproducible generation, tests, race checks, vet, builds, Django checks, and architecture scans across every active repository. | | 2026-09-01 | F003 | `STARTED` | `DONE` | Passed Buf lint/build/breaking, local Python and all Go generation, thirteen AdminPanel tests/checks, and API/Auth/Wallet/GL tests/race/vet/build. Committed missing API/Auth generated Wallet contracts and corrected Wallet integration-test synchronization found by the race gate. | | 2026-09-01 | F004 | `TODO` | `STARTED` | Began final per-repository status, generated/manual diff, branch, architecture-documentation, and unrelated-change review across all active repositories. | | 2026-09-01 | F004 | `STARTED` | `DONE` | Confirmed API/Auth/Wallet/GL/AdminPanel/Proto are clean on `feat/refactor-v1`; reviewed generated admin-contract diffs and the Wallet test-only synchronization diff; refreshed stale architecture guidance without modifying excluded repositories. | | 2026-09-01 | F005 | `TODO` | `DONE` | Prepared purpose-specific generated-consumer and test commits plus `FINAL-MIGRATION-REPORT.md`; every active repository remains buildable and no actionable tracker task remains. |