Skip to content

Add backend API, frontend types, SDK & CI updates - #7

Merged
BarryHenryJr merged 4 commits into
mainfrom
6-chore-refactor-refactor-and-clean-up-the-codebase
Mar 13, 2026
Merged

BarryHenryJr merged 4 commits into
mainfrom
6-chore-refactor-refactor-and-clean-up-the-codebase

Conversation

@BarryHenryJr

Copy link
Copy Markdown
Collaborator

Large refactor and feature addition across the repo: introduces a structured backend API (core api, selectors, services, management commands, tasks) with tests and new Django settings, adds OpenAPI export and generated frontend types, and ships a small Python SDK with tests. CI workflow was overhauled: renamed/streamlined jobs (validate, security, codeql), upgraded runtimes, pnpm support, automated OpenAPI export/verification, and unified validation steps to run backend/frontend/SDK checks and tests. Makefile and README were updated to reflect the new developer workflow and commands. Removed some legacy files and simplified the project layout to improve developer experience and ensure type-safe frontend integration with the backend API.

Large refactor and feature addition across the repo: introduces a structured backend API (core api, selectors, services, management commands, tasks) with tests and new Django settings, adds OpenAPI export and generated frontend types, and ships a small Python SDK with tests. CI workflow was overhauled: renamed/streamlined jobs (validate, security, codeql), upgraded runtimes, pnpm support, automated OpenAPI export/verification, and unified validation steps to run backend/frontend/SDK checks and tests. Makefile and README were updated to reflect the new developer workflow and commands. Removed some legacy files and simplified the project layout to improve developer experience and ensure type-safe frontend integration with the backend API.
@BarryHenryJr BarryHenryJr self-assigned this Mar 13, 2026
@BarryHenryJr BarryHenryJr added the enhancement New feature or request label Mar 13, 2026
@BarryHenryJr BarryHenryJr linked an issue Mar 13, 2026 that may be closed by this pull request
Copilot AI review requested due to automatic review settings March 13, 2026 18:25
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a major refactor and feature addition to the TelemetryTaco project, focusing on a structured backend API, type-safe frontend integration, and a streamlined developer workflow. The changes enhance the project's maintainability, scalability, and developer experience, ensuring a robust foundation for future development.

Highlights

  • Backend API Refactor: Introduced a structured backend API with core components, selectors, services, management commands, and tasks, along with corresponding tests and new Django settings.
  • Frontend Types and SDK: Added OpenAPI export and generated frontend types to ensure type-safe integration, and shipped a Python SDK with tests for easy event capture.
  • CI Workflow Overhaul: Streamlined CI jobs, upgraded runtimes, added pnpm support, automated OpenAPI export/verification, and unified validation steps for backend, frontend, and SDK.
  • Developer Experience Improvements: Updated Makefile and README to reflect the new developer workflow and commands, removed legacy files, and simplified the project layout.
Changelog
  • Makefile
    • Added 'validate' target to run backend, frontend, and SDK validation.
  • README.md
    • Updated to reflect the current architecture, quick start instructions, useful commands, backend notes, frontend notes, SDK example, and API summary.
  • backend/.env.example
    • Added example environment variables for backend configuration.
  • backend/.env.test
    • Added test environment variables for backend testing.
  • backend/SETUP.md
    • Refactored backend setup instructions for clarity and conciseness.
  • backend/core/init.py
    • Imported celery app for use by Django.
  • backend/core/admin.py
    • Registered Event model with custom admin interface.
  • backend/core/api.py
    • Removed the old api.py file.
  • backend/core/api/init.py
    • Added api init file to import events.
  • backend/core/api/events.py
    • Created events API endpoints for capturing events, listing events, getting insights, and health checks.
  • backend/core/api/schemas.py
    • Defined Pydantic schemas for API requests and responses.
  • backend/core/management/commands/export_openapi_schema.py
    • Added management command to export OpenAPI schema to a JSON file.
  • backend/core/management/commands/purge_expired_events.py
    • Added management command to purge expired events based on retention days.
  • backend/core/selectors/init.py
    • Added selector init file to import events.
  • backend/core/selectors/events.py
    • Implemented selectors for listing recent events, getting insights, and purging expired events.
  • backend/core/services/init.py
    • Added service init file to import health and ingestion.
  • backend/core/services/health.py
    • Implemented services for checking liveness and readiness status.
  • backend/core/services/ingestion.py
    • Implemented services for enqueuing events and normalizing event data.
  • backend/core/tasks.py
    • Removed the old tasks.py file.
  • backend/core/tasks/init.py
    • Added tasks init file to import events.
  • backend/core/tasks/events.py
    • Implemented Celery tasks for processing event batches, individual events, and purging expired events.
  • backend/core/tests.py
    • Removed the old tests.py file.
  • backend/core/tests/init.py
    • Added tests init file.
  • backend/core/tests/test_api.py
    • Added API tests for capturing events, listing events, getting insights, and readiness.
  • backend/core/tests/test_tasks.py
    • Added tests for Celery tasks, including duplicate event UUID handling.
  • backend/poetry.lock
    • Updated poetry.lock with new dependencies and versions.
  • backend/pyproject.toml
    • Updated pyproject.toml with new dependencies, including ruff, bandit, pytest, and pytest-django.
  • backend/requirements.txt
    • Removed requirements.txt.
  • backend/telemetry_taco/api.py
    • Created api.py to import ninja API.
  • backend/telemetry_taco/settings.py
    • Removed settings.py.
  • backend/telemetry_taco/settings/init.py
    • Added settings init file to import development settings.
  • backend/telemetry_taco/settings/base.py
    • Created base settings module with common configurations.
  • backend/telemetry_taco/settings/development.py
    • Created development settings module with environment-specific configurations.
  • backend/telemetry_taco/settings/production.py
    • Created production settings module with environment-specific configurations.
  • backend/telemetry_taco/settings/test.py
    • Created test settings module with environment-specific configurations.
  • backend/telemetry_taco/urls.py
    • Updated urls.py to include Ninja API endpoints.
  • frontend/eslint.config.js
    • Updated ESLint configuration to include new rules and globals for testing.
  • frontend/openapi.json
    • Added OpenAPI schema definition.
  • frontend/package.json
    • Updated package.json with new dependencies, including @tanstack/react-query, @testing-library/jest-dom, @testing-library/react, openapi-typescript, and vitest.
  • frontend/src/App.tsx
    • Updated App.tsx to import from app/App.
  • frontend/src/app/App.tsx
    • Created new App component with dashboard layout, including insight chart and live event stream.
  • frontend/src/app/providers.tsx
    • Created new AppProviders component to wrap the app with TanStack QueryProvider.
  • frontend/src/app/query-client.ts
    • Created new query-client to configure TanStack Query.
  • frontend/src/components/InsightChart.tsx
    • Removed InsightChart component.
  • frontend/src/components/LiveEventStream.tsx
    • Removed LiveEventStream component.
  • frontend/src/features/events/components/live-event-stream-card.test.tsx
    • Created tests for the LiveEventStreamCard component.
  • frontend/src/features/events/components/live-event-stream-card.tsx
    • Created LiveEventStreamCard component with live event stream functionality.
  • frontend/src/features/events/queries.ts
    • Created queries for fetching events using TanStack Query.
  • frontend/src/features/insights/components/insight-chart-card.test.tsx
    • Created tests for the InsightChartCard component.
  • frontend/src/features/insights/components/insight-chart-card.tsx
    • Created InsightChartCard component with insight chart functionality.
  • frontend/src/features/insights/queries.ts
    • Created queries for fetching insights using TanStack Query.
  • frontend/src/shared/api/client.ts
    • Created api client to fetch data.
  • frontend/src/shared/api/generated.ts
    • Created generated API types from OpenAPI schema.
  • frontend/src/shared/api/types.ts
    • Created types for API data.
  • frontend/src/shared/ui/panel-message.tsx
    • Created PanelMessage component for displaying messages.
  • frontend/src/test/setup.ts
    • Created test setup file.
  • frontend/src/test/test-utils.tsx
    • Created test utils file.
  • frontend/src/vite-env.d.ts
    • Updated vite-env.d.ts to include vitest globals.
  • frontend/tailwind.config.js
    • Updated tailwind.config.js with new theme colors and configurations.
  • frontend/vite.config.ts
    • Updated vite.config.ts with new test environment and build configurations.
  • package.json
    • Updated package.json with new dependencies and scripts for backend, frontend, and SDK validation.
  • pnpm-lock.yaml
    • Updated pnpm-lock.yaml with new dependency resolutions.
  • sdk/pyproject.toml
    • Created pyproject.toml for the SDK.
  • sdk/telemetry_taco.py
    • Removed telemetry_taco.py.
  • sdk/telemetry_taco/init.py
    • Created init file for the SDK.
  • sdk/telemetry_taco/client.py
    • Created client.py for the SDK.
  • sdk/tests/test_client.py
    • Created tests for the SDK client.
  • seed.sh
    • Updated seed.sh to use POETRY_CACHE_DIR.
  • start.sh
    • Updated start.sh to use POETRY_CACHE_DIR.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/cicd.yml
Activity
  • Introduced a structured backend API.
  • Added OpenAPI export and generated frontend types.
  • Shipped a Python SDK with tests.
  • Streamlined CI jobs and upgraded runtimes.
  • Updated Makefile and README for improved developer experience.
  • Removed legacy files and simplified project layout.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This is an impressive and extensive refactoring that significantly improves the project's structure, maintainability, and developer experience. The introduction of a structured backend API with services and selectors, the overhaul of the frontend with React Query and generated types, and the robust new Python SDK are all excellent changes. The CI/CD and developer tooling updates also streamline the workflow considerably.

I've left a few minor suggestions for improvement, mostly related to documentation clarity and code simplification. Overall, this is a very high-quality pull request.

Comment thread README.md
Comment thread backend/.env.example Outdated
Comment thread backend/core/services/ingestion.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors TelemetryTaco into a more structured backend API + typed frontend integration, adds a queue-backed Python SDK, and overhauls CI/dev workflows to validate backend/frontend/SDK and keep OpenAPI artifacts in sync.

Changes:

  • Backend: split settings modules, introduce service/selector/task layers, add OpenAPI export + management commands, and add pytest coverage.
  • Frontend: generate OpenAPI TypeScript types, migrate data fetching to React Query, add Vitest setup/tests, and refresh UI components/styles.
  • Tooling: update shell scripts + pnpm commands, add SDK package skeleton/tests, and streamline CI jobs (validate/security/codeql).

Reviewed changes

Copilot reviewed 72 out of 76 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
start.sh Adds POETRY_CACHE_DIR defaulting and passes it into Poetry commands.
seed.sh Ensures dependency install + seed command uses Poetry cache dir.
restart-backend.sh Ensures backend restart uses Poetry cache dir.
package.json Adds unified validate/test scripts, OpenAPI generation, and sets Poetry cache dir in backend commands.
frontend/vite.config.ts Adds Vitest configuration and splits vendor chunks (React Query).
frontend/tailwind.config.js Switches primary/secondary colors to CSS variables for theme control.
frontend/src/vite-env.d.ts Adds Vitest global type references for tests.
frontend/src/test/test-utils.tsx Adds Testing Library render helper with React Query provider.
frontend/src/test/setup.ts Adds jest-dom matchers for Vitest.
frontend/src/shared/ui/panel-message.tsx Introduces reusable panel empty/error/loading message component.
frontend/src/shared/api/types.ts Adds app-level types over generated OpenAPI types (EventRecord/InsightPoint/etc).
frontend/src/shared/api/generated.ts Adds generated OpenAPI TypeScript definitions.
frontend/src/shared/api/client.ts Adds API URL builder + typed fetch wrapper with structured errors.
frontend/src/main.tsx Wraps app in AppProviders (React Query provider).
frontend/src/index.css Updates theme tokens and base layout styling (dark scheme, radius, etc.).
frontend/src/hooks/useEventStream.ts Removes legacy polling hook in favor of query layer.
frontend/src/features/insights/queries.ts Adds React Query-based insights polling + error mapping.
frontend/src/features/insights/components/insight-line-chart.tsx Adds insights chart visualization component.
frontend/src/features/insights/components/insight-chart-card.tsx Adds insights card with loading/error/empty states and lazy chart import.
frontend/src/features/insights/components/insight-chart-card.test.tsx Adds Vitest coverage for insights card states.
frontend/src/features/events/queries.ts Adds React Query-based events polling + error mapping.
frontend/src/features/events/components/live-event-stream-card.tsx Adds live event stream UI with expandable rows and deferred rendering.
frontend/src/features/events/components/live-event-stream-card.test.tsx Adds Vitest coverage for live stream states + rendering.
frontend/src/components/LiveEventStream.tsx Removes legacy event stream component.
frontend/src/components/InsightChart.tsx Removes legacy insights chart component.
frontend/src/app/query-client.ts Centralizes React Query client configuration.
frontend/src/app/providers.tsx Adds app-wide providers wrapper for React Query.
frontend/src/app/App.tsx Introduces new app shell layout and lazy-loads insights surface.
frontend/src/App.tsx Re-exports new app entry from @/app/App.
frontend/package.json Adds Vitest + OpenAPI type generation scripts and dependencies.
frontend/openapi.json Adds committed OpenAPI schema output for type generation.
frontend/eslint.config.js Adds test-file globals and adjusts rules for vitest/test environment.
backend/telemetry_taco/urls.py Switches to centralized telemetry_taco.api API instance.
backend/telemetry_taco/settings/base.py Introduces new base settings (env, redis/cache, celery, rate limits, logging).
backend/telemetry_taco/settings/development.py Adds dev overrides (CORS defaults, dev rate limits).
backend/telemetry_taco/settings/test.py Adds test overrides (sqlite/locmem cache, eager Celery, relaxed rate limits).
backend/telemetry_taco/settings/production.py Adds production validation for secret key requirements.
backend/telemetry_taco/settings/init.py Defaults telemetry_taco.settings to development settings module.
backend/telemetry_taco/settings.py Removes legacy monolithic settings module.
backend/telemetry_taco/api.py Centralizes NinjaAPI instance and attaches core router.
backend/requirements.txt Removes legacy pip requirements file in favor of Poetry.
backend/pyproject.toml Adds pytest tooling config and dependencies for pytest-django.
backend/poetry.lock Updates lockfile for newly added dev deps and marker changes.
backend/core/tests/test_tasks.py Adds test coverage for batch task idempotency via UUID.
backend/core/tests/test_api.py Adds endpoint-level tests for capture/batch/events/insights/health/retention command.
backend/core/tests/init.py Adds tests package marker for pytest discovery.
backend/core/tests.py Removes unused default Django test stub.
backend/core/tasks/events.py Adds batch processing task + purge task + timestamp parsing helpers.
backend/core/tasks/init.py Exposes tasks from tasks package for imports/autodiscovery.
backend/core/tasks.py Removes legacy single-event task module.
backend/core/services/ingestion.py Adds ingestion normalization + enqueue logic for capture and batch endpoints.
backend/core/services/health.py Adds readiness/liveness dependency checks (DB/cache).
backend/core/services/init.py Exposes services API surface.
backend/core/selectors/events.py Adds selectors for list events, insights aggregation, and retention purge.
backend/core/selectors/init.py Exposes selectors API surface.
backend/core/management/commands/purge_expired_events.py Adds retention purge management command.
backend/core/management/commands/export_openapi_schema.py Adds management command to export OpenAPI schema JSON.
backend/core/api/schemas.py Adds request/response schemas for capture/events/insights/health endpoints.
backend/core/api/events.py Introduces Ninja router implementing capture/batch/events/insights/health endpoints.
backend/core/api/init.py Exposes core API router.
backend/core/api.py Removes legacy router + schema implementations (superseded by module structure).
backend/core/admin.py Registers Event model in Django admin with useful list/search config.
backend/core/init.py Exposes Celery app for Django/Celery integration.
backend/SETUP.md Updates backend setup guide to new settings modules and workflow.
backend/.env.test Adds test env defaults file.
backend/.env.example Adds example env with new configuration knobs.
README.md Updates repo docs to the new MVP-focused structure and workflow commands.
Makefile Updates targets to use pnpm-based test/validate flows.
.github/workflows/cicd.yml Overhauls CI into validate/security/codeql jobs with OpenAPI/type verification.
sdk/tests/test_client.py Adds SDK tests for batching flush behavior and queue-full policy.
sdk/telemetry_taco/client.py Adds queue-backed SDK client with batching, retries, and flush/close semantics.
sdk/telemetry_taco/init.py Exposes SDK public API via package init.
sdk/telemetry_taco.py Removes legacy single-file SDK implementation.
sdk/pyproject.toml Adds PEP 621 project metadata for the SDK package.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/core/tasks/events.py Outdated
Comment thread backend/core/services/ingestion.py Outdated
Comment thread backend/core/api/schemas.py Outdated
Comment thread package.json Outdated
Comment thread sdk/pyproject.toml

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dea6824a5b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread sdk/telemetry_taco/client.py Outdated
Comment thread backend/core/selectors/events.py Outdated
Comment thread backend/core/api/events.py Outdated
Add stable cursor pagination and readiness status handling; refactor event ingestion and worker robustness. Key changes:

- API: support `before=timestamp,id` cursor parsing and accept plain timestamps for backward compatibility; list_events now accepts string cursors and readiness endpoint can return 503 when dependencies are degraded.
- Selectors: list_recent_events updated to handle timestamp+id cursors for stable pagination across equal timestamps.
- Schemas/OpenAPI/frontend types: replace ModelSchema with explicit Pydantic/Ninja Schema (from_attributes), adjust EventResponseSchema fields (id, properties, timestamp required) and add 503 response in OpenAPI and generated TS types.
- Tasks/Services: refactor event persistence (extract _build_event and _persist_events), remove client-side chunking when enqueuing events, ensure tasks return processed counts and log event_count accordingly, and expose a process_event_task that persists single events.
- SDK: improve TelemetryTaco worker shutdown and draining behavior, defend against non-serializable batches when encoding payloads, and add a test ensuring a bad batch doesn't kill the worker.
- Tests: add and update tests for stable pagination, invalid cursors, readiness 503 behavior, and process_event_task; adjust existing tests for cursor semantics.
- Misc: update backend .env.example guidance for SECRET_KEY generation; add backend test sqlite DB; streamline package.json scripts to use poetry directly; add setuptools package find config in sdk pyproject.toml.

These changes improve pagination stability, make background processing more resilient, clarify API contracts, and align generated client types with the server schemas.
Collapse the multiline Q(...) | Q(...) condition in backend/core/selectors/events.py into a single line for readability. This is a pure formatting change with no behavioral impact.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a more structured end-to-end telemetry stack: a refactored Django Ninja API with split settings and pytest coverage, OpenAPI export + generated frontend types, a new queued/batched Python SDK, and a consolidated CI workflow to validate backend/frontend/SDK together.

Changes:

  • Backend: split settings modules, structured API/services/selectors/tasks, management commands, and expanded pytest coverage.
  • Frontend: OpenAPI-driven generated types, React Query polling surfaces, Vitest setup, and UI refresh.
  • Tooling/CI: unified validation scripts (pnpm), OpenAPI generation verification, and streamlined GitHub Actions jobs.

Reviewed changes

Copilot reviewed 72 out of 77 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
start.sh Adds POETRY_CACHE_DIR usage for Poetry commands.
seed.sh Adds POETRY_CACHE_DIR usage for Poetry install/run.
restart-backend.sh Adds POETRY_CACHE_DIR for backend restart command.
package.json Adds OpenAPI type-gen + backend/frontend/sdk test/validate scripts.
Makefile Routes test/validate through pnpm scripts.
.github/workflows/cicd.yml New Validate/Security/CodeQL job layout + OpenAPI/type checks.
README.md Updates docs to reflect new architecture and workflow.
frontend/vite.config.ts Adds Vitest config and new build chunk splitting.
frontend/tailwind.config.js Switches primary/secondary colors to CSS variables.
frontend/src/vite-env.d.ts Adds Vitest globals reference types.
frontend/src/test/test-utils.tsx Adds React Query test wrapper utilities.
frontend/src/test/setup.ts Adds jest-dom matchers for Vitest.
frontend/src/shared/ui/panel-message.tsx Adds reusable empty/error panel component.
frontend/src/shared/api/client.ts Adds typed fetch helper + API error wrapper.
frontend/src/shared/api/types.ts Adds app-level types based on generated OpenAPI components.
frontend/src/shared/api/generated.ts Adds generated OpenAPI TypeScript bindings.
frontend/src/main.tsx Wraps app with providers.
frontend/src/index.css Updates theme tokens and base styles.
frontend/src/hooks/useEventStream.ts Removes legacy polling hook.
frontend/src/features/insights/queries.ts Adds React Query insights polling query.
frontend/src/features/insights/components/insight-line-chart.tsx Adds insights chart component.
frontend/src/features/insights/components/insight-chart-card.tsx Adds insights card with loading/empty/error states + lazy chart.
frontend/src/features/insights/components/insight-chart-card.test.tsx Adds Vitest coverage for insights card states.
frontend/src/features/events/queries.ts Adds React Query events polling query.
frontend/src/features/events/components/live-event-stream-card.tsx Adds new live event stream card component.
frontend/src/features/events/components/live-event-stream-card.test.tsx Adds Vitest coverage for live event stream states.
frontend/src/components/LiveEventStream.tsx Removes legacy live stream component.
frontend/src/components/InsightChart.tsx Removes legacy insights component.
frontend/src/app/query-client.ts Centralizes QueryClient creation defaults.
frontend/src/app/providers.tsx Adds top-level app providers.
frontend/src/app/App.tsx New app shell combining insights + live stream.
frontend/src/App.tsx Re-exports app entry from new location.
frontend/package.json Adds vitest/testing deps + OpenAPI type-gen script.
frontend/openapi.json Adds committed OpenAPI schema snapshot used for type generation.
frontend/eslint.config.js Updates ESLint for Vitest globals and disables no-undef.
backend/telemetry_taco/urls.py Switches API instantiation to telemetry_taco.api.
backend/telemetry_taco/api.py Adds centralized NinjaAPI instance/version.
backend/telemetry_taco/settings/base.py Introduces shared base settings with env config.
backend/telemetry_taco/settings/development.py Adds development-specific overrides.
backend/telemetry_taco/settings/test.py Adds isolated test settings (sqlite/locmem/eager celery).
backend/telemetry_taco/settings/production.py Adds production checks for SECRET_KEY correctness.
backend/telemetry_taco/settings/init.py Defaults settings module to development.
backend/telemetry_taco/settings.py Removes legacy single-file settings.
backend/requirements.txt Removes legacy pip requirements file.
backend/pyproject.toml Adds pytest/pytest-django config and deps.
backend/poetry.lock Updates lockfile for new dev dependencies.
backend/core/api/events.py Adds structured API routes (capture/batch/events/insights/health).
backend/core/api/schemas.py Adds pydantic schemas for API surface.
backend/core/api/init.py Exposes router via package init.
backend/core/api.py Removes legacy API module.
backend/core/services/ingestion.py Adds ingestion normalization + batch enqueue service.
backend/core/services/health.py Adds liveness/readiness status helpers.
backend/core/services/init.py Exposes service functions.
backend/core/selectors/events.py Adds selectors for list/insights/retention purge.
backend/core/selectors/init.py Exposes selector functions.
backend/core/tasks/events.py Adds Celery tasks for batch/single processing and purge.
backend/core/tasks/init.py Exposes task callables.
backend/core/tasks.py Removes legacy single-event task module.
backend/core/management/commands/purge_expired_events.py Adds retention purge command.
backend/core/management/commands/export_openapi_schema.py Adds OpenAPI export command used by CI/frontend.
backend/core/tests/test_api.py Adds pytest coverage for API behavior and edge cases.
backend/core/tests/test_tasks.py Adds pytest coverage for Celery task behavior.
backend/core/tests/init.py Adds tests package marker.
backend/core/tests.py Removes legacy Django tests module stub.
backend/core/admin.py Registers Event model in admin.
backend/core/init.py Exposes celery app import hook.
backend/SETUP.md Updates backend setup docs to match new workflow/settings.
backend/.env.example Adds example env values for local dev.
backend/.env.test Adds test env file (repo-provided).
sdk/telemetry_taco/client.py Replaces SDK with queued, batched sender + retries.
sdk/telemetry_taco/init.py Exposes SDK public API.
sdk/telemetry_taco.py Removes legacy SDK implementation file.
sdk/pyproject.toml Adds SDK packaging + pytest pythonpath config.
sdk/tests/test_client.py Adds SDK tests for batching, queue policy, serialization failures.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sdk/telemetry_taco/client.py
Comment thread sdk/telemetry_taco/client.py Outdated
Comment thread backend/core/tasks/events.py
Comment thread frontend/src/test/test-utils.tsx Outdated
Backend: make event timestamp parsing more robust — accept naive datetimes (make aware), accept date objects (convert to start-of-day aware datetime), require strings for ISO parsing, and raise on unsupported types; added tests for date timestamps and invalid timestamp objects. Frontend: memoize QueryClient with useState to avoid recreating it on each render. SDK: normalize and validate base_url, use UTC constant, add thread-safety for capture/close with a state lock and closing flag, implement dropping/replacing oldest queued event safely, improve error handling/logging when sending batches fails; added and updated tests to cover sentinel preservation, base_url normalization/validation, and failed request handling.
@BarryHenryJr
BarryHenryJr merged commit a49acf6 into main Mar 13, 2026
5 checks passed
@BarryHenryJr
BarryHenryJr deleted the 6-chore-refactor-refactor-and-clean-up-the-codebase branch March 13, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore (refactor): refactor and clean up the codebase

2 participants