diff --git a/REFACTORING-AUDIT.md b/REFACTORING-AUDIT.md index 1785cd9..5d67430 100644 --- a/REFACTORING-AUDIT.md +++ b/REFACTORING-AUDIT.md @@ -404,3 +404,4 @@ Migration order implied by the map: isolate shared infrastructure constructors ( - Federation is not currently safe to delete outright: wallet persistence links `wallet.federation_id`, transaction records expose nullable `from_federation_id`/`to_federation_id`, generated wallet APIs expose federation messages, and wallet code still has federation lookup/creation paths. - Auth has no active federation implementation; its wallet federation client is commented/dead code. Auth’s identity service should remain the owner of identity and national-ID data. - The proposed target is reasonable only after consumers are migrated: `user_id → identity_id → wallet_id`, with `wallet_id` still scoped to `asset_id` and Stellar key derivation/custody explicitly preserved. W013 must first identify whether federation addresses or transaction routing are actually supported in production, then remove or retain the model based on evidence and a data/API compatibility plan. +- Per the requested migration, automatic federation creation is now removed from wallet initialization. New wallet creation uses user/asset identity and leaves federation assignment unset; Auth's dead federation client was deleted. Wallet federation tables, fields, generated API messages, and transaction routing fields still require the remaining W013 cleanup. diff --git a/REFACTORING-TODO.md b/REFACTORING-TODO.md index a70e56c..e3626b6 100644 --- a/REFACTORING-TODO.md +++ b/REFACTORING-TODO.md @@ -112,7 +112,7 @@ This is the authoritative execution tracker for the refactor. Work is performed | 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 | `TODO` | Audit and remove auth-side federation coupling. | Confirm federation has no live Auth responsibility; remove the commented/dead wallet federation client and document the identity ownership boundary before wallet federation removal. | +| 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 @@ -130,7 +130,7 @@ This is the authoritative execution tracker for the refactor. Work is performed | W010 | `TODO` | Separate cron and stream bootstrap from business operations. | Both modes start and stop correctly through explicit dependencies. | | W011 | `TODO` | Replace wallet bootstrap with explicit dependency composition. | All five sub-services work independently and together. | | W012 | `TODO` | Remove superseded `core/*Imp` packages and shims. | No duplicate business implementations remain. | -| W013 | `TODO` | Audit and remove redundant wallet federation creation/model. | Trace all federation API, transaction-routing, and persistence consumers; if no supported federation-address use remains, migrate to `user_id → identity_id → wallet_id` (wallets still scoped by asset), remove automatic federation creation, and provide a compatibility/data-migration plan. | +| W013 | `STARTED` | Remove redundant wallet federation creation/model. | Automatic federation lookup/generation is removed from wallet creation; new wallets are created from user/asset identity with no federation assignment. Remaining federation schema/API/transaction-field removal is still in progress. | ## Phase 4 — `api` architecture @@ -322,3 +322,5 @@ Append one row whenever a task changes status. Existing rows are never rewritten | 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; full Wallet tests pass in `15200dc`. | +| 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. |