test(privacy): Count me is held to its last choice on the device that made it
Seed 77 found the phone showing Count me on after the laptop turned it off: the instance withheld the laptop's row from the phone and handed back the phone's own older one. That is a device held at an earlier genuine record, ADR 0019's residual risk; what holds is that no device goes back behind what it saw itself, which is what the test now checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
bf6864682c
commit
15326f675e
1 changed files with 10 additions and 3 deletions
|
|
@ -143,8 +143,9 @@ final class _World(
|
|||
final allowed = <String>{};
|
||||
var _next = 0;
|
||||
|
||||
/// Whether the person last turned Count me on.
|
||||
/// Whether the person last turned Count me on, and on which device.
|
||||
bool countMe = false;
|
||||
_Device? _countMeOn;
|
||||
|
||||
// The instance's memory.
|
||||
final _history = <String, List<Object>>{};
|
||||
|
|
@ -664,6 +665,7 @@ final class _World(
|
|||
);
|
||||
}
|
||||
countMe = on;
|
||||
_countMeOn = device;
|
||||
log.add(' Count me ${on ? 'on' : 'off'}');
|
||||
}
|
||||
|
||||
|
|
@ -1181,8 +1183,13 @@ final class _World(
|
|||
}
|
||||
}
|
||||
// As the settings repository folds the rows the device reads: Count me
|
||||
// on only where every one says so.
|
||||
final device = _pick([laptop, phone]);
|
||||
// on only where every one says so. On the device that made the last
|
||||
// choice: any device can be held at an earlier genuine record (the
|
||||
// instance withholding a newer one), but none behind its own.
|
||||
final device = _countMeOn;
|
||||
if (device == null) {
|
||||
return null;
|
||||
}
|
||||
final rows = [
|
||||
for (final row in await device.settings.rows())
|
||||
if (_decoded(row.payload) case final Map<String, Object?> settings)
|
||||
|
|
|
|||
Loading…
Reference in a new issue