FAILURE MAP
← Case archive

FA-74296 / Feature flag rollout bucketing / Open access

Timestamp targeting clause: Equal timestamps satisfy "before" · case 01

A user created at exactly the clause instant matches both before-rules and the next launch rule.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The before operator uses a <= b.

THE FAILURE

The before operator uses a <= b.

Unsuccessful approach: Requiring a one-millisecond gap rejects values that are genuinely earlier.

Case contract

Values are epoch milliseconds (int or float) or UTC strings exactly "YYYY-MM-DDTHH:MM:SSZ" converted to milliseconds; booleans, other strings and invalid dates are unusable and make the clause false. op before means user < clause, after means user > clause (strict); other ops are false.

Why this case matters

Date clauses schedule launches and trials; unit and timezone slips shift them by days or years.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import datetime
N = 1
observations = []
def solve(user_value, op, clause_value):
    def ms(v):
        if isinstance(v, bool):
            return None
        if isinstance(v, (int, float)):
            return v
        if isinstance(v, str) and len(v) == 20 and v.endswith('Z'):
            try:
                d = datetime.datetime.strptime(v, '%Y-%m-%dT%H:%M:%SZ').replace(tzinfo=datetime.timezone.utc)
            except ValueError:
                return None
            return int(d.timestamp()) * 1000
        return None
    a, b = ms(user_value), ms(clause_value)
    if a is None or b is None:
        return False
    if op == 'before':
        return a <= b
    if op == 'after':
        return a > b
    return False
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('ISO clause converts to milliseconds', [1700000000001, 'after', '2023-11-14T22:13:20Z'], True),
  ('boolean user value is unusable', [True, 'after', 0], False),
  ('false user value is unusable', [False, 'before', 1], False),
  ('equal timestamps are not before', [1700000000000, 'before', '2023-11-14T22:13:20Z'], False),
  ('one millisecond earlier is before', [1699999999999, 'before', 1700000000000], True),
  ('timestamp pair sample 1', ['2023-11-14T23:13:20+01:00', 'on', True], False),
  ('timestamp pair sample 2', [0, 'before', 1700000000000], True),
  ('timestamp pair sample 3', [1700000000, 'after', 1700000000001], False)],
 [('boolean user value is unusable', [True, 'after', 0], False),
  ('false user value is unusable', [False, 'before', 1], False),
  ('equal timestamps are not before', [1700000000000, 'before', '2023-11-14T22:13:20Z'], False),
  ('one millisecond earlier is before', [1699999999999, 'before', 1700000000000], True),
  ('offset string is unusable', ['2023-11-14T23:13:20+01:00', 'before', '2023-11-14T22:13:21Z'], False),
  ('timestamp pair sample 6', [True, 'after', 1700000000001], False),
  ('timestamp pair sample 13', [1700000000, 'before', 1700000000], False),
  ('timestamp pair sample 42', ['2023-11-14T22:13:20Z', 'before', 1700000000001], True)],
 [('false user value is unusable', [False, 'before', 1], False),
  ('equal timestamps are not before', [1700000000000, 'before', '2023-11-14T22:13:20Z'], False),
  ('one millisecond earlier is before', [1699999999999, 'before', 1700000000000], True),
  ('offset string is unusable', ['2023-11-14T23:13:20+01:00', 'before', '2023-11-14T22:13:21Z'], False),
  ('explicit UTC offset spelling is unusable', ['2023-11-14T22:13:20+00:00', 'before', 1800000000000], False),
  ('timestamp pair sample 11', ['soon', 'after', 1700000000001], False),
  ('timestamp pair sample 12', ['2023-11-14T22:13:21Z', 'after', 1700000000001], True),
  ('timestamp pair sample 40', [1699999999999, 'before', 1699999999999], False)],
 [('equal timestamps are not before', [1700000000000, 'before', '2023-11-14T22:13:20Z'], False),
  ('one millisecond earlier is before', [1699999999999, 'before', 1700000000000], True),
  ('offset string is unusable', ['2023-11-14T23:13:20+01:00', 'before', '2023-11-14T22:13:21Z'], False),
  ('explicit UTC offset spelling is unusable', ['2023-11-14T22:13:20+00:00', 'before', 1800000000000], False),
  ('invalid calendar date is unusable', ['2023-02-30T00:00:00Z', 'before', 1800000000000], False),
  ('timestamp pair sample 16', ['2023-11-14T22:13:20Z', 'before', True], False),
  ('timestamp pair sample 17', [1699999999999, 'before', 1], False),
  ('timestamp pair sample 42', ['2023-11-14T22:13:20Z', 'before', 1700000000001], True)],
 [('one millisecond earlier is before', [1699999999999, 'before', 1700000000000], True),
  ('offset string is unusable', ['2023-11-14T23:13:20+01:00', 'before', '2023-11-14T22:13:21Z'], False),
  ('explicit UTC offset spelling is unusable', ['2023-11-14T22:13:20+00:00', 'before', 1800000000000], False),
  ('invalid calendar date is unusable', ['2023-02-30T00:00:00Z', 'before', 1800000000000], False),
  ('seconds epoch compared as milliseconds', [1700000000, 'before', '2023-11-14T22:13:20Z'], True),
  ('timestamp pair sample 13', [1700000000, 'before', 1700000000], False),
  ('timestamp pair sample 21', ['soon', 'after', '2023-11-14T22:13:20Z'], False),
  ('timestamp pair sample 22', ['2023-11-14T22:13:20Z', 'after', '2023-11-14T22:13:20+00:00'], False)]]
for label, args, expected in fixtures[N - 1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
ISO clause converts to millisecondsTrueTruePassed
boolean user value is unusableFalseFalsePassed
false user value is unusableFalseFalsePassed
equal timestamps are not beforeTrueFalseFailed
one millisecond earlier is beforeTrueTruePassed
timestamp pair sample 1FalseFalsePassed
timestamp pair sample 2TrueTruePassed
timestamp pair sample 3FalseFalsePassed

SHA-256 / 33b8fe31b3ee6d9b2e40599be149c2589956384c104f07b72b186a043c0d4c51

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import datetime
N = 1
observations = []
def solve(user_value, op, clause_value):
    def ms(v):
        if isinstance(v, bool):
            return None
        if isinstance(v, (int, float)):
            return v
        if isinstance(v, str) and len(v) == 20 and v.endswith('Z'):
            try:
                d = datetime.datetime.strptime(v, '%Y-%m-%dT%H:%M:%SZ').replace(tzinfo=datetime.timezone.utc)
            except ValueError:
                return None
            return int(d.timestamp()) * 1000
        return None
    a, b = ms(user_value), ms(clause_value)
    if a is None or b is None:
        return False
    if op == 'before':
        return a + 1 < b
    if op == 'after':
        return a > b
    return False
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('ISO clause converts to milliseconds', [1700000000001, 'after', '2023-11-14T22:13:20Z'], True),
  ('boolean user value is unusable', [True, 'after', 0], False),
  ('false user value is unusable', [False, 'before', 1], False),
  ('equal timestamps are not before', [1700000000000, 'before', '2023-11-14T22:13:20Z'], False),
  ('one millisecond earlier is before', [1699999999999, 'before', 1700000000000], True),
  ('timestamp pair sample 1', ['2023-11-14T23:13:20+01:00', 'on', True], False),
  ('timestamp pair sample 2', [0, 'before', 1700000000000], True),
  ('timestamp pair sample 3', [1700000000, 'after', 1700000000001], False)],
 [('boolean user value is unusable', [True, 'after', 0], False),
  ('false user value is unusable', [False, 'before', 1], False),
  ('equal timestamps are not before', [1700000000000, 'before', '2023-11-14T22:13:20Z'], False),
  ('one millisecond earlier is before', [1699999999999, 'before', 1700000000000], True),
  ('offset string is unusable', ['2023-11-14T23:13:20+01:00', 'before', '2023-11-14T22:13:21Z'], False),
  ('timestamp pair sample 6', [True, 'after', 1700000000001], False),
  ('timestamp pair sample 13', [1700000000, 'before', 1700000000], False),
  ('timestamp pair sample 42', ['2023-11-14T22:13:20Z', 'before', 1700000000001], True)],
 [('false user value is unusable', [False, 'before', 1], False),
  ('equal timestamps are not before', [1700000000000, 'before', '2023-11-14T22:13:20Z'], False),
  ('one millisecond earlier is before', [1699999999999, 'before', 1700000000000], True),
  ('offset string is unusable', ['2023-11-14T23:13:20+01:00', 'before', '2023-11-14T22:13:21Z'], False),
  ('explicit UTC offset spelling is unusable', ['2023-11-14T22:13:20+00:00', 'before', 1800000000000], False),
  ('timestamp pair sample 11', ['soon', 'after', 1700000000001], False),
  ('timestamp pair sample 12', ['2023-11-14T22:13:21Z', 'after', 1700000000001], True),
  ('timestamp pair sample 40', [1699999999999, 'before', 1699999999999], False)],
 [('equal timestamps are not before', [1700000000000, 'before', '2023-11-14T22:13:20Z'], False),
  ('one millisecond earlier is before', [1699999999999, 'before', 1700000000000], True),
  ('offset string is unusable', ['2023-11-14T23:13:20+01:00', 'before', '2023-11-14T22:13:21Z'], False),
  ('explicit UTC offset spelling is unusable', ['2023-11-14T22:13:20+00:00', 'before', 1800000000000], False),
  ('invalid calendar date is unusable', ['2023-02-30T00:00:00Z', 'before', 1800000000000], False),
  ('timestamp pair sample 16', ['2023-11-14T22:13:20Z', 'before', True], False),
  ('timestamp pair sample 17', [1699999999999, 'before', 1], False),
  ('timestamp pair sample 42', ['2023-11-14T22:13:20Z', 'before', 1700000000001], True)],
 [('one millisecond earlier is before', [1699999999999, 'before', 1700000000000], True),
  ('offset string is unusable', ['2023-11-14T23:13:20+01:00', 'before', '2023-11-14T22:13:21Z'], False),
  ('explicit UTC offset spelling is unusable', ['2023-11-14T22:13:20+00:00', 'before', 1800000000000], False),
  ('invalid calendar date is unusable', ['2023-02-30T00:00:00Z', 'before', 1800000000000], False),
  ('seconds epoch compared as milliseconds', [1700000000, 'before', '2023-11-14T22:13:20Z'], True),
  ('timestamp pair sample 13', [1700000000, 'before', 1700000000], False),
  ('timestamp pair sample 21', ['soon', 'after', '2023-11-14T22:13:20Z'], False),
  ('timestamp pair sample 22', ['2023-11-14T22:13:20Z', 'after', '2023-11-14T22:13:20+00:00'], False)]]
for label, args, expected in fixtures[N - 1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
ISO clause converts to millisecondsTrueTruePassed
boolean user value is unusableFalseFalsePassed
false user value is unusableFalseFalsePassed
equal timestamps are not beforeFalseFalsePassed
one millisecond earlier is beforeFalseTrueFailed
timestamp pair sample 1FalseFalsePassed
timestamp pair sample 2TrueTruePassed
timestamp pair sample 3FalseFalsePassed

SHA-256 / 0825edd7106dbd69127eef3c058ab8ffef87639aebe2ce065d0e790f51694b4c

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

A deterministic toy flag-evaluation model with a stipulated contract; it does not reproduce any vendor SDK byte for byte. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:48:55.269492+00:00.

Case digest / bcb2f87f1946742e2d75d4ea5eccf8702f671a94f738adcae73a22ac4110e0d2