Commit Graph

100 Commits

Author SHA1 Message Date
kjh2064 6422cb2b13 V13-FE-011: finalize search list layout slice 2026-08-09 02:57:26 +09:00
kjh2064 58e8b02d33 feat: compose T01 search list workspace (V13-FE-011) 2026-08-09 02:39:24 +09:00
kjh2064 eb59cae8e3 security: hard-disable all KIS trading paths (AEG-X-016)
Blocks submit, status, cancel, and settlement before HTTP or database writes and removes the KIS polling recurring job. Evidence: concrete adapter test 1/1 passed with zero HTTP calls. WBS remains IN_PROGRESS pending endpoint/startup override evidence.
2026-08-09 02:30:39 +09:00
kjh2064 ec80337389 feat: add deterministic execution heartbeats (AEG-V15-038)
Adds a pure, monotonic execution heartbeat and caller-supplied staleness cutoff without inventing alert thresholds. Evidence: targeted Release tests 5/5 passed; TRX SHA256 2ADBB526FAF6E5D924EB3F53C7E582E736199A59E0DA4E4FD25DCAA82A661BBC. WBS remains IN_PROGRESS pending approved alert contract.
2026-08-09 02:20:14 +09:00
kjh2064 d38dc32e7a feat: require explicit model-operation holds (AEG-V15-037)
Separates business holds from technical failures in the pure execution state machine. Evidence: targeted Release tests 3/3 passed; TRX SHA256 2F2CD06B1DFD3F76F336A0636598553599CD05CF7FA82E477DB160425975085F.
2026-08-09 02:14:55 +09:00
kjh2064 00957bf384 test: verify scheduler CAS on PostgreSQL (AEG-V15-036)
Adds a lease-loss/reacquire integration rehearsal and fixes Dapper due-schedule materialization with an explicit row DTO. Evidence: PostgreSQL test 1/1 passed; TRX SHA256 49627FF0180034D2A7A1E4393448C73D337D918E7CE47EA9FC2BDB144FBBA833.
2026-08-09 02:11:23 +09:00
kjh2064 5a1570790c feat: fence scheduler next-due updates (AEG-V15-036)
Adds dispatch revision CAS to dispatched, skip, and release schedule mutations. Targeted Release evidence: 8/8 passed. PostgreSQL concurrency rehearsal remains required; WBS stays IN_PROGRESS.
2026-08-09 02:06:37 +09:00
kjh2064 d18f6a7a67 feat: preserve due operation provenance (AEG-V15-035)
Carries scheduledFor, catch-up policy, and maxCatchUp from the scheduler through the request model and transactional outbox. Evidence: targeted Release tests 5/5 passed; TRX SHA256 C1BF3EF274702305A29673D5B6A1C3A98D08B1716DA3CD8CB0EE710B5E6C12E6. Schedules remain disabled.
2026-08-09 02:04:26 +09:00
kjh2064 dd352596fc feat: bound scheduler catch-up dispatch (AEG-V15-034)
Implements LATEST_ONLY, SKIP_MISSED, and ALL_WITH_LIMIT dispatch plans anchored to scheduledFor. Evidence: targeted Release tests 4/4 passed; TRX SHA256 DC28BE4F2FCF511D5859B9FC3A0ADDF8CE3A566262C9848F05B06D825EA944AD. Schedules remain disabled; DEC-083 is not resolved.
2026-08-09 02:01:25 +09:00
kjh2064 6a86997438 docs: close AEG-V15-033 schedule anchor evidence
Evidence: Release targeted ScheduleOccurrencePlannerTests 2/2 passed; TRX SHA256 4CDD5098C0D49B642A869E35A77F31CB4BF4A9CB76F0B340F1C69EF58C7ED864. No scheduler was enabled.
2026-08-09 01:56:32 +09:00
kjh2064 a3c20240ab test: lock shared layout contracts (V13-FE-006) 2026-08-09 01:04:04 +09:00
kjh2064 e5da826329 feat: adopt vendor-neutral form components (V13-FE-005) 2026-08-09 01:02:34 +09:00
kjh2064 eee15039e2 docs: reconcile adapter implementation evidence (V13-FE-004) 2026-08-09 01:00:42 +09:00
kjh2064 35161d8363 docs: reconcile UI adapter port contract (V13-FE-003) 2026-08-09 01:00:03 +09:00
kjh2064 b70eab02d1 docs: record KBX v36 design harness (V13-FE-001) 2026-08-09 00:53:36 +09:00
kjh2064 9ffb740f07 fix: DEBT-028 - wire ActivateModelHandler, fix data-corrupting activation
Systematic sweep of every *Handler registered in Program.cs (same
method that found DEBT-026/027) found ActivateModelHandler was the
last orphan in Features/ApprovalWorkflow/: no POST /approvals/{id}/activate
endpoint existed, so an Approved proposal could never reach Active -
the entire point of this maker-checker slice.

While wiring it up, found the handler's original call would have
overwritten the checker's approved_by/approval_notes with the
activating SRE's identity (it passed userEmail through
UpdateProposalStatusAsync's approvedBy parameter), and never set
activated_by/activated_at at all despite those columns existing since
migration 0036. Added a dedicated ApprovalWorkflowSql.ActivateProposalAsync
that only touches activation-specific columns, and a regression test
asserting the checker's approval record survives activation unchanged.

Also documents DEBT-029 (discovered, not fixed - genuine cross-cutting
scope): LogAuditEventCommandHandler is never called by any other
slice, so VS-27's audit trail is empty in production regardless of
activity even though its own tests pass. Downgraded AEG-VS-27-01 from
COMPLETED to BLOCKED in the tracker to reflect that honestly.

dotnet build KArtSell.sln -c Release: clean. Not run against a live
database this session.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-09 00:32:02 +09:00
kjh2064 ace9fe8a9c fix: DEBT-027 - schedule trade status polling/settlement job
PollTradeStatusHandler and ConfirmSettlementHandler were fully
implemented and registered in DI, but nothing in the running
application ever called them - no endpoint, no Hangfire job. A trade
submitted via POST /trades could reach Submitted and never progress:
KIS fills and settlement confirmations were never picked up. Same
class of gap as DEBT-026 (a complete handler with no caller).

Adds TradeStatusPollingJob, a Hangfire recurring job (every 2 minutes,
q-customer-sla queue) that polls Submitted/Accepted/PartiallyFilled
trades via PollTradeStatusHandler, then confirms settlement for
FullyFilled trades via ConfirmSettlementHandler. Registered in
Program.cs alongside the other recurring jobs.

dotnet build KArtSell.sln -c Release: clean. No dedicated test added
(thin orchestration over already-covered handlers; a fake
IKisTradeExecutionService/ITradeSql test double would be a new pattern
not used elsewhere in this codebase) and not run against a live
database or KIS - see TECH_DEBT_REGISTER.md DEBT-027.

Also corrected WBS_PROGRESS_TRACKER.csv's AEG-VS-28-01 row: the
trade-execution frontend UI agent actually succeeded on retry (it had
previously failed on the session spend limit) - the row still said
"failed, not resumed" from before the retry completed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-09 00:12:32 +09:00
kjh2064 8ed232e224 fix: DEBT-018 - make outbox writes co-transactional with entity writes
TradeExecution: TradeOutboxPublisher.PublishAsync replaced with
UpdateAndPublishAsync, which opens one connection/transaction, updates
trade status and writes the outbox message on it, then commits once.
Used by the 3 call sites that publish an event after a status update
(SubmitTradeHandler, PollTradeStatusHandler's FullyFilled branch,
ConfirmSettlementHandler).

PortfolioReconciliation: ReconcileTradeHandler now injects the
request-scoped IDbConnection (the same instance ReconciliationSql
already uses) instead of opening a second separate connection via
IDbConnectionFactory, begins one transaction shared by
ReconciliationEngine.ReconcileTradeAsync and the outbox writes, and
commits once. Required adding IDbTransaction-aware overloads of
GetHoldingAsync/UpsertHoldingAsync/InsertReconciliationLogAsync - the
read needed one too, since Npgsql throws if a command on a connection
with a pending transaction doesn't have it attached.

dotnet build KArtSell.sln -c Release: clean. Integration tests: 17
pure-logic tests pass, 13 DB-backed tests fail with the pre-existing
connection-refused error (no SSH tunnel in this environment) - the
transactional changes themselves are not yet verified against a live
database. Also corrected two WBS_PROGRESS_TRACKER.csv rows that
inaccurately said frontend UI work was "in progress" when the
background agents building VS-28/VS-29 UI had actually failed
(hit the session's spend limit) before committing anything.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-08 23:04:44 +09:00
kjh2064 3c56c0926a fix: DEBT-025/026 - wire Draft->Proposed transition and GET /approvals/{id}
DEBT-026 (high impact): ProposeForReviewHandler + POST /approvals/{id}/propose
wires ApprovalWorkflowPolicy.CanProposeForReview, which previously had no
Handler/Endpoint calling it. Before this, a proposal created via POST
/approvals could never reach Approved/Active through the running application
- the maker-checker gate was not completable end-to-end via HTTP.

DEBT-025 (medium impact): GetApprovalByIdEndpoint (GET /approvals/{id}) +
ApprovalWorkflowSql.GetEvidenceForProposalAsync make evidence attached during
approval (PBO/DSR/OOS artifact links) readable via HTTP instead of only by
querying model_operations.approval_evidence directly.

Both discovered while resolving DEBT-017 earlier the same session. 4 new
tests added. dotnet build -c Release clean. Not verified against a live
database (no SSH tunnel open in this environment) - see
TECH_DEBT_REGISTER.md and WBS_PROGRESS_TRACKER.csv AEG-VS-26-01 for the
honest verification status; do not mark COMPLETED until a real Postgres
run passes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-08 22:55:56 +09:00
kjh2064 9d3a467dde Merge DEBT-017 fix: adopt Features/ApprovalWorkflow as canonical
Merges the isolated-worktree agent's resolution of TECH_DEBT_REGISTER.md
DEBT-017 (duplicate ApprovalWorkflow implementation) into this branch.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

# Conflicts:
#	CURRENT_ROADMAP.md
#	docs/CURRENT/CATALOGS/WBS_PROGRESS_TRACKER.csv
#	src/KArtSell.Modules.ModelOperations/ApprovalWorkflow/README.md
2026-08-08 17:59:25 +09:00
kjh2064 70d7c7c8dc fix: align UI catalog contract metadata (AEG-V16-024) 2026-08-08 16:43:03 +09:00
kjh2064 9da1903d64 fix: resolve frontend TypeScript sources first (AEG-X-002) 2026-08-08 16:34:44 +09:00
kjh2064 9665f7791f perf: lazy load selected UI provider (AEG-X-002) 2026-08-08 16:29:36 +09:00
kjh2064 4e0a0bc02b perf: split frontend routes from initial bundle (AEG-X-002) 2026-08-08 16:21:34 +09:00
kjh2064 7b04dd6017 fix: prevent frontend typecheck source emit (AEG-X-002) 2026-08-08 16:05:39 +09:00
kjh2064 a910fc86d7 docs: mark AEG-V16-015 rollback evidence blocked 2026-08-08 15:59:24 +09:00
kjh2064 aad6b9ee04 test: preserve AEG-V16-016 vendor-boundary evidence 2026-08-08 15:40:35 +09:00
kjh2064 2293acc825 docs: correct AEG-X-038 cost audit evidence 2026-08-08 15:33:50 +09:00
kjh2064 02bdd39d31 docs: record AEG-X-038 cost-data blocker 2026-08-08 15:33:18 +09:00
kjh2064 c44f55aef6 docs: record AEG-VS-06-01 contract blocker 2026-08-08 15:27:18 +09:00
kjh2064 0ce86742b0 docs: record AEG-VS-05-01 contract blocker 2026-08-08 15:18:56 +09:00
kjh2064 3287ae399e feat: type-safe CRUD sensitive field definitions (AEG-V16-021)
Constrain sensitive fields to row keys and preserve generic resource-definition contracts.
2026-08-08 15:00:57 +09:00
kjh2064 6f47d71c4a test: add shared accessibility contract gate (AEG-V16-024)
Verify required field error relationships and busy command suppression; preserve actual test evidence while awaiting UX/QA artifacts.
2026-08-08 14:52:15 +09:00
kjh2064 cada8fe843 test: cover all screen states in T01-T10 catalogue (AEG-V16-023)
Type mandatory states and prevent READY or FORBIDDEN from drifting out of the shared screen matrix.
2026-08-08 14:25:18 +09:00
kjh2064 a750858dfe fix: preserve idempotency keys across command retries (AEG-V16-022)
Create one immutable request per user intent so retries forward the same key; preserve concurrency conflict handling and execution evidence.
2026-08-08 13:35:30 +09:00
kjh2064 a84e5c1273 feat: harden CRUD resource contract checks (AEG-V16-020)
Reject incomplete permission, version, concurrency, idempotency, and sensitive-column contracts. Preserve runtime regression evidence; status remains IN_PROGRESS pending predecessor acceptance.
2026-08-08 13:13:32 +09:00
kjh2064 30c941cc5b feat: guard CommandBar busy actions (AEG-V16-019)
Keep action order while preventing disabled or busy actions from emitting a command. Preserve test evidence; status remains IN_PROGRESS pending predecessor acceptance.
2026-08-08 13:07:54 +09:00
kjh2064 14e2cedc4f fix: resolve DEBT-017 duplicate ApprovalWorkflow implementation
Adopt Features/ApprovalWorkflow/ (wired into Program.cs, reachable over
HTTP) as the sole VS-26 (formerly VS-03) maker-checker approval slice.
Delete the dead, [DontRegister]'d duplicate under
ApprovalWorkflow/ (Workstream H) and its dedicated test file, which had
been misleadingly credited with "20/20 tests PASS" while being
unreachable at runtime.

- Sql.cs: fix the same Dapper DateOnly-parameter-binding bug that was
  already found and fixed in the now-deleted implementation
  (commit 2ccf74c) but had not been ported to this one; InsertProposalAsync
  would have failed 100% of the time against a real database.
- tests/.../ApprovalWorkflow/ApprovalWorkflowTests.cs: new Handler+Sql+
  real-Postgres integration coverage (create/approve/activate role
  gating, maker!=checker separation of duties, evidence attachment,
  DateOnly round-trip, list filtering) replacing the deleted dead-code
  suite at the same path.
- ApprovalWorkflowPolicyTests.cs: extended (5->10 cases) rather than
  replaced, since it already tested the kept implementation's Policy.
- Program.cs: drop the reference comment to the deleted namespace.
- TECH_DEBT_REGISTER.md: DEBT-017 marked Completed (DB verification
  pending); corrected stale DEBT-023 to point at this resolution;
  registered two residual gaps discovered (not introduced) by this
  cleanup as DEBT-025 (no GET /approvals/{id}, evidence unreachable via
  HTTP) and DEBT-026 (no wired Draft->Proposed transition, so the
  approve/activate path is currently unreachable end-to-end via HTTP).
- WBS_PROGRESS_TRACKER.csv / CURRENT_ROADMAP.md: AEG-VS-26-01 kept
  BLOCKED, not COMPLETED — no PostgreSQL was reachable in this session
  (127.0.0.1:5432 connection refused), so the 8 new integration tests
  are unverified; only the 10 pure-Policy tests were confirmed passing.

Cherry-picked cedc8d7/8c777df from docs/wbs-tracker-current-state onto
this worktree branch first, to bring in the VS-26 renumbering and
ADR-WBS-001 that this task's brief assumed already existed.

dotnet build -c Release: 0 errors/0 warnings.
dotnet test --filter "FullyQualifiedName~ApprovalWorkflow" -c Release:
10 passed (Policy, no DB), 15 failed (DB connection refused - includes
6 unrelated pre-existing tests matched by the filter substring).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-08 13:05:03 +09:00
kjh2064 f2b7b40668 feat: require complete data context header evidence (AEG-V16-018)
Make projection and watermark visible requirements, expose stale state accessibly, and add component regression coverage. Status remains IN_PROGRESS pending predecessor and UX evidence.
2026-08-08 13:02:22 +09:00
kjh2064 52bdf926ad docs: define provider rollback evidence runbook (AEG-V16-015)
Document startup-only provider switching, immutable-artifact rollback, and mandatory visual/accessibility/performance evidence. Status remains IN_PROGRESS until rehearsal and predecessor evidence exist.
2026-08-08 12:58:23 +09:00
kjh2064 b78c19646f fix: keep v16 vendor-boundary validation catalog-safe (AEG-V16-016)
Validate extensible WBS identity integrity instead of an obsolete fixed row count. Preserve actual vendor-boundary and adapter-contract evidence; status remains IN_PROGRESS pending predecessor acceptance evidence.
2026-08-08 12:56:50 +09:00
kjh2064 7304aafc83 feat: standardize FieldShell accessibility boundary (AEG-V16-017)
Centralize label, error, help, required, and ARIA relationships across core field wrappers. Preserve WBS evidence and keep the item IN_PROGRESS pending predecessor acceptance evidence.

Evidence: frontend pnpm typecheck; pnpm test (42/42); pnpm build.
2026-08-08 12:52:04 +09:00
kjh2064 df7d41df7d docs: add DBA grant script and Phase 1 VersionSet approval checklist
- scripts/dba/grant-migration-test-db-ownership.sql: for a DBA to run,
  fixes the kartsell_migration_test ownership regression blocking
  DbUpMigrationTests/DbUpRecoveryTests (12 tests) locally.
- docs/CURRENT/PHASE-1_APPROVAL_CHECKLIST.md +
  scripts/phase1/template-approve-versionset.sql: documents/templates the
  human maker-checker approval steps needed to freeze a VersionSet before
  Phase 1 shadow run can be re-queued. Does not perform any approval —
  every placeholder must be filled by a real, named maker and a different
  named checker. No automation should insert rows into dataset_manifest /
  model_version_registry / evidence_snapshot / release_evidence_bundle.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-08 12:47:24 +09:00
kjh2064 60c90baa28 docs: resolve VS-03/04/12/14 numbering collision (renumber to VS-26/27/28/29)
Renumbers the four 2026-08-07 slices (ApprovalWorkflow, AuditTrail,
TradeExecution, PortfolioReconciliation) to previously-unused VS-26..29,
leaving WBS_MASTER.csv's original VS-03/04/12/14 definitions (IngestMarketDataPIT,
ApplyCorporateActions, RankBuyCandidates, GenerateDailyRecommendations) untouched,
per docs/DECISIONS/ADR-WBS-001-slice-renumbering.md.

While investigating, found two things not yet resolved by this commit:
- DEBT-017 (duplicate ApprovalWorkflow implementation): the tested backend
  (ApprovalWorkflow/) is [DontRegister]'d dead code; the live one
  (Features/ApprovalWorkflow/, wired in Program.cs) has no dedicated tests.
  AEG-VS-26-01 downgraded from COMPLETED to BLOCKED in the tracker pending an
  architect decision on which implementation is canonical.
- Features/MarketData and Features/Portfolio (VS-03/04/05/08 Market Data
  Ingestion Dashboard, Portfolio Rebalance, Risk Metrics, Dashboard) are a
  third, already-implemented-and-tested body of work entirely absent from
  WBS_PROGRESS_TRACKER.csv. Flagged in CURRENT_ROADMAP.md as a follow-up.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-08 12:47:24 +09:00
kjh2064 8c777df66b docs: add DBA grant script and Phase 1 VersionSet approval checklist
- scripts/dba/grant-migration-test-db-ownership.sql: for a DBA to run,
  fixes the kartsell_migration_test ownership regression blocking
  DbUpMigrationTests/DbUpRecoveryTests (12 tests) locally.
- docs/CURRENT/PHASE-1_APPROVAL_CHECKLIST.md +
  scripts/phase1/template-approve-versionset.sql: documents/templates the
  human maker-checker approval steps needed to freeze a VersionSet before
  Phase 1 shadow run can be re-queued. Does not perform any approval —
  every placeholder must be filled by a real, named maker and a different
  named checker. No automation should insert rows into dataset_manifest /
  model_version_registry / evidence_snapshot / release_evidence_bundle.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-08 12:39:18 +09:00
kjh2064 cedc8d79ee docs: resolve VS-03/04/12/14 numbering collision (renumber to VS-26/27/28/29)
Renumbers the four 2026-08-07 slices (ApprovalWorkflow, AuditTrail,
TradeExecution, PortfolioReconciliation) to previously-unused VS-26..29,
leaving WBS_MASTER.csv's original VS-03/04/12/14 definitions (IngestMarketDataPIT,
ApplyCorporateActions, RankBuyCandidates, GenerateDailyRecommendations) untouched,
per docs/DECISIONS/ADR-WBS-001-slice-renumbering.md.

While investigating, found two things not yet resolved by this commit:
- DEBT-017 (duplicate ApprovalWorkflow implementation): the tested backend
  (ApprovalWorkflow/) is [DontRegister]'d dead code; the live one
  (Features/ApprovalWorkflow/, wired in Program.cs) has no dedicated tests.
  AEG-VS-26-01 downgraded from COMPLETED to BLOCKED in the tracker pending an
  architect decision on which implementation is canonical.
- Features/MarketData and Features/Portfolio (VS-03/04/05/08 Market Data
  Ingestion Dashboard, Portfolio Rebalance, Risk Metrics, Dashboard) are a
  third, already-implemented-and-tested body of work entirely absent from
  WBS_PROGRESS_TRACKER.csv. Flagged in CURRENT_ROADMAP.md as a follow-up.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-08 12:36:00 +09:00
kjh2064 53be11673c docs: correct WBS tracker and roadmap against verified current state
Both docs were stale relative to 115 commits already on main (VS-03
Approval Workflow, VS-04 Audit Trail, AEG-X-009 live API integration,
Phase 3 J/K/L Sell Decision/Trade Execution/Portfolio Reconciliation),
and repeated an already-corrected false claim that Phase 1 shadow run
was RUNNING.

WBS_PROGRESS_TRACKER.csv:
- AEG-VS-03-01, AEG-VS-04-01: PLANNED/BLOCKED -> COMPLETED, with real
  file paths, commit refs, and isolated test-run counts (20/20, 5/5)
  as evidence.
- AEG-VS-10-01: BLOCKED -> COMPLETED (implementation), with an
  explicit caveat that PBO/DSR production validation is separate and
  still blocked on Phase 1 - not overclaiming past what's verified.
- Added AEG-VS-12-01 (Trade Execution) and AEG-VS-14-01 (Portfolio
  Reconciliation), which had no tracker row at all despite being
  merged to main.
- Flagged a real WBS_ID collision: WBS_MASTER.csv defines VS-03/04/12/14
  as different, unrelated slices (IngestMarketDataPIT, ApplyCorporateActions,
  RankBuyCandidates, GenerateDailyRecommendations). Per user decision,
  kept the tracker's existing IDs and recorded the collision as
  DECISION_REQUIRED on each affected row rather than silently
  renumbering or picking a side.
- Softened AEG-VS-05-01/AEG-X-011/AEG-VS-09-01/AEG-VS-19-01 notes that
  implied Phase 1 was actively counting down ("Job 976, ~50-90 days") -
  corrected to say Phase 1 has not been queued.
- Re-confirmed PHASE-1-SHADOW-RUN unchanged: still no RunId/JobId
  anywhere in this workspace.

CURRENT_ROADMAP.md: full rewrite. Dropped the 2026-08-03 snapshot
content, replaced with what's actually true today, and added a short
"how to re-verify this document" section (check git log divergence,
re-run tests in isolation not just as a full suite, confirm file paths
before writing COMPLETED) aimed at whoever updates this next.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-07 23:45:07 +09:00
kjh2064 b1e38ac374 feat: Phase 3 J/K/L (Sell Decision, Trade Execution, Portfolio Reconciliation) + fix pre-existing build/boot breakage
Completes VS-10/VS-12/VS-14 and makes the solution and Host actually
build and boot for the first time on this branch (main did not build
before this commit).

Root-cause fixes required to reach a green build/boot (not scoped to
J/K/L but blocking any verification of it):
- Restore Polly PackageVersion accidentally deleted from
  Directory.Packages.props (broke KArtSell.Host).
- Remove MediatR dependency from Compliance/VS-04 (package was never
  installed; ICommand/ICommandHandler/IMediator never existed) and
  wire Endpoint -> Handler directly per this repo's convention.
- Migrate FastEndpoints v5 API calls (SendOkAsync/SendAsync/
  SendCreatedAtAsync/SendNotFoundAsync, Description().WithName()) to
  the v7 Send.* fluent API across ~10 endpoint files.
- Fix migrations 0036/0038/0039/0040: rewritten from invalid T-SQL
  (`IF NOT EXISTS ... BEGIN ... END`) to idiomatic Postgres
  (`CREATE TABLE/INDEX IF NOT EXISTS`) — these could not apply to any
  fresh database before this fix.
- Collapse 3 duplicate cross-cutting abstractions that shadowed the
  BuildingBlocks versions and caused type-mismatch compile errors:
  IKrxDataService, IOutboxWriter (ReconcileTradeHandler), IClock
  (ApprovalWorkflow/ApprovalPolicy).
- Inject IClock (BuildingBlocks.Time) in place of direct
  DateTime.Now/UtcNow across 19 files to satisfy the architecture
  test AGENTS.md#DateTime-abstraction rule (13/13 architecture tests
  now pass, was 12/13).
- Register all new and previously-unregistered slices in
  Program.cs DI (SellDecision, TradeExecution, PortfolioReconciliation,
  Compliance, Features/ApprovalWorkflow) — the Host had never
  successfully completed a boot with this code present.
- Disable ("[DontRegister]") the older, route-colliding
  ApprovalWorkflow/ (Workstream H) endpoint set in favor of
  Features/ApprovalWorkflow/ (Workstream G, matches the documented
  Features/<Slice>/ convention); kept for its existing test coverage.
  See TECH_DEBT-017 for the follow-up decision needed.

Verified: dotnet build 0 errors/0 warnings; architecture tests 13/13;
unit tests 54/54 + 18/18; integration tests 34/36 (2 failures are a
local test-DB migration-journal/schema mismatch, not a code defect);
Host boots cleanly and registers all 34 endpoints.

New tech debt recorded: DEBT-017 (duplicate VS-03 implementation),
DEBT-018 (outbox write not co-transactional with entity write in
TradeExecution/PortfolioReconciliation), DEBT-019 (duplicate
BuildingBlocks-shadowing abstractions, partially resolved).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-07 19:53:38 +09:00
kjh2064 cef4289b32 Merge pull request 'Workstream F: VS-03 & VS-04 Slice Specifications (Complete Design)' (#27) from feat/F-vs03-vs04-design into main
deploy / deploy (push) Failing after 1m6s
deploy / notify (push) Successful in 1s
Reviewed-on: #27
2026-08-07 17:18:46 +09:00
kjh2064 aef5a5831d Merge pull request 'Workstream E: VS-02 Data Governance Policy' (#26) from feat/E-vs02-data-governance into main
deploy / notify (push) Has been cancelled
deploy / deploy (push) Has been cancelled
Reviewed-on: #26
2026-08-07 17:18:34 +09:00