Keep action order while preventing disabled or busy actions from emitting a command. Preserve test evidence; status remains IN_PROGRESS pending predecessor acceptance.
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>
Make projection and watermark visible requirements, expose stale state accessibly, and add component regression coverage. Status remains IN_PROGRESS pending predecessor and UX evidence.
Document startup-only provider switching, immutable-artifact rollback, and mandatory visual/accessibility/performance evidence. Status remains IN_PROGRESS until rehearsal and predecessor evidence exist.
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.
- 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>
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>
- 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>
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>
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>
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>
Deployment pipeline was computing version sequence (YYYY.MM.DD.N) by
counting existing vYYYY.MM.DD.* git tags, but the pipeline never created
those tags. Result: VERSION_SEQUENCE always resolved to 1, making the
"daily sequence" half of the contract decorative.
Now: After successful deployment to production, pipeline automatically
creates and pushes release tag vYYYY.MM.DD.N.SHA10 (e.g. v2026.08.07.1.abc1234567).
Uniqueness preserved even on same-day re-deploys. Permissions upgraded:
contents: read → write for tag push.
AGENTS.md: Right-Way (root cause fixed, not bandaged).
Ref: DEPLOY_FRONTEND_ARTIFACT_CONTRACT.md section "Bug Fix: Version Sequence Tagging"
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Tests now guard against accidental drop of kartsell_migration_test by throwing
when the credential source DB is the destructive rehearsal target. Distinct
credential DB (kartselldb_test) prevents config collision.
AEG-X-004 evidence consolidated: rehearsal .trx files + preflight markdown
documented. Schema 0032 (shadow_run_queued_status_contract) verified
fresh/upgrade/recovery on isolated DB.
AGENTS.md: Necessity-driven (guard against destructive accident); no new feature.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>