Skip to content

Split Rust Gateway telemetry into a dedicated module #7

Closed

Description

@NOirBRight

Problem

Telemetry schema, ingestion, pricing, usage windows, and public command wrappers all live in src-tauri/src/gateway.rs.

Scope

  • Move telemetry internals behind a dedicated Rust module.
  • Preserve public command behavior, SQLite schema, and cost calculations.

Acceptance Criteria

  • gateway.rs no longer owns telemetry internals beyond command delegation.
  • SQLite schema and cost calculations remain unchanged.
  • Frontend-facing GatewayUsageSnapshot remains unchanged.

Required Verification

Push-Location src-tauri; cargo test telemetry; cargo test usage_; cargo test; Pop-Location

Source Evidence

  • docs/reviews/v0.2-code-optimizer-audit.md
  • docs/superpowers/plans/2026-07-09-gateway-telemetry-module.md
  • docs/reviews/v0.2-issue-plan.md

Activity

  1. NOirBRight commented on Jul 9, 2026

    @NOirBRight
    OwnerAuthor

    Implemented locally on branch codex/issue-7-rust-gateway-telemetry and fast-forward merged into local dev at commit 4711b16.

    Scope:

    • Moved Gateway telemetry ingestion, SQLite lifecycle, usage projections, pricing, and event sanitization internals into src-tauri/src/gateway/telemetry.rs.
    • Kept public Gateway command functions in gateway.rs as delegating wrappers.
    • Preserved frontend-facing GatewayUsageSnapshot and usage event/summary types.

    Verification:

    • cargo test telemetry ✅ 6 passed
    • cargo test usage_ ✅ 17 passed
    • cargo test ✅ 192 passed
    • cargo clippy --all-targets -- -D warnings ✅

    Leaving this issue open until the local dev changes are pushed and merged through the agreed flow.

  2. self-assigned this
    on Jul 12, 2026
  3. NOirBRight commented on Jul 12, 2026

    @NOirBRight
    OwnerAuthor

    Dispatch

  4. NOirBRight commented on Jul 12, 2026

    @NOirBRight
    OwnerAuthor

    Merged PR #97 into dev at 8087888. Standards/spec review passed with no P0-P2 findings; all four CI jobs passed. Two non-blocking P3 cleanup candidates remain: consolidate telemetry path naming/authority and eventually colocate telemetry tests to narrow test-only re-exports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions