fix: clean up service configuration startup and development commands

This commit is contained in:
Boki 2026-10-26 13:23:49 -04:00
parent 4ddffa6b67
commit 805a9f8fd4
36 changed files with 627 additions and 596 deletions

View file

@ -1,6 +1,6 @@
# Cleanup and maintainability plan
Baseline: `fbf2eb9e`, inspected October 26, 2026. This is a planning-only extension of the existing development backlog. The original 45 scheduled tasks remain complete; these 13 cleanup stories are new work. No application implementation, agent launch or Git commit is part of this request.
Baseline: `fbf2eb9e`, inspected October 26, 2026. This extends the existing development backlog. The original 45 scheduled tasks remain complete; these 13 cleanup stories are new work. The owner subsequently authorized implementation and validated commits; progress and checks are recorded in [cleanup-execution.md](cleanup-execution.md). No additional agents have been launched.
[manifest.json](backlog/manifest.json) remains the scheduling source of truth. It records task states, prerequisites, priorities and write locks. This page explains the execution contract and recommended order; it is not a second status tracker. Current evidence is appended to [findings.md](backlog/findings.md#cleanup-audit-2026-10-26).
@ -59,7 +59,7 @@ This is a preferred sequence, not an artificial dependency chain. Unrelated fron
## First execution wave
**CL01, CL03 and CL04** are the first independent assignments. Implementation still requires a subsequent user instruction; current manifest authorization is planning-only. The earlier completion authorization remains historical evidence for the completed original backlog.
**CL01, CL03 and CL04** are the first independent assignments. The owner has authorized implementation and validated commits. The earlier completion authorization remains historical evidence for the completed original backlog.
| Story | Why first | Writable ownership | Completion evidence |
| --- | --- | --- | --- |
@ -72,7 +72,7 @@ These three assignments have disjoint authored paths. For a solo maintainer, sta
## Execution contract
- Read the task, current manifest, approved relevant architecture decisions and [QUALITY-GATES.md](QUALITY-GATES.md). Scope is the selected story, not permission to implement neighboring cleanup.
- `ready` means code prerequisites are satisfied. The current top-level `execution_authorized` is false because the user requested stories, not implementation. Do not infer new authorization from historical task completion or old continuation instructions.
- `ready` means code prerequisites are satisfied. The current top-level `execution_authorized` is true following the owner’s explicit cleanup implementation request. Scope remains these stories; conditional performance/product tasks are excluded.
- Use one focused branch/worktree per implementation when multiple agents are used. Claim exact files and write locks in the manifest before edits. An unexpected overlap requires coordination before changing the shared file.
- Preserve Rust financial semantics, strategy targets/state, exact financial output, command idempotency, receipt recovery, run/outbox atomicity, leases, paper recovery and original reproduction inputs.
- Preserve historical result readers, retained source/build artifacts, reviewed calculation APIs and useful legacy research. No broad dead-code deletion or native-export removal follows from this plan.

View file

@ -2,7 +2,7 @@
**The original 45/45 scheduled tasks are complete.** The canonical Rust engine, TypeScript research/workbench, bounded worker pool, isolated candidates, AI evidence workflow and human-reviewed paper promotion are validated. Implementation commits: `bbf0dd4`, `26b9726`, `25b5cbf` (R07 measurement `ab08db8`). Six conditional tasks remain deferred; four merged IDs remain redirects. This is scheduled-backlog completion, not live-trading activation.
**New work:** [13 cleanup stories](../CLEANUP.md) were proposed on October 26, 2026. Their implementation has not been requested; the manifest's current execution authorization is false. The first independent group is CL01, CL03 and CL04.
**New work:** [13 cleanup stories](../CLEANUP.md) were proposed on October 26, 2026. The owner subsequently authorized implementation and commits; see [execution evidence](../cleanup-execution.md). The first independent group is CL01, CL03 and CL04.
## One source of truth

View file

@ -2,8 +2,8 @@
"schema_version": 1,
"plan_revision": "2026-10-26.79",
"repository_base": "b7aeca4",
"plan_status": "cleanup_backlog_proposed",
"execution_authorized": false,
"plan_status": "cleanup_backlog_in_progress",
"execution_authorized": true,
"execution_scope": {
"authorized_by": "Owner: commit and continue with the rest of the tasks till 100%",
"tasks": ["R05", "R07", "S06", "A01", "A02", "A03", "A04", "P04"],
@ -50,7 +50,7 @@
"CL03",
"CL04"
],
"authorization": "Stories and planning artifacts only. Top-level execution_authorized is false; historical execution_scope applies to the completed original backlog.",
"authorization": "Owner authorized cleanup implementation and validated commits: commit, implement backlog tasks and commit again. Historical execution_scope remains evidence for the original backlog.",
"preserved_original_tasks": 55,
"preserved_original_completed_tasks": 45,
"excluded": [
@ -2086,7 +2086,7 @@
"epic": "E10",
"priority": "P1",
"severity": "High",
"status": "ready",
"status": "done",
"dependencies": [],
"decision_dependencies": [],
"task_file": "backlog/tasks/CL01.md",
@ -2105,13 +2105,14 @@
"completed_commit": null,
"blocker": null,
"release_gates": [],
"integration_state": "planned",
"integration_state": "validated",
"integration_base": "fbf2eb9e",
"review_notes": "Planning-only cleanup story requested 2026-10-26. Current implementation authorization is false. No implementation, tests or completion are claimed by this entry.",
"review_notes": "Focused implementation and integration checks recorded in cleanup-execution.md; no separate reviewer agent was launched.",
"concrete_write_scope": [
"libs/core/di/test/container-builder.test.ts",
"libs/core/di/test/di.test.ts"
]
],
"completion_evidence": "docs/development/cleanup-execution.md"
},
{
"id": "CL02",
@ -2119,7 +2120,7 @@
"epic": "E10",
"priority": "P1",
"severity": "High",
"status": "blocked",
"status": "done",
"dependencies": [
"CL01"
],
@ -2140,11 +2141,11 @@
"branch": null,
"pull_request": null,
"completed_commit": null,
"blocker": "Waiting for implementation prerequisites: CL01.",
"blocker": null,
"release_gates": [],
"integration_state": "planned",
"integration_state": "validated",
"integration_base": "fbf2eb9e",
"review_notes": "Planning-only cleanup story requested 2026-10-26. Current implementation authorization is false. No implementation, tests or completion are claimed by this entry.",
"review_notes": "Focused implementation and integration checks recorded in cleanup-execution.md; no separate reviewer agent was launched.",
"concrete_write_scope": [
"libs/core/config/src/schemas/database.schema.ts",
"libs/core/config/src/schemas/unified-app.schema.ts",
@ -2155,7 +2156,8 @@
"test/integration/questdb-configuration.test.ts",
"libs/core/di/test/container-builder.test.ts",
"test/integration/store-configuration.test.ts"
]
],
"completion_evidence": "docs/development/cleanup-execution.md"
},
{
"id": "CL03",
@ -2163,7 +2165,7 @@
"epic": "E10",
"priority": "P1",
"severity": "High",
"status": "ready",
"status": "done",
"dependencies": [],
"decision_dependencies": [],
"task_file": "backlog/tasks/CL03.md",
@ -2183,15 +2185,16 @@
"completed_commit": null,
"blocker": null,
"release_gates": [],
"integration_state": "planned",
"integration_state": "validated",
"integration_base": "fbf2eb9e",
"review_notes": "Planning-only cleanup story requested 2026-10-26. Current implementation authorization is false. No implementation, tests or completion are claimed by this entry.",
"review_notes": "Focused implementation and integration checks recorded in cleanup-execution.md; no separate reviewer agent was launched.",
"concrete_write_scope": [
"libs/core/di/src/utils/lifecycle.ts",
"libs/core/di/src/container/builder.ts",
"libs/core/di/test/lifecycle.test.ts",
"test/integration/service-startup-rollback.test.ts"
]
],
"completion_evidence": "docs/development/cleanup-execution.md"
},
{
"id": "CL04",
@ -2199,7 +2202,7 @@
"epic": "E10",
"priority": "P1",
"severity": "Medium",
"status": "ready",
"status": "done",
"dependencies": [],
"decision_dependencies": [],
"task_file": "backlog/tasks/CL04.md",
@ -2220,9 +2223,9 @@
"completed_commit": null,
"blocker": null,
"release_gates": [],
"integration_state": "planned",
"integration_state": "validated",
"integration_base": "fbf2eb9e",
"review_notes": "Planning-only cleanup story requested 2026-10-26. Current implementation authorization is false. No implementation, tests or completion are claimed by this entry.",
"review_notes": "Focused implementation and integration checks recorded in cleanup-execution.md; no separate reviewer agent was launched.",
"concrete_write_scope": [
"package.json",
"scripts/docker.sh",
@ -2230,7 +2233,8 @@
"README.md",
"apps/stock/README.md",
"apps/stock/web-app/README.md"
]
],
"completion_evidence": "docs/development/cleanup-execution.md"
},
{
"id": "CL05",

View file

@ -2,7 +2,7 @@
Parent epic: E10. Priority/severity: P1 / High. Complexity: M. Specialization: TypeScript infrastructure testing.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). This story defines planned work; implementation has not been requested.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). Implementation and validated commits were authorized after planning; scheduling and completion evidence live in the manifest.
## User story and outcome

View file

@ -2,7 +2,7 @@
Parent epic: E10. Priority/severity: P1 / High. Complexity: M. Specialization: TypeScript configuration and database adapters.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). This story defines planned work; implementation has not been requested.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). Implementation and validated commits were authorized after planning; scheduling and completion evidence live in the manifest.
## User story and outcome

View file

@ -2,7 +2,7 @@
Parent epic: E10. Priority/severity: P1 / High. Complexity: M. Specialization: TypeScript resource lifecycle and concurrency.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). This story defines planned work; implementation has not been requested.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). Implementation and validated commits were authorized after planning; scheduling and completion evidence live in the manifest.
## User story and outcome

View file

@ -2,7 +2,7 @@
Parent epic: E10. Priority/severity: P1 / Medium. Complexity: S. Specialization: Bun/Turbo developer tooling.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). This story defines planned work; implementation has not been requested.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). Implementation and validated commits were authorized after planning; scheduling and completion evidence live in the manifest.
## User story and outcome

View file

@ -2,7 +2,7 @@
Parent epic: E10. Priority/severity: P2 / High. Complexity: M. Specialization: TypeScript domain boundaries and package migration.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). This story defines planned work; implementation has not been requested.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). Implementation and validated commits were authorized after planning; scheduling and completion evidence live in the manifest.
## User story and outcome

View file

@ -2,7 +2,7 @@
Parent epic: E10. Priority/severity: P2 / Medium. Complexity: M. Specialization: Shared contracts and frontend validation.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). This story defines planned work; implementation has not been requested.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). Implementation and validated commits were authorized after planning; scheduling and completion evidence live in the manifest.
## User story and outcome

View file

@ -2,7 +2,7 @@
Parent epic: E10. Priority/severity: P2 / Medium. Complexity: M. Specialization: Frontend HTTP contracts and retry semantics.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). This story defines planned work; implementation has not been requested.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). Implementation and validated commits were authorized after planning; scheduling and completion evidence live in the manifest.
## User story and outcome

View file

@ -2,7 +2,7 @@
Parent epic: E10. Priority/severity: P2 / Medium. Complexity: M. Specialization: TypeScript application services and PostgreSQL transactions.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). This story defines planned work; implementation has not been requested.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). Implementation and validated commits were authorized after planning; scheduling and completion evidence live in the manifest.
## User story and outcome

View file

@ -2,7 +2,7 @@
Parent epic: E10. Priority/severity: P2 / Medium. Complexity: M. Specialization: React strategy workflows.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). This story defines planned work; implementation has not been requested.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). Implementation and validated commits were authorized after planning; scheduling and completion evidence live in the manifest.
## User story and outcome

View file

@ -2,7 +2,7 @@
Parent epic: E10. Priority/severity: P2 / Medium. Complexity: M. Specialization: React experiment workflow state.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). This story defines planned work; implementation has not been requested.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). Implementation and validated commits were authorized after planning; scheduling and completion evidence live in the manifest.
## User story and outcome

View file

@ -2,7 +2,7 @@
Parent epic: E10. Priority/severity: P2 / Medium. Complexity: M. Specialization: React asynchronous state and durable-run UX.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). This story defines planned work; implementation has not been requested.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). Implementation and validated commits were authorized after planning; scheduling and completion evidence live in the manifest.
## User story and outcome

View file

@ -2,7 +2,7 @@
Parent epic: E10. Priority/severity: P2 / Medium. Complexity: M. Specialization: Compatibility cleanup and execution boundaries.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). This story defines planned work; implementation has not been requested.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). Implementation and validated commits were authorized after planning; scheduling and completion evidence live in the manifest.
## User story and outcome

View file

@ -2,7 +2,7 @@
Parent epic: E10. Priority/severity: P2 / Low. Complexity: S. Specialization: React navigation and product clarity.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). This story defines planned work; implementation has not been requested.
Scheduling metadata: [manifest](../manifest.json). Read the [cleanup execution contract](../../CLEANUP.md#execution-contract). Implementation and validated commits were authorized after planning; scheduling and completion evidence live in the manifest.
## User story and outcome

View file

@ -0,0 +1,33 @@
# Cleanup execution evidence
The owner authorized implementation and validated commits after plan commit `4ddffa6b`.
The [manifest](backlog/manifest.json) remains the task-state authority. No additional
agents were launched; review here is a separate self-review pass, not an independent
reviewer sign-off. Financial engine code and retained financial artifacts are unchanged.
## CL01–CL04 — Configuration, startup and commands
- CL01 replaces the mocked normalizer and success-or-error assertions with real-schema,
no-network construction checks. Existing DI fixtures now supply valid database inputs.
- CL02 shares the core database schemas, consistently applies disable options, preserves
QuestDB port aliases/credentials, and maps PostgreSQL SSL/pool/timeouts and MongoDB URI/pool
settings to client configuration. URI parsing remains driver-owned.
- CL03 retains cleanup ownership of late initialization, rolls back settled resources,
clears startup timers and tolerates cleanup/resolution failures without replacing the
original startup error. Arbitrary hung initializers cannot be forcibly cancelled;
their final cleanup stays attached until settlement.
- CL04 adds `dev:research`, aligns infrastructure aliases on Compose v2/all four stores,
removes three nonexistent command targets and makes shell failures propagate.
Validation:
- `bun test libs/core/di/test/container-builder.test.ts libs/core/di/test/di.test.ts libs/core/di/test/lifecycle.test.ts test/integration/service-startup-rollback.test.ts test/integration/questdb-configuration.test.ts` — 41 pass.
- `bun test test/integration/store-configuration.test.ts` — 5 pass.
- `bun test scripts/test/workspace.test.ts` — 8 pass / 763 assertions; includes real Turbo dry runs and a fake Docker executable, with no containers started.
- `bun run --cwd libs/core/config build`, `bun run --cwd libs/core/di build`, `bun run typecheck` — pass.
Configuration scope: core schemas retain settings used by other consumers. ServiceCache
intentionally owns DB1 and its service/global namespace; core `db`/`keyPrefix` do not override
that isolation policy. Core `ttl`, retry hints and QuestDB buffer/flush metadata are not
claims that the shared DI client supports writer/cache tuning; those adapter APIs remain
unchanged. Financial inputs, hashes and accounting were not modified.