feat(#877): document + lock the ver-code population invariant

Seven comparison sites dispositioned: pre-split floors (>=8, >=13) stay bare by design; fork floors are caps-anchored and now covered by a stock-ver-22 regression test. Channel-data bound is vacuous: the client never sends CMD_SEND_CHANNEL_DATA.

Agent: GentleGlacier (session f0c92a36)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
chore/904-docs-only-ci
diffwireauto 4 weeks ago committed by Strycher
parent 20066c58cb
commit 7aafeaa397

@ -552,6 +552,15 @@ const int offbandCapBlock = 0x02;
/// FEM-bearing boards report false today.
const int offbandCapFemLna = 0x04;
// POPULATION INVARIANT (#875-#877): every `offbandCaps`-anchored gate below is
// safe against stock 1.18+ devices ONLY because the connector nulls the caps
// bytes unless the population classifier corroborates the fork layout
// (device_population.dart). The ver-code floors in these gates are FORK
// contract numbers; stock reuses 14+ with different meanings, so a bare
// `firmwareVerCode >=` comparison may only be added for codes BELOW 14
// (pre-split, same meaning everywhere: see supportsCompanionRadioStats >= 8
// and firmwareSupportsRegionScope >= 13) or behind a caps-anchored gate here.
bool firmwareSupportsOffbandFemLna(int? offbandCaps) =>
offbandCaps != null && (offbandCaps & offbandCapFemLna) != 0;

@ -242,5 +242,22 @@ void main() {
);
expect(connector.offbandCaps, isNull);
});
test('fork gates never open on a stock device, whatever its ver code'
' (#877): stock reuses the fork range 14+ with other meanings', () {
// A hypothetical future stock device reporting ver 22 (the fork's
// current contract number) must not light any Offband capability.
connector.handleFrameForTest(
deviceInfo(verCode: 22, version: 'v9.9.9'),
);
expect(connector.supportsOffbandGps, isFalse);
expect(connector.supportsOffbandBlock, isFalse);
expect(connector.supportsOffbandFemLna, isFalse);
expect(connector.supportsButtonMatrix, isFalse);
expect(connector.supportsNotifyScope, isFalse);
expect(connector.supportsPktHash, isFalse);
// Pre-split floors (same meaning on every population) stay available.
expect(connector.supportsCompanionRadioStats, isTrue);
});
});
}

Loading…
Cancel
Save

Powered by TurnKey Linux.