Skip to content

Conversation

@geeewhy
Copy link
Owner

@geeewhy geeewhy commented Jun 10, 2025

folds registry, command issuer devx, admin api commands endpoints, error handling hardening

geeewhy added 21 commits June 8, 2025 15:39
…mand schema contracts and singleton logging example

src/core/system/payload-schemas.ts: Added aggregateId and aggregateType to payload schemas for stricter contract alignment.
devex-ui/src/components/CommandIssuer.tsx: Removed unused timestamp display for cleaner UI.
src/api/routes/commands.ts: Introduced a POST endpoint for scheduling commands with validation, unique ID assignment, and logging improvements.
src/infra/temporal/temporal-scheduler.ts: Added warning log for unsupported commands in the scheduler for better debugging.
src/tools/lint-payloads/index.ts: Introduced a lint tool to detect missing `aggregateRouting` in registered commands.
src/core/system/register.ts: Added `aggregateRouting` metadata to system commands for consistent aggregate handling.
src/api/routes/commands.ts: Updated scheduling response to return router results.
src/core/registry.ts: Extended `CommandTypeMeta` with `aggregateRouting` for routing declarative metadata.
src/infra/temporal/workflow-router.ts: Integrated `aggregateRouting` logic into command handling for workflows.
.github/workflows/core-linter.yml: Added GitHub action for `core-lint` validation in PRs.
src/core/system/payload-schemas.ts: Removed redundant fields (`aggregateId`, `aggregateType`) from payload schemas.
README.md: Added status badge for `core-linter.yml`.
devex-ui/src/components/Header.tsx: Updated roles list to reflect new role categories.
src/components/Header.tsx: Removed role switcher; simplified tenant UI.
src/components/CommandIssuer.tsx: Replaced aggregate ID with role switcher. Added cmd highlight for recent submissions, adjusted toast UX.
src/infra/logger/apiLogger.ts, src/api/logger.ts: Added and exported `apiLogger` for modular logging focused on API layer encapsulation.
src/api/middlewares/accessLog.ts: Switched to `apiLogger` for request/response logging, replacing `stdLogger` for enhanced modularity.
src/api/routes/commands.ts: Replaced `stdLogger` with `logger` from `apiLogger`, removed redundant logger setup for improved consistency and cleaner dependency management.
src/core/system/register.ts: Introduced `registerRoles` interface and registered domain roles for "system".
src/api/routes/registry.ts: Added `/api/registry/roles` endpoint to expose roles meta; updated registry response to include roles data.
src/core/registry.ts: Added roles storage, registration, and retrieval utilities in the `DomainRegistry`.
src/tools/core-lint/index.ts: Clarified file path for better script organization.
devex-ui/src/mocks/stores/roles.store.ts: Created roles store and helper to manage domain-based roles.
devex-ui/src/hooks/api/useRoles.ts: Added a react-query hook to fetch roles by domain.
devex-ui/src/mocks/scenarios/default.ts: Seeded roles store with default domain-role mappings for mock data.
devex-ui/src/data/apiService.ts: Created fetch function for fetching roles by domain from API.
devex-ui/src/mocks/handlers.ts: Added API mock handler for fetching roles, including default fallback.
devex-ui/src/hooks/api/queryKeys.ts: Added query keys for roles for use in react-query.
devex-ui/src/hooks/api/index.ts: Exported `useRoles` for centralized API hook import.
devex-ui/src/mocks/stores/index.ts: Exported `roles.store` for centralized store registry.
devex-ui/src/data/api.ts: Refactored API baseUrl to account for `apiMode` changes.
devex-ui/src/components/CommandIssuer.tsx: Integrated roles query to dynamically fetch roles based on selected command's domain.
devex-ui/src/components/Header.tsx: Minor update to tenants array for example clarity.
devex-ui/src/components/CommandIssuer.tsx: Added role validity check with reaction to role changes using `useEffect`. Updated role selection to ensure it's dynamic, clear, and disabled until a command type is selected.
src/devex-ui/: Added SPA with tabs for commands, events, projections, traces, and AI assistance. Enabled schema-driven forms, role validation, and simulation/replay functionality through ports-only backend.
README.md: Added badge for DevX UI build status to enhance visibility.
.github/workflows/build.yml: Renamed workflow to clarify its scope as Core and Infra build.
.github/workflows/devx-ui-build.yml: Introduced a dedicated CI workflow for DevX UI, including build steps, caching, and dependency installation specific to the devex-ui directory.
src/core/policy-registry.ts: Added condition map getter and registered access models for evaluation and debugging purposes, improved policy registration.
src/core/logger.ts: Introduced `createLogger` method for scoped logger instances within the core.
src/tools/core-lint/index.ts: Expanded linting to validate roles against access models
src/infra/logger/stdLogger.ts: Improved errorSerializer with custom fields support and fallback robustness for structured logging.
src/core/errors.ts: Refactored BusinessRuleViolation with retryable flag, details, JSON support, and stack trace enhancement.
src/api/routes/commands.ts: Added BusinessRuleViolation import for comprehensive error handling.
src/infra/contracts.ts, src/infra/temporal/workflows/processCommand.ts: Updated CommandResult error type to Error for consistency.
package.json: Added `api:admin:watch` script for improved developer convenience during development.
devex-ui/, devex-ui/src/components/CommandIssuer.tsx: Addressed formatting and alignment for consistent code styling.
…ble tests with martial state object matching
@geeewhy geeewhy merged commit d9d860e into main Jun 11, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants