genichin
996127f215
Preserve ledger venue provenance ( #39 )
...
* feat: preserve ledger venue provenance
* fix: satisfy ledger test lint ratchet
* fix: advance image migration inventory
2026-09-19 19:30:32 +09:00
genichin
e6a90800ec
feat(strategy): expose configurable nick contract
2026-08-15 23:38:18 +09:00
genichin
6e02d92282
Add ProofLine criteria documentation and Strategy Catalog v1 implementation
...
- Add acceptance criteria documentation (AC-0013 through AC-0023)
- Add Line-0003 discovery documentation
- Implement Strategy Catalog v1 with new database migration
- Update portfolio API endpoints and schemas
- Refactor strategy and portfolio services
- Add strategy management CLI commands
- Update domain models with strategy catalog support
- Add comprehensive tests for v1 strategies
- Update design documentation (data model, interfaces, runtime flows)
2026-08-15 11:18:31 +09:00
genichin and Claude Opus 4.8
233cbc3df6
fix(portfolio): name 검증에 한글+공백 허용 (minor-change, CHG-20260627-03)
...
_PORTFOLIO_NAME_RE + CLI _NAME_RE를 ^[a-zA-Z0-9가-힣 ._:-]{1,100}$로 완화. name은 (owner,name) 조회 키일 뿐 wire 식별자 아님. 475 passed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01VHtM5Ws1HKCKQ4JGi6GRb5
2026-06-27 12:03:33 +09:00
genichin
e2226e28b6
feat: implement asset catalog database foundation (BAT-001, REQ-009/011/014)
...
Asset Catalog Model Implementation (BAT-001):
- Introduce assets table with UUID PK, symbol UNIQUE, markets TEXT[] array
- Define MarketCode enum (KRX, NXT, SOR, NASDAQ, NYSE, UPBIT, BITHUMB)
- Add Asset domain model with catalog properties
- Implement asset CRUD protocols in portfolio_repository
- Add PostgreSQL asset CRUD operations with GIN index on markets
Portfolio Model Refactoring (REQ-011):
- Add portfolios.asset_id UUID FK to assets(asset_id) ON DELETE RESTRICT
- Remove portfolios.symbol and portfolios.market columns
- Update Portfolio domain model to reference asset_id instead of symbol/market
- Refactor all portfolio queries to JOIN assets catalog
- Update all repository methods to use asset references
Data Migration (REQ-014):
- Create 20260519_0017 Alembic revision for assets table creation
- Create 20260519_0018 Alembic revision for atomic data migration:
* Extract unique symbol combinations from portfolios
* Aggregate markets using ARRAY_AGG(DISTINCT market)
* Populate assets catalog with extracted data
* Update portfolios.asset_id to reference new assets
* Remove legacy symbol/market columns in single transaction
- Implement migration with rollback support
Requirements Approved (REQ-001~008):
- REQ-001~008 transitioned from Proposed to Approved
- Complete tag model requirement set with implementation readiness
New Requirements Approved (REQ-009~015):
- REQ-009: assets table schema (approved, included in BAT-001)
- REQ-010: admin asset catalog CRUD (approved, future BAT-002)
- REQ-011: portfolios asset_id FK (approved, included in BAT-001)
- REQ-012: portfolio create catalog validation (approved, future BAT-002)
- REQ-013: GET /v1/assets token branching (approved, future BAT-002)
- REQ-014: portfolios data migration (approved, included in BAT-001)
- REQ-015: asset catalog baseline docs (approved)
Code Changes:
- app/domain/models.py: Add Asset model, MarketCode enum, Portfolio asset_id FK
- app/repositories/portfolio_repository.py: Define asset CRUD protocol
- app/repositories/postgres.py: Implement asset operations with full CRUD
- app/api/v1_assets.py: Remove symbol/market direct references
- app/cli/commands/portfolio.py: Update portfolio commands for asset references
- app/schemas/portfolio.py: Update portfolio schema with asset_id
- All portfolio operations throughout codebase: Use asset references
Testing:
- Add test_asset_catalog.py for asset CRUD operations
- Verify REQ-009 AC-1~5 (asset catalog creation, lookup, uniqueness)
- Verify REQ-011 AC-1~5 (FK constraint, portfolio asset reference)
- Verify REQ-014 AC-1~6 (migration atomicity, data correctness, rollback)
- Update existing tests for asset model usage
Documentation:
- Create BAT-001 batch documents (planning, design, implementation, verification)
- Update dcy-001 with implementation details and confirmed architecture
- Add 8 new requirement documents (REQ-009~015)
- Update docs/discovery/index.md with batch entry
Impact:
- Database: assets catalog table, portfolios refactored to reference assets
- Migration: 2 new Alembic revisions (0017 assets, 0018 portfolio migration)
- API: Symbol/market now accessed through asset references
- CLI: Portfolio commands require asset reference pattern
- All existing portfolio data preserved and correctly migrated
2026-05-19 15:59:20 +00:00
genichin
b9e3bddb34
feat: add portfolio daemon assignment and improve list rendering
...
- Add --daemon-id option to portfolio update command for daemon assignment
- Update managed_by_daemon_id field in portfolio updates
- Refactor print_portfolio_table() to print_portfolio_list() for better readability
- Display daemon_id in portfolio list output when assigned
- Show portfolio tags and managed daemon information in CLI list view
- Add daemon_id support to portfolio repository and service layers
- Update schemas to include managed_by_daemon_id field in responses
2026-05-15 08:27:14 +00:00
genichin
829629fa8f
feat: implement portfolio UUID migration and v1 API finalization (BAT-006, BAT-001 re-verified)
...
Core Changes:
- Migrate portfolio_id from string to UUID in schema and repository layer
- Update portfolio CLI commands to use name+user combination for identification
- Update HTTP API to accept portfolio_id as UUID path parameter
- Implement portfolio ownership validation in repository queries
Requirements Completed (REQ-016 to REQ-019):
- REQ-016: portfolios table UUID schema migration with data migration script
- REQ-017: CLI portfolio commands with name+user identification
- REQ-018: HTTP API portfolio path parameters and v1 asset_id UUID returns
- REQ-019: Portfolio UUID baseline documentation updates
BAT-001 Re-verification:
- REQ-004~010 marked as Implemented after verification evidence validation
- All v1 API endpoints verified with comprehensive test coverage
Documentation Updates:
- Update data-model.md with portfolio UUID structure
- Update interface-contract.md with UUID path parameters
- Update runtime-flows.md with ownership-based resolution flows
- Update project-structure.md with database layer changes
- Add migration script for portfolio UUID transition
Testing:
- Add test_portfolio_uuid.py for migration validation
- Update test_cli.py and test_portfolio_ownership.py for ownership checks
2026-05-11 09:27:57 +00:00
genichin
a776ea3b1d
feat(req-002): implement portfolio tagging and tag filters
2026-04-14 01:06:10 +09:00
genichin
9787cf3159
feat: add portfolio ownership model, auth guards, and migration
2026-04-14 00:13:34 +09:00
copilot-swe-agent[bot] and genichin
e8f782bec6
feat(REQ-001): add portfolio comment history API, CLI, repository, migration, and tests
...
Agent-Logs-Url: https://github.com/genichin/portfolio-hub/sessions/64fc2cec-78f5-41d1-99a4-45f868781edd
Co-authored-by: genichin <4282227+genichin@users.noreply.github.com >
2026-04-10 13:54:18 +00:00
genichin
0654b24d66
feat(portfolio): add asset name field across API, DB, and CLI
2026-04-03 14:51:36 +00:00
genichin
1b0991c9cf
feat: add strategy set CRUD operations (API + CLI)
2026-04-03 08:37:04 +00:00
genichin
908068d9aa
feat: refactor portfolio strategy references
2026-04-03 08:16:07 +00:00
genichin
ebd4559939
feat: update strategy set schema fields
2026-04-03 08:03:27 +00:00
genichin
3e3acbd13d
chore: initial project scaffold and gitignore
2026-04-03 07:33:32 +00:00