I-4 merged yesterday evening. It gives every lab value from Kaiser one row per Observation, so the copies that arrive through HTML exports and parsed documents can be recognised as copies (#930, migration 119). The rollout ran the same night:

  • the backfill gave 2,907 stored rows their Kaiser identity;
  • the cleanup removed 39 copies and one duplicate series;
  • the first comparison of the old and new views explained every row.

The first real sync had to wait for a Kaiser login, because the token lasts an hour and does not refresh.

The login came at 05:34 this morning. The sync ran from 05:36 to 07:13 and finished clean:

  • 2,907 rows updated and 1,086 new results created;
  • no conflicts, no ambiguous matches, no refusals;
  • 78,085 one-time history rows, where the review had predicted 78–80 thousand.

The second comparison of old and new views left no row unexplained:

  • 6,212 live rows, equal to 5,126 plus the 1,086 new ones;
  • 905 copies hidden as matching their Kaiser row;
  • 141 listed as conflicts;
  • 169 moved to her local calendar day;
  • 6 updated in place by Kaiser.

Then the positive control failed.

What the control checks

The control (check_lab_positive_control.py) looks at one lab series end to end, the one we watch most closely, and asserts seven things about what a chart of it would show. Six passed. The most important ones say the newest value is shown once, on the right day.

The seventh says that no row from outside Kaiser is shown on a day that also shows a Kaiser value. It found four:

  • two exact duplicates of the Kaiser value that day;
  • one text-only row from a parsed document;
  • one parsed-document row whose number differs from Kaiser’s.

None of the four carries a Kaiser identity, so I-4 has no way to link them to Kaiser’s row. I-4 recognises a copy only by a merged id. Matching by value is the next stage’s job (I-5), by design.

So the code did what the design said. The design’s expectation was wrong. Its count of zero assumed that every copy of a Kaiser value would carry a merged Kaiser id. Nobody had counted. I reviewed that check before the merge and accepted the zero, because it sounded like a property of the data. It was really a guess about the data.

The control’s own rule is that a failure means no reader change is announced. So I-4 is not called done, and the question went to Richard as D-Q4-31 (#939). My lean is to leave the four rows to I-5 and send the disagreeing one to the open question about suspect parsed values (#256). The cost of waiting is a duplicate point on three old days. Her current values are right.

Where I was wrong, or nearly

  • The zero in the control. Covered above. A control’s expected values are claims, and its first real run tests them along with the code. The cheap fix would have been a read-only count of unlinked rows on Kaiser days before the merge. It needed no sync at all.

  • The sync’s duration, and a deadline built on it. The review estimated 25–40 minutes, and it took 97. The import updates each row over the Cloud SQL proxy, several round trips per row, all in one transaction. My watcher’s 70-minute deadline came from that estimate, so it expired while the sync was still healthy. I read the task state directly, re-armed the watcher, and waited. The one estimate that held was the history-row count, because it came from a count rather than a guess about speed. The token expired at 06:34, mid-import, which did no harm: once the fetch is done, the import touches only the database.

  • Sharing a full machine. Run 3’s negatives pilot is running on Richard’s workstation: two runs at 8 threads each, which fill all 16 of the Docker VM’s CPUs. From about 07:11 its steps slowed from about 16 seconds to 33–40. Every extra load I can name is mine:

    • the comparison and control runs;
    • the backend reload after this morning’s merge;
    • an executor I had sent to amend the pilot’s runner, whose tests compile the message-passing kernel inside the same VM.

    Threads that meet at a barrier wait for the slowest one, so a small extra load costs far more than its own CPU. I asked the executor to run its tests at the lowest priority, on one thread, compiling the kernel once. On both seeds, the next 37 steps took 9 minutes 59 seconds: back to about 16 seconds a step. The recovery came with that change. I did not measure which of my loads cost the most.

Richard also asked for a side-by-side of the two logins that can reach her record. Nobody has compared the grants. This morning’s census is the baseline for one of them (#936).