Skip to content

Skip pause rule features this version does not know - #234

Merged
Views2k merged 1 commit into
mainfrom
fix/tolerant-feature-policy
Nov 23, 2026
Merged

Views2k merged 1 commit into
mainfrom
fix/tolerant-feature-policy

Conversation

@Views2k

@Views2k Views2k commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Closes #233.

Problem

FeatureControlVerifier.ReadRule checked every feature name in a rule against ControlledFeatures.All and rejected the whole envelope when one was unknown. A pause of a feature added in a later version therefore stopped every pause from reaching this version, which kept its last accepted policy until that expired and reported policy-rejected.

Change

  • Feature names this version does not know are skipped. They must still be well-formed (token characters, at most 64 long, distinct, at most 128 per rule), and the array still cannot be empty.
  • A rule with no known name left is dropped after validation, so a malformed or duplicate rule is still rejected even when it would pause nothing here.
  • Everything else is validated as before. The signature covers the whole payload, so nothing unsigned is accepted.
  • The policy is requested from /api/v1/feature-controls?schema=3. The service returns the published policy there and keeps serving ?schema=2 without names newer than 2.7.6 for the versions that reject them.

Platforms

The change is in policy verification and the request route only. It runs before any game, store or graphics context is read, so Steam and Xbox behave the same.

Tests

FeatureControlTests:

  • unknown names are skipped in schema 1 and schema 2 payloads, a rule with only unknown names is dropped, and the resulting state passes FeatureControlGate;
  • a download that names only unknown features is accepted, pauses nothing, reports no failure, and a later revision still applies;
  • malformed names, non-text entries, more than 128 names, duplicate known or unknown names, and a duplicate rule ID on a dropped rule are rejected;
  • the transport and client tests expect the ?schema=3 route.

Not verified here: behavior in a running game against the live service. The verifier and client run only in the Windows test suite.

A pause rule naming a feature added in a later version made the verifier
reject the whole policy, so every other pause stopped reaching this version
until its last accepted policy expired.

Feature names this version does not know are now skipped, and a rule with no
known name left is dropped after it has been validated. Names must still be
well-formed, distinct and at most 128 per rule; everything else is rejected
as before. The signature covers the whole payload.

The policy is requested with schema=3, where the service returns the
published policy. Versions that reject unknown names keep asking for
schema=2 and get a policy without them.
@Views2k
Views2k marked this pull request as ready for review November 23, 2026 21:51
@Views2k
Views2k merged commit 0551c57 into main Nov 23, 2026
10 checks passed
@Views2k
Views2k deleted the fix/tolerant-feature-policy branch November 23, 2026 21:55
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.

A pause rule naming a feature an older version does not know makes it reject the whole policy

1 participant