Skip to content

tech-debt: document + tune transcript shutdown timeout value (WB3b MEDIUM) #8

Description

@baladithyab

Source: docs/reviews/audio-graph-wave-b-review.md WB3b MEDIUM

Current: Hardcoded `Duration::from_secs(5)` in writer shutdown timeout.

Concern: "Chosen empirically" — not validated with real-world data. Could be:

  • Too short: healthy fsync on a large transcript (10+ MB) + slow disk (HDD / network filesystem) might legitimately exceed 5s, causing the hard HIGH double-drop path.
  • Too long: a wedged disk (NFS stall, drive died) causes `new_session_cmd` to block the UI for 5s which is user-visible jank.

Action:

  1. Add instrumentation (log fsync duration histogram at INFO level)
  2. Collect 1-2 weeks of real usage data
  3. Tune timeout to p99 of healthy flushes + safety margin
  4. Document the chosen value in a `// Chosen because...` comment citing the data

Effort: 1h initial instrumentation + 2 weeks wait + 30min tune.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationtech-debtTechnical debt cleanup

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions