anchor.diff:                            PidI = {self(), I},
                             event_logger:event(log_make_call(PidI, {read, LPN}),
                                                TS1),
  -                          Pm = read_result_mangle(P),
  +                          Pm = perhaps_trip_scan_forward(
  +                                 ?TRIP_bad_scan_forward, read_result_mangle(P),
  +                                 EndLPN),
                             event_logger:event(log_make_result(PidI, Pm), TS2)
                         end || {{LPN, P}, I} <- PageIs],
                        Ps = [{LPN, read_result_mangle(P)} ||
  
positive.code:         event_logger:event(log_make_result(LOG__Result)),
          LOG__Result).
  
  -ifndef(TEST_TRIP_no_append_duplicates).
  
  append(#run{seq=Seq, proj=Proj}, Page) ->
      ?LOG({append, Page},
           corfurl:append_page(Seq, Proj, Page)).
  -else. % TEST_TRIP_no_append_duplicates
  
  %% If the appended LPN > 3, just lie and say that it was 3.
  
  append(#run{seq=Seq, proj=Proj}, Page) ->
      MaxLPN = 3,
      ?LOG({append, Page},
           begin
               case corfurl:append_page(Seq, Proj, Page) of
                   {ok, LPN} when LPN > MaxLPN ->
                       Bad = {ok, MaxLPN},
                       io:format("BAD: append: ~p -> ~p\n", [Page, Bad]),
                       Bad;
                   Else ->
                       Else
               end
           end).
  -endif. % TEST_TRIP_no_append_duplicates
  
  read_result_mangle({ok, Page}) ->
      Page;
  read_result_mangle(Else) ->
      Else.
  
  -ifndef(TEST_TRIP_bad_read).
  
  read_approx(#run{seq=Seq, proj=Proj}, SeedInt) ->
      Max = corfurl_sequencer:get(Seq, 0),
      %% The sequencer may be lying to us, shouganai.
      LPN = (SeedInt rem Max) + 1,
      ?LOG({read, LPN},
           read_result_mangle(corfurl:read_page(Proj, LPN))).
  -else. % TEST_TRIP_bad_read
  
  read_approx(#run{seq=Seq, proj=Proj}, SeedInt) ->
      Fake = <<"FAKE!">>,
      Max = corfurl_sequencer:get(Seq, 0),
      LPN = (SeedInt rem Max) + 1,
      ?LOG({read, LPN},
           if LPN > 4 ->
                   io:format("read_approx: ~p -> ~p\n", [LPN, Fake]),
                   read_result_mangle(Fake);
              true ->
                   Res = read_result_mangle(corfurl:read_page(Proj, LPN)),
                   %% io:format("read_approx: ~p -> ~P\n", [LPN, Res, 6]),
                   Res
           end).
  
  -endif. % TEST_TRIP_bad_read
  
  scan_forward(#run{seq=Seq, proj=Proj}, SeedInt, NumPages) ->
      Max = corfurl_sequencer:get(Seq, 0),
      StartLPN = if SeedInt == 1 -> 1;
                    true         -> (SeedInt rem Max) + 1
                 end,
      ?LOG({scan_forward, StartLPN, NumPages},
           begin
               TS1 = event_logger:timestamp(),
  
negative.code:              end
           end).
  
  perhaps_trip_append_page(false, Res, _Page) ->
      Res;
  perhaps_trip_append_page(true, {ok, LPN}, _Page) when LPN > 3 ->
      io:format(user, "TRIP: append_page\n", []),
      {ok, 3};
  perhaps_trip_append_page(true, Else, _Page) ->
      Else.
  
  perhaps_trip_read_approx(false, Res, _LPN) ->
      Res;
  perhaps_trip_read_approx(true, _Res, 3 = LPN) ->
      io:format(user, "TRIP: read_approx LPN ~p", [LPN]),
      <<"FAKE!">>;
  perhaps_trip_read_approx(true, Res, _LPN) ->
      Res.
  
  perhaps_trip_scan_forward(false, Res, _EndLPN) ->
      Res;
  perhaps_trip_scan_forward(true, _Res, 20) ->
      io:format(user, "TRIP: scan_forward\n", []),
      <<"magic number bingo, you are a winner">>;
  perhaps_trip_scan_forward(true, Res, _EndLPN) ->
      Res.
  
  -endif. % PULSE
  -endif. % TEST
  
  