Skip to content

ADR: The Nightly Function on the Admin tab

ADR: The Nightly Function on the Admin tab

Status
accepted
Date
2026-10-20

The Azure Function that starts the nightly workflow gets the seventh resource card under Cloud infrastructure, nightly, named The Nightly Function: whether its slots fired on time, what its runs on GitHub came to, what it costs line by line, and what it is allowed to do. It is one more definition in the one frame (ADR: One frame for every resource), not a recorder, keep or route of its own, and it never reads anything from the file share the lane works on.

In plain words

A job that runs at four in the morning fails where nobody is looking. The Function wakes every hour, decides whether the hour is one of its six slots in Central time, and asks GitHub to start a run; the run does the work. Until now, finding out whether last night happened meant opening the portal, then GitHub, then the bill. This card puts the three on one page in the same shape as every other resource: two dials, a chart, four questions and a readout.

What that is worth: the dev side and the infrastructure side of a scheduled job looked at in one place, the same way the site's own resources are.

Context

The Function func-jobhunt-ss runs on Flex Consumption in its own resource group, RG-JOBHUNT-SS, with the plan plan-jobhunt-ss and the storage account stjobhuntss (infra/jobhunt.bicep). Flex Consumption on Linux does not honour a time zone setting (learn.microsoft.com/azure/azure-functions/functions-bindings-timer, read 2026-10-20), so its timer fires every hour on the hour in UTC and CentralClock decides what the hour is: 4:00 AM Central is the reply lane, and midnight, 8 AM, noon, 4 PM and 8 PM are the records run. Each fires repository_dispatch at this repository, which runs .github/workflows/nightly.yml.

Three sources answer the card's questions. Azure Monitor counts the Function's on-demand executions and execution units on Microsoft.Web/sites as OnDemandFunctionExecutionCount and OnDemandFunctionExecutionUnits, the latter in megabyte-milliseconds, which is what the free grant is counted in; a gigabyte-second is 1,024,000 of them (learn.microsoft.com/azure/azure-functions/functions-consumption-costs, read 2026-10-20). GitHub's public API lists the workflow's runs without a token. The bill names the Function, its plan and its storage account as three lines.

Decision

One slot table, compiled twice. The slots live in TheYard.Domain/Features/Admin/NightlySlots.cs: the slot an hour is, the slots due in a window, the next one, and how a slot is judged from five-minute firing counts (on time when a bucket in its first five minutes counted one, late when the first that did is later in the hour, missed otherwise). The Function compiles the same file through a link in its project, and its CentralClock asks the table rather than keeping hours of its own, so the card's idea of a slot can never be the Function's minus a daylight-saving change. NightlySlotsTests holds the link, the table on both daylight-saving days, and the judging.

/// <summary>The nightly lane's slots in Central time, and how a month of firings is judged against them.</summary>
public static class NightlySlots
{
    /// <summary>The 4 AM reply lane, by the name its dispatch carries.</summary>
    public const string Reply = "nightly";

    /// <summary>The four-hourly records run, by the name its dispatch carries.</summary>
    public const string Bookkeeping = "bookkeeping";

    /// <summary>The zone the slots are written in.</summary>
    public const string ZoneId = "America/Chicago";

    /// <summary>What an on-time slot, a late one and a missed one are called.</summary>
    public const string OnTime = "on time", Late = "late", Missed = "missed";

    /// <summary>How long after the hour a firing still counts as on time: the first five-minute bucket.</summary>
    public static readonly TimeSpan Grace = TimeSpan.FromMinutes(5);

    private static readonly TimeZoneInfo Central = TimeZoneInfo.FindSystemTimeZoneById(ZoneId);

    /// <summary>The moment in Central wall-clock time.</summary>
    /// <param name="utc">The moment.</param>
    public static DateTime Local(DateTimeOffset utc) => TimeZoneInfo.ConvertTime(utc, Central).DateTime;

    /// <summary>The run the hour of this moment starts, or null when the hour is not a slot.</summary>
    /// <param name="utc">The moment.</param>
    public static string? Slot(DateTimeOffset utc)
    {
        int hour = Local(utc).Hour;
        if (hour == 4)
        {
            return Reply;
        }
        return hour % 4 == 0 ? Bookkeeping : null;
    }

    /// <summary>
    /// Every whole UTC hour from <paramref name="from"/> (inclusive) to <paramref name="to"/>
    /// (exclusive) whose Central hour is a slot, oldest first, with the slot it is. Central's offset
    /// is always a whole number of hours, so a whole UTC hour is a whole Central hour.
    /// </summary>
    /// <param name="from">Where the window starts.</param>
    /// <param name="to">Where the window ends.</param>
    public static IReadOnlyList<(DateTimeOffset At, string Slot)> Due(DateTimeOffset from, DateTimeOffset to)
    {
        var due = new List<(DateTimeOffset At, string Slot)>();
        for (var hour = CeilingHour(from); hour < to; hour = hour.AddHours(1))
        {
            if (Slot(hour) is { } slot)
            {
                due.Add((hour, slot));
            }
        }
        return due;
    }

    /// <summary>The first slot hour strictly after <paramref name="after"/>, with the slot it is.</summary>
    /// <param name="after">The moment to look from.</param>
    public static (DateTimeOffset At, string Slot) Next(DateTimeOffset after)
    {
        // A slot comes at least every four hours, so this ends within a day.
        for (var hour = FloorHour(after).AddHours(1); ; hour = hour.AddHours(1))
        {
            string? slot = Slot(hour);
            if (slot is not null)
            {
                return (hour, slot);
            }
        }
    }

    /// <summary>
    /// What became of one slot: on time when a bucket that starts inside its first five minutes
    /// counted a firing; late when the first bucket that counted one starts later in the same hour;
    /// missed otherwise. The moment it fired comes back beside the word, null when it was missed.
    /// </summary>
    /// <param name="slot">The slot's hour, UTC.</param>
    /// <param name="executions">Buckets of firings: each bucket's start and how many it counted.</param>
    public static (string Outcome, DateTimeOffset? FiredAt) Judge(DateTimeOffset slot, IReadOnlyList<(DateTimeOffset At, double Count)> executions)
    {
        DateTimeOffset? first = null;
        foreach (var (at, count) in executions)
        {
            if (count > 0 && at >= slot && at < slot.AddHours(1) && (first is null || at < first))
            {
                first = at;
            }
        }
        if (first is not { } fired)
        {
            return (Missed, null);
        }
        return fired < slot + Grace ? (OnTime, fired) : (Late, fired);
    }

    /// <summary>How many of the due slots fired on time, late, or not at all.</summary>
    /// <param name="due">The slots that were due, from <see cref="Due"/>.</param>
    /// <param name="executions">Buckets of firings: each bucket's start and how many it counted.</param>
    public static SlotTally Tally(IReadOnlyList<(DateTimeOffset At, string Slot)> due, IReadOnlyList<(DateTimeOffset At, double Count)> executions)
    {
        int onTime = 0, late = 0, missed = 0;
        foreach (var (at, _) in due)
        {
            string outcome = Judge(at, executions).Outcome;
            if (outcome == OnTime)
            {
                onTime++;
            }
            else if (outcome == Late)
            {
                late++;
            }
            else
            {
                missed++;
            }
        }
        return new SlotTally(due.Count, onTime, late, missed);
    }

    /// <summary>The UTC moment the Central day holding <paramref name="utc"/> began; midnight is never skipped or repeated in Chicago.</summary>
    /// <param name="utc">The moment.</param>
    public static DateTimeOffset StartOfCentralDay(DateTimeOffset utc)
    {
        var midnight = Local(utc).Date;
        return new DateTimeOffset(midnight, Central.GetUtcOffset(midnight)).ToUniversalTime();
    }

    private static DateTimeOffset FloorHour(DateTimeOffset at)
    {
        var utc = at.ToUniversalTime();
        return new DateTimeOffset(utc.Year, utc.Month, utc.Day, utc.Hour, 0, 0, TimeSpan.Zero);
    }

    private static DateTimeOffset CeilingHour(DateTimeOffset at)
    {
        var floor = FloorHour(at);
        return floor == at.ToUniversalTime() ? floor : floor.AddHours(1);
    }
}

/// <summary>A month of slots, counted: how many were due, and how many fired on time, late or not at all.</summary>
/// <param name="Due">The slots that were due.</param>
/// <param name="OnTime">The ones that fired inside their first five minutes.</param>
/// <param name="Late">The ones that fired later in their hour.</param>
/// <param name="Missed">The ones that did not fire in their hour.</param>
public sealed record SlotTally(int Due, int OnTime, int Late, int Missed)
{
    /// <summary>
    /// The share on time, in per cent to one place; null when nothing was due. Counted in tenths of a per cent and rounded
    /// to a whole tenth, because a whole-number rounding is the same on every runtime where Math.Round(x, 1) is not
    /// (3 of 2000 is 0.2 on .NET 10 and 0.1 on .NET 11 that way), and this file is compiled into the Function too, which
    /// keeps it to itself (ADR: Moving to .NET 11 in four ships, G6).
    /// </summary>
    public double? OnTimePercent => Due == 0 ? null : Math.Round(1000.0 * OnTime / Due) / 10;
}

Live from api/TheYard.Domain/Features/Admin/NightlySlots.cs, region nightly-slots, read from this build at 99df7a8.

The two dials are the two that run out. Runs on time over thirty days, a floor: amber under 95 per cent and red under 90, read on the misses the way the edge's cache dial is. And the month's execution units against the Flex Consumption free grant of 100,000 GB-s a month per subscription (with 250,000 executions), amber at 80 per cent and red at 95 (Azure Functions pricing page, read 2026-10-20). The grant is typed with its source on the constant, because no record Azure returns states it.

A resource group of its own, a directory of its own. The card finds the Function by type and the configured name in a second ResourceDirectory over the Function's group, built beside the first in the module. The names come from configuration (Nightly in appsettings.json, Features/Admin/Cloud/NightlyResources.cs), and LiteralScanTests now refuses the Function's suffix in the code too.

No role yet, and the card says so. The site's identity holds no role on RG-JOBHUNT-SS. Until it does, Resource Manager and Monitor answer 403, and the card treats that as an answer: the hour writes role = missing, the minute reads nothing, and every line that needs Azure reads "not read: no role on RG-JOBHUNT-SS", the group named from configuration. The run log is GitHub's and still reads. The step is Steve's: Monitoring Reader and Reader for the site's identity on the group, which lets the card read the metrics, the record and the Activity Log and nothing on the share.

The runs are kept a year, one document each. The hour reads the last thirty days of runs, and upserts each into the nightlyruns container under GitHub's own run id, so a run read on thirty hours is one document; it also writes one document per judged slot when Monitor has the counts. The container is partitioned on the day and keeps a year. The card's view is synchronous, so the hour reads the month back into a small in-process cache the view draws from, newest first. .github/workflows/nightly.yml gained a run-name, so every run's title names its lane and whether it was a dry run; a run from before it reads "not named" rather than a guess.

What it is allowed to do, in words. One role on one share (Storage File Data SMB Share Contributor, proven by functions/jobhunt/role-check.ps1), and a token that may send repository_dispatch to this one repository. The card says so, and says that nothing from the share is read here. How many share snapshots are kept is not read either: that needs a data role on the storage account, and the account key never goes in the site's settings; the readout prints the Function's own limit, fourteen, held to ShareSnapshot.Keep by a test that reads the file.

Three lines of the bill. ResourceCard takes an optional list of bill names and ResourceCardInputs an optional dictionary of their month to date, which CloudReader fills from the same cost function; every other card passes neither and is unchanged.

Consequences

  • The rail's Cloud infrastructure group ends with The Nightly Function, after Memory against traffic, with its tone dot read before it is opened.
  • The card reads GitHub once an hour, one of the sixty unsigned reads GitHub allows an address an hour.
  • Two containers on the existing account, inside the free tier: nightly for the minutes and hours like every card, and nightlyruns for the year of runs. Both are a person's az command from their definitions, as every container is.
  • The chart shades every Monday and Friday in Central days, the two days the schedule keeps free, through the chart's existing bands.
  • Until the role is granted, the dials read "not read" and the card's tone is unread; that is the truth, not a fault.

Where it sits

Domain gains the slot table, its first rule shared with a project outside the six, which is why it reads no clock and has no I/O. Data gains the two run records. Application gains the run log's port and its memory adapter beside the other memory keeps, Infrastructure.Cosmos its document adapter, and the host the card's view, rows, reader, GitHub reader and cache under Cloud/, wired in the cloud slice's module. Single responsibility: the slots are one file both readers compile. What would change it: a second Function, at which point the names become a list and the card a pair.

Files

Addendum, 2026-10-21 (1.0.4.10): GitHub first, the log a durable copy

1.0.4.9 shipped the card against a run log that was always there in its tests and never there on the live site. Neither container exists yet (nightly, nightlyruns), and two things followed. The one recorder returned before any card's hour when the card's own keep was missing, so the GitHub read never ran; and even when it ran, the card's cache was filled only by reading the log back, which needs nightlyruns. Read live on both names on the morning of 21 October, the card said "no runs read yet" and "nightly off · bookkeeping off" while nightly.yml listed ten runs, that morning's 04:00 reply run among them. The sentence above, "the run log is GitHub's and still reads", was not true in code.

From 1.0.4.10:

  • GitHub is the source of the card, the log its durable copy. The hour fills the cache from GitHub's answer whatever the log says. When nightlyruns is there, the runs are also kept in it and the older runs it holds are folded in beside GitHub's, which is what lets the card show a run GitHub no longer lists. When GitHub refuses, the cache is read back from the log if there is one, and the hour says "not read: GitHub answered" and the status.
  • An hourly card is read with no keep. CloudRecorder still reads an hourly card's hour once in its hour when the card's keep is missing, holds it in memory (LiveHour), and appends nothing; the minutes are not read at all, since nothing could keep them. CloudReader draws such a card from that held hour and asks the recorder once the held hour is older than the card's staleness. The card's note says so: "the nightly container is not there yet; the card reads live until it is."
  • Empty is unread, not off. The Gates line says "on" or "off" only of a list that was read; with no runs it reads "not read yet" and why.
  • Every "not read" says why: no hour kept yet, the keep's own reason, no role on the group, or GitHub's answer. ResourceView.LiveRead says why no minute is kept on every card.
  • An optional token. Nightly:GitHubToken, when set as a web app setting, is sent as a bearer token, so the read draws on its own allowance rather than the sixty unsigned reads an hour App Service's shared outbound addresses split. None is kept in the repository, and with none set the read is unsigned as before.
  • Words. The readout is "The nightly job", the slots are "the reply run" and "the records run", and the run table's column is "Run"; "lane" is no word of the site's.

Before the two containers exist the card shows GitHub's runs and gates, the hour's role sentence, and "not read" with its reason on every Azure line; it keeps no history and its chart is empty. Creating them is still a person's az command from their definitions. NightlyCardTests holds all of it: a run log that is not there beside three listed runs, the gates on an empty list, the reasons, and the recorder with an hourly card and no keep.

Addendum, 2026-10-21 (1.0.4.12): the hour without a keep, for a minute card too

1.0.4.10 shipped the rule above for an hourly card, and the nightly card is read by the minute, so on the live site the recorder still returned before its hour: read on both names at 14:41Z, about eight minutes after the roll, Gates said "not read yet: no hour kept yet" and the run log was empty. From 1.0.4.12 any card whose keep is missing has its hour read once an hour and held in memory, minute card or hourly, and the reader asks for it once the held hour is past the hour. NightlyCardTests runs the recorder case with both shapes. The lesson is in the job-hunt failure log: a test of a card's wiring builds the card the way the catalogue builds it.

Addendum, 2026-10-21 (1.0.4.15): the run reader, and the Function's clock held by running it

NightlySource read Azure Monitor, Resource Manager, the Activity Log and GitHub, wrote the run log and filled the cache, which is why the GitHub path could not be tested apart from Azure and why 1.0.4.9 shipped it broken. From 1.0.4.15 the runs are NightlyRunReader's alone (Features/Admin/Cloud/NightlyRunReader.cs: GitHub's answer into the cache, the log as the durable copy, the log's older runs folded in, the log read back when GitHub refuses), and NightlySource keeps the Azure reads and asks the reader first each hour. NightlyCardTests exercises the reader with a GitHub answer and a log and nothing of Azure, the bearer token among it.

The test that held CentralClock and the table together read the Function's two files as text. From 1.0.4.15 the test project compiles functions/JobHunt.Domain/Shared/Clock/CentralClock.cs by a link, the way the Function compiles NightlySlots.cs; the clock needs Domain and nothing of the Functions SDK, so no second test project was needed. NightlySlotsTests calls the Function's clock and the table for every hour of both daylight-saving days of 2026 and an ordinary day and asserts the same slot, the same 4 AM and the same Central hour, one 4 AM a UTC day. The Function's own project is unchanged, so nothing rolls to Azure for it.

Addendum, 2026-10-21 (1.0.4.18): what the group listed, when the Function is not in it

Read live on 1.0.4.14 and after, the card's Last fired said "not read: no Microsoft.Web/sites named func-jobhunt-ss in RG-JOBHUNT-SS". The group's listing answered without refusing, so the role is not plainly missing, and the sentence could not say whether the name was wrong or the listing showed the site nothing. From 1.0.4.18 NightlySource.Unfound says which: "RG-JOBHUNT-SS lists nothing to the site's identity" when the listing is empty, or the count of resources and the names of the web and Function apps it did list. NightlyCardTests.A_function_not_found_says_what_the_group_listed holds the three sentences.

Addendum, 2026-10-21 (1.0.4.22): a GitHub hiccup is the run log's alone, and an empty group is resolved

Two things the review of 1.0.4.11 to 1.0.4.18 found. NightlyRunReader caught only HttpRequestException, so GitHub's client timing out (a TaskCanceledException) or a body of the wrong shape escaped, and because NightlySource.HourAsync asked the reader outside its own try, the whole nightly hour failed, the Azure facts with it. And the 1.0.4.18 sentence for an empty listing said "the group is empty, or it holds no role that reads it": the honest union of what one list call knows, left unresolved.

From 1.0.4.22 the reader catches every failure but the host stopping and says which ("not read: GitHub did not answer (TaskCanceledException)"), falling back to the log as before, and the hour asks it inside a try of its own, so the Azure facts are kept whatever GitHub did. An empty listing is resolved by one read of the Function's own path (FunctionPath, from configuration): a 403 says "the site's identity holds no role on {group}" and marks the role missing, a 404 says "no Function app named {name} in {group}", and a 200 reads the Function as found and carries on. A 404 on the group's list is counted in Refused beside 401 and 403, so it no longer takes the hour down. The spec line now reads "FLEX CONSUMPTION · NOT READ" and no more; the reason is a readout line of its own, "Spec", in a sentence and never in capitals. NightlySource.cs loses its doubled summary (Refused has its own again), and the stale hand-written sentence in NightlyCardTests.Unkept.cs is built from NightlySource.Unfound. NightlyCardTests.Reader.cs holds a GitHub timeout leaving the Azure facts in the hour and the three answers through HourAsync.

Addendum, 2026-10-22 (1.0.4.25): the roles granted, the containers that could not be, and the snapshots read

On the owner's word (22 October, 04:16 CDT: "I grant full permissions for that prompt"), lane rolegrant made the two grants this record has asked for since 1.0.4.9, through the runner, and read them back:

  • Reader on RG-JOBHUNT-SS for the site's identity id-theyard-ss (principal dd34b0a6-4df7-4381-b6af-d1262a98f9ef), so the group lists the Function and its ARM record, plan and storage read.
  • Monitoring Reader on RG-JOBHUNT-SS for the same identity, so the Function's two metrics and the five-minute firing counts read.

az role assignment list --scope <RG-JOBHUNT-SS> answers exactly those two for the site, beside the job hunt identity's one share role, and functions/jobhunt/role-check.ps1 now fails on anything else the site's identity holds on the group or on any resource in it.

A summary of the role assignments on RG-JOBHUNT-SS, read back on 22 October, and Cosmos DB's refusal of a twenty-sixth container

The two containers could not be created, and are not needed. az cosmosdb sql container create for nightly answered "Collection create forbidden as collection count in database offer has exceeded 25": the theyard database shares its thousand RU/s across its containers, a shared database holds at most twenty-five, and it holds twenty-five, seventeen the site defines and eight copies the live tests use under tests-. The two definitions were never going to apply; the card read live for two days on a create that could not succeed. From 1.0.4.25 the card's minutes and hours and its run log live in the plan container, which is partitioned on the day and indexes the kind, the day, the moment and the bucket keys, exactly what the two definitions asked for. Their kinds and ids open with nightly- (Containers.NightlyPrefix; CosmosResourceHistory takes the prefix, CosmosNightlyRunLog writes it), so the plan's own minutes and the nightly card's never meet in a query, and each run document carries its own time to live of a year, which the plan container's month does not override. infra/cosmos/nightly.json and nightlyruns.json are removed. CosmosDefinitionTests.The_shared_database_never_needs_a_twenty_sixth_container fails a definition that would need one, so a later card shares a container the same way instead of waiting on a create.

The snapshot count is read with Reader. The card said the share's snapshot count needed a data role on the storage account. It does not: Resource Manager lists a storage account's shares with their snapshots (fileServices/default/shares?$expand=snapshots), which Reader on the group may read, with no data role and no account key, and without opening anything in the share. The hour now reads it (NightlySource.SnapshotCount), and the readout's "Snapshots kept" line and the cost row say how many the account holds against the fourteen the Function keeps.

Nothing that needed a role can park again. The owner's ship script, which lives in his own workspace outside this repository, now reads every Cloud card on both names before it applies a patch and stops a ship whose card says "no role on", printing the az command that clears it. A read-only grant on the owner's own group to the site's own identity is pre-approved for every change that needs one, on his word of 22 October.

Addendum, 2026-10-22 (1.0.4.26): the dial reads the night before the keep holds it

Read live on both names after 1.0.4.25 rolled, the card showed the Function's spec, Last fired (22 October, 04:00 Central), the firings and units sparklines, the free grant and three share snapshots, and one dial still said "no slot kept yet": the slots are judged against the kept five-minute minutes, the keep began at 10:5x UTC, and the next slot was 13:00 UTC. The hour already judges the day before from Azure Monitor's own five-minute counts, which Monitor keeps whether or not the site did, and writes those judgements to the run log. From 1.0.4.26 the hour also writes the day's tally as a fact (NightlySource.SlotsFact), and until the kept minutes hold a whole slot the dial reads that tally instead (NightlyCard.Tally, HourTally). Once a slot comes due inside the keep, the thirty days' count takes over as before.

Addendum, 2026-10-22 (1.0.4.27): the merger's counts and ages, from the Function

The card's rule was that nothing in the share is read here. From 1.0.4.27 that sentence stopped being true in one narrow way, and the allowed row says so: the tracker merger moved into the Function (ADR: The tracker merger runs in Azure), and the card has a fifth question, "Is the tracker merger keeping up?", answered by five numbers the Function's own health route gives, read once a minute beside the metrics and kept on the same minute. No file in the share is opened by the site, no key to the share or the app is in its settings, and only the five numbers are kept; any other field in the Function's answer is dropped. The row is good while nothing has waited past five minutes, information while something has, and a warning past ten. NightlyCardTests.Merger.cs builds the card through ResourceCatalog.Cards, routes the hour and the minute to a recorded group and health answer, and holds that no file name, row or log line from that answer reaches the card's JSON.

Addendum, 2026-10-22 (1.0.4.28): the runs joined to their usage

The run log this card keeps is now read by a second card. The Claude usage card (ADR: Every Claude lane reports its usage) joins the usage documents the nightly lane posts to this card's run log by GitHub run id, slot by slot: a run the log lists with no usage document reads "no usage reported", and a usage document whose run the log never listed reads "run not seen by the nightly reader". The run log itself is unchanged; the join only reads it.

Addendum, 2026-10-24 (1.0.4.53): the six processes write a run line each

Every one of the Function's six processes (AtsSweep, DailyCard, Merger, MergerHealth, Nightly, SheetMirror) writes one line a run, at its end, in a finally, so a run that threw still writes it: process:<Name> outcome=<word> took_ms=<n> started=<UTC>, a one-word detail when there is one, and its counts (RunLine in JobHunt.Application, RunLines in the host). The outcome is one of six words: success; late, with the seconds after its slot, when it started more than a minute after its scheduled minute; blocked, with the reason (google_settings, google_token, mismatch); failed, with the exception's type; planned, for a shadow run that acted on nothing; unchanged, for a run that found nothing to do or whose switch is off. The inbox pass folds its pass.log line into the same record; its counts are read out of its parts' lines by a pattern a count (read, archived, leads, leads_passed, unjudged, waiting).

What a run line never carries: an address, a message body, a file's contents or a sentence. A detail is one word of letters, digits and underscores, a count's name is lower case, and anything else is dropped before the line is written; RunLineTests holds it with an address in a detail and in a part's line.

How it reaches Application Insights: the line is an information log, which the Functions host sends as a trace in the invocation's own operation, beside the request row the host already writes for every invocation (name, time, duration, success). The Admin tab joins the two by the operation id, so a run from before this version still reads from its request row, success or failed. The plan was a request row named process:<Name>; that needs the Application Insights SDK in the worker, a second telemetry pipeline beside the host's, for a row the host already writes. The health route also answers the processes' switches by name (ATS_SWEEP, LEADS, LEADS_LIST, TRIAGE, REPLY_ON_HUMAN, MERGER, APPENDS, NIGHTLY_ANY_HOUR, SHEET_MIRROR, DAILY_CARD), each a plain word or "set", never another setting: the site's identity holds Reader, which cannot list an app's settings, and the card needs the words only.

The six summaries are now the plain-words descriptions the card shows, with the technical notes they held kept as remarks, and Program.cs holds the paragraph that says what the app is (region what-it-is).

Addendum, 2026-10-24 (1.0.4.54): the six processes on the card

The card gains a description and a section for each of the Function's six processes, from the approved mockup J:\mockups\TheYard-Function-processes-mockup.html. Nothing the card already drew changed: the two dials, the chart, the five questions and the readout are where they were.

The shape is one request per run, and the run line beside it. The Functions host writes a request row for every invocation (name, start, duration, success); since 1.0.4.53 each process also writes its run line in the same operation. The site reads both from the Log Analytics workspace the two Application Insights components send to, with the Log Analytics Reader role the Application Insights card already holds, joined on the operation id: InsightsProcessRuns holds the one Kusto shape (the runs of the six, with the outcome from the line, or from the request's success for a row from before the lines) and asks it for a page of one process, its totals, the days folded in Central time, or each process's newest. A history lists every run of the inbox pass, the Sheet mirror and the health route; for the merger, the clock and the daily card it lists the runs that did something and counts the rest, because a pass that merged nothing every minute is a count, not a row.

What a run line carries and never carries is the 1.0.4.53 addendum's rule, and the route keeps it: GET /api/admin/cloud/nightly/runs/{process}?window=7d&page=1 answers twenty runs a page with when, how long, what each came to in words, what it read and wrote as one sentence built from its counts by one table a process (ProcessWords), and a link that opens the run's operation in the workspace's Logs. It is public like the card, because nothing in it is not already on the card or in the health route, and a name not among the six is a 404 problem.

The route is public and a fresh page is two workspace queries through Resource Manager, whose limits the Application Insights card shares, so the route has a guard (GuardedProcessRuns, after a three-seat review of the first cut): a page is kept two minutes by its process, window and page, the page number stops at fifty (a thousand runs back), and past thirty fresh reads in a minute the route says it is busy instead of asking again. The card's own read is kept two minutes too, failure included, so a workspace that is down is asked once in two minutes, not on every poll. A run line's detail is held to one word when it is read, as when it is written.

Why the description is read from the code: the words on the card should be the words in the code at the version deployed, not a second copy that drifts. Each timer file marks its summary with a summary region and Program.cs marks its paragraph what-it-is; the image carries functions/jobhunt/*.cs, and the card reads the regions through the same live-sample reader the documents use (behind a shared port, so the Cloud slice does not reach into the Docs slice). The switches are read from the Function's health route, which reads the app's settings and answers the seven switch names with plain words; the site's Reader role cannot list an app's settings itself, and this way it never sees any other setting.

Two departures from the mockup, both the operator's look winning over the drawing: each process section wears the site's panel (op-glass: its ground, its top rule and its corner brackets, with the mockup's tone edge on its left), because every box on a page wears the look and the coverage check reads every page for it; and a narrow card stacks each run, every value under its column's name, instead of scrolling the table sideways, because an Admin table fits or stacks and never scrolls (25 September).

What is not built: the mockup's per-process extras that come from somewhere other than the run lines (the clock's GitHub run number and snapshots kept, the Sheet mirror's blocked row from the plan file, the daily card's header line). The clock's GitHub side is the Run log row below, and the rest stay in their files on the share, which the site does not read.

Addendum, 2026-10-24 (1.0.4.60): the seventh process, the email campaign

The Function gains CampaignSend (ADR: The campaign sends, the model writes rows), hourly on the hour in UTC and acting in the 8 o'clock hour Central only, so the card gains its seventh section, "The email campaign", between the daily card and the health route, with its switch EMAIL_CAMPAIGN as the section's chip and its run line's counts as its sentence: leads open, eligible, written in shadow or sent, held. The counts only: no company, person or address reaches the run line, the card or the history. The next run reads the next 8 AM Central under either clock, and the health route's switch list carries EMAIL_CAMPAIGN so the card shows its word.

Addendum, 2026-11-04 (1.0.4.133): the eighth process, the network log

The Function gains NetworkLogPass (functions/jobhunt/NetworkLogTimer.cs), hourly on the hour in UTC and acting once a Central day in the 6 o'clock hour Central, so the card gains its eighth section, "The network log", between the email campaign and the health route, with NETWORK_LOG as its chip and NETWORK_LOG_ANY_HOUR beside it, and its run line's counts as its sentence: threads read, logged, drafted. Counts only: no person, company, address or subject reaches the run line, the card or the history. The next run reads the next 6 AM Central under either clock, and the health route's switch list carries both switches.

Addendum, 2026-10-26 (1.0.4.91): the Merger's sentence names the tracker's SQL copy

ProcessWords' table for the Merger gains three counts the Merger has written since 1.0.4.74 (ADR: The tracker merger runs in Azure, the addendum of 1.0.4.91): tracker_sql_written ("the SQL copy in step" at 0, "N rows copied" above it), tracker_sql_parity ("parity same" at 1, "PARITY DIFFERENT" at 0) and tracker_sql_failed ("copy failed, retried next pass"). The runs query lists a Merger pass that carried a parity count, a failed copy or a copy of more than nothing, and the newest-run read adds one row, MergerParity, the newest Merger pass that checked parity, which the section's tone reads. A process section's tone can now be warning as well as good, info and off; the Merger is the only section that uses it.

Addendum, 2026-10-26 (1.0.4.93): five lines that misled a reader

A read of every process's lines on 25 October found five places where a line said something a reader would take the wrong way. None lost data; each made a figure on the card or in a log mean less than it seemed to.

  • The lead import's refused count left out refused companies. A company the rules turned away was written in the file's notes only, so "0 refused" could sit beside a refused company. It now counts every refusal, a file, a company or a lead. Its count of companies was a count of saves, and a company named in three files counted three times (199 on 25 October for 141 companies); it now reads "companies saved" and counts each company once a pass.
  • The daily card was written every hour. The check that skips an unchanged card compared the whole body, and the body carries ages ("last line 7 h ago") that change every hour, so the unchanged path never ran (24 of 24 runs wrote the card). Decided: the comparison strips the age words before it compares, and the card itself keeps them, because they are what tells Steve how fresh each line is. The card is still written at 6 AM Central whatever it says.
  • A Sheet plan the gate stopped read as planned. The mirror's plan stops at the first row it may not copy (by the gate's design; 142 rows behind one on 25 October), and that pass reported "planned", so the card showed a quiet shadow day. A stopped plan is now blocked, detail gate, and its sentence says the rows after the stop wait; it names no row's company.
  • The ATS sweep read the same messages every half hour. The 41 messages it leaves in the inbox were each read whole and their threads listed every pass, about 4,000 Gmail calls a day. It now keeps ats-sweep/judged.tsv, one line a message it left: the id, the thread, its senders and the tracker's hash. A message it left before is not read again while its thread's senders and the tracker are unchanged; it is counted with the ones it left. A new sender in the thread, or any change to the tracker, and it is read and judged again. Only a message the sweep left is skipped, so nothing it would archive or row waits on this.
  • The campaign card claimed the database's cost. Since one database (ADR: The campaign sends, the model writes rows, the addendum of 1.0.4.72) the campaign has no database of its own, and its cost row read the site's database and showed that month as the campaign's, so the Azure SQL card and this one both claimed it. The row now reads nothing of its own and says it shares the site's Basic database, already on the bill.

The tests: LeadImportTests, DailyCardTests, SheetMirrorTests (the timer's outcome rule), AtsSweepTests and CampaignCardTests.

Addendum, 2026-10-26 (1.0.4.96): a cancelled health read is blocked, not failed

The dead Function alert (infra/jobhunt-alerts.bicep) mails on any failed invocation in the last thirty minutes. The incidents card, read at 01:21 CDT on 26 October and again at 07:12, showed one at 21:49:30 CDT the evening before: MergerHealth ended in an RpcException, beside two TaskCanceledException thrown by the share's client through its cancellation helper, the shape of an invocation whose own cancellation was signalled while it listed the two folders. The host signals that when it drains the instance or times the invocation out. Nothing had failed. The route caught every exception, marked the run failed and threw again, so a run cancelled under it counted as a failure. From this version an exception that is an OperationCanceledException while the invocation's own cancellation is set ends the run as blocked, with the word cancelled, and answers 204 with nothing read; any other exception still fails the run and is thrown again. The 10:27 CDT failure on 25 October was a System.Exception with no cancellation behind it and still counts. The change touches the route's catch only; the switch list the addendum of 1.0.4.91 extended is unchanged. RunLineTests.A_health_read_the_host_cancelled_is_blocked_and_a_failed_share_still_fails: red on the prior route, which has no such catch, green with it.

Addendum, 2026-10-29 (1.0.4.114): the card is fed by a push, and GitHub is read to reconcile

Until this version the run log was filled one way: once an hour the card's reader asked GitHub's public API for the workflow's last thirty days and kept what it answered. That read is unsigned unless a token is set, GitHub allows sixty unsigned reads an hour per address, and App Service shares its outbound addresses with every other site on it, so the card's own freshness depended on an allowance it does not control. The design note J:\mentor\CLOUD-NIGHTLY-FEED-DESIGN-2026-10-27.md put three ways of feeding a Cloud card to the owner and he chose option A, the push pattern the Claude usage card already uses, and the nightly card as the first one to wear it.

The push. POST /api/admin/cloud/nightly/run takes one run, behind the operator's key in X-Admin-Key, checked before any body is read, exactly as POST /api/admin/usage is (ADR: Every Claude lane reports its usage). The route is NightlyRunRoutes; the handler is KeepNightlyRunHandler, a command because a push is a write from outside (ADR: A request is a query or a command), and it writes through INightlyRunLog.UpsertAsync, the same port the hourly read already upserted into. The document's id is GitHub's own run id, so a run posted twice is kept once and a workflow may post again after a failure without the card counting a run twice. Nothing in Azure changed for this: THEYARD_ADMIN_KEY already lived in the repository's secrets for the usage report, and the route's key check already existed.

What the wire carries, and what it does not. The posted body is GitHub's own facts for the run and nothing made of them: the id, the run number, the event, the display title, when the run was created, how long it had run by the time it posted, and what the job had come to at that step. The slot, who started it, the lane and whether it was a dry run are not on the wire: the route reads them off the event and the title with GitHubRuns.LaneOf, NightlySlots.Local and the same by-function or by-hand rule GitHubRuns.Parse uses on GitHub's list. So a run the workflow posted and the same run read from GitHub are one document, field for field, which NightlyCardTests.A_run_pushed_and_the_same_run_read_from_github_are_one_document holds by parsing GitHub's own JSON for a run and reading the wire for it and asserting the two are equal. Had the slot been taken from the wire there would be two rules for the Central wall clock and one day they would differ.

The one fact that can differ, and why GitHub is still read. The workflow reports job.status at the posting step. That is the run as the job knows it there, and GitHub's final conclusion can be something else: a later step can fail, and the run can be cancelled after the post. So the reader keeps reconciling. NightlyRunReader.ReadAsync now asks the log first: while the log holds runs and the next slot the schedule has after the newest of them has not come due (NightlyRunReader.Current, over NightlySlots.Next), and GitHub was read inside the day (NightlyRunReader.Reconcile), the hour answers from the log and asks GitHub nothing, and says so in its own words ("N runs kept" rather than "N runs read"). GitHub is read when a slot came due with nothing posted for it, and once a day whatever arrived, and its copy replaces the pushed one, because GitHub is the authority on a run it lists. An empty log is never current: nothing kept says nothing about what ran.

A night with no push still draws. A workflow that could not reach the site, a missing key, a site that refused the post: the slot comes due, the newest kept run is older than it, and the hour falls back to the read it has always done. The run log row now carries a line saying which of the two this hour read (NightlyRows.RunsFrom), so a reader never has to infer it, and a GitHub read that failed says the log's runs are what is shown and why GitHub did not answer.

The workflow's step sits beside the usage report in .github/workflows/nightly.yml, region nightly-run-report, under if: always(), and never fails the run: a missing key leaves the step on 0 with one line in the summary, and a refused post writes one line and goes on. The night's work matters more than its report. The step reads nothing from GitHub's API, so it costs no allowance: every fact it posts is in the run's own contexts, and the start it posts is the first step's clock rather than GitHub's created_at, which the daily reconcile then corrects to the second.

What is not built, by the owner's ruling. The campaign card's push was the design note's first recommendation but needs an ADMIN_KEY app setting on func-jobhunt-ss to come from the Function, which is an Azure change and the owner's alone; the counts the campaign card reads come through SQL views the site already reads with its own identity, and the nightly workflow on GitHub has no SQL access, so there was nothing to push from there. The owner chose the nightly card first for that reason.

One thing this version did not change, found while reading it. GitHubRuns.LaneOf names two lanes, nightly and bookkeeping, and the workflow has since gained two dispatch types, triage and leads. A run of either reads "not named" on the card, and it did before this version too. Both paths agree about it (NightlyCardTests.A_dry_run_by_hand_and_a_dispatch_the_lane_table_does_not_name_read_the_same_either_way holds that), so the push changed nothing here; naming the two new lanes would change what the card shows and belongs in a version of its own.

The tests: NightlyCardTests gains the push's cases (the reader preferring the log, a due slot with nothing pushed falling back, the daily reconcile, the posted run equal to the read run, the rules, the handler with a fake log and no host, the row's line and the workflow's step), and AdminEndpointsNightlyRunTests holds the route through the host at each status it declares.

Addendum, 2026-11-07 (1.0.4.156): the second write in the Cloud slice

From this version the nightly run's push is one of two writes in the Cloud slice: the box that supports the job hunt posts its snapshot and its live samples the same way, behind the operator's key, read only after the key is checked (ADR: The box reports itself).

Addendum, 2026-11-09 (1.0.4.170): the funnel

The job hunt's measure is first calls, two to three a week, and nothing on the Admin tab counted the steps that lead to one. From this version a card under the desk question, "The job hunt funnel", reads one line the Function writes and adds it up over the window the pills choose. It shows six counts, from postings scanned down to first calls booked, and each step's share of the step before it. The card's tone is the newest seven days' calls booked. Two or more is fine and one is worth a look. None needs attention. With no line in the week, or a newest line three days old, the card is not judged.

The line is the contract between the Function and the card, and the Function does not write it yet: autohunt1109's rung 6 adds it. It is a run line in the shape every process of the Function already writes (RunLine.Text), once a Central day, after that day's counts are known:

process:Funnel outcome=success took_ms=<ms> started=<UTC start> detail=<the Central day, yyyy-MM-dd> scanned=<n> ready=<n> applied=<n> reached=<n> replied=<n> booked=<n>

detail is the day the counts belong to, so a line written after midnight still lands on its own day, and a day written twice counts once, its later line. A count the line leaves out reads as zero. "Reached" is every person the hunt touched that day, by any channel. "Replied" counts replies from a person, never a system. The weekly line on TODAY.md is the sum of seven of these. Until the first line arrives the card says "the Function has not written a funnel line in the last seven days", and off Azure it says the funnel is not read here.

The route is GET /api/admin/funnel?window=24h|7d|30d. It reads the lines from the workspace the Function's Application Insights sends to, by the Function's app name as its cloud role, the same read as the run histories. A workspace that refuses is the card's unread with its reason, never the route's 500. FunnelRules in the Domain holds the sum and the grade. FunnelTests hold the parser to a line in the RunLine shape and the handler to a fake reader; FunnelEndpointTests boot the route off Azure, and admin.spec draws the card on a report in the route's shape.

Addendum, 2026-11-09 (1.0.4.175): the Function writes the funnel line

The addendum of 1.0.4.170 wrote the line's contract and said the Function did not write it yet. From this version it does, and one sentence of the record on the six processes stops being true: a run line's detail may now also be one day written yyyy-MM-dd. The funnel's day needs the hyphens and the card's parser reads them; nothing else is let in (RunLine.Word, held by FunnelLineTests).

A process named Funnel (FunnelTimer) has no timer of its own: the morning card's tick at 7:30 Central asks it first, once a day, so the card's week line always holds the day before. A funnel that fails writes its own failed line and the card goes on. It counts the day before, so the night's scan and the evening's tracker rows are both in. FunnelCount in the Card slice does the counting with no model and no clock. Postings come from the board scan's scan: line in campaign/pass.log, and READY from the day's JOBS file. Everything else is read off the opening phrase of each tracker row's Notes, the type every lane writes first.

A touch is an upper-case phrase ending in SENT; a NO or NOT phrase never counts, nor a DECLINE. Each person counts once a day, on the first channel that matches. A reply is an INBOUND row from a named person that is not a rejection or a receipt, or a LinkedIn spool row whose last inbound falls on the day. A call is a row that opens with INTERVIEW BOOKED or INTERVIEW SCHEDULED, or with BOOKED alone. The leaders the leaders lane named that day sit beside reached and are never added to it, because a named leader has not been touched yet.

The run line carries the six counts the card reads, and the breakdown behind reached, which the card ignores. The same line goes to the share's nightly/funnel.log behind the Central time and the kind of run. The morning card sums the week from that file, Monday to Sunday, the week holding the day before, as one line under its "Written" line; a day with no line is named after the counts. POST /api/funnel/hand-run?day= with the function key writes one day's line and puts the week's line into TODAY.md where it stands, mailing nothing. FUNNEL set to off stops it; unset is on. The shape, field by field, is J:\mentor\FUNNEL-LINE-SHAPE-2026-11-09.md.

Addendum, 2026-11-10 (1.0.5.3): the empty note names the span it read

The funnel card's route always reads at least the week, so the tone has a week to grade, and reads the window when it is longer. When neither held a line, the note said "in the last seven days" for every window, so the 30-day window said a week when it had read a month. The note now names the span read: the last seven days for the hour, the day and the week, and the last 30 days for the month. FunnelTests holds all four windows. The first timer-written line, 07:30:04 CST on 10 November for 9 November, was read on both names the same day: the route answers that day's later line (the timer's, replied 1) over the hand run's of the evening before, one day counted once, as section 1 of the funnel line's shape says.

Addendum, 2026-11-10 (1.0.5.6): the funnel card has no hour window

What stopped being true: the addendum of 1.0.5.3 says the empty note names "the last seven days for the hour, the day and the week". The card has no hour window: the route reads its window with CardWindows.Of, which answers the day for anything but 24h, 7d and 30d, so a request for an hour is read, counted and reported as the day. The note it shows then is the day's, the last seven days, and FunnelTests' hour case holds exactly that. CodeRabbit found it on #11.

Correction, 1.0.5.7: the paragraph above says an hour request is "read, counted and reported as the day". It is counted and reported as the day; the route still reads the last seven days to grade the tone, as it does for every window. CodeRabbit found the slip on #16.

Addendum, 2026-11-11 (1.0.5.19): time to first touch

The job hunt's second measure is time to first touch: the minutes from a posting going live to the first message reaching a hiring manager or VP at that company. The target is 60 minutes or less, day and night. The Function clocks every role the pounce passes (ADR-125's addendum on the pounce gate and the clock) and writes process:PounceDay lines for the last seven Central days, at five past each hour and on any tick that changed a clock. From this version a card under the desk question named "Time to first touch" sits right after the funnel. It reads those lines and shows one row a Central day, newest first: the day, caught, touched, the median and worst minutes to the first message, the ones still waiting and the oldest wait. Minutes over 120 print as hours and minutes ("3 h 5 min"), over 48 hours as days and hours. Until a day has a line the card says "No role has been clocked yet."; off Azure it says time to first touch is not read here.

What it reads. The line is process:PounceDay outcome=success ... detail=<yyyy-MM-dd> caught=N touched=N median_min=N worst_min=N waiting=N oldest_wait_min=N. A day has many lines, and the newest one written for a day is the truth for that day; a day with no line is read false with zeros. Each day gets one judgement from PounceRules in the Domain: on_target when a role was touched and the median is 60 minutes or less, late when the median is over 60, waiting when nothing is touched and something waits, quiet when nothing was caught, unread for a day with no line. The route is GET /api/admin/pounce, public like the funnel's, and answers days (seven, newest first, each day, read, the six counts and judgement), target_min 60, newest_ms (when the newest line was written) and read_ms (when the route read them), in snake_case. It reads the funnel's workspace and role. A workspace that refuses is the card's unread with its reason, never the route's 500. PounceTests hold the parser to a line in the RunLine shape and the handler to a fake reader, and PounceEndpointTests boot the route off Azure. admin.spec draws the card on an empty week and then on a week in the route's shape.

What it cannot show. Counts only: nothing that names a role or a person is on the wire, so the card cannot say which role was late; that is in the Function's nightly/pounce.log and jobhunt.PounceRoles. A day's row is the day as its newest line saw it: waiting and oldest_wait_min are as of that line, up to an hour old, not as of the read. The card sees only what the clock sees, so it inherits the clock's limits: a touch is a tracker row or a campaign send to a named address, timed by when it was written, so a message sent outside those two, or a send to a shared mailbox under a leader's name, is no touch and the role reads as waiting; a role is watched for 14 days, and one never touched in that time stays waiting on its day's last line. It shows seven days and no week's median, since seven medians do not add up to one.

Correction, 1.0.5.20: the paragraph above says a day's waiting and oldest_wait_min are up to an hour old. That holds while the Function writes its line each hour and the line reaches Application Insights; when either stops, the newest line can be older, and the card does not refuse it. The answer's newest_ms says how old the newest line is. CodeRabbit found it on #29.

Addendum, 2026-11-11 (1.0.5.24): a runs page is kept built

What stopped being true: the addendum of 1.0.4.54 says a page is kept two minutes and the route reads it fresh after. A 48-hour probe read the runs route at a p95 of 1.7 s in Application Insights. From this version a page is kept the way the Cloud cards' views are (ADR-102, the addendum of this version): under two minutes old it answers at once, past one minute the next is read behind the request, and one keeper reads again each page asked for in the last hour, once a minute. The thirty fresh reads a minute now count the reads behind the request and the keeper's as well as the request's, and a read that is not available, busy included, is never kept, so the page the route had stays.

Addendum, 2026-11-11 (1.0.5.37): the funnel by channel

What stopped being true: "the funnel by channel" was a one-off read (J:\staging\pounce1110\analysis\gap-numbers-output.txt, DONE-POUNCE1110), and the Admin tab's funnel card added the whole job hunt up as one line, so no card said which channel a reply or a room came from.

From this version a card under the desk question named "The funnel by channel" sits right after time to first touch. It reads GET /api/admin/channels, public like the funnel's, which reads card.Channels in the job hunt's database over the connection the campaign card uses (SqlChannelCounts, ReadChannelsHandler, the fold in ChannelRules). For each week, Monday first, the newest eight, the card shows the touches, the replies from people, the reply rate and the rooms booked of six channels in one order: pounce, hotmgr, email campaign, old contacts, applications, recruiters.

Where the numbers come from. One SQL query, two views. jobhunt.ChannelRows reads the tracker's rows of the last nine weeks: a row is a touch when it records a send or an application, a reply when it opens INBOUND, a room when it is an interview or a booked call (the tracker's interview rows). Its channel, first match wins: pounce when the pounce's first touch at the same company fell on that day (jobhunt.PounceRoles), then CAMPAIGN EMAIL SENT, an old contact or a referral, a recruiter (the person or the note says recruiter or talent), an application, and any other LinkedIn send, which is the hot-manager outreach. A reply or a room counts for the channel of the newest touch at the same company on or before its day. The company is read only inside that view; card.Channels sums it a channel a week and carries counts only, as the card schema requires.

What it cannot show yet. Opens and the highest rung reached are not counted: the site keeps opens by code, and only link-tokens.csv on the share knows which channel a code went out on, so joining them needs the Function to write a code's channel where the site's database can read it. The answer says so in its note on every read. Chat lanes' sends by email to a person outside those six channels are not counted. The keywords are the tracker's house words as written on 11 November; a lane that writes a send in other words is not a touch here.

The card is for Steve's own reading and is never a link in any message, as every Admin tab address is not. ChannelsTests, ChannelsEndpointTests and ChannelViewTests hold it; workbench.test counts 45 cards.

The Tuesday scorecard. The job hunt's Tuesday scorecard gets a section from the same view. This repository cannot edit J:\nightly\BOOKKEEPING-LANE.md, so the section's text is here, to be added to that file under its scorecard heading:

Funnel by channel (from card.Channels)

Read SELECT [Channel], [Week], [Touches], [Replies], [Rooms] FROM [card].[Channels] WHERE [Week] >= DATEADD(day, -28, CAST(SYSDATETIMEOFFSET() AT TIME ZONE 'Central Standard Time' AS date)) ORDER BY [Week] DESC, [Channel]; with the Function's identity, or open the Admin tab's card "The funnel by channel". Write one table: a row a channel (pounce, hotmgr, email campaign, old contacts, applications, recruiters), a column pair a week for the last four weeks (touches, replies), and a last column for rooms booked in the four weeks. Under it, one line: the channel with the most replies per touch over the four weeks, with its two numbers. Opens and the highest rung are not in the view yet; say "opens: not counted" rather than leaving the column out. Counts only: no name, company or address in the section. Never link the Admin tab in the scorecard or in any message.

Correction, 1.0.5.40: four statements in the 1.0.5.37 addendum did not hold (CodeRabbit on #48).

  • "Its channel, first match wins ... an old contact or a referral, a recruiter, an application": the view gave every application the applications channel unless the pounce had it, so an application that reached an old contact or a recruiter was counted for applications. It also left an application that matched no channel above it with none at all. From this version an application takes applications only when no channel matched or only the LinkedIn send did; the pounce, the campaign, an old contact and a recruiter keep theirs.
  • That empty channel reached the card's reader as a null, and the reader failed the whole read on it, so one ordinary application made the card say it could not read. The view no longer makes one, and the reader leaves out a row with no channel as it leaves out a channel outside the six.
  • "The person or the note says recruiter or talent": the note was read for recruiter only. It is now read for talent too.
  • A read with no week drew the column heads over an empty table. It now says "no touch, reply or room in these weeks", as the other Admin tables say theirs.

ChannelViewTests, ChannelsTests and the card's browser test hold them.

Addendum, 2026-11-12 (1.0.5.52): the inbox pass fails on a failed campaign or finder part, and the finder has its counts

What stopped being true: the 1.0.4.53 addendum folds the inbox pass's outcome from four parts (ats, leads, triage, human), so a pass whose campaign part failed came to success. The campaign part answered 403 on 13 to 25 of each day's 48 passes from 10/27 (J:\inbox-pass\pass.log) and the run line said success every time. And the finder's numbers rode inside the campaign part's line, so when a later step of that part threw, the line said only "campaign: FAILED" and the calls it had spent were gone (09:20 CST 11/12: 21 calls, no line).

From this version the finder is its own part, written to pass.log as | finder: hunter: 3 asked, 1 found, 0 dropped, 7 of 50 this month (with , 1 refused (<reason>) or , stopped: <why> when that happened), and AtsSweepTimer.Fold reads six parts: a FAILED campaign or finder part comes to failed with detail part_failed like the other four. The run line carries four more counts when the finder ran: finder_asked, finder_found, finder_dropped and finder_refused (0 when none). No outcome word is added; RunLine.Outcomes stays six. RunLineTests.A_failed_campaign_or_finder_part_fails_the_run_and_the_finder_counts_reach_the_run_line holds it.

Addendum, 2026-11-12 (1.0.5.59): an empty run is not a success, and a run line that says failed or blocked emails

Steve, 11/12: "an empty run counts as failed". What stopped being true: a run that did nothing it was there to do came to success. The clock recorded dispatched=0 for a dispatch GitHub did not take and still came to success, and the run lines were read by the card but by no alert.

From this version:

  1. Every process has a floor or the words for why empty is normal (RunFloors, Application/Shared/Runs): the count that proves a run worked, the least it must reach, over how many tries. The clock (dispatched, 1) and the fresh scan (read, 1) have floors judged by the run; the finder's (10 asked, none found) is kept by AddressSearch (ADR-118's addendum of this version); every other process has its reason, such as "nothing waiting in the spool is the usual minute". RunFloorsTests fails when any process that writes a run line, or any process on the Admin tab's table, has no row.
  2. Under its floor a run comes to blocked with detail zero_results (applied in RunLines.Write, the one place a line is written). No seventh outcome word.
  3. The clock's three dispatches come to blocked with dispatch_refused when GitHub did not take them (Dispatch.Delivered), and to unchanged with switch_off when the dispatch's switch is off.
  4. The alert reads the run line. alert-jobhunt-dead-function in infra/jobhunt-alerts.bicep now also counts a process: line with outcome failed or blocked over three hours, one alert instance a process, autoMitigate on; "unchanged" and "planned" never email. No new rule, so no new monthly charge for a rule. Not deployed with this version: replayed over 11/5 to 11/12 it would have sent 17 emails, one to three a day, each a real break, and the rung's own bar is no ordinary day with more than one. It is deployed after the Gmail fix (gmail403-1112) and the campaign's 403 are gone and a fresh replay is quiet.

Run lines are not sampled: 33,070 of 33,070 process: lines over eight days carry itemCount 1, one line an invocation, so host.json is unchanged.

Addendum, 2026-11-12 (1.0.5.70): a lane whose setup died runs once more

What stopped being true: a run the Function started was one attempt at the lane. On 8 November three Nightly runs died within half an hour before their lanes began (the reply run 42469518816 at 10:00Z, a leads run before it and a triage run after it): claude-code-action's setup-bun read "Unexpected HTTP response: 504" and the next step found no bun (exit 127). 1.0.4.168 gave the reply lane a second dispatch from the Function at 5 AM Central; every other mode still lost its run.

From this version nightly.yml's lane step continues on error, and three steps follow it (the lane-retry region):

  1. Did the lane begin runs only when the lane step failed, and says again=true only when the step left no execution file, the run folder is still empty, and the failure came within ten minutes of the run's start. A lane that ran and failed on its own writes an execution file or something in its folder, or has run longer than any setup takes, so it is never run twice.
  2. The lane, once more has the same inputs as the first and runs only on again=true.
  3. The lane's verdict is the attempt that ran: the second's outcome when it ran, else the first's. It fails the job when that is not success, and it runs before the run report, so job.status there is the lane's. The usage step reads whichever execution file exists.

The job's ceiling is 75 minutes, room for a 55-minute lane after a setup that failed in its first minutes. NightlyWorkflowTests holds the shape.

Addendum, 2026-11-12 (1.0.5.70): a nightly lane that ends closes its row

What stopped being true: a nightly lane's state.md row was closed only by the lane. reply1110-0400 registered at 04:02 on 10 November, wrote its closing block to nightly/bookend-2026-11-10.md and no CLOSED row (NIGHTLY-LANE.md's close step names the bookend and DONE.md only), and the 6 AM program's second-driver check read it as open at 06:11 and held invites, messages and network. bookkeeping1111-0800 also has a registration and no close.

From this version nightly.yml closes the row when the lane did not, whatever the run came to (the lane-close region, after the run report and before the unmount). The day step names the id the lane registers under, <mode><MMdd>-<HHMM> from the run's own date and slot (reply1110-0400). The close step reads the state.md spool, its merged/ folder for the last day and the end of state.md; when a row opens ## LANE: <id> and none closes it (## LANE: <id> CLOSED, or a row of that lane ending | CLOSED |, the two forms RegistryTail reads), it writes <UTC stamp>-<id>-close.md into the spool, aside as a dot file first and renamed in: ## LANE: <id> CLOSED <time> (GitHub Actions run <id> came to <job.status>; nightly.yml wrote this row because the lane wrote none). DONE: <run folder>/DONE.md. Holds: none. | CLOSED |. A lane that never registered (a dry run, a triage pass) gets no row, and a failed write is a summary line, never a failed run. A lane that registers under another id is not found; the lane files name the id this way today. NightlyCloseRowTests runs the step's own script against a scratch share.

Addendum, 2026-11-12 (1.0.5.73): the morning card on the card

What stopped being true: the 1.0.4.54 addendum says the runs route answers for the six and the card's table names every process it reads. From 1.0.4.171 the Function has a ninth timer, TodayCard (TodayCardTimer, "0 30 * * * *", acting once a day in the 7 o'clock hour Central, TODAY_CARD unset read as on), and the table did not list it, so GET /api/admin/cloud/nightly/runs/TodayCard answered 404 and the Cloud card could not say whether the morning card ran.

From this version the table has a row for it, "The morning card", beside the daily card: its cron is the Function's own, its next run is the next 7:30 Central under either clock, and its history lists the runs that wrote the card and counts the hourly ticks between. Its sentence reads its two counts, written and mailed; a tick outside its hour reads "not the 7 o'clock hour", and the campaign's still reads "not the 8 o'clock hour", both from the one table of acting hours in FunctionProcesses. What a run came to says "not its hour" for either. The 404's detail is built from the table, so it names every process the route knows and cannot fall behind it again.

One read changed with it. The 07:30 tick writes the funnel's line before its own, in the same invocation and so the same operation, and the runs query took any one line of an operation. A request is now joined to the line its own process wrote, by operation and process name.

The chip reads TODAY_CARD from the Function's health route, which does not name that switch yet and answers an unset switch as off; until the Function names it, the chip says off while the card runs. ProcessRunsTests and ProcessReadersTests hold the row, its next run, its words, the 404's words and the join.

Addendum, 2026-11-12 (1.0.5.73): the funnel on the card, and the reader keeps its day

What stopped being true: the 1.0.4.54 addendum says a run line's detail is held to one word when it is read, and that a run is a request row with its line beside it. The 1.0.4.175 addendum let the Function write one yyyy-MM-dd day as a detail, for the funnel, and the reader still dropped it. And the funnel has no request row named for it: its line is written inside the morning card's 07:30 tick and inside FunnelHandRun.

Decided: the table lists the funnel, "The funnel", after the morning card, as a process that rides the morning card's schedule. It has no cron of its own (FunctionProcesses.Riders names the process whose tick runs it), so its next run is the morning card's, its chip is FUNNEL, and its history lists every run, one a day. The runs query reads a rider's runs from its own lines, each line one run, with its time, its took_ms and its outcome from the line, beside the request-and-line runs of the rest. The reader keeps a detail that is one word or one real yyyy-MM-dd day, the rule RunLine.Word writes by, and drops anything else. The funnel's sentence names its day and its six counts: scanned, ready, applied, reached, replied, booked; the breakdown behind reached stays on the funnel card.

The funnel's chip has the morning card's caveat: the health route does not name FUNNEL yet, so it reads off while the line is written. ProcessRunsTests and ProcessReadersTests hold the row, the day, the sentence and the query; RunFloorsTests holds the funnel's row in the floor table: empty is normal, because the line writes the day before whatever it held.

Addendum, 2026-11-15 (1.0.5.77): the card leads with the model lanes' empty runs

The same rule for the model lanes, which write no run line: on the share, J:\dispatch\check_empty_runs.py reads each lane's close row, and a lane that had work due and did none two runs in a row ("0 sent verified of 12") gets one WALLS.md bullet and one line in dispatch/EMPTY-RUNS.md, "EMPTY RUN: , runs, since "; "0 of 0" is quiet. The dispatcher runs it once a Central day from 07:10, the file's own date marking the day. From this version the 07:30 card reads that file and prints each EMPTY RUN line in its head, under the hiring signal, every day: a wall the Walls section would show only on Mondays. TodayEmptyRunsTests holds it.

Addendum, 2026-11-19 (1.0.5.106): what the grant pays for

In plain words: the Function's free grant is spent by run time, a second at least for every run, so the site's own polling of it was a fifth of the bill. It now asks less often. The single warm "dispatcher" timer proposed on 18 November was measured and is not built.

On 19 November the grant dial read 84,959 of 100,000 GB-s, amber. Flex Consumption bills each execution the memory of its instance while it runs, at least 1,000 ms, and does not bill idle or start-up time. The Function's requests priced that way came to 6,407 GB-s for the day, against 6,417 from Azure's own meter. By function: FreshScan 30 %, the merger's health route 21 %, AtsSweep 15 %, the Merger 13 %. The health route ran 2,638 times a day, 19 ms each, billed a second each, and every call came from this site.

The roughly 420 new instances a day cost nothing, so a dispatcher would have saved only the rounding of short runs, about 160 GB-s a day.

From this version the site asks the health route every five minutes for the merger's numbers (MergerReading.Every) and every fifteen minutes for the switches (NightlyProcesses.SwitchesKeep), which saves about 1,150 GB-s a day. The merger row names the minute it was read. The dial's projection now uses the last day's rate (ADR-102, the addendum on the honesty rule). The month runs past the grant whatever ships, at about 158 % and roughly $1.50 at the on-demand rate. The dial reads red from about 21 November and green from 1 December. MergerHoldTests and NightlyCardTests hold it.

Addendum, 2026-11-19 (1.0.5.112): the merger's reading stays on its minute

In plain words: after the health route was asked every five minutes, the nightly card's merger row read "not read" all day. The reading was taken, then wiped by the next minute's write.

The recorder reads each card five minutes back every minute, and writes again any minute whose values changed. The reading was put on one minute; a minute later that same minute came back from Azure without it, its values had changed, and it was written over. Asked every minute, the next reading always arrived to replace it, which hid the fault.

From this version the reading is remembered with the minute it landed on (MergerHold) and put back on that minute at every read until the next ask, so the minute reads the same and is not written again. The ask stays every five minutes. MergerHoldTests holds the minute read twice.

Addendum, 2026-11-19 (1.0.5.112): what the workspace pays for

In plain words: the Function was filling most of the site's free 5 GB of telemetry a month with lines nobody reads, and it now sends fewer of them.

On 19 November the one workspace both apps report to, log-theyard-ss, held 4.757 GB for the month. The Function's share was 2.835 GB, 1.77 GB of it traces, and its daily rate stepped up from about 0.10 to 0.22 GB on 11 November when FreshScan began. FreshScan's HTTP client logs two Information lines for every board it reads, about 54,000 rows and 46 MB a day. Beside them were the host's start-up lines, about 15 MB a day, and the health route's status lines, about 24 MB a day.

From this version:

  • the worker sends the HTTP client's lines only at Warning and above (LogLevels);
  • the host sends Host.Startup and the status lines only at Warning and above;
  • every process's own "process:" run line, which the Admin tab's nightly card reads, keeps Information, as do every request row, warning and error.

No daily cap was added. A cap drops whatever arrives after it fills, errors included, which is the data loss the Insights card exists to show. LogLevelsTests holds it.

Addendum, 2026-11-20 (1.0.5.139): the host's aggregates and performance counters

In plain words: two of the Function's largest sources in the workspace are read by nothing. On 20 November, in 24 hours, the host's performance counters were 27.3 MB (processor time twice and private bytes, every few seconds) and its per-function aggregates about 8 MB (seven metrics a function a minute: Count, Successes, Failures, SuccessRate and three durations). The Nightly card reads the Function's Azure Monitor metrics and its run lines, and no query on the Admin tab reads either table for the Function. From this version host.json sets Host.Aggregator to Warning and enablePerformanceCountersCollection to false; the run lines stay at Information. The largest Function source left in AppMetrics is the host's own azure.functions.health_check.reports, about 27.8 MB a day, which no host.json switch named in Microsoft's reference turns off; it is the next lever. LogLevelsTests holds the two settings.

Addendum, 2026-12-02 (1.0.5.256): the run's notes are read back for NUL bytes

What stopped being true: a run whose lane came to success was a clean run whatever its notes held. Ten DONE notes the runner's lanes wrote on the share between 22 and 29 November came back as a run of NUL bytes followed by their later lines (the 23 November 20:00 bookkeeping note: 11,250 of 11,404 bytes); in nine of the ten the lost bytes are exactly the note's first whole write, and the appends after it survived. The runner's SMB mount kept the write's length and lost its text, and every step after the lane read the run as good.

From this version nightly.yml has a step after the lane's verdict and before the usage is read (the note-nul-check region), run whenever the lane step ran: it syncs, drops the runner's page cache so the bytes come from the share and not from what the runner remembers writing, and reads every .md and .tsv in the run folder with the share's own nightly/done_note.py check, the helper the lanes now write their notes through. A hit lists the notes in the summary and fails the job, so the run report and the close row carry the failure; a clean folder writes the helper's count line; a share without the helper writes one summary line and passes. The mount options are unchanged: if a hit still shows with the helper and this step in place, the next move is cache=none on the mount. NightlyCardTests holds the step's place and shape.

Enforced by

12 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 shared Cosmos DB database never needs a twenty-sixth container: the definitions and the live tests' copies stay at its limit, and the nightly card keeps its minutes and runs in the plan container under kinds of its own CosmosDefinitionTests, NightlyCardTests 134 of 134 passed
The nightly lane's slots are one table in Domain that the Function compiles by a link and its clock asks, judged on time, late or missed from five-minute firing counts on both daylight-saving days; the nightly card's dials turn at their lines, every Azure line reads "not read: no role on" the configured group while the identity has none, the run log warns on one failed run and alarms on two, GitHub's runs are parsed by lane, the snapshot count is the Function's own, and a run the workflow posted is kept under GitHub's own id, read by the same rules GitHub's own list is read by, and preferred over a read of GitHub while every slot due since it was answered by a push NightlySlotsTests, NightlyCardTests, AdminEndpointsNightlyRunTests 166 of 166 passed
The nightly card's six process sections read the Function's run lines and request rows through one Kusto shape, the runs route answers a page of twenty for one of the six and a 404 problem for any other name, a closed run history asks for nothing, and every figure names its source ProcessRunsTests, ProcessReadersTests, cloud.spec.ts, axe.spec.ts 106 of 106 passed
The words a process section prints are the code's own: each timer's summary and the Function's paragraph are read from the repository at the version deployed, and the schedule table holds the Function's own cron strings ProcessReadersTests, ProcessRunsTests 106 of 106 passed
The nightly card draws the Function's seven processes, the campaign among them with its switch, and its next run is the next 8 AM Central under either clock ProcessRunsTests, ProcessReadersTests, cloud.spec.ts 106 of 106 passed
The site asks the Function's health route every five minutes for the merger's numbers and every fifteen for the switches MergerHoldTests, NightlyCardTests 114 of 114 passed
The job-hunt Function sends the HTTP client's lines, the host's start-up lines and the health route's status lines only at Warning and above, and every process's run line at Information LogLevelsTests in its own suite, not this file
The job hunt funnel reads the Function's daily process:Funnel line into its day and six counts, counts a day written twice once, and grades the newest seven days' calls booked: two or more fine, one amber, none red, no line unread; a refused read is unread, never a 500 FunnelTests, FunnelEndpointTests 30 of 30 passed
Time to first touch reads the Function's process:PounceDay lines into their day and six counts, takes the newest line for each of the last seven Central days, and judges each day: a median of 60 minutes or less on target, over 60 late, nothing touched and something waiting waiting, nothing caught quiet, no line unread; a refused read is unread, never a 500 PounceTests, PounceEndpointTests 32 of 32 passed
The funnel by channel folds the card schema's Channels view into the newest eight weeks, newest first, every week with pounce, hotmgr, email campaign, old contacts, applications and recruiters in that order and zeros where a channel had nothing; the views count a reply or a room for the newest touch at the same company and carry counts only; a refused read is unread, never a 500 ChannelsTests, ChannelsEndpointTests, ChannelViewTests 8 of 8 passed
The Function's funnel line counts one Central day from its logs and each tracker row's opening phrase, a person once a day, never a NO or NOT send; its detail is the day; the share's log sums into the week's line on TODAY.md, each day its latest line and a missing day named FunnelLineTests 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