Skip to content

Duplicate runnable entrypoints create split-brain runtime behavior #20

@tg12

Description

@tg12

Summary

WireTapper maintains two divergent executable entrypoints (app.py and app-env.py) with materially different configuration, enrichment, and output behavior, creating split-brain runtime semantics for the same product.

Evidence

Why this matters

This is not a cosmetic duplication problem. Which file gets launched changes auth behavior, provider custody, enrichment results, and the shape of returned device data. That makes behavior non-deterministic across environments and turns debugging into guesswork.

Attack or failure scenario

A local demo uses app.py, while another operator or deployment uses app-env.py. Identical requests now return different fields, different leak annotations, and different provider behavior. Defects appear irreproducible because the project has no single authoritative runtime.

Root cause

The project evolved by copying the entrypoint and editing the clone instead of extracting shared logic and preserving one canonical executable path.

Recommended fix

  1. Collapse to a single supported entrypoint.
  2. Move provider configuration and enrichment behavior into shared modules with explicit feature flags.
  3. Add schema tests so returned device structures remain stable across environments.
  4. Remove the abandoned or demo-only path from production documentation.

Acceptance criteria

  • Only one canonical server entrypoint remains for the product.
  • Provider config and enrichment logic are shared, not forked.
  • Route responses are deterministic across environments given the same configuration.

Suggested labels

  • architecture
  • technical-debt
  • reliability
  • production-readiness

Priority

P1 (High)

Severity

High — duplicated entrypoints create non-deterministic runtime behavior and configuration drift.

Confidence

Confirmed — the divergence is explicit in tracked source.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions