Skip to content

Regression: compression threshold settings now accept negative values #1900

@acoliver

Description

@acoliver

Summary

The branch for issue #1898 appears to fix the idle-timeout problem, but it also introduces an unrelated validation regression in packages/core/src/settings/settingsRegistry.ts.

Problem

The validation for compression-threshold and compression.density.optimizeThreshold no longer enforces a lower bound of 0.

Current conditions in settingsRegistry.ts now effectively allow any numeric value less than or equal to 1 because the lower-bound check was replaced with a constant true.

That means negative values are now accepted for settings that are documented and consumed as 0..1 thresholds.

Why this matters

  • Negative compression-threshold values can change compression behavior in ways the rest of the code does not expect.
  • Negative compression.density.optimizeThreshold values can be persisted and treated as valid user settings even though the setting is documented as 0..1.
  • This change is unrelated to the stream idle timeout fix and should be corrected separately after merge.

Follow-up work

  1. Restore the lower-bound validation for both settings so valid values are 0 through 1.
  2. Add regression tests that prove negative values are rejected.
  3. Verify whether stream-idle-timeout-ms should also be surfaced in the CLI settings schema/help surfaces, since the runtime and ephemeral setting paths appear to support it but I did not confirm full schema surfacing.

Notes

  • This was spotted during review of the issue1898 branch.
  • I did not run tests as part of the review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions