Skip to content

fix: remove streaming-enabled config option (always enabled)#2985

Merged
sanity merged 6 commits intomainfrom
remove-streaming-enabled
Feb 20, 2026
Merged

fix: remove streaming-enabled config option (always enabled)#2985
sanity merged 6 commits intomainfrom
remove-streaming-enabled

Conversation

@sanity
Copy link
Copy Markdown
Collaborator

@sanity sanity commented Feb 12, 2026

Problem

Users with pre-0.1.109 configs containing streaming-enabled = false experience all GET/PUT/UPDATE operations aborting when peers send streaming responses, leaving the UI stuck at the loading bar (report KTGFMG).

Since 0.1.109 (Feb 1), streaming is the default and required for the network to function. There's no valid reason to disable it.

Solution

Remove the streaming-enabled config option entirely across all layers:

  • Config: Remove field from NetworkArgs (CLI) and NetworkApiConfig, remove merge/finalization logic, remove default_streaming_enabled() fn
  • Runtime: Remove streaming_enabled field from OpManager, always start orphan stream GC task, simplify should_use_streaming() to just check threshold
  • Operations: Simplify should_use_streaming() from 3 params to 2, remove 6 guard blocks that returned errors when streaming was disabled
  • P2P protocol: Always set orphan stream registry on connections, remove conditional from broadcast streaming check
  • Tests: Remove streaming_enabled from SimNetwork, rename with_streaming() to with_streaming_threshold()

Old config files containing streaming-enabled will have it silently ignored by serde (unknown TOML keys are skipped), and the field will be stripped on the next config persist.

streaming-threshold is kept — it's still useful and configurable.

Testing

  • cargo fmt — clean
  • cargo clippy --all-targets — clean
  • cargo test -p freenet --lib — 1333 passed, 0 failed
  • Verified no remaining streaming_enabled references in source

[AI-assisted - Claude]

Since 0.1.109, streaming is required for the network to function.
Users with old configs containing `streaming-enabled = false` would
have all GET/PUT/UPDATE operations abort when peers send streaming
responses, leaving the UI stuck at the loading bar.

Remove the option entirely. Old config files with the field will have
it silently ignored by serde, and it will be stripped on the next
config persist.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
sanity and others added 4 commits February 12, 2026 08:08
Previously SimNetwork set `streaming_enabled: false` by default, so
simulation tests never triggered the streaming code path unless they
explicitly called `with_streaming()`. After removing the
`streaming_enabled` field, all tests defaulted to the system 64KB
threshold — accidentally enabling streaming for tests that weren't
designed for it, causing timing-sensitive failures like
test_crdt_convergence::case_4_n6_g1.

Default to `usize::MAX` so no test payload exceeds the threshold
unless the test explicitly opts in via `with_streaming_threshold()`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sanity sanity enabled auto-merge February 18, 2026 00:57
@sanity sanity added this pull request to the merge queue Feb 20, 2026
Merged via the queue into main with commit a695ced Feb 20, 2026
7 checks passed
@sanity sanity deleted the remove-streaming-enabled branch February 20, 2026 03:01
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