Skip to content

ADR: The tracker merger runs in Azure

ADR: The tracker merger runs in Azure

Status
accepted
Date
2026-10-22

The job hunt's tracker merger moved from the laptop to the job hunt's Function, func-jobhunt-ss, on 22 October between 09:45 and 09:47 Central. It is now the only writer of Job_Hunt_Tracker.csv and Job_Hunt_Tracker_MOVED_OUT.csv, it runs every minute while the MERGER setting is on, and the Admin tab's nightly card asks it once a minute whether it is keeping up.

Reading list

  1. ADR: The Nightly Function on the Admin tab, the Function this runs in and the card that watches it.
  2. ADR: The onion cut into vertical slices, the port-and-adapter shape the merger keeps in a project of its own.

In plain words

Every lane of the job hunt, on the laptop or on GitHub's runners, records what it did as a row in one tracker file. Lanes never write the tracker. Each drops a small file into a spool folder, and one merger appends those files to the tracker in order and files them away. Until 22 October that merger was a PowerShell loop on Steve's laptop, so a row written while the laptop slept waited for it to wake, and the cloud lanes' rows crossed the sync twice before they landed.

Now the merger is a timer in the Function that already runs the nightly lanes. It reads the share directly, writes the tracker on the share, and the laptop gets a copy on the way down.

What that is worth: one writer per file, wherever the writer runs, and the laptop off the path a row takes to the record.

Context

  • One writer per file is the rule the job hunt lives by. Two lanes writing one file have overwritten each other before; the spool and the single merger exist so that never happens to the tracker. Moving the merger only works if it moves whole: for a minute, two mergers on two copies of the tracker would be two writers.
  • The laptop was on the critical path. The nightly lanes run on GitHub Actions against the share. Their rows reached the tracker only after the laptop's sync brought them down, the laptop's merger appended them, and the sync took the tracker back up. A laptop asleep at 4:00 AM held every row of the night until morning.
  • Measured before the move (22 October, the job hunt's own notes): the share's sync had failed one file on every pass for two days, merge.log, because the laptop merger appended to it while the copy ran. The share's copy of the log was 23.6 MB against 31.2 MB on the laptop, so a cloud lane that read it read a stale log.

Decision

  1. The merger is a timer function in the job hunt's Function app. Merger runs at second 0 of every minute and does nothing unless the app setting MERGER is on, so the hand-over is a setting, not a deploy. It lists the two spool folders, tracker-inbox/ (rows the laptop's lanes write, carried up by the sync) and inbox/tracker-inbox/ (rows the cloud lanes write on the share), and runs new rows, then fixes, then approved moveouts, the order the PowerShell merger always ran them.
  2. The rules talk to a port. IMergeStore is seven calls over paths relative to the job-hunt folder: exists, read, list, ensure a folder, write, rename over, move, append. ShareMergeStore is the Azure Files adapter over the Function's existing ShareClient; the tests run the same rules over a plain folder on disk (FolderMergeStore). Nothing in the rules knows the share exists.
  3. A tracker is never half written. Every change writes the whole new file to <file>.merger-tmp, reads it back and compares it byte for byte, and only then renames it over the target. A failure anywhere before the rename leaves the tracker as it was and the spool file where it was, for the next pass. A row is copied to the moved-out file before it is removed from the tracker, so a failure between the two can duplicate a row and never lose one.
  4. The split is by file, not by job. The tracker and the moved-out file had only ever been written by the merger, so they moved cleanly. The .md files the laptop merger also appended to (state.md and the rest) are still edited directly by laptop lanes, so a cloud writer there would be a second writer. Those appends stay on the laptop: its Tracker Merger task runs merge-tracker.ps1 -Loop -AppendsOnly, and merge-tracker.ps1 carries $TrackerRowsInAzure = $true, which makes a plain run leave the tracker alone.
  5. Parity was proven before the hand-over, byte for byte. A test runs the PowerShell merger and the new one on two copies of the real tracker and moved-out file with awkward rows (commas, quotes, line breaks, a header-only file, a fix and an approved moveout) and requires identical bytes: master 1,743,354 B and moved-out 79,903 B identical on the laptop, and the same five spool files gave the same SHA-256 on Azure in a scratch folder. One difference is on purpose: a row file whose [TID:] is already in the moved-out file is filed as already present instead of merged a second time, which the PowerShell merger, reading only the tracker, did not check.
  6. The template keeps it on. infra/jobhunt.bicep sets the Function's app settings as one list, and a deploy of the template replaces every setting the app holds with that list. A switch that is on in Azure and missing from the template is off after the next deploy. So the template carries MERGER on, and both dispatches on as they run, and a test in functions/jobhunt.Tests fails if MERGER is missing or not on, if either dispatch is not on, or if the Function reads a setting the template does not name (three are named as set out of band: the scratch root, the GitHub token, and the hand test of the clock).
// This list REPLACES the app's settings on every deploy of this template: a setting that is on
// in Azure and missing here is off after the next deploy. functions/jobhunt.Tests holds the
// list to every name the Function reads, and MERGER and both dispatches to 'on' as they run
// (ADR: The tracker merger runs in Azure).
siteConfig: {
  appSettings: [
    { name: 'AzureWebJobsStorage', value: storageConnection }
    { name: 'DEPLOYMENT_STORAGE_CONNECTION_STRING', value: storageConnection }
    { name: 'JOBHUNT_SHARE_CONNECTION', value: storageConnection }
    { name: 'JOBHUNT_SHARE_NAME', value: shareName }
    // Application Insights for every function in the app (the host reads it; no code does).
    { name: 'APPLICATIONINSIGHTS_CONNECTION_STRING', value: appInsights.properties.ConnectionString }
    // The 4:00 AM reply lane and the four-hour records run, both on in Azure. NIGHTLY_GITHUB_TOKEN
    // is set out of band with az functionapp config appsettings set, never here; this list
    // replaces the app's settings on a redeploy, so set the token again after one.
    { name: 'NIGHTLY_DISPATCH', value: 'on' }
    { name: 'BOOKKEEPING_DISPATCH', value: 'on' }
    { name: 'NIGHTLY_REPO', value: 'SteveStout/TheYard' }
    // The tracker merger: the only writer of Job_Hunt_Tracker.csv and its moved-out file on the
    // share. 'off' hands the tracker back to the laptop's merger (the roll back in the record).
    { name: 'MERGER', value: 'on' }
    // The shared .md files' appends, on since the cutover: the same Merger is their one writer. 'off'
    // hands them back to the laptop's merger (-AppendsOnly), with the two switches in its scripts.
    { name: 'APPENDS', value: 'on' }
    // The tracker's SQL copy (PROMPT-JOBHUNT-TRACKER-SQL, functions/jobhunt/Merger.cs): 'import' copies the CSV into
    // jobhunt.Tracker once, when the copy is empty, and checks it byte for byte; 'on' copies the rows that changed
    // after every merge and checks the whole file on the first pass of each Central day; anything else is off. The
    // CSV stays the master either way.
    { name: 'TRACKER_SQL', value: 'on' }
    // The Sheet mirror (functions/JobHunt.Application/Features/Sheet): 'shadow' writes its plan to the share and adds
    // nothing; 'on' appends the master's missing rows to the Sheet and checks the read-back; anything else is off.
    // On since 12/1 (Steve 11:51 CST: "On and make sure no bugs"): the mirror is the only writer of
    // new rows to Sheet1, so a redeploy keeps it on. The Google client, its refresh token and the Sheet's id are set
    // out of band.
    { name: 'SHEET_MIRROR', value: 'on' }
    // The watch (functions/jobhunt/WatchTimer.cs, at 13, 28, 43 and 58 past): 'shadow' reads every test's real source and
    // writes J:\dispatch\WATCH.md, healing nothing; 'on' also runs the heal ladder; anything else is off.
    { name: 'WATCH', value: 'shadow' }
    // The 30-minute inbox pass (functions/jobhunt/AtsSweepTimer.cs, at 20 and 50 past each hour), three parts.
    // The ATS sweep (functions/JobHunt.Application/Features/Ats): 'on' drops the rows in the spool, archives and reads the labels back;
    // 'shadow' writes its plan and archives nothing; anything else is off.
    { name: 'ATS_SWEEP', value: 'on' }
    // The leads harvest (functions/JobHunt.Application/Features/Leads): 'on' appends each whole alert's jobs to nightly/leads-<date>.md,
    // then archives it; 'shadow' writes leads-shadow/ only.
    { name: 'LEADS', value: 'on' }
    // The leads list and the campaign's lead run (ADR-118, Decision 5): 'on' fires nightly.yml's leads run (Sonnet, low effort,
    // LEADS-LANE.md) when a pass harvested a lead that passed the filter and that leads/scored.tsv does not hold;
    // 'shadow' writes what it would fire to the pass's line; anything else never starts it.
    { name: 'LEADS_LIST', value: 'on' }
    // Human mail never waits for 4 AM (rung 5): 'on' fires nightly.yml's reply run (drafts only) when a person
    // waits on a thread with no draft, at most once every four hours between 7 AM and 9 PM Central; 'shadow'
    // writes what it would fire to the pass's line; anything else never starts it.
    { name: 'REPLY_ON_HUMAN', value: 'shadow' }
    // The model's step: 'on' fires nightly.yml's triage run (Sonnet, low effort) when the inbox holds mail
    // that no triage run has judged; anything else never starts it.
    { name: 'TRIAGE', value: 'on' }
    // The daily card (functions/JobHunt.Infrastructure/Features/Card): 'on' keeps nightly/CARD.md current, the one page Steve reads.
    { name: 'DAILY_CARD', value: 'on' }
    // The hiring-manager email campaign (functions/jobhunt/CampaignSendTimer.cs, ADR-118), at 8 AM Central seven
    // days a week: 'shadow' writes what it would send to EmailsSent and calls no mail service; 'on' sends from
    // Steve's Gmail, at most ten a day with a three, five, ten start; anything else is off. 'on' is Steve's
    // switch after seven mornings of shadow, never a deploy's.
    { name: 'EMAIL_CAMPAIGN', value: 'shadow' }
    // The network log (functions/jobhunt/NetworkLogTimer.cs), in the 6 o'clock hour Central: 'shadow' logs every
    // two-way conversation and writes the Monday would-drafts to the share; 'on' writes Gmail drafts under
    // Follow-up/Ready, and sends email reconnects only when NETWORK_SEND reads 'on'; anything else is off.
    // NETWORK_LOG_ANY_HOUR 'on' lets a pass run outside the hour.
    { name: 'NETWORK_LOG', value: 'shadow' }
    { name: 'NETWORK_LOG_ANY_HOUR', value: 'off' }
    // NETWORK_SEND, read only while NETWORK_LOG is 'on': 'on' sends each email reconnect in RECONNECT-v1 through the
    // campaign's GmailSender; anything else is shadow, which drafts it and writes the HTML that would send.
    { name: 'NETWORK_SEND', value: 'shadow' }
    // The reply screen (functions/JobHunt.Domain/Features/Ats/ReplyScreen.cs), read by the five-minute reply pass:
    // 'on' holds a blacklisted, red-carried or two-flag first-contact message back (no item, no draft), logs it and
    // archives it; anything else is shadow, which writes what it would screen to inbox-pass/would-screen and changes nothing.
    { name: 'REPLY_SCREEN', value: 'shadow' }
    // CALL_WATCH (CallWatchPass): 'on' mails Steve's own address a booked call an email cancelled or moved, deletes the
    // Function's own untouched drafts to that person and rows it; anything else is shadow, which writes
    // dispatch/CALL-CHANGES.md and inbox-pass/call-changes/*.would-mail.txt and mails, deletes and rows nothing.
    { name: 'CALL_WATCH', value: 'shadow' }
    { name: 'CAMPAIGN_SQL', value: campaignSql }
  ]
}

Live from infra/jobhunt.bicep, region jobhunt-settings, read from this build at 99df7a8.

  1. CI runs the Function's tests. The api job runs dotnet test api, which never built the Function. A job of its own runs dotnet test functions/jobhunt.Tests on every push, with the .NET 9 runtime the Flex Consumption app runs installed beside the SDK. The parity test needs Windows and a copy of the real tracker, so on GitHub's Linux runner it reports that it did not run, by design; every other test must pass.
# The job hunt's Function and its tests (functions/jobhunt, functions/jobhunt.Tests). The
# Function shares this repository and nothing in the site's image, so the api job's
# `dotnet test api` never built it, and the tracker merger's rules, the template check that
# keeps MERGER on, and the health route's arithmetic ran only on the laptop that wrote them
# (ADR: The tracker merger runs in Azure). The Function targets .NET 11, the runtime its Flex
# Consumption app runs, and builds with the project SDK Azure.Functions.Sdk, whose extension project is
# generated by a hook on the Function's own restore; restoring through the test project skips the
# hook and the build warns (AZFW0108), so the Function is restored first (ADR: Moving to .NET 11 in
# four ships, ship 4).
# The parity test runs the laptop's PowerShell merger beside the new one; it needs Windows and a
# copy of the real tracker, so here it reports "not run" by design and the rest must pass.
functions:
  needs: style
  runs-on: ubuntu-24.04
  steps:
    - uses: actions/checkout@v7
      with:
        ref: ${{ inputs.sha || github.sha }}
    - uses: ./.github/actions/dotnet
    - name: Run the job hunt Function's tests
      run: dotnet restore functions/jobhunt && dotnet test functions/jobhunt.Tests --logger 'console;verbosity=normal'

Live from .github/workflows/ci.yml, region functions-job, read from this build at 99df7a8.

  1. The card asks whether it is keeping up, and sees counts and ages only. The site's identity holds Reader and Monitoring Reader on the job hunt's group, which read the Function's record and metrics and nothing inside the share, and it is given no account key. So the Function answers the question itself: GET /api/merger/health lists the two spool folders, reads merge.log's write time from the same listing, opens no file, and answers five numbers: seconds since merge.log was last written, files waiting, files waiting past five minutes, past ten, and the oldest wait. The route is anonymous because those five numbers are exactly what the card shows the public; the site would otherwise need a key to the app in its settings. The nightly card reads it once a minute with the Function's metrics, beside them on the same kept minute, from the host name the hour reads off the Function's record, and keeps only the five numbers under names of its own: any other field in the answer is dropped unread. The row "Is the tracker merger keeping up?" is good while nothing has waited past five minutes, information while a file has, and a warning once any file has waited past ten (CloudThresholds.MergerWait), because a merger that runs every minute and leaves a file through ten passes is stuck, not busy.
[Fact]
public async Task The_minute_carries_the_function_s_five_numbers_and_nothing_else_reaches_the_card()
{
    const string health = """
        {"log_age_s":42,"waiting":2,"waiting_over_5":1,"waiting_over_10":1,"oldest_wait_s":700,
         "file":"20261022-150000Z-lane-a.csv","log":"2026-10-22 10:59:00 MERGED Job_Hunt_Tracker.csv","rows":[{"Person":"Ann"}]}
        """;
    var nightly = CatalogueNightly();
    var group = new FunctionGroup(health);
    IReadOnlyList<ResourceMinute> minutes;
    using (OutboundHttp.RouteTo(group))
    {
        await nightly.Hour(Now, Now.AddHours(-1), CancellationToken.None);
        minutes = await nightly.Minutes(Now.AddMinutes(-10), Now, "1.0.4.27", CancellationToken.None);
    }
    Assert.Contains(FunctionHost + "/api/merger/health", group.Asked);
    var kept = MergerReading.Newest(minutes);
    Assert.NotNull(kept);
    Assert.Equal(1d, kept.Values[MergerReading.Over10]);
    Assert.Equal(700d, kept.Values[MergerReading.Oldest]);
    Assert.All(minutes.SelectMany(m => m.Values.Keys), key => Assert.True(MergerReading.Fields.Values.Contains(key) || NightlyMetrics.Readings.Contains(key), $"{key} is kept and is not a reading"));

    var report = nightly.View(WithMinutes(minutes));
    var row = report.Rows.Single(r => r.Key == "merger");
    Assert.Equal(("1 file waiting over 10 minutes", "warning"), (row.Answer, row.Tone));
    string wire = JsonSerializer.Serialize(report);
    foreach (string share in new[] { "lane-a", ".csv", "Job_Hunt", "MERGED", "Ann" })
    {
        Assert.DoesNotContain(share, wire, StringComparison.Ordinal);
    }
}

[Fact]
public async Task The_first_minute_after_a_roll_reads_the_host_itself_and_reads_the_record_once()
{
    // A roll starts a new process with no hour read yet: the merger row must not wait for the hour. After that the
    // health route is asked every five minutes, not every minute: each answer is billed a full second of the grant.
    var nightly = CatalogueNightly();
    var group = new FunctionGroup("""{"log_age_s":12,"waiting":0,"waiting_over_5":0,"waiting_over_10":0,"oldest_wait_s":null}""");
    IReadOnlyList<ResourceMinute> first, second, sixth;
    using (OutboundHttp.RouteTo(group))
    {
        first = await nightly.Minutes(Now.AddMinutes(-2), Now.AddMinutes(-1), "1.0.4.30", CancellationToken.None);
        second = await nightly.Minutes(Now.AddMinutes(-1), Now, "1.0.4.30", CancellationToken.None);
        Assert.Single(group.Asked, asked => asked == FunctionHost + "/api/merger/health");
        sixth = await nightly.Minutes(Now.AddMinutes(3), Now.AddMinutes(4), "1.0.4.30", CancellationToken.None);
    }
    Assert.Equal(0d, MergerReading.Newest(first)?.Values[MergerReading.Waiting]);
    Assert.Null(MergerReading.Newest(second));
    Assert.Equal(0d, MergerReading.Newest(sixth)?.Values[MergerReading.Waiting]);
    Assert.Equal(2, group.Asked.Count(asked => asked == FunctionHost + "/api/merger/health"));
    Assert.Equal(1, group.Asked.Count(asked => asked.EndsWith(FunctionPath, StringComparison.OrdinalIgnoreCase)));
    Assert.Equal(("keeping up", "good"), (NightlyRows.MergerRow(WithMinutes(first)).Answer, NightlyRows.MergerRow(WithMinutes(first)).Tone));
}

[Fact]
public async Task A_record_that_refuses_the_minute_costs_the_merger_reading_and_nothing_else()
{
    var nightly = CatalogueNightly();
    var group = new RefusedRecord();
    IReadOnlyList<ResourceMinute> minutes;
    using (OutboundHttp.RouteTo(group))
    {
        minutes = await nightly.Minutes(Now.AddMinutes(-2), Now, "1.0.4.30", CancellationToken.None);
    }
    Assert.Null(MergerReading.Newest(minutes));
    Assert.Contains(group.Asked, asked => asked.EndsWith("/metrics", StringComparison.Ordinal));
    Assert.DoesNotContain(group.Asked, asked => asked.StartsWith(FunctionHost, StringComparison.Ordinal));
    Assert.Equal(NightlyRows.MergerUnread, NightlyRows.MergerRow(WithMinutes(minutes)).Answer);
}

/// <summary>The same group, with the Function's own record answering 403 and Monitor answering an empty series.</summary>
private sealed class RefusedRecord : HttpMessageHandler
{
    public List<string> Asked { get; } = [];

    protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
    {
        var uri = request.RequestUri!;
        Asked.Add(uri.Host + uri.AbsolutePath);
        if (string.Equals(uri.AbsolutePath, FunctionPath, StringComparison.OrdinalIgnoreCase))
        {
            return Task.FromResult(new HttpResponseMessage(HttpStatusCode.Forbidden) { Content = new StringContent("{}") });
        }
        string body = uri.Host == "169.254.169.254" ? """{"access_token":"e30.e30.sig"}"""
            : uri.AbsolutePath.EndsWith("/resources", StringComparison.Ordinal) ? $$"""{"value":[{"id":"{{FunctionPath}}","name":"func-test","type":"Microsoft.Web/sites"}]}"""
            : """{"value":[]}""";
        return Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent(body, System.Text.Encoding.UTF8, "application/json") });
    }
}

[Theory]
[InlineData(0d, 0d, 0d, "keeping up", "good")]
[InlineData(3d, 0d, 0d, "keeping up", "good")]
[InlineData(3d, 2d, 0d, "2 files waiting over 5 minutes", "info")]
[InlineData(3d, 2d, 1d, "1 file waiting over 10 minutes", "warning")]
public void The_merger_row_is_good_until_five_minutes_and_a_warning_past_ten(double waiting, double over5, double over10, string answer, string tone)
{
    var row = NightlyRows.MergerRow(WithMinutes([Merger(waiting, over5, over10, waiting > 0 ? 400 : null)]));
    Assert.Equal((answer, tone), (row.Answer, row.Tone));
    Assert.Equal("Is the tracker merger keeping up?", row.Question);
    Assert.StartsWith("newest merge.log line 30 s ago", row.Detail[0].Text, StringComparison.Ordinal);
}

[Fact]
public void An_hour_with_no_merger_reading_says_so_and_a_missing_log_is_named()
{
    var unread = NightlyRows.MergerRow(WithMinutes([new ResourceMinute(Now.AddMinutes(-1), new Dictionary<string, double?> { ["executions"] = 1 }, "1.0.4.27")]));
    Assert.Equal((NightlyRows.MergerUnread, "info"), (unread.Answer, unread.Tone));
    var noLog = NightlyRows.MergerRow(WithMinutes([Merger(0, 0, 0, null, logAge: null)]));
    Assert.Equal("no merge.log on the share", noLog.Detail[0].Text);
    Assert.Equal((5d, 10d), CloudThresholds.MergerWait);
}

[Fact]
public void Only_numbers_under_the_five_names_are_read_from_the_function_s_answer()
{
    using var answer = JsonDocument.Parse("""{"waiting":"3","waiting_over_5":1,"oldest_wait_s":null,"extra":9}""");
    var readings = MergerReading.Readings(answer.RootElement);
    Assert.Equal(MergerReading.Fields.Values.Order(), readings.Keys.Order());
    Assert.Null(readings[MergerReading.Waiting]);
    Assert.Equal(1d, readings[MergerReading.Over5]);
    Assert.Null(readings[MergerReading.Oldest]);
    Assert.Equal(["59 s", "11 min", "2 h 5 min"], new[] { 59d, 700d, 7500d }.Select(MergerReading.Age));
}

Live from api/TheYard.Tests/NightlyCardTests.Merger.cs, region nightly-merger-tests, read from this build at 99df7a8.

The age of a waiting file is counted from its own write time, which for a laptop row is when the lane wrote it on the laptop, not when the sync carried it up. A laptop that comes back online after more than ten minutes therefore shows its held rows as waiting past ten for the minute or two the merger needs: the card is reporting the row's whole trip, sync included, which is the question the operator asks.

A row file's path

A laptop lane's row goes up by the share sync and a cloud lane's is written to the share; the Merger appends it through a temp file it reads back and renames over, files it under merged and logs it; the sync brings the tracker down; the health route counts what waits for the Admin tab

The roll back

Three switches, in this order, each one undoing one part:

  1. MERGER to off on func-jobhunt-ss (az functionapp config appsettings set ... --settings MERGER=off). The timer keeps firing and does nothing. A row file left in the share's spools stays there.
  2. In the job-hunt folder, $TrackerRowsInAzure = $false in merge-tracker.ps1, so a run writes the tracker again.
  3. Restart the laptop's Tracker Merger task without -AppendsOnly, and turn the sync back to carrying the tracker up. The laptop is the one writer again.

Template and setting must agree after a roll back: a template deploy with MERGER on would turn the cloud merger back on beside the laptop's, two writers. The template's test holds on because that is what runs; a roll back that lasts longer than an afternoon changes the template and the test together.

What was considered

  • Moving the .md appends too. Rejected for now: laptop lanes edit those files directly, so a cloud appender would be a second writer. They move when the laptop lanes stop editing them in place.
  • Mounting the share on the laptop and keeping the PowerShell merger. The laptop stays on the path; a sleeping laptop still holds every cloud row.
  • The site reading the share for the card. It would need the account key or a data role in the site's settings for five numbers the Function can say on its own. Rejected; the card keeps its rule that no file in the share is opened by the site.
  • A key on the health route. It would put a second secret in the site's settings to protect numbers the site publishes anyway.

Consequences

  • A row reaches the share's tracker within a minute of reaching a spool; on the laptop it shows about three minutes after a lane writes it (sync up, a merger pass, sync down).
  • The Function runs one more execution a minute, about 43,200 a month at 512 MB, plus one health read a minute from the site: inside the Flex Consumption free grant the nightly card already measures.
  • A redeploy of infra/jobhunt.bicep keeps the merger on. A setting added in Azure by hand and not in the template is caught by the test the next time the Function reads it.

Where it sits

The merger is not in the site's onion: it is the job hunt's Function, functions/jobhunt, a project of its own that shares this repository and nothing in the site's image. Its rules (Merge/RowMerge, FixMerge, MoveOutMerge, MergeContext, MergerHealth) talk only to the IMergeStore port; ShareMergeStore is the adapter over Azure Files; Merger.cs and MergerWatch.cs are the timer and the route. On the site's side the reading is the host's, beside the nightly card it feeds: Features/Admin/Cloud/MergerReading.cs reads the route and keeps the five numbers, Features/Admin/Cloud/NightlySource.cs reads it with the Function's metrics, and Features/Admin/Cloud/NightlyRows.cs draws the row. Nothing in Domain or Application knows the merger exists.

Files

Addendum, 2026-10-22 (1.0.4.29): the .md appends merge in Azure too

The split in rule 4 lasted three hours. On Steve's word at 11:40 ("move the .md appends into the Azure merger, the same pattern as the tracker rows") the appends moved at 12:32 Central, in the quiet window after the noon records run.

  • The port. Merge/TextAppendMerge.cs is merge-tracker.ps1's Merge-TextAppends behind the same IMergeStore port, which gained a folder listing: the fragments in append-inbox/<target>/ (the laptop's, sent up by the sync) and inbox/append-inbox/<target>/ (the cloud lanes', on the share), the same nine targets, the fragment appended verbatim and stamped <!-- AID:<stem> -->, read back, filed under merged/, the 24-hour self-heal, nothing deleted. The Merger runs it after the rows when APPENDS is on; the template carries on and its test holds it there.
  • Parity. TextAppendMergeTests runs merge-tracker.ps1 -AppendsOnly and the port on copies of all nine real targets with a fragment that has no final line break, one with only LF line ends and trailing blank lines, one with a byte order mark and characters past ASCII, one whose stamp is already in its target, an empty one, and one for a folder that is not a target: every target identical, byte for byte.
  • A bug found on the way, fixed in both. From 11:20 to 11:53 the laptop merger re-appended 332 blocks. The sync brought stale top-level copies of already merged fragments back down from the share; the merger filed each as already present under a name merged/ already held, which renames it -dupHHMMSS; the next pass looked for that new name's stamp, did not find it, and appended the block again. The self-heal now counts the original name's stamp for a -dup name, a dot file (azcopy's .azDownload-*) is never a fragment, and the sync never brings append-inbox/ down. The duplicated blocks already appended (standard-answers.md 33, CONVENTIONS.md 11, writing-samples.md 3, failure-log.md 1) are left for a dedupe the owner approves, because removing them deletes text.
  • The cutover (staging\mergercode1022\cutover-appends.ps1 in the job-hunt folder): the sync paused; the laptop merger idle ($AppendsInAzure = $true); the laptop's nine targets up and proven equal on the share by SHA-256; the 44 stale fragment copies at the top of the share's spools set aside in pre-cutover/ folders, not deleted; APPENDS=on; the new sync in and resumed; one fragment from the laptop spool merged on the share and back in the laptop's state.md in four minutes.
  • The laptop copy is a copy. The sync brings the nine targets down every pass. Text a lane appended to the laptop copy directly is found against the last copy brought down and turned into a fragment (logged ADOPTED), so it is merged rather than lost; any other edit is set aside whole and logged CONFLICT. A sweep or rotation of a target is a rewrite, not an append, so it is no lane's job until the merger can do it.
  • Roll back: APPENDS=off, both $AppendsInAzure switches false, the share's copies down once, the laptop merger appending again (rollback-appends.ps1).

Addendum, 2026-10-22 (1.0.4.30): the merger row is read from the first minute after a roll

Rule 8 said the card reads the route "from the host name the hour reads off the Function's record". That stopped being true at 1.0.4.30. The hour runs once an hour, and a roll starts a new process with no hour read yet, so for about two minutes after every deploy the row read "not read: no merger reading kept in the last hour" (seen on both names at 13:26 Central after 1.0.4.29, cleared by 13:28).

  • The minute reads the host itself. When NightlySource.MinutesAsync finds the Function and no host is known, it reads the Function's record once for properties.defaultHostName, the same read and API version the hour uses, and keeps the answer. Every later minute and hour uses the kept host; the hour still refreshes it.
  • A failed read costs one line. A 401, 403 or 404, a timeout or an answer of the wrong shape leaves the host unknown and the merger reading out of that minute; the Function's metrics on the same minute are kept, and the next minute asks again.
  • Tests (NightlyCardTests.Merger.cs): the first two minutes after a roll, with no hour read, both carry the merger's reading and read the record once between them; a record that answers 403 leaves the minute's metrics read, asks the route nothing, and the row says it is not read.

Addendum, 2026-10-22 (1.0.4.30): the Sheet mirror, in shadow

The four-hour records run spent most of its turns on a job with one right answer: copy the master rows the tracker's Google Sheet lacks onto the end of the Sheet. On Steve's word at 11:54 ("we can write code that writes to the CSV and Google sheet", "azure is cheaper than AI") that job moves into the same Function, as the first increment of the job hunt's automation plan.

  • The rules are the records run's, as code (functions/JobHunt.Domain/Features/Sheet/SheetPlan.cs). Sheet row N+1 holds the master's Nth data row in Count order and column A is the display number 1..N, so the rows to add are the master's rows past the Sheet's last, numbered on from it. Before anything is added the Sheet's numbering must run 1..N without a gap and its last five rows must match the master's Person, Company and Date at the same positions; a Sheet ahead of the master, a gap or a drifted tail adds nothing and says which. A row the tracker gate bans (TrackerGate.cs, check_tracker.py's BANNED verdict ported line for line) or whose Communication is not a channel name stops the append at that row, and every later row waits behind it, because the Sheet is in Count order.
  • Append only, as a test. The grid port (ISheetGrid) has two methods, read and append, and a test holds it to those two; another refuses any code under Sheet/ that could edit, clear or delete a cell or reach Gmail. The adapter (GoogleSheetGrid.cs) makes two calls: spreadsheets.values.get on A:G and spreadsheets.values.append with RAW input and INSERT_ROWS. After an append the mirror reads the grid back and checks the row count, the numbering and every added cell, and logs VERIFIED or MISMATCH.
  • Shadow first. SheetMirror runs every fifteen minutes (7, 22, 37 and 52 past). SHEET_MIRROR=shadow, which the template carries, writes the pass's plan to sheet-mirror/last-plan.tsv on the share and one line to sheet-mirror/mirror.log, and adds nothing, so its plan can be set beside the records run's sheet-plan.tsv for at least two runs before the switch moves to on and the records run stops writing the Sheet. One writer a file stays the law: the day the mirror is on, the records run's Sheet step goes.
  • Credentials. The mirror reads the Sheet with the Google client and refresh token the nightly lane already holds (ADR-JOBHUNT-001 in the job-hunt folder) and the Sheet's id, set on the Function out of band as GMAIL_CLIENT_ID, GMAIL_CLIENT_SECRET, GMAIL_REFRESH_TOKEN and TRACKER_SHEET_ID; none is in this repository, and the Sheet's id is left out because the Sheet holds the job hunt's private rows. Until they are set the timer logs that it is blocked and does nothing.
  • Roll back: SHEET_MIRROR=off.

Addendum, 2026-10-22 (1.0.4.30): the ATS sweep, in shadow

The second increment of the same plan: the records run's ATS sweep (its step 3), the job that costs most of its turns after the Sheet, as code in the same Function (functions/JobHunt.Application/Features/Ats/ since 1.0.4.44).

  • What a message is (AtsRules.cs). Mail still in the inbox from a known tracking system's domain (Greenhouse, Lever, Ashby, Workday, iCIMS, Jobvite, SmartRecruiters, Taleo, SuccessFactors, BambooHR, Workable) is read as a receipt, a generic rejection, a rejection that gives a reason (a location, a cap, sponsorship), or unknown. A receipt that asks for anything (an assessment, availability, a reply) is unknown.
  • What the sweep does with it. A person anywhere in the thread keeps it in the inbox. Mail from before 2026 is archived with no row. The company is the one company with an application on the master named in the sender, the subject or the text; none, or two, keeps it in the inbox. A receipt rests on an application row within two days, else gets a row; a generic rejection rests on a rejection row within two days, else gets a row naming the applications on file; either is then archived. A rejection with a reason gets its row and stays for Steve. A message a row already names by its Gmail id rests on that row. Rows go to inbox/tracker-inbox/ for the merger, never into the tracker directly.
  • The red lines as tests. The inbox port has four methods (find, read, a thread's senders, archive), and a test refuses any code under Ats/ that could send, draft, trash, delete or add a label. Archive removes INBOX and reads the labels back.
  • Shadow first. AtsSweep runs at 50 past the hour before each records run, so both read the same inbox. ATS_SWEEP=shadow, which the template carries, writes ats-sweep/last-plan.tsv and a line to ats-sweep/sweep.log on the share and archives nothing; after two runs agree with the records run's DONE table, on turns the records run's step 3 off. Roll back: ATS_SWEEP=off.

Addendum, 2026-10-22 (1.0.4.31): the daily card

The third increment: one page Steve reads, nightly/CARD.md on the share, written by the same Function with no model (functions/JobHunt.Domain/Features/Card/ and functions/JobHunt.Infrastructure/Features/Card/ since 1.0.4.44). It says what waits on him (the newest APPLY-BLOCKERS file's numbered items, a Sheet held behind a row, rejections that give a reason left in the inbox), the next seven days (each interview or call on his calendar with how he joins it, read with calendar.readonly once the token holds that scope; a call with no join link and no number starts with STOP and is listed under what waits on him too; until the scope is granted the line says it is not read), the pipeline (the tracker's rows and last Count, the merger's and the appends' newest log lines with their age, rejected spool files, the Sheet mirror's and the ATS sweep's last passes) and TheYard (the newest CI run on main and both names' live version). Every line names where it was read, and a read that fails says so in words. Under what waits on him the card also names every company at RULE 50's cap (three applications in a rolling 60 days) or on the do-not-apply list, with the day the next application may go in: Leads/ApplicationCap.cs is that rule as code, the do-not-apply table read out of systemRules.md and a company's variant spellings counted as the company, and it is the one cap check the leads filter will use too. DailyCard runs at 5 past each hour and rewrites the card only when what it says changed, and at 6 AM Central every day. Roll back: DAILY_CARD=off.

Addendum, 2026-10-22 (1.0.4.31): the leads harvest, in shadow

The fourth increment, started: the LinkedIn job alerts still in the inbox, each requisition read out of the alert's text (Leads/LinkedInAlert.cs: the title, the company and the location above "View job:", the link cut to its job id so no tracking reaches a file), and judged by Leads/LeadsFilter.cs before any model reads it: remote only, not already applied to (the company with the title in an application row's note), and clear of RULE 50 through the same ApplicationCap the card uses. It runs in the ATS sweep's slot with LEADS=shadow, writes leads-shadow/last-pass.tsv and one line to leads-shadow/leads.log on the share, and archives nothing, so its list can be set beside the records run's leads-<date>.md. The other boards' alerts and the posting age from the Greenhouse, Lever and Ashby APIs come next, each in shadow first. Roll back: LEADS=off.

Addendum, 2026-10-22 (1.0.4.34): processed means archived

Steve set the rule at 18:26 Central: once a lane or a run processes a mail, it is archived in the same pass. The ATS sweep followed the records run's older rule and left a rejection that gives a reason in the inbox for him. It now logs that rejection with the reason in the row's notes and archives it, and archives it with no new row when a rejection row already holds it (AtsRules.Decide, held by AtsSweepTests). The row, not the inbox, is where he reads the reason. The daily card's "left in the inbox" line went with it, and its RULE 50 line now names how many companies are held and the five that open soonest, not every one. Mail that asks something of Steve, and any thread with a person in it, still stays in the inbox. The first parity read against a records run (17:45) found one more: an interview or scheduling mail a row already names by its Gmail id was planned for the archive, where the run leaves it; it now stays.

The leads harvest's first live pass, at 19:50, read 13 LinkedIn alerts and no job: the body it was handed was the one the ATS rules read, every line joined into one, so an alert had no blocks to split. A message now also carries its plain part with the lines kept (InboxMessage.Lines), the harvest reads that, and an alert's own header line, which carries a link mid-line, no longer reads as the first job (AtsSweepTests holds both on a multipart alert shaped like the real one).

Addendum, 2026-10-23 (1.0.4.35): every function's telemetry in Application Insights

Until this addendum the Function app had no Application Insights: a timer that threw or a pass that stalled showed only in the share's own logs. appi-jobhunt-ss (RG-JOBHUNT-SS, workspace-based on TheYard's log-theyard-ss, so one workspace holds both) now receives every function's invocations, failures and host logs, from the one app setting APPLICATIONINSIGHTS_CONNECTION_STRING that the template carries from the component's own connection string. No code reads it; the Functions host does. TemplateTests holds the setting and the component in the template, so a redeploy cannot cut the app off.

Addendum, 2026-10-23 (1.0.4.35): the 30-minute inbox pass, acting

Steve's alpha goal for 2026-10-23: a pass every 30 minutes, so he never sees a job-board alert or a rejection again, and every human message, interview, scheduling and account mail stays in the inbox. Until this addendum the ATS sweep and the leads harvest ran in shadow once before each records run, and the records run left same-day alerts in the inbox. AtsSweep now runs at 20 and 50 past every hour as the inbox pass, three parts in order, each logged and each allowed to fail without stopping the next:

  • The ATS sweep, on. The same rules as in shadow (AtsRules.Decide); its plans since 1.0.4.34 matched the records runs and archived nothing a run left. The row goes to the spool before the archive.
  • The leads harvest, on. Harvest before archive: the requisitions of every LinkedIn alert that read whole are appended to nightly/leads-<date>.md (the records run's file, never rewritten) with the filter's verdict beside each, and only then is the alert archived and its labels read back. An alert with a block it could not read, with no job in it, or with anybody but the alert sender in its thread stays in the inbox.
  • The model, only for what code could not judge. With TRIAGE=on the pass lists the inbox's mail from the last two days that triage/seen.tsv does not name and, when there is any, fires triage at nightly.yml: Sonnet at low effort, 40 turns, a 10-minute step, reading nightly/TRIAGE-LANE.md on the share. It harvests the other boards' alerts, logs the rejections and receipts, archives them, leaves everything else, and writes one line a judged message to triage/seen.tsv, so nothing is judged twice and the model is never started for nothing. It shares the records run's concurrency group, so the two never act on the inbox at once.

One line a pass goes to inbox-pass/pass.log with its wall time. The template carries ATS_SWEEP=on, LEADS=on and TRIAGE=on; InboxPassTests holds the schedule, the harvest-before-archive order and what is left, and the triage step's seen list. Roll back: any of the three set to shadow or off, each on its own.

Addendum, 2026-10-23 (1.0.4.37): the triage floor is the inbox, and a refused token is named

Two gaps the first day of the inbox pass showed. The 09:20 and 09:50 passes each wrote FAILED: HttpRequestException: ... 400 (Bad Request) three times and fired no triage: Steve's password change at 08:12 revoked the Gmail refresh token, and every Gmail call of the pass answered 400 until the consent click at 09:57 (read from inbox-pass/pass.log and state.md). The token trade now throws GoogleTokenRefusedException, the pass writes one BLOCKED: line naming the click that restores it, and the parts after it are skipped instead of asking Google again. And the triage window was the last two days, so an alert older than that (the Ladders alert of 10/19) was never judged by any run; the pass now hands the model whatever is still in the inbox that triage/seen.tsv does not name, a hundred a pass, and nightly/triage_gmail.py lists the same. InboxPassTests holds both.

Addendum, 2026-10-23 (1.0.4.40): every board's alert is harvested, and the leads list has its own run

The inbox pass harvested LinkedIn's digest only, so the other boards' alerts waited for the triage run, which judges by model what code can read. Read in the inbox on 23 October: a SuccessFactors agent (Olympus, olympuscorp1-jobnotification@noreply.jobs2web.com, HTML only), two Ladders alerts (jobs@my.theladders.com), and two LinkedIn nudges from jobs-noreply@linkedin.com ("CSI Companies is hiring for a API role", "apply now to 'Senior Staff Software Engineer at ServiceTitan'"). From 1.0.4.40 the harvest asks every reader in BoardAlerts.All: LinkedIn's digest as before, LinkedIn's nudges by their two subjects and the first job link, Ladders by "title, band, company, place" once the markup is gone (a company named in two parts keeps both; the link written is a Ladders search for the title and company, because Ladders' own links are tracking redirects with no job id), and a SuccessFactors agent by its job links in the HTML part, cut at the query string. The same sender's "Your application was viewed" and "application was sent" mails are not alerts and are left for the sweep and triage. Each reader names its own sender, so a thread with anybody else in it stays. LeadsFilter adds the band floor: a printed band that tops under $155K fails with the figure named; no band printed passes, as before.

The list itself: LEADS_LIST fires nightly.yml's new leads mode (Sonnet, low effort, 40 turns, 10 minutes, nightly/LEADS-LANE.md on the share) when a pass harvested a lead that passed the filter and that leads/scored.tsv does not hold. That run scores fit against targeting-criteria.md and candidate-profile.md and rewrites nightly/LEADS.md ranked best first; a lead drops off when a tracker row names it applied, rejected or skipped. The template carries LEADS_LIST=shadow: the pass's line says what it would fire for two passes, then the setting moves to on. BoardAlertsTests holds each reader on the shape the board sent; TemplateTests holds the setting and its gate. Roll back: LEADS_LIST to anything but on.

Addendum, 2026-10-23 (1.0.4.42): human mail never waits for 4 AM, and a dead Function emails me

A person who writes in the morning waited for the 4 AM reply run. From 1.0.4.42 the inbox pass asks HumanMail whether a person, not Steve, not a machine and not a relay that speaks for one (an InMail notice, a digest, an alert, a newsletter), has written in the last two days to a thread that holds no draft. When one has, the pass fires the reply run (the nightly mode, Opus, drafts only) at most once every four hours, between 7 AM and 9 PM Central, and keeps the time of the fire in inbox-pass/reply-fired.txt. Nothing sends: every email still waits for Steve's word. REPLY_ON_HUMAN carries it, shadow in the template first, so the pass's line says who is waiting and what it would fire. HumanMailTests holds who is a person on the senders in the inbox on 23 October and the hours, the four hours and the draft rule.

A Function that stops told nobody. infra/jobhunt-alerts.bicep is its own template, so its deploy touches no app setting: one action group that emails me (the address passed at deploy time, never written in the repository) and one log alert over appi-jobhunt-ss, every ten minutes, that fires on any failed invocation in thirty minutes or no Merger invocation in ten. TemplateTests holds the parameter, the windows and the query.

The card's next seven days needed no change: the token Steve restored at 09:57 on 23 October was issued by get_google_token_j.py, which asks calendar.readonly, and CARD.md at 14:05 listed Tuesday's recruiter screen from Google Calendar.

Addendum, 2026-10-24 (1.0.4.50): an answered thread does not fire, a full harvest asks no more boards, and the share is billed less

Three fixes to the inbox pass, the first a condition for REPLY_ON_HUMAN leaving shadow. A thread whose newest message, not counting a draft, is mine is answered: after I reply, the person's mail stays in the inbox for two days, and HumanMail read the thread as waiting because it held no draft, so it would have fired the reply run every four hours until the mail aged out. The inbox port reads a thread's newest sender (ThreadNewestSenderAsync, Gmail lists a thread oldest first), and HumanMailTests holds the answered case. LeadsHarvest stops asking boards once its cap of 150 is met, where it asked each later board for zero, which Gmail answers with its default page or a 400.

The share the Function writes to bills every transaction. From 1.0.4.49 the merger remembers for an hour each folder it has made sure of, which took about 2,200 creates an hour that found the folder already there off the bill. From this version the share is Transaction optimized rather than Hot (infra/jobhunt.bicep), an alert emails when the share passes 20,000 transactions in an hour, about four times a quiet hour (infra/jobhunt-alerts.bicep), and a $50 monthly budget on the subscription emails at 80 % and 100 % of the spend and at 100 % of the forecast (infra/jobhunt-budget.bicep, subscription scope, the address passed at deploy time). TemplateTests holds the tier, the alert and the budget.

Addendum, 2026-10-25 (1.0.4.71): the Function and its CI job on .NET 10

Point 7 above installed the .NET 9 runtime beside the SDK, because the Function ran on .NET 9. From 1.0.4.71 the Function targets .NET 10 and its Flex Consumption app runs dotnet-isolated 10.0 (ADR-089, the addendum of that version), so the CI job installs .NET 10 alone, the same as every other job.

Addendum, 2026-10-25 (1.0.4.73): the tracker gets a SQL copy, and the CSV stays the master

Job_Hunt_Tracker.csv has twelve readers and one writer, this Merger. PROMPT-JOBHUNT-TRACKER-SQL moves it into the job hunt's schema one reader at a time, and this version is its first rung: the copy and the proof that the copy is the file.

  • The tables. jobhunt.Tracker holds one row a record: the seven cells as the file holds them (no date parsing, no trimming, no length limit), the record's text with its quotes and inner line breaks, and the record's SHA-256. jobhunt.TrackerHeader holds the header record, which carries byte order marks inside its quoted Count cell, whether the file opens with a mark and ends with a break, the row count and the whole file's hash. Both live in the site's database beside the campaign (ADR-118, the addendum of 1.0.4.72).
  • The cut. TrackerFile cuts the file at every CRLF outside quotes, so a line break inside a field, CRLF or LF alone, stays in its record, and puts the records back byte for byte. Measured on the live file the morning this shipped, by csv.reader and the same cut: 1,816,499 bytes, 3,006 records (the header and 3,005 rows), the last Count 3135, every record one row of seven cells, and the file put back identical.
  • The import. TRACKER_SQL=import makes the Merger copy the file once, after its pass, when the copy is empty, then rebuild the file from the copy and compare it with the CSV byte for byte. Its run line carries the rows, the rows written and the parity. Nothing writes the CSV but the merge it already did.

TrackerSqlTests holds the cut and the rebuild over a checked-in sample of the real file's shapes with the names replaced, the mirror writing only changed rows, and the copy following a row taken off the end. .gitattributes keeps the sample's CRLF breaks as they are.

Addendum, 2026-10-25 (1.0.4.74): both, every pass

The second rung of the tracker's move. With TRACKER_SQL=on the Merger copies the tracker into SQL after every pass that changed it, the CSV first and the copy second. A pass whose file hash the copy already holds writes nothing, and a copy that fails is logged on the run line (tracker_sql_failed) for the next pass to retry, because the CSV stays the master. The first pass of each Central day rebuilds the file from the copy and compares it with the CSV byte for byte; the run line carries tracker_sql_parity (1 when the two are the same), so the nightly card's Merger section shows it. Seven straight days of parity come before any reader moves to the copy (the prompt's rung 3).

Addendum, 2026-10-26 (1.0.4.91): the copy's counts are drawn on the card

The addendum above says the nightly card's Merger section shows tracker_sql_parity. It did not. The Merger's sentence on the card was built from merged alone, its history listed only the passes that merged something, and the health route's switch list had no TRACKER_SQL, so a parity check that found the copy different, or a copy that kept failing, would have been in the run line and nowhere a person looks. The copy itself was in step when this was found: the SQL frame's hash equalled the CSV's SHA-256, 3,005 rows.

From this version the card draws what this record said it did:

  • The sentence names the copy beside the merge: "the SQL copy in step" or "N rows copied" (tracker_sql_written), "parity same" or "PARITY DIFFERENT" (tracker_sql_parity, the first pass of a Central day), and "copy failed, retried next pass" (tracker_sql_failed).
  • The history lists a pass that copied rows, checked parity or failed its copy, beside the ones that merged something; a quiet minute is still counted and not listed.
  • The section turns amber when the newest parity check in the window found the copy different, or when the newest pass failed its copy. Every other tone is still its first switch's.
  • The health route names TRACKER_SQL among the switches, and the Merger section shows it as a chip beside MERGER and APPENDS.

ProcessRunsTests holds the words and the tone, ProcessReadersTests the listing rule and the parity row, and RunLineTests the switch name.

Addendum, 2026-10-26 (1.0.4.92): the copy reads the tracker only when it moved

The copy pass read the whole tracker from the share every minute (1.8 MB on 25 October) and hashed it, to learn that the copy already held it nearly every time. The share bills that as one read operation a minute, inside its free line, so this is not about the bill: it is the host's time and the trace volume of fourteen hundred needless reads a day.

From this version the pass first asks the share for the tracker's size and last-write time, one properties request that moves no content. When both equal what the last pass saw, and the copy's frame still holds the hash that pass read, the pass writes nothing and does not read the file. Any write to the tracker, the Merger's own included, moves its last-write time, so the next pass reads it whole. What the last pass saw lives in the Function's memory only, so the first pass after a restart reads the file as before. The daily parity check is unchanged and still reads the whole file.

TrackerSqlTests.An_unmoved_tracker_is_not_read_again holds it.

Addendum, 2026-11-05 (1.0.4.141): the digest's header is skipped, and a country alone reads as remote

Read in the share's leads files of 4 and 5 November: of 74 requisitions the inbox pass wrote on the 4th, 28 failed "not remote: United States", and nine had their columns shifted, the role in the Company column and "Your job alert for lead dotnet developer in United States" in the Title. Two causes, both in code. LinkedIn's digest now opens with its header on a line of its own, with no link on it, so the reader took that line for the job's first and the real location fell off the end. And a role LinkedIn shows as "United States (Remote)" reaches the alert's plain text as "United States", which the filter read as a place.

From this version LinkedInAlert starts each block after the last "Your job alert for" line and counts those lines, and the pass line ends with "digest headers skipped ". LeadsFilter passes a lead whose location names the country alone ("United States", "US", "USA", "Anywhere in the US") beside one with the word remote anywhere, as before; a state or a city still reads as a place. Re-filtered with an empty tracker, the 4th's rows pass 35 against 11 and the 5th's 25 against 12. LeadsFixtureTests holds both days, copied from the share into functions/jobhunt.Tests/Fixtures/leads/ and kept byte for byte by .gitattributes, and the header with the plain text LinkedIn sent on 4 November.

Addendum, 2026-11-11 (1.0.5.34): a person's reply on a job thread gets its own draft within five minutes

What stopped being true: "A person who writes in the morning waited for the 4 AM reply run" was answered from 1.0.4.42 by firing the whole reply run at most once every four hours, between 7 AM and 9 PM Central. A reply at 9:05 could still wait until 1 PM, and one at 9:10 PM until the next morning.

From this version the Function has a thirteenth timer, ReplyDraft, every five minutes (ReplyDraftTimer, the use case ReplyDrafts, the rules and the item's text in ReplyDraft):

  1. Which messages. The inbox's last two hours, nothing Steve sent, from a person (HumanMail.IsPerson, so no machine, no relay), on a job thread: one the job hunt already knows, because the writer's address is in a tracker row's Phone/Email cell, or the writer's work domain is the domain of an address there (ReplyDraft.Known, read from Job_Hunt_Tracker.csv on the share; a personal mail domain such as gmail.com never counts as a domain, only as the exact address). A subject's words, or Steve having written in the thread, make nothing a job thread, so a personal thread never gets a draft. Any other thread gets no item and no draft: a <id>.skipped file and one log line, "skipped : not a job thread", once. A thread that holds a draft, or whose newest message is Steve's, is answered and skipped. The pounce's hand-offs and the campaign's leads are not read here yet: a leader the pounce touched has a tracker row by the time he can reply, and that row is what this reads.
  2. One item a message. A marker inbox-pass/reply-drafts/<id>.md is written first, holding the thread, the person's address, the reply's subject and the message's own text, so the item never opens a mailbox. Then one dispatcher item, dispatch/ready/12-replydraft-<id>.md, on Sonnet: it writes the reply in Steve's voice from writing-samples.md and standard-answers.md to <id>.draft.md beside the marker, at most 120 words, a question the banks do not answer left as a bracketed note, and appends one line to TODAY.md. It opens no browser and no mailbox and sends nothing.
  3. Into the thread, never sent. When POUNCE_RUN says live, the next firing puts each written draft into its Gmail thread once with the network log's draft writer, which has no send (IReplyDraftWriter has one member, a draft; ReplyDraftTests holds it), and writes <id>.placed with the draft's id. Any other value leaves the draft on the share and in the item's DONE note; "off" reads and writes nothing. Without the Gmail client settings the firing is blocked and says so.

The four-hour reply run is unchanged and still fires for any person waiting; a thread that now holds the step's draft no longer counts as waiting for it. ReplyDraftTests holds the step, and ProcessRunsTests counts thirteen timers.

Correction, 1.0.5.36: three statements above did not hold (CodeRabbit on #45).

  • Item 2 says the marker is written first. A pass that stopped after the marker and before the item's rename left a marker with no item, and every later pass skipped the message, so the reply never got a draft. From this version the item is written first under a name the dispatcher does not read (dispatch/ready/.replydraft-<id>.tmp), then the marker, then the rename. A pass that stops before the marker starts the message over; one that stops after it finds the waiting item beside a marker and renames it, once, since the rename consumes it.
  • Item 3 says the next firing puts each written draft into the thread. A draft written while Steve answered the thread, or while another draft arrived, was placed anyway. The thread is now read again right before the draft is placed; when Steve's message is the newest or a draft is already there, the written draft is marked <id>.stale with why, logged as "not placed", and never placed.
  • "Into its Gmail thread" needs more than the thread's id: Gmail files a draft in a thread only when it also carries the message's In-Reply-To and References and a matching subject. The draft carried neither header. The inbox reader now keeps each message's Message-ID and References, the marker holds them (in_reply_to, and references with the message's own id added), and the draft writer passes both to the draft.

Correction, 1.0.5.40: one statement in the 1.0.5.36 correction did not hold (CodeRabbit on #47).

  • It says the item is written first, "then the marker". The share creates a file at its full length before it fills it, so a pass that stopped inside the marker's write left a marker with no fields; the next pass found it beside the waiting item, renamed the item, and the draft that item wrote was never placed, because a marker with no thread is skipped without a word. From this version the marker is written aside (inbox-pass/reply-drafts/.<id>.md.tmp, outside the ready folder the dispatcher reads) and renamed over its name in one step, so an interrupted write leaves no marker and the next pass starts the message over. ReplyDraftTests holds it.

Correction, 1.0.5.48: two statements in the 1.0.5.34 addendum stopped holding on 12 November.

  • "Every five minutes" put the firing at :20 and :50, the minutes the ATS sweep and the pounce fire. From this version ReplyDraft fires at two past the hour and every five minutes after (0 2-59/5 * * * *), never at :20 or :50.
  • "The inbox's last two hours" was the window the pass judged, not the one it asked Gmail for. It searched newer_than:1d, read each of up to fifty messages in full, and only then looked at the window and at the message's marks. From the first firing at 01:05 Central on 12 November the inbox's last day held enough mail, most of it GitHub's notifications for the coding lanes, that every firing read fifty in full (its run lines say read=50), and a 403 from Gmail's per-user quota stopped a pass before it marked anything, so the next pass read the same fifty again. The sweep at :20 and :50, which did not wait out a rate answer, failed on every pass from 04:20 Central. From this version the search asks for the window itself (after: two hours before now, in Unix seconds) and leaves GitHub's mail out (-from:(notifications@github.com OR github.com)), and a message an earlier pass skipped or marked is settled by its file before anything is read. It still holds its thread, which the list call already names (IInboxReader.FindInThreadsAsync), so an older message in that thread is not queued beside it. ReplyDraftTests holds all three.

Addendum, 2026-11-12 (1.0.5.62): a row that opens NOT APPLIED is not an application

What stopped being true: TrackerRows.IsApplication, the one test RULE 50's cap (ApplicationCap), the leads filter, the picker, the ATS sweep, the campaign's live-thread rule and Track A's feed read for "this went in", matched "submitted" or "applied" anywhere in a note. A row that says it did not go in matched on its own denial: "NOT APPLIED, BLOCKER" (Foundation Finance, Counts 3475 and 3481) and "NOT SUBMITTED" (PointClickCare, Count 3566) each counted toward three in 60 days.

From this version a row whose note opens with NOT APPLIED or NOT SUBMITTED in its first 80 characters is not an application, the pattern the leaders lane reads (leaders_read.py, NOT_APPLIED). Only the opening is read, as the machine lanes' closed-req gate reads it: on the master every never-sent row says so within 73 characters, and eleven real applications (ServiceTitan, WellSky, Zillow, GEICO and others) mention an earlier NOT SUBMITTED draft 265 characters in or later, which a whole-note read would drop from the cap. ApplicationCapTests.A_row_that_says_not_applied_or_not_submitted_is_not_an_application holds both, with the real notes' openings.

Addendum, 2026-11-12 (1.0.5.70): an append leaves no stale Content-MD5

What stopped being true: the merger's append (ShareMergeStore.AppendAsync) was taken to leave a file as whole as a write does. It grows the file with Set File Properties naming only the new size, and a request that names only the size leaves every other property as it was, the stored Content-MD5 with it. A file uploaded whole once by the box's rclone mount (which stores the hash) and appended to later kept the hash of its older bytes, and every whole read through the mount failed with Errno 5, rclone logging "md5 hashes differ": writing-samples.md, link-tokens.csv and nightly/resume-drift.tsv on 9 November, when the apply run built no resume, and writing-samples.md again on 12 November.

From this version the resize also carries the file's own content headers (its type, encoding, language, disposition and cache control, read from the properties the append already fetches) and no hash. The service sets those together, so a hash it was not given is cleared, and a reader with no stored hash has nothing stale to check against. A content type is always named, the service's default when none is stored, because with none of the group named the hash would stay. A whole write and a rename were already clean: Create File starts a file with no hash, and the rename carries the temporary file's. ShareMergeStoreTests holds the append against a recording handler in place of the share.

Addendum, 2026-11-20 (1.0.5.139): the quiet pass

What stopped being true: that a pass with nothing to merge costs only a look at the spool folders. Every pass reached SQL. The merger's copy step read the tracker's frame from the database before it could use the file's size and last write to see that nothing had moved, and what the last pass saw lived only in the host's memory (TrackerSeen), so a new Flex Consumption instance read the whole 1.8 MB file again and asked SQL twice. On 20 November the Merger was the second largest user of the Function's free grant after FreshScan: 1,440 runs a day at 2.17 s on average (9.4 s at the 95th), about 1,560 GB-s of a day's 6,080 by run time (App Insights, the 24 hours to 12:4x CST).

From this version a pass that merged nothing over a master whose size and last write are what the last copy saw, with the day's byte-for-byte check already run on this Central day, asks SQL nothing (TrackerMirror.QuietAsync) and says so on its run line (tracker_sql_quiet). What the last copy saw is kept on the share as well, one line in tracker-inbox/tracker-sql.seen (MergePaths.CopySeen, neither a .csv nor a moveout list, so the merger never takes it for a lane's file), written only when it changes, so a new instance reads one small file instead of asking the database. A moved master, a new Central day or a line that does not read sends the pass to SQL as before. The timer stays at every minute: the empty pass is measured again after the roll, and if it is still over about a second the next lever is every two minutes, which the card's five- and ten-minute lines allow. TrackerSqlTests holds it.

Addendum, 2026-11-23 (1.0.5.147): the reply pass writes a row beside each file it writes

What stopped being true: that the reply pass keeps what it decided only as files on the share. Every message it settles leaves a file in inbox-pass/reply-drafts (<id>.skipped, <id>.md, <id>.placed, <id>.stale), and every firing asks the share about each of the window's fifty ids to learn which ones are settled. On 23 November the folder held 180 .skipped files, 41 markers, 41 drafts, 41 DONE notes, 23 .placed and 18 .stale, and only this pass reads it.

From this version, once the table jobhunt.ReplyDrafts exists (functions/JobHunt.Database/Tables/ReplyDrafts.sql: the message id, the thread, one of skipped, queued, placed or stale, why, and Gmail's draft id, no message text and no draft text), every decision the files make is also written as a row (ReplyDraftLedger, SqlReplyDraftRows). The files still decide. At the end of each firing the rows of the window's ids are read back against the folder's names, and the run line gains three counts: rows (the window's ids that have a row), mismatch (rows whose status is not what the files say) and sql_error. An id the files settled that has no row gets its row there, so the table fills by reading through and no import runs. A SQL error never fails the pass: it is counted, and the rest of that firing asks SQL nothing more.

The table is the switch. The Function asks once a process whether it exists and, while it does not, once an hour; until then the pass runs on its files exactly as before, with no new setting. The markers, the drafts, the DONE notes, .placed and .stale stay files whatever happens next, because the dispatcher reads the first three and the last two are what stop a revert from placing a second draft in Gmail. The next step, the rows deciding and .skipped no longer written, waits for 500 firings in a row that read mismatch=0 and sql_error=0. ReplyDraftTests holds the dual write, the read-through, a mismatch, a lost database and the hourly ask, against a row store in memory; no test reaches a database.

Addendum, 2026-11-25 (1.0.5.162): every two minutes

What stopped being true: that the merger runs every minute. The share's bill, 10 October to 8 November, came to $47.96, the largest line on the subscription, and $15.78 of it was list operations (242.8 units of 10,000, $0.065 per 10,000). ListFiles was the file service's largest API every day of 2 to 9 November, 55,000 to 64,000 a day with an hourly floor of 2,359 that barely moved overnight; one merger pass lists about 40 folders (the tracker spool and its merged folder, the fix and move-out spools, and each of the nine append targets' spools and merged folder), so a pass a minute is that whole floor. It bought a median lag of 34 s (p95 61 s) for about 35 appends a day and 42 s (p95 82 s) for about 9 tracker rows a day, read from the two merge.log files (J:\mentor\YARD-Y4-MERGER-2026-11-09.md).

From this version the timer is 0 */2 * * * *, second 0 of every even minute, and the Admin tab's schedule row reads "Every two minutes, on the even minute." Steve approved it on 11 November (07:42 CST); the quiet pass of 1.0.5.139 named the same lever and left the timer at a minute until it was measured, and this version takes it on his approval rather than waiting on that measure. Half the listings, about $5.70 a month. A fragment now waits at most two minutes plus the pass, inside SHARED-WRITES.md's "allow about 3 minutes", so nothing a lane reads back changes. Every five minutes would save about $9 but breaks that promise, so it is not taken. The card's five- and ten-minute lines (CloudThresholds.MergerWait) and the alert's ten minutes without a Merger invocation (infra/jobhunt-alerts.bicep) still hold: ten minutes is five missed passes. The Sheet mirror's odd minutes (7, 22, 37, 52) stay clear of the merger's. The larger meter, Hot Read Operations at $25.14, is mostly not the merger and is not chased here. To read after a day: ListFiles' hourly floor near 1,200, and merge.log's lag p95 under 150 s. ProcessRunsTests holds the cron and the next pass.

Addendum, 2026-11-28 (1.0.5.183): the reply pass's rows decide

What stopped being true: that the files decide and the rows only follow them. The dual write of 1.0.5.147 waited for 500 firings in a row reading mismatch=0 and sql_error=0; it had 1,407, every one of them clean, from 16:15 UTC 23 November to the morning of 28 November. Meanwhile each firing still asked the share once or twice for each of up to fifty window ids and two or three times for every draft ever written, and read the folder twice more for the dual write's comparison: by the code, 100 to 250 file property reads a firing, 29,000 to 72,000 a day.

From this version, with the table there, the rows decide. An id the window lists that has a row is settled by it and costs the share nothing. An id with no row is decided from its files as before, read from one listing of the folder a firing instead of two calls an id, and then given its row. Drafts are looked for only while a row is queued (the table's filtered index on queued rows): no queued row, no listing; any number of them, one listing. A queued row whose files say placed or stale is moved to match and counted as mismatch. The first firing in a process also writes a queued row for every marker with no .placed, .stale or .skipped file and no row, from that same listing, because a marker queued before the dual write began has no row and would otherwise never be placed. The files are still written, all of them, so a revert to this record's earlier form finds everything where it was; and a SQL error hands the rest of that firing back to the files, as before. Every run line now carries share_calls, the calls the firing made to the share (CountingStore), so a pass that starts asking the share for every file again shows on its next line. ReplyDraftTests holds a pass with nothing new to at most two share calls, the backfill, the read-through and the queued row the files contradict, against a row store in memory.

Addendum, 2026-11-28 (1.0.5.184): a marker is a name shaped like a message id

What stopped being true: that every .md in inbox-pass/reply-drafts other than a draft is a marker. The items write their DONE notes there too (<stamp>-<id>-DONE.md, 61 of them on 28 November), the first firing's backfill read them as markers, their names overran the table's varchar(32) key, and the firing fell back to its files (sql_error=1, share_calls=87). From this version a marker is a name of letters and digits no wider than the key (ReplyDraftRow.IsMessageId), the test's row store refuses a wider id as the table does, and a SQL failure is written to the log with its error instead of only counted.

Addendum, 2026-11-28 (1.0.5.189): the merger writes a channel sentence as its channel

What stopped being true: that a Communication cell reaches the master exactly as a lane wrote it. At 17:06 CST on 28 November a chat lane's spool row for a booking reply carried "Email sent: booking reply with 90-day page" in Communication; the merger appended it as Count 3951, and from its 17:07 pass the Sheet mirror stopped at that row ("Count 3951's Communication is not a channel name"), as its channel gate says it must, with every later row waiting behind it. The watch read W12 SheetMirror "blocked" three ticks running. It was the third such stop in nine days (Counts 3817 and 3892, both an empty cell, each cleared by a bookkeeping fix- file).

From this version the merger reads the one channel rule, TrackerChannel (moved out of SheetPlan, which now calls it): a new row whose Communication is a sentence that opens with a channel word is written as that word, the sentence kept whole at the front of its Notes, and merge.log says so on its own line under the MERGED line. Nothing is guessed: a cell that is already a channel name, is empty, or opens with no channel word ("SENT by Steve ...") is merged as written and still stops the mirror for a lane to fix with a fix- file. Fix files are applied as given. The mirror's gate is unchanged. SheetChannelMergeTests holds the 11/28 row, the cells left alone, and the plan the mirror makes after the merge.

Addendum, 2026-11-29 (1.0.5.193): a reply draft with no browser is not run, not closed

What stopped being true: that a LinkedIn reply item whose lane cannot reach the browser should close with the DONE note saying thread not read. On 25 November two items (Sowmiya Saravanan at 08:07 CST, Ryan Alvine at 11:22) started under the box's setup-token, whose CLI loads no claude-in-chrome server. Both lanes closed thread not read, the dispatcher read that as done, and neither reply was ever drafted. Each DONE note asked for a session with the browser tools, and nothing gave one.

From this version the item's first step splits the two cases. If the browser cannot be reached (no claude-in-chrome tools, or no Linux browser listed), the lane writes the one line not run: no browser to /mnt/j/dispatch/running/<lane>/NOT-RUN and stops, writing no DONE note, no draft, no TODAY.md line and no CLOSED row. The dispatcher reads that file, puts the item back in ready with a later Not_before, and writes no held row. If the browser answers and the thread does not read, the lane still closes thread not read, and nothing is guessed from the notice. The dispatcher half, on the share and outside this repository, starts a chrome lane without the token variables, as ClaudeCli does. It also keeps a chrome item in ready while the box's Chrome or the claude.ai sign-in cannot be confirmed, and it reads a chrome lane whose init line lists no claude-in-chrome as not run. Nothing is sent and no send gate moved: the draft still waits for Steve's send. ReplyDraftTests holds the new first step for a LinkedIn item, and the absence of NOT-RUN for an email item.

Addendum, 2026-11-29 (1.0.5.194): no reply is drafted to a job board, an ATS or a system

What stopped being true: that a person on a job thread is whoever HumanMail.IsPerson passes on a domain the tracker holds. ZipRecruiter's seekerteam@ and phil@, linkedin@em.linkedin.com and systemmessage@paycomonline.com ("Password Reset Request") all reached the drafter, because an application or an alert put their domains on the tracker. From this version the pass skips a message ReplySender.Of names, before an item is queued, with its reason in reply-drafts.log once, as it does a paid blast: a job board's or an ATS's host (ziprecruiter.com, paycomonline.com and the hosts in ReplySender.Boards, any ats. host), a marketing host (em., email., news. and the like), or a system message by its sender (system, do-not-reply, security) or its subject (a password reset, a verification code). A relay that carries a person's words (hit-reply@linkedin.com) is not one of them. ReplyDraftTests (the Sender part) and TodayCard1129Tests hold it.

Addendum, 2026-11-30 (1.0.5.208): the tracker gains no column and no writer for outcomes

What stays true: the merger is the tracker's one writer, and the tracker keeps its seven columns. The outcomes of the job hunt (how far each opportunity got, how it ended and why) live in tables of their own under jobhunt, linked to the tracker by each row's Count with no foreign key to jobhunt.Tracker (ADR: Outcomes and reasons: the model proposes rows, code admits them). The pass that fills them reads the master the way the Sheet mirror does and writes no tracker row, no fix file and no spool file; jobhunt.Tracker and jobhunt.TrackerHeader are not changed, and the daily parity check is unaffected.

Addendum, 2026-11-30 (1.0.5.216): a reply draft reaches Gmail ready to send

What stopped being true: that the reply pass puts the item's draft into its thread as the item wrote it. The draft file is the whole of what the item writes, and three things the item was told to put there were never meant for the person: the OBJECTIVE: line check_draft.py asks for, a bracketed note to Steve for any question the banks did not answer, and the links typed as Label: address lines, which drifted (Resume and Site at one address, no Blog, an untagged Recommendations). On 30 November four drafts in Gmail opened with the objective line, thirteen of thirty carried a note to Steve and three were nothing but the note, the sign-off read Steven on twelve and Steven Stout on two, and a reply on a live interview thread went in at 13:57 with the objective as its first line. A LinkedIn message relayed by mail also got a Gmail draft addressed to the relay, a second copy of a reply Steve makes on LinkedIn.

From this version:

  1. Only the greeting onward is placed (ReplyDraftBody). The lines above the bare Name, greeting are read as fields and never placed: OBJECTIVE:, NO-LINKS:, SEND ON:. The prose runs to the sign-off word, and a **bold** span is bold in the HTML part.
  2. The links are code's. The item writes prose only. At placing, the Function mints one code the make_ref.py way (RefCodes, moved to the shared Mail code with LinkCodes, which spools its row under the lane ReplyDraft) and puts the Portfolio block between the last paragraph and the sign-off: a bold Portfolio heading and seven bold labels, each a link that prints no address, the plain part saying Label -> address. The block is built by Portfolio in the shared Mail code, the one builder RECONNECT-v1 now calls too; its golden files did not change. A NO-LINKS: line naming the 10/29 logistics carve-out places the draft with no block and mints no code.
  3. A draft that is not ready is refused, with its reason: no greeting line (no greeting), a bracketed note to Steve or an OBJECTIVE: line below the greeting (note in body), a typed stevenstout.biz, linkedin.com/in/stevenwstout or google.com/url address (links in body), or a line after the sign-off word other than Steve (sign-off). Nothing is placed and the name is never rewritten. The first time, the item is written again once as 12-replydraft-<id>-fix.md, its first line the header field Fix: needs fix: <reason> (the dispatcher's header is the run of Key: value lines at the top, so the reason rides as one), the refused draft moved to <id>.refused for it to read, and the row stays queued with needs fix: <reason> as its reason. The second time the message closes not placed: <reason>, a stale file and row. Each is one line in reply-drafts.log; neither reaches the card.
  4. A LinkedIn relay's reply gets no Gmail draft. Its text, the block built, is written ready to paste to <id>.linkedin.txt, its placed file and row read linkedin: text ready with no draft id, and the item's TODAY.md line says the reply text is ready for LinkedIn.
  5. One conversation, one item (OpenReplies). Before an item is queued, the pass looks for an open item for the same person queued in the last day (the same address, or on a LinkedIn relay the same display name): a marker with no placed, stale or skipped file. Finding one, it appends the new message under that marker after a line that names it, writes the new message's skipped file and row (joined <id>), and queues nothing. The marker now carries the person's name=. Outlook's mail and its "Canceled:" calendar twin, twelve seconds apart in two threads, were the case.
  6. The item's steps keep every question for Steve out of the draft (one line under LEFT FOR STEVE in the DONE note, with the default taken), write no draft at all when the honest reply is none (no reply: <reason>), give the reply its shape (the greeting line his models use, the role once and led by Remote, one question that asks for the next door), sign Thanks, and Steve, and read the blog fragment with the other three.

The row statuses stay the four jobhunt.ReplyDrafts allows (skipped, queued, placed, stale): the new states are reasons on those rows, so the table's check constraint and the DACPAC did not change. IReplyDraftWriter now takes the plain and HTML parts; it still has one member, a draft, and nothing on this path sends. check_draft.py, on the share and outside this repository, gained the same checks so the item fixes a draft before the Function sees it: NOTE IN BODY, GOOGLE REDIRECT, SIGN-OFF NOT STEVE (in place of FULL LEGAL SIGN-OFF), and for a file under inbox-pass/reply-drafts LINK IN BODY (in place of the links checks) and NO GREETING LINE. ReplyDraftTests (the Body, People and Item parts) and PortfolioTests hold it.

Addendum, 2026-12-01 (1.0.5.219): a session's email reaches Gmail through the drop folder

What stopped being true: that every draft in Steve's Gmail with his portfolio links in it was placed by the Function. The emails he writes with a chat beside him (the must-answers, a booking reply, any reply a chat repairs) were written through the claude.ai Gmail connector, and that connector stores every link as https://www.google.com/url?q=<address>&..., which opens Google's "Redirect Notice" page the reader has to click through. It is the write that wraps, not the read: on 30 November a draft given clean anchors read back wrapped, a plain-text body did the same, and the raw MIME held the wrapped addresses; the same draft as the placer wrote it read back clean. Recipients got the wrapped form (a reply of 25 November quoted every link that way), four of six reconnects of 30 November had to be rewritten, and a draft a chat writes belongs to no ledger, so nothing can ever retire it.

From this version a session writes one request file to the share's outbox/drafts (DraftDrop): <UTC stamp>-<lane>.draft.json, written as .tmp and renamed, holding to, subject, thread, in_reply_to (the Gmail message id it answers), html, text, lane and replaces. Inside the five-minute reply pass, after the reply drafts are placed and only while POUNCE_RUN says live, DraftDropPass lists the folder once (a folder with no open request costs that one call) and for each request with no answer:

  1. Refuses it with the reason as the first line of <stem>.refused, and places nothing, when it is not JSON, names no recipient or more than one, names a machine (an ATS's domain, or a sender ReplySender names), has no subject on a new message, has no body, holds google.com/url anywhere, holds a note to Steve or an OBJECTIVE: line (ReplyDraftBody.HoldsNote, the replybody patterns), has no Thanks, line followed by Steve, answers a message in another thread than the one it names, or answers a thread whose newest message is Steve's (the placer's second stale test). A request Gmail or the share fails on is answered failed: <reason> rather than tried again every five minutes.
  2. Places it once as a Gmail draft through IDropDraftWriter, the Ats slice's port over the network log's GmailDrafts (the slice may not name IDraftWriter; that writer is used because it answers the message id, reads the HTML back and deletes): into the answered message's thread with its Message-ID and References and, with no subject given, its subject with one Re: in front; into the named thread; or, with neither, a new thread (Gmail is sent no thread id). With no HTML, the text becomes Gmail's divs with each web address a link; with no text, the plain part is the HTML's words. The draft is read back at once, and <stem>.placed holds the draft id, the message id, the time, the lane, the recipient, the draft it replaced, read_back=clean or wrapped (a defect, counted as drop_wrapped) and the SHA-256 of the HTML placed, so a sweep can tell an edited draft from the one placed.
  3. Replaces only its own. With replaces naming a draft id one of this folder's placed files holds, that draft is deleted first, so one draft stands, and the old placed file gains a deleted= line. A draft id the folder did not place is never deleted; the new draft is placed and the log says the old one was left as it is. A refused request with a body deletes nothing. A request with no body that replaces one of the folder's own drafts is the retire request: the draft is deleted and the request is refused no body; deleted <id>.

The run line gains drop_placed, drop_refused, drop_deleted and drop_wrapped on a live pass, each request is one line in outbox/drafts.log, and nothing on this path sends: a placed draft is sent the way any draft is, by Steve's own tap or on his "send". The Ats guard test that keeps Gmail's endpoints out of the slice reads the drop folder's share path out before it looks for /drafts, and the slice deletes a draft only through the port and only one the folder placed. DraftDropTests holds the placing, every refusal, the replace and retire rules, the dry pass and the one listing.

Addendum, 2026-12-01 (1.0.5.238): the Sheet mirror goes on, and it is the Sheet's only writer

What stopped being true: that the mirror waits in shadow beside the records run, and that it checks only the Sheet's last five rows. On Steve's word at 11:51 CST 12/1 ("On and make sure no bugs"), after the Sheet sat 36 rows behind the tracker from 08:32 to the noon records run, the template carries SHEET_MIRROR=on and TemplateTests holds it there, so a redeploy cannot put it back to shadow. The records run's Sheet step (BOOKKEEPING-LANE.md step 5, on the share) becomes compare and alarm: it reads both records and reports a gap, and appends nothing. One writer a file, as the first addendum promised.

The bug hunt before the switch moved, each a test in SheetMirrorAlignmentTests, red on the code before this version where a bug was found:

  1. Alignment is checked on every row, not the last five. The Sheet has no Count column, so a row is matched by its place. With five rows checked, a move-out above a tail of look-alike rows (six follow-ups to one person) left the tail matching one row off and the next pass appended one row off. SheetPlan now compares every Sheet row with the master row at its place in Person, Company, Communication and Date, and any difference stops the pass before anything is added ("the two records have drifted"). A Date written yyyy-MM-dd on the Sheet and M/d/yyyy in the master reads as the same day (264 older Sheet rows carry the first form); on 12/1 every one of the Sheet's 3942 rows matched in all four. Notes may differ (a row fixed in place after it was placed keeps its old Notes on the Sheet, and the append goes on at its place). A move-out that leaves the master shorter than the Sheet stops as before. The Sheet is never edited to make them agree; a stop is an alarm (W12) for a person.
  2. A pass that fails part way is logged and never repeated blind. An append or read-back that throws now writes a FAILED line to mirror.log before the run fails; nothing is sent again in that pass, and the next pass reads the Sheet first and plans from the rows it really holds, so a row that landed before the error is not appended a second time. The Function's HttpClient has no retry handler, so Google is never sent the same append twice by the client either.
  3. A cell lands as the master holds it. The mirror reads the master with TrackerCsvText.ParseExact, which keeps every character of a quoted field as Python's csv.reader does. Parse, kept for the merger, reads through TextFieldParser, which drops an empty line inside a quoted field. The append still goes as RAW text with INSERT_ROWS, and a test reads the request body to prove a Notes cell's newlines, quotes and commas are sent unchanged.
  4. One appender. A test holds GoogleSheetGrid as the only code in the Function that calls a Sheets append.

Addendum, 2026-12-02 (1.0.5.252): the leads harvest reads a board's alerts out of the inbox too, and says when a board goes quiet

A proposal of 2026-11-19 read from:my.theladders.com newer_than:30d as 36 and the same search with in:inbox as none, and took it to mean Ladders' alerts skip the inbox and were never harvested. The read on 2026-12-02 says otherwise: every one of the 36 Ladders alerts from 10/20 to 11/19 is named by its Gmail id in a nightly/leads-<date>.md (the sample, 1a1be0252b513022, in the 11/8 file); the inbox held none because the harvest archives what it harvests. What the leads files did show is that Ladders sent nothing after 11/12 16:05 Central, and no pass, card or lane said so for three weeks. From this version:

  1. One search a sender, the last seven days, any label: from:<sender> newer_than:7d -from:me (LeadsHarvest.SearchFor), so an alert a Gmail filter, the triage run or a hand archive takes out of the inbox before a pass reads it is still harvested. Ladders' second address, jobs@inform.theladders.com, on BOOKKEEPING-LANE.md step 3b's sender list, is read as well.
  2. What stops a second harvest is the Gmail id, not the INBOX label. An alert whose id the last nine days' leads files or campaign/leads-seen.tsv already name is not read again. On 12/2 all 30 alerts of the week from the four senders read then were already named, so the first pass adds none twice.
  3. Only an alert still in the inbox is archived. One already out of it is harvested and left where it is; the thread rule stands (any sender but the board's leaves it).
  4. The canary. Each pass that is on writes leads-shadow/canary.tsv: each sender's mail of the week, how much of it a leads file names, and its state, EMPTY when it sent mail and none is harvested, silent when it sent none. dispatch/check_empty_runs.py on the share puts both on dispatch/EMPTY-RUNS.md ("EMPTY RUN: alert harvest "), so a board that stops sending is named within a day.
  5. Ladders' figure is an estimate, not a band. Its footer says "Ladders estimates are based on our calculations", and RULE 72 takes only the employer's posting or a wage filing. The figure is now the lead's Estimate, written in the leads file as the board's estimate to confirm; before, the filter's floor failed a Ladders lead on it (The Cadmus Group's Senior Full Stack Developer, 11/13, "under the floor" on Ladders' $145K).

InboxPassTests holds the first four on a mailbox in memory (an alert out of the inbox is harvested and not archived; one a leads file names is not read twice; a sender with mail and nothing harvested is named, a sender with none is silent), GmailQueryTests holds the searches, and BoardAlertsTests the estimate. Roll back: LEADS=shadow.

Addendum, 2026-12-02 (1.0.5.257): a job-alert blast gets no reply item, from any sender

What stopped being true: that a blast is caught only by who sent it. Phil @ ZipRecruiter's "STEVEN, I think this job might be right for you!" of 11/20 and 11/21 each became a reply item, and each item's draft said the mail was an automated alert and not to send it, while its card line still asked Steve to say send. ziprecruiter.com has been a board since 1.0.5.194; a card blast from a sender on a domain the tracker holds for a person was still drafted to. From this version the pass also skips a message ReplyDraft.Alert names, after ReplySender, with its reason in reply-drafts.log once: a "might be right for you" or "a job for you" subject, or a body that is a job card (an apply button, 1-Click Apply or Apply Now, and a View Details link), when no sentence outside its links and its footer asks Steve something (a question mark, "let me know", "reply with", "send your"). A recruiter who sends a card and asks a question is still a person. The item's no-reply step now closes with - none under LEFT FOR STEVE, and on the share dispatch_close.py writes - none to LEFT-FOR-STEVE.md for a replydraft lane whose draft holds only a bracketed note to Steve (dispatch_rules.nothing_to_send, test_dispatch.py). ReplyDraftTests (the Alert part) holds the two messages by their Gmail ids, 1a1fb0586e663d41 and 1a20004c7db39ea5.

Addendum, 2026-12-03 (1.0.5.266): a rejection is a decision made, not a sentence on what happens if Steve is not chosen

What stopped being true: from 1.0.4.30 the ATS sweep read a message as a rejection when any of its rejection phrases appeared anywhere in it, and a bare "not selected" and "other candidates" were two of them. On 11/19 Delinea's receipt through Ashby ("Thank you for your Application!", Gmail 1a1f60a89759f68d) said "If you are not selected for this position, keep an eye on our careers page", and the sweep logged it as Count 3804, "REJECTION, generic". A rejection row closes an application in every later reading (the open windows, the day-21 silent close, the scorecard), so one wrong word took a live application out of follow-up; the bookkeeping run fixed the row before it reached the Sheet. From this version:

  1. Each sentence is read up to its first conditional or future wording: "if", "unless", "should we", "in the event", "whether", "we may", "we will review", "we will reach out" and their kin (AtsRules.Conditional). What comes after it in that sentence is what might happen, not what did.
  2. What is left must state a decision made: "decided to pursue other candidates", "will not be moving forward", "were not selected", "the position has been filled", "regret to inform" (AtsRules.Rejection). A bare "not selected" or "other candidates" is not one, and neither is "we have decided" on its own, which also opens good news.
  3. The rules' version moves to 3, so every message the sweep left is read again once, in a dry pass that writes its reasons (1.0.5.179's rule).

A message the new reading cannot call a receipt or a rejection stays in the inbox, which is the safe side of the line. AtsDecisionWordingTests holds Delinea's receipt as it arrived as a receipt that rests on its application row, three rejections in the shape of A Place for Mom's (3627), PointClickCare's (3764) and Affirm's (3799) as rejections beside a conditional sentence, conditional and future wording as never a rejection, and a decision in Steve's favour as not one.

Enforced by

5 rules in the rulebook cite this record, each held by a test on every release.

The rule What holds it In the last gate
The nightly card asks the job hunt's Function whether the tracker merger is keeping up and keeps only the five numbers its health route answers, so no file name, row or log line from the share reaches the site; the row is good under five minutes waiting and a warning past ten NightlyCardTests 108 of 108 passed
The tracker's SQL copy is the CSV byte for byte: the file is cut at CRLFs outside quotes and put back identical, the mirror writes only the rows whose hash changed, and a rebuild from the copy is compared with the CSV, which stays the master; the job hunt's outcomes sit beside it and never write it: an opportunity is a company and a requisition, else a company, a role and a month, a tracker row is linked to one by its Count alone and never by a bare mention, a withdrawal by Steve, a generic rejection, a closed-silent row and 45 quiet days close one by rule, code never writes a pull or a stated reason from the tracker's text, a model's reason is admitted only with its quote found in the evidence it names, and a pull 72 hours or less before its booked call is last minute, one constant in the Domain and one line in the view TrackerSqlTests, OutcomeGroupingTests, OutcomeRulesTests, OutcomeSqlTests, OutcomeAdmissionTests, OutcomePipelineTests, OutcomeStoreTests, OutcomeEdgeTests, OutcomeShareTests, OutcomeReaderTableTests, OutcomeTabsTests, GoogleOutcomeTabsTests, OutcomeStatsFileTests, OutcomeFileShapeTests, OutcomeBucketTests in its own suite, not this file
The inbox pass skips LinkedIn's digest header and counts it, keeps the company, title and location in their columns, and passes a lead whose location is the country alone as remote; the two days of leads files it wrote on 4 and 5 November are re-filtered and their pass counts held LeadsFixtureTests in its own suite, not this file
Every Gmail request the job hunt Function sends waits for its slot on one clock for the whole process; a 429 or a quota 403 is waited out five times on doubling waits, a server error only on a call that may be made twice, so a send or a draft is never made twice after one; any other answer fails on its first try, and every failure names Gmail's reason word and its tries; the reply pass asks Gmail for its two-hour window only, leaves GitHub's mail out, and never reads again a message it marked or skipped, which still holds its thread; a reply draft reaches Gmail ready to send: only the draft from its greeting on is placed, never an OBJECTIVE, NO-LINKS or SEND ON line above it; the Portfolio block is built by the one builder the reconnect uses, seven bold links on one new code spooled as ReplyDraft, between the last paragraph and the sign-off, and none with NO-LINKS; a draft with no greeting, a note to Steve or OBJECTIVE line in its body, a typed portfolio or google.com/url address, or a sign-off other than Thanks and Steve is never placed, its item is written again once with the reason first and a second refusal closes it not placed; a LinkedIn relay's reply gets no Gmail draft and its text is made ready for LinkedIn; a second message from a person whose item is open joins that item; the item's steps keep every question for Steve out of the draft; before any marker or item a person's message passes the reply screen, whose first holding check is its one logged reason: a BLACKLIST.md address, name or company, a RED FLAG: RED, F3 DECLINED or CANDIDATE-PAID verdict on a tracker row of the last 180 days that a newer SCREEN-ALLOW row has not lifted, or two first-contact flags on a thread Steve never wrote in; with REPLY_SCREEN on a screened message gets no item, one tracker row a company in 30 days, one screened line and the archive, and in shadow, unset included, it is only written down; an item runs the fit line and the red flag line before any reading for voice and closes screened with no draft on exit 2 or RED; a request a session writes to outbox/drafts is placed once by the reply pass, live only, as a Gmail draft with a writer that has no send, its placed file holding the draft id, or refused with its reason and no draft (more than one recipient, a machine, a google.com/url link, a note to Steve, no Thanks, then Steve, a thread Steve has answered), and a request that replaces a draft deletes it only when the folder placed it; every message the reply pass reads goes first to the call watch: a message from someone on a call in the seven days after it, or under a calendar-change subject on a job thread, that holds a cancel, move or filled word outside a link's own text is a cancelled or moved call, matched against the calls the calendar holds or held; with CALL_WATCH on it mails Steve's own address once a call a Central day, puts one line on CALL-CHANGES.md that the card prints beside the DARK lines for 72 hours, deletes only a draft to that person the Function placed before the change whose HTML still hashes to what it placed, names every other draft do not send and writes one tracker row, and in shadow, unset included, writes the card line and the would-mail text only; the item for such a message opens with its CLASS line GmailHttpTests, ReplyDraftTests, GmailQueryTests, PortfolioTests, ReplyScreenTests, ReplyScreenPassTests, DraftDropTests, CallChangeTests, CallWatchTests in its own suite, not this file
The job-hunt Function spends less of its grant and the workspace: a merger pass that merged nothing over a master whose size and last write are what the last copy saw, with the day's check already run, asks SQL nothing, and a new instance knows it from the line the last pass left on the share; the fresh pass reads six boards at a time, never more, and adds the rows one board after another with the same counts; the host sends no per-function aggregates and no performance counters TrackerSqlTests, FreshScanTests, LogLevelsTests in its own suite, not this file
Store

The Yard, home

Steven StoutStaff .NET engineerRemote

Production .NET that stays up. Built with AI, measured on every version.

Steven Stout

Hi, I'm Steve. I build the systems that make delivery boring in the best way, then coach people inside them.

  • 200+

    production releases, none took the platform down

    Conway Investment Research, 2019 to 2024. Sole engineer for the first three years on a live financial advisory platform.

    See how
  • 50%

    shorter release cycle

    Storee Construction, 2024 to 2026. Four ASP.NET applications onto one .NET 10 platform on Azure, with a four-person team I hired and mentored.

    See how

01Verified

Steven Stout

A real person, and the work is mine.

  • Identity

    Checked by LinkedIn, not by me.

    LinkedIn verified my government ID.

  • Running system

    You are looking at it.

    Version 1.0.5.273 is live. Nothing ships unless it passes the automated gates first.

That's who I am. Here's how I work.

02Strengths

Ten strengths, each with the proof beside it. The numbers match my resume and LinkedIn, and the live ones are read from this site as you look.

  • 01

    Keeps production alive

    200+ releases on a live financial platform, and none took it down. Sole engineer for the first three years.

    See the Conway work

  • 02

    Simplifies messy systems

    Four ASP.NET applications onto one .NET 10 platform on Azure, and a release cycle 50% shorter.

    See the Storee work

  • 03

    Marries dev and infrastructure

    Blue-green releases at Storee that flipped in about 5 seconds with nobody signed out, and Azure Front Door at two employers.

    See this site's cloud

  • 04

    Designs data that holds up

    White-label clients on one shared database, the isolation built into the data, and no cross-client issues.

    See the Conway work

  • 05

    Keeps AI-written code honest

    15 quality numbers that may only improve: 273 releases in a row with none worse.

    See the quality numbers

  • 06

    Resourceful

    $30,000+ cut from Azure and vendor spend at Conway. This site's Azure bill is public, resource by resource.

    See the bill

  • 07

    Builds people up

    Hired and mentored a four-person team. 13 colleagues recommend me by name.

    Read the recommendations

  • 08

    Takes ideas to production

    This site: designed, built and run solo, with 352 versions measured through one gate.

    How it was built

  • 09

    Writes clearly

    Posts on real engineering problems, in plain words.

    Read the blog

  • 10

    Owns decisions

    153 decision records, each with its tradeoff and the call I made.

    See the decision records

Built with AI. Gated so quality never slides.

Steven Stout’s showcase: a used-vehicle auction on .NET and React, built and run by one engineer, live on Azure, with its decisions written down.

No quality number has gotten worse at any release since 1.0.5.1 on 10 November: 273 releases in a row.

One engineer, an AI agent and a gate that checks 15 quality numbers on every release. 352 versions measured, with every result public, the worst days included.

82 releases in the last 7 days, each through the same gate.

Async methods with no CancellationToken, may only fall

11091.0.3.1391.0.5.2731.0.4.115, the ratchet
Every number, on the Quality page

TheYard, right nowLive

Answering in

unread

02505007501,000

server time at p95, the usual five minutes of the last day.

Azure this month

unread

the bill, by resource, read from Azure. The Admin tab shows every line.

Since the last roll

unread

 

rolled in place by the pipeline, behind one gate.

People who have visited

unread

30 days agotoday

Scanners, my own tools' and my own reads left out.

03Start here

04Where teams are heading

How I see engineering with AI, and the setup on this site that backs it.

AI-augmented teams · Architecture and ownership

AI writes more of the code. Someone still has to own what ships.

Teams are going to be heavily AI-augmented. That moves the senior job toward architecture and technical ownership: deciding what to build in pieces small enough to verify, and owning what ships.

  • Task tracking will get automated too. Judgment stays human: seeing a design fail at scale before it does.
  • On this site the AI's first design held the whole catalogue in memory. I caught it when the App Service plan hit 82 per cent and moved the work to the store.

What the AI wrote, what I decided

07Tech stack

  •    
  •    
  •    

Read from the build, never typed by hand

What TheYard runs on

What we use, where it runs, its AWS twin, the version as built, and the file that proves it.

Cloud patterns, not one vendor: every Azure piece in this stack has a named AWS twin. Mapped, not yet run on AWS.

  • .NET 1114 projects
  • React 19.3TypeScript 7.0
  • Azure9 Bicep files
  • 11GitHub Actions workflows
The whole stack, with the file that proves each line

The last release the gate stopped was 1.0.5.258 on 2 December, at its browser 1 of 2 job.

08How it is built

09How it is run

10Who and why

Next step

11What has to work, where is it today, and what does success look like?

Book 20 minutes opens an email to me with those three questions in it, and I answer with a time.

Book 20 minutes

Your email app should have opened with this message. If it did not, copy it and send it from any mailbox.

Or message me on LinkedIn