Skip to content

feat(replay): generic app-event and network observation - #32

Closed
Chinmay-KB wants to merge 3 commits into
mainfrom
cursor/app-network-observation-b0de
Closed

feat(replay): generic app-event and network observation#32
Chinmay-KB wants to merge 3 commits into
mainfrom
cursor/app-network-observation-b0de

Conversation

@Chinmay-KB

@Chinmay-KB Chinmay-KB commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds opt-in, provider-neutral evidence capture for logical app/analytics events and HTTP calls on the existing TugboatEvent → session → sink path.

Stack A — Core tugboat 0.6.0

  • TugboatReplay.eventHook records one external_event per host invocation with bounded parameter policies (namesOnly, allowList, transform, exploration-only allowAll)
  • TugboatReplay.beginNetworkCall exposes an exactly-once token for method, safe route template, status, outcome, and duration
  • Evidence append path stamps session identity only — never inherits active actionId, relatedEventId, or anchors
  • Bounded TugboatSdkHealth.evidence counters for accepts/drops/duplicate finishes

Stack B — tugboat_dio 0.6.0

  • Companion package with TugboatDioInterceptor / install (appends after auth/retry; rejects duplicates)
  • Maps Dio lifecycle to the core token without capturing headers, queries, bodies, or raw errors
  • Unmatched routes are dropped (plan recommendation)
  • Install after auth/retry because Dio error interceptors run FIFO

Docs

  • Package READMEs and changelogs for 0.6.0
  • docs/README.md and production replay acceptance updated off stale 0.5.0 references

Out of scope for this repo

  • Collector enrichment bypass (Stack C) and mobile_app pilot (Stack D) live in separate repositories

Decisions (from plan open questions)

  1. Scope: Flutter SDK + tugboat_dio only in this PR
  2. Default parameter policy: names-only; allow-list/transform/allowAll available
  3. Unmatched routes: drop
  4. Companion versioning: lockstep 0.6.0

Verification

  • dart analyze . — clean
  • New observation + dio suites — all passed
  • Full flutter test packages/tugboat — 301 passed; 4 pre-existing visual/asset failures on Flutter 3.44 in this environment (modal_capture_visual_test, overlay matrix, nonAssetImagesOnly mask pixel checks), unrelated to evidence hooks
  • Note: branch is behind main (0.5.3 identity work) and still needs rebase before merge
Open in Web Open in Cursor 

cursoragent and others added 3 commits August 3, 2026 14:34
Provide a provider-neutral external_event hook with bounded parameter
policies and a generic exactly-once network_call token, plus a
tugboat_dio interceptor that maps Dio request lifecycles onto that
token without importing Dio into core.

Co-authored-by: Chinmay Kabi <chinmay@blend.to>
Rename parameter transform field to avoid static/instance clash, append
tugboat_dio after auth/retry for Dio FIFO error handling, and cover
retries/cache resolves in adapter tests. Also make semantics flags
compat tests work on Flutter 3.36+ Tristate APIs.

Co-authored-by: Chinmay Kabi <chinmay@blend.to>
Update docs index compatibility and production replay acceptance to the
current release candidate, and note tugboat_dio plus evidence-only events.

Co-authored-by: Chinmay Kabi <chinmay@blend.to>
@Chinmay-KB Chinmay-KB closed this Aug 8, 2026
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