<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[A1 Lane]]></title><description><![CDATA[A1 Lane]]></description><link>https://a1lane.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Fri, 04 Dec 2026 23:47:42 GMT</lastBuildDate><atom:link href="https://a1lane.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[A live post can still vanish: audit your public profile against your own post log]]></title><description><![CDATA[A 130-line, token-free Python script that diffs your post log against your public Bluesky and Mastodon profiles.]]></description><link>https://a1lane.hashnode.dev/a-live-post-can-still-vanish-audit-your-public-profile-against-your-own-post-log</link><guid isPermaLink="true">https://a1lane.hashnode.dev/a-live-post-can-still-vanish-audit-your-public-profile-against-your-own-post-log</guid><category><![CDATA[Python]]></category><category><![CDATA[monitoring]]></category><category><![CDATA[Bluesky]]></category><category><![CDATA[Mastodon]]></category><category><![CDATA[Security]]></category><dc:creator><![CDATA[A1 Lane]]></dc:creator><pubDate>Tue, 01 Dec 2026 19:24:42 GMT</pubDate><content:encoded><![CDATA[<blockquote>
<p>This post was drafted with AI assistance. The script was run on Dec 1 2026 and every output below is pasted from those runs.</p>
<p>Disclosure: I'm the maker of A1 Lane (a1lane.ai), a social scheduler that reads each post back from the platform and records a receipt. It is mentioned here as the example; everything in the code works without it.</p>
</blockquote>
<p>A publish-time check answers one question: did the post land? It says nothing about next Tuesday, when the post may be gone, edited, set to a different visibility, or sitting next to a post you never wrote. This piece gives you a 130-line Python script that compares a log of what you meant to publish with what your public Bluesky and Mastodon profiles show right now, using public APIs and no tokens. I ran it today against our own brand accounts, then broke the log on purpose to see each failure.</p>
<h2>Two stories from this week show why "it worked once" is not enough</h2>
<p>On Hacker News today, Hussein Saleh documents 19 fake "Meta Ads Manager" apps that passed App Store review between Nov 18 and 30. They open Facebook's real login inside the app and keep the session cookies, so two-factor doesn't help. When he tested the same scheme in 2025 with a Meta test account, the ad account vanished within hours and "posts promoting dangerous organizations appeared under my name."</p>
<p>On DEV, Rajan Nishad wrote up six months of letting an AI agent run his production site. One session "made five clean commits, and told me it was finished. Not a single file had been copied to the server."</p>
<p>Both are the same gap. The thing that acted reported success, and nobody looked at the public result later.</p>
<p>A stolen session can post things you didn't send. An agent can say "done" about something that isn't. The read-back in my own scheduler runs once, at publish time.</p>
<h2>What the audit compares</h2>
<p>You need a ledger: one entry per post you published, with the platform id and the time. If your scheduler exports a post list, use that; if not, a JSON file you append to after each post works. The audit then asks the platform two things.</p>
<p>First, for every post in the ledger: is it still there, and is it the same? Second, for the profile as a whole: is there anything on it since your first logged post that is not in the ledger?</p>
<p>A publish-time check can't answer that second question, and it's the one that catches a hijacked session.</p>
<p>The script reports seven states:</p>
<table>
<thead>
<tr>
<th>State</th>
<th>Meaning</th>
</tr>
</thead>
<tbody><tr>
<td>LIVE</td>
<td>Found, unchanged</td>
</tr>
<tr>
<td>GONE</td>
<td>In the ledger, not returned by the public API (deleted, or hidden from public view)</td>
</tr>
<tr>
<td>EDITED</td>
<td>Mastodon reports an edit (<code>edited_at</code> is set)</td>
</tr>
<tr>
<td>CHANGED</td>
<td>Bluesky record text no longer matches what you logged</td>
</tr>
<tr>
<td>VISIBILITY</td>
<td>Mastodon visibility differs from what you logged</td>
</tr>
<tr>
<td>NOT IN LOG</td>
<td>On the public profile, but not in your ledger</td>
</tr>
<tr>
<td>UNKNOWN</td>
<td>The instance refused the read (for example HTTP 401 where the API requires sign-in)</td>
</tr>
</tbody></table>
<h2>The script</h2>
<p>Python 3, standard library only. Bluesky reads go to <code>public.api.bsky.app</code>; Mastodon reads go to the instance's public REST API.</p>
<pre><code class="language-python">#!/usr/bin/env python3
"""Compare what you meant to publish (a ledger) with what your public profile shows.

Reads public APIs only (no tokens): Bluesky's public AppView and a Mastodon
instance's public REST API. Python 3 stdlib only.

Reports, per post:
  LIVE        found, unchanged
  GONE        in your ledger, not on the platform (deleted, or hidden from public view)
  EDITED      Mastodon says it was edited (edited_at is set)
  CHANGED     Bluesky record text no longer matches the text you logged
  VISIBILITY  Mastodon visibility differs from what you logged
  NOT IN LOG  on your public profile since the ledger's first post, but not in your ledger
  UNKNOWN     the instance refused the read (HTTP other than 200/404/410)

Exit code 0 if everything is LIVE, 1 otherwise.

Usage: python3 profile_audit.py ledger.json
"""
import json, sys, urllib.request, urllib.error, urllib.parse

BSKY = "https://public.api.bsky.app/xrpc"

def get(url):
    req = urllib.request.Request(url, headers={"User-Agent": "profile-audit/1.0"})
    try:
        with urllib.request.urlopen(req, timeout=15) as r:
            return r.status, json.load(r)
    except urllib.error.HTTPError as e:
        return e.code, None

def bsky_text(record):
    """Record text with each link facet expanded to its full URI.

    The Bluesky app stores a shortened label ("a1lane.ai/docs/prove-i...") in
    the text and keeps the real URL in a link facet, so compare on this."""
    b = record.get("text", "").encode("utf-8")
    links = [(f["index"]["byteStart"], f["index"]["byteEnd"], feat["uri"])
             for f in record.get("facets", [])
             for feat in f["features"] if feat["$type"] == "app.bsky.richtext.facet#link"]
    for start, end, uri in sorted(links, reverse=True):
        b = b[:start] + uri.encode("utf-8") + b[end:]
    return b.decode("utf-8")

def bsky_audit(handle, entries):
    out = []
    uris = [e["uri"] for e in entries]
    found = {}
    for i in range(0, len(uris), 25):                      # getPosts takes up to 25 URIs
        q = urllib.parse.urlencode([("uris", u) for u in uris[i:i + 25]])
        _, d = get(f"{BSKY}/app.bsky.feed.getPosts?{q}")
        for p in (d or {}).get("posts", []):
            found[p["uri"]] = p
    for e in entries:
        p = found.get(e["uri"])
        if p is None:
            out.append(("GONE", e["uri"]))
        elif "text" in e and bsky_text(p["record"]) != e["text"]:
            out.append(("CHANGED", e["uri"]))
        else:
            out.append(("LIVE", e["uri"]))
    since = min(e["created_at"] for e in entries)
    cursor, logged = None, set(uris)
    while True:                                             # walk the author feed back to `since`
        q = {"actor": handle, "limit": 50, "filter": "posts_with_replies"}
        if cursor:
            q["cursor"] = cursor
        _, d = get(f"{BSKY}/app.bsky.feed.getAuthorFeed?{urllib.parse.urlencode(q)}")
        if not d:
            break
        for item in d["feed"]:
            p = item["post"]
            if "reason" in item or p["author"]["handle"] != handle:
                continue                                    # skip reposts and other authors
            if p["record"]["createdAt"] &lt; since:
                return out
            if p["uri"] not in logged:
                out.append(("NOT IN LOG", p["uri"]))
        cursor = d.get("cursor")
        if not cursor:
            return out
    return out

def masto_audit(acct, entries):
    user, host = acct.lstrip("@").split("@")
    base = f"https://{host}/api/v1"
    out = []
    for e in entries:
        code, s = get(f"{base}/statuses/{e['id']}")
        if code in (404, 410):
            out.append(("GONE", f"{e['id']} (HTTP {code})"))
        elif code != 200:                                  # e.g. 401 on instances that require sign-in
            out.append(("UNKNOWN", f"{e['id']} (HTTP {code})"))
        elif s.get("edited_at"):
            out.append(("EDITED", f"{e['id']} at {s['edited_at']}"))
        elif "visibility" in e and s["visibility"] != e["visibility"]:
            out.append(("VISIBILITY", f"{e['id']} {e['visibility']} -&gt; {s['visibility']}"))
        else:
            out.append(("LIVE", e["id"]))
    _, a = get(f"{base}/accounts/lookup?acct={user}")
    since = min(e["created_at"] for e in entries)
    logged, max_id = {e["id"] for e in entries}, None
    while a:
        q = {"limit": 40, "exclude_reblogs": "true"}
        if max_id:
            q["max_id"] = max_id
        _, page = get(f"{base}/accounts/{a['id']}/statuses?{urllib.parse.urlencode(q)}")
        if not page:
            break
        for s in page:
            if s["created_at"] &lt; since:
                return out
            if s["id"] not in logged:
                out.append(("NOT IN LOG", s["id"]))
        max_id = page[-1]["id"]
    return out

def main(path):
    ledger = json.load(open(path))
    results = []
    if ledger.get("bluesky"):
        results += [("bluesky",) + r for r in bsky_audit(ledger["bluesky"]["handle"], ledger["bluesky"]["posts"])]
    if ledger.get("mastodon"):
        results += [("mastodon",) + r for r in masto_audit(ledger["mastodon"]["acct"], ledger["mastodon"]["posts"])]
    for platform, status, ref in results:
        print(f"{status:&lt;11} {platform:&lt;9} {ref}")
    return 0 if all(r[1] == "LIVE" for r in results) else 1

if __name__ == "__main__":
    sys.exit(main(sys.argv[1]))
</code></pre>
<p>The ledger format:</p>
<pre><code class="language-json">{
  "bluesky": {"handle": "a1lane.bsky.social",
              "posts": [{"uri": "at://did:plc:.../app.bsky.feed.post/3n3kgqkdstc2p",
                         "created_at": "2026-11-30T19:11:24.170Z",
                         "text": "Health checks can pass while..."}]},
  "mastodon": {"acct": "a1lane@mastodon.social",
               "posts": [{"id": "117706975710052694",
                          "created_at": "2026-11-30T19:11:53.546Z",
                          "visibility": "public"}]}
}
</code></pre>
<h2>The bug I hit on the first run</h2>
<p>My first version compared the logged text with <code>record.text</code> directly, and one of our three Bluesky posts came back CHANGED. Nobody had touched it.</p>
<pre><code>CHANGED 3n3l2z6qvdc2s 'ed.) a1lane.ai/docs/prove-i...'
LIVE 3n3ktzphqdk2d 'elf. Same key, no second post.'
LIVE 3n3kgqkdstc2p 'd out. Missing = page someone.'
</code></pre>
<p>The stored text ended in <code>a1lane.ai/docs/prove-i...</code>. When you post a long link from the Bluesky app, the record keeps a shortened label in <code>text</code> and puts the real URL in a link facet, addressed by byte offsets. My log had the full URL.</p>
<p>That's why the script has <code>bsky_text()</code>: it swaps each link facet's byte range for its full URI before comparing. Without it, every Bluesky post with a long link looks edited.</p>
<h2>The runs, pasted</h2>
<p>All six of our posts from Nov 30, logged correctly:</p>
<pre><code>$ python3 profile_audit.py ledger-real.json
LIVE        bluesky   at://did:plc:ovtfocgjbfeal76o2nfqkee6/app.bsky.feed.post/3n3l2z6qvdc2s
LIVE        bluesky   at://did:plc:ovtfocgjbfeal76o2nfqkee6/app.bsky.feed.post/3n3ktzphqdk2d
LIVE        bluesky   at://did:plc:ovtfocgjbfeal76o2nfqkee6/app.bsky.feed.post/3n3kgqkdstc2p
LIVE        mastodon  117706975710052694
LIVE        mastodon  117707947768459790
LIVE        mastodon  117708443254169201
exit=0
</code></pre>
<p>Now leave one post per platform out of the ledger. This is what a post you didn't send looks like:</p>
<pre><code>$ python3 profile_audit.py ledger-missing-entry.json
LIVE        bluesky   at://did:plc:ovtfocgjbfeal76o2nfqkee6/app.bsky.feed.post/3n3l2z6qvdc2s
LIVE        bluesky   at://did:plc:ovtfocgjbfeal76o2nfqkee6/app.bsky.feed.post/3n3kgqkdstc2p
NOT IN LOG  bluesky   at://did:plc:ovtfocgjbfeal76o2nfqkee6/app.bsky.feed.post/3n3ktzphqdk2d
LIVE        mastodon  117706975710052694
LIVE        mastodon  117708443254169201
NOT IN LOG  mastodon  117707947768459790
exit=1
</code></pre>
<p>A ledger with four faults: a Bluesky post id that doesn't exist, a Mastodon id that doesn't exist, logged text with "30 min" changed to "20 min", and a post logged as unlisted that is public:</p>
<pre><code>$ python3 profile_audit.py ledger-faults.json
LIVE        bluesky   at://did:plc:ovtfocgjbfeal76o2nfqkee6/app.bsky.feed.post/3n3l2z6qvdc2s
LIVE        bluesky   at://did:plc:ovtfocgjbfeal76o2nfqkee6/app.bsky.feed.post/3n3ktzphqdk2d
CHANGED     bluesky   at://did:plc:ovtfocgjbfeal76o2nfqkee6/app.bsky.feed.post/3n3kgqkdstc2p
GONE        bluesky   at://did:plc:ovtfocgjbfeal76o2nfqkee6/app.bsky.feed.post/3n3zzzzzzzz2a
VISIBILITY  mastodon  117706975710052694 unlisted -&gt; public
LIVE        mastodon  117707947768459790
LIVE        mastodon  117708443254169201
GONE        mastodon  117706975710052000 (HTTP 404)
exit=1
</code></pre>
<p>Our own posts have never been edited, so for EDITED I pointed it at the official @Mastodon account and one of its posts from July 7 that the API reports as edited. The other 19 posts on that profile since then are NOT IN LOG, because they aren't in my one-line ledger, so I filtered them out:</p>
<pre><code>$ python3 profile_audit.py ledger-edited.json | grep -v "NOT IN LOG"
EDITED      mastodon  116880274053020002 at 2026-07-07T19:30:22.285Z
exit=1
</code></pre>
<h2>What it can't tell you</h2>
<ul>
<li>GONE doesn't say why. A Mastodon 404 can mean deleted, followers-only or a direct message; a signed-out read can't tell them apart. On Bluesky, a post missing from <code>getPosts</code> was deleted or isn't being served by the public AppView.</li>
<li>Bluesky has no edit button, so CHANGED is rare. It catches a record rewritten through the API, or a mistake in your own log.</li>
<li>NOT IN LOG includes replies and posts you made by hand. If you post by hand, log those too, or the audit will be noisy.</li>
<li>It only reads public data. Followers-only Mastodon posts need an authenticated read, which this script doesn't do on purpose.</li>
</ul>
<h2>Running it</h2>
<p>Put it on a daily cron, and send the output somewhere you read when the exit code is 1. Look at every NOT IN LOG line the same day. If one is a post you didn't write, end sessions on that account before anything else.</p>
<h2>Where A1 Lane fits</h2>
<p>A1 Lane, the scheduler I build, reads each post back right after publishing and keeps a receipt, which is a ready-made ledger for this script; the later checks for deletions, edits and posts you never sent are what the script adds. How each platform confirms a post: <a href="https://a1lane.ai/docs/receipts-by-platform?utm_source=hashnode&amp;utm_medium=post&amp;utm_campaign=delivery-receipts&amp;utm_content=p20261201-23-hookR">https://a1lane.ai/docs/receipts-by-platform?utm_source=hashnode&amp;utm_medium=post&amp;utm_campaign=delivery-receipts&amp;utm_content=p20261201-23-hookR</a></p>
<h2>Sources (read Dec 1 2026)</h2>
<ul>
<li>Hussein Saleh, "19 Fake Meta Ads Manager Apps Passed App Store Review in 12 Days": <a href="https://husseinsaleh.com/2026/12/01/fake-meta-ads-manager-apps-pass-app-store-review-apple-ads/">https://husseinsaleh.com/2026/12/01/fake-meta-ads-manager-apps-pass-app-store-review-apple-ads/</a> (HN discussion: <a href="https://news.ycombinator.com/item?id=50714812">https://news.ycombinator.com/item?id=50714812</a>)</li>
<li>Rajan Nishad, "I let AI agents run my production site for 6 months. Here's everything they broke.": <a href="https://dev.to/rajan_nishad/i-let-ai-agents-run-my-production-site-for-6-months-heres-everything-they-broke-1mdh">https://dev.to/rajan_nishad/i-let-ai-agents-run-my-production-site-for-6-months-heres-everything-they-broke-1mdh</a></li>
<li>Bluesky API, app.bsky.feed.getPosts and getAuthorFeed: <a href="https://docs.bsky.app/docs/api/app-bsky-feed-get-posts">https://docs.bsky.app/docs/api/app-bsky-feed-get-posts</a></li>
<li>Bluesky rich text facets: <a href="https://docs.bsky.app/docs/advanced-guides/post-richtext">https://docs.bsky.app/docs/advanced-guides/post-richtext</a></li>
<li>Mastodon statuses API (edited_at, visibility): <a href="https://docs.joinmastodon.org/entities/Status/">https://docs.joinmastodon.org/entities/Status/</a></li>
<li>Mastodon accounts API (lookup, statuses): <a href="https://docs.joinmastodon.org/methods/accounts/">https://docs.joinmastodon.org/methods/accounts/</a></li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Run a weekly canary post to catch a scheduler that broke silently]]></title><description><![CDATA[This post was drafted with AI assistance. The script was run and every claim checked against its source before publishing. Disclosure: I'm the maker of A1…]]></description><link>https://a1lane.hashnode.dev/run-a-weekly-canary-post-to-catch-a-scheduler-that-broke-silently</link><guid isPermaLink="true">https://a1lane.hashnode.dev/run-a-weekly-canary-post-to-catch-a-scheduler-that-broke-silently</guid><category><![CDATA[monitoring]]></category><category><![CDATA[Devops]]></category><category><![CDATA[Python]]></category><category><![CDATA[social media]]></category><dc:creator><![CDATA[A1 Lane]]></dc:creator><pubDate>Tue, 01 Dec 2026 10:08:21 GMT</pubDate><content:encoded><![CDATA[<blockquote>
<p>This post was drafted with AI assistance. The script was run and every claim checked against its source before publishing.</p>
<p>Disclosure: I'm the maker of A1 Lane (a1lane.ai), a social scheduler that reads each post back from the platform and records a receipt. It is mentioned here as the example; everything in the code works without it.</p>
</blockquote>
<p>By the end of this you will have one post a week that exists only to prove your scheduler still works, and a short script that looks for it from the outside and exits non-zero when it is missing. The script reads public APIs only, needs no tokens, and I ran it on November 30 against three accounts. All three were fresh. A made-up marker on a live account came back missing, which is the failure the alert is for.</p>
<h2>A scheduler that broke last month looks exactly like one that works</h2>
<p>Benjamin Cane's post "If you want failover to work well, use it often" hit the Hacker News front page over the weekend. His point is that a warm standby passes its health check while its credentials expire and its firewall rules drift, because the health check does not exercise the path real traffic uses. In his words: "Finding out your failover has flaws during an emergency is the worst time."</p>
<p>A social scheduler fails the same way. The dashboard says "scheduled" and later says "sent", but the token behind the connection was revoked when you changed your password, or the app lost a permission, or the platform rejected the post and the error was swallowed. Nothing in the scheduler's own view changes, because the scheduler is grading its own homework.</p>
<p>The fix is Cane's fix: use the path on purpose, on a schedule, and check the result from the far end. That is what a canary post is.</p>
<h2>The canary is a real post, checked by a reader that is not your scheduler</h2>
<p>There are three parts. First, pick a channel where anyone can read your posts without logging in; Bluesky and Mastodon both expose an account's recent posts through public, unauthenticated endpoints, which is why the script below covers those two. Second, schedule one post per week through the scheduler you want to trust, containing a marker that changes every week, like <code>canary 2026-W49</code>.</p>
<p>Third, a few hours after the canary should have gone out, run a check that asks the platform for the marker and never asks the scheduler. If the marker is there and the post is public, the whole chain worked: the scheduler fired, the credential was valid, the platform accepted the post and made it visible. If it is not there, something in that chain is broken, and you found out on a Monday instead of during a launch.</p>
<p>Send the canary from the same account and the same connection as your real posts. A canary from a separate test connection only proves that the test connection works, which is the stale-standby problem all over again.</p>
<h2>The check reads the platform and nothing else</h2>
<p>Here is the full script. It uses only the Python standard library, so it runs anywhere Python 3 does.</p>
<pre><code class="language-python">#!/usr/bin/env python3
"""Weekly canary check for a scheduler: did the canary post actually show up?

Reads public, unauthenticated APIs only (Bluesky AppView, Mastodon REST).
  python3 canary_check.py --bluesky HANDLE --marker "canary 2026-W49"
  python3 canary_check.py --mastodon user@instance --marker "canary 2026-W49"
  python3 canary_check.py --bluesky HANDLE --max-age-days 8   # newest post too old?
Exit 0 = found / fresh, 1 = missing / stale (alert), 2 = could not check.
"""
import argparse, datetime as dt, html, json, re, sys, urllib.parse, urllib.request

def get(url):
    req = urllib.request.Request(url, headers={"User-Agent": "canary-check/1.0"})
    with urllib.request.urlopen(req, timeout=20) as r:
        return json.load(r)

def bluesky_posts(handle, limit=30):
    q = urllib.parse.urlencode({"actor": handle, "limit": limit, "filter": "posts_no_replies"})
    feed = get(f"https://public.api.bsky.app/xrpc/app.bsky.feed.getAuthorFeed?{q}")["feed"]
    for item in feed:
        p = item["post"]
        if p["author"]["handle"] != handle:   # skip reposts of other people
            continue
        yield p["record"]["createdAt"], p["record"].get("text", ""), "public", p["uri"]

def mastodon_posts(acct, limit=30):
    user, instance = acct.lstrip("@").split("@")
    a = get(f"https://{instance}/api/v1/accounts/lookup?acct={urllib.parse.quote(user)}")
    sts = get(f"https://{instance}/api/v1/accounts/{a['id']}/statuses?limit={limit}&amp;exclude_reblogs=true")
    for s in sts:
        text = html.unescape(re.sub(r"&lt;[^&gt;]+&gt;", " ", s["content"]))
        yield s["created_at"], text, s["visibility"], s["url"]

def parse(ts):
    return dt.datetime.fromisoformat(ts.replace("Z", "+00:00"))

def main():
    ap = argparse.ArgumentParser()
    ap.add_argument("--bluesky"); ap.add_argument("--mastodon")
    ap.add_argument("--marker", help="unique text the canary post must contain")
    ap.add_argument("--max-age-days", type=float, default=8)
    a = ap.parse_args()
    try:
        posts = list(bluesky_posts(a.bluesky) if a.bluesky else mastodon_posts(a.mastodon))
    except Exception as e:
        print(f"CHECK FAILED: {e}"); return 2
    now = dt.datetime.now(dt.timezone.utc)
    if a.marker:
        hits = [p for p in posts if a.marker.lower() in p[1].lower()]
        if not hits:
            print(f"MISSING: no recent post contains {a.marker!r} ({len(posts)} posts read)"); return 1
        ts, _, vis, url = hits[0]
        print(f"FOUND: {url} visibility={vis} age={now - parse(ts)}")
        return 0 if vis == "public" else 1
    if not posts:
        print("STALE: account has no posts at all"); return 1
    newest = max(parse(p[0]) for p in posts)
    age = (now - newest).total_seconds() / 86400
    print(f"{'OK' if age &lt;= a.max_age_days else 'STALE'}: newest post {age:.1f} days old ({newest.isoformat()})")
    return 0 if age &lt;= a.max_age_days else 1

if __name__ == "__main__":
    sys.exit(main())
</code></pre>
<p>In marker mode it pulls the account's last 30 non-reply posts, drops reposts of other people's posts, and looks for the marker text. Found and public exits 0. Found but not public exits 1, because a canary that landed as unlisted on Mastodon is still a failure for a scheduler that was told to post publicly. (A followers-only post never shows up in the signed-out list at all, so it comes back MISSING, which is also the right answer.)</p>
<p>Without a marker it falls back to a freshness check: if the newest post is older than eight days the account has gone quiet, which also exits 1. Exit 2 means the check itself could not run, for example a DNS failure or a renamed account. Keep that separate from 1, because "the scheduler is broken" and "the monitor is broken" need different people woken up.</p>
<h2>The November 30 runs show the check failing where it should</h2>
<p>I ran it on November 30 against a public account and against my own two brand accounts.</p>
<pre><code>$ python3 canary_check.py --bluesky bsky.app
OK: newest post 2.1 days old (2026-11-28T17:58:10.156000+00:00)
$ python3 canary_check.py --bluesky a1lane.bsky.social
OK: newest post 0.0 days old (2026-11-30T19:11:24.170000+00:00)
$ python3 canary_check.py --mastodon a1lane@mastodon.social
OK: newest post 0.0 days old (2026-11-30T19:11:53.546000+00:00)
$ python3 canary_check.py --bluesky bsky.app --marker zzz-canary-not-there
MISSING: no recent post contains 'zzz-canary-not-there' (7 posts read)
$ python3 canary_check.py --bluesky bsky.app --marker "That's just science"
FOUND: at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3n3fbpqxoj227 visibility=public age=2 days, 1:14:55.562662
</code></pre>
<p>The first three lines are a freshness check. Bluesky's own account is the known-good control: 2.1 days old, so OK. The next two are A1 Lane's brand accounts, which had published earlier that day, and the script reports them as fresh.</p>
<p>A check that has never failed in front of you is a check you cannot trust, so the last two lines are the marker outcomes. A marker that does not exist comes back MISSING with the count of posts actually read, and a phrase that does exist comes back FOUND with the AT URI, the visibility, and the age down to the second. That age belongs in your alert, since "the post exists" and "the post exists two days late" are different problems.</p>
<h2>The exit code should reach a human, not a log file</h2>
<p>A question people ask about every scheduler is whether it alerts you when a post fails. Any scheduler can alert on the failures it notices; the canary catches the ones it does not. Wrap the script so a non-zero exit sends a message somewhere you will see it on a Monday.</p>
<pre><code class="language-sh">#!/bin/sh
# cron: 0 12 * * 1  /opt/canary/run.sh   (the canary post itself is scheduled for 09:00 UTC Monday)
marker="canary $(date -u +%G-W%V)"
python3 /opt/canary/canary_check.py --bluesky you.bsky.social --marker "$marker"
rc=$?
if [ "$rc" -ne 0 ]; then
  curl -fsS -d "scheduler canary exit $rc: $marker" https://ntfy.sh/your-topic
fi
exit $rc
</code></pre>
<p>The <code>date -u +%G-W%V</code> call produces the ISO week, <code>2026-W49</code> as I write this, so the marker in the post and the marker in the check agree without you touching either. Schedule the canary for the same weekday and hour every week, and run the check three hours later to leave room for a slow queue. Swap the curl line for whatever already wakes you up.</p>
<p>One more rule for when it fails: do not re-send blindly. A DEV post over the weekend described an MCP retry proxy that passed its digest check and still wrote a duplicate row, because the original write had already succeeded. Look at the account first, and if you do re-send on Mastodon set the Idempotency-Key header, or on Bluesky reuse the same rkey, so a second attempt cannot create a second post.</p>
<h2>The canary stays even when the scheduler keeps receipts</h2>
<p>Disclosure: I'm the maker of A1 Lane (a1lane.ai), a social scheduler that reads each post back from the platform and records a receipt. The canary still earns its place next to receipts, because a receipt system is code too, and this check doesn't depend on it.</p>
<p><a href="https://a1lane.ai/docs/prove-it-published?utm_source=hashnode&amp;utm_medium=post&amp;utm_campaign=delivery-receipts&amp;utm_content=p20261130-02-hookA">a1lane.ai/docs/prove-it-published</a></p>
<h2>Sources (all read 2026-11-30)</h2>
<ul>
<li>Benjamin Cane, "If you want failover to work well, use it often", bencane.com, 25 Nov 2026: <a href="https://bencane.com/posts/2026-11-25-failover-often/">https://bencane.com/posts/2026-11-25-failover-often/</a> (Hacker News: <a href="https://news.ycombinator.com/item?id=50689816">https://news.ycombinator.com/item?id=50689816</a>)</li>
<li>rollsolo, "My MCP retry proxy passed a digest check and still wrote a duplicate row", DEV: <a href="https://dev.to/rollsolo/my-mcp-retry-proxy-passed-a-digest-check-and-still-wrote-a-duplicate-row-2eaj">https://dev.to/rollsolo/my-mcp-retry-proxy-passed-a-digest-check-and-still-wrote-a-duplicate-row-2eaj</a></li>
<li>Bluesky API, app.bsky.feed.getAuthorFeed: <a href="https://docs.bsky.app/docs/api/app-bsky-feed-get-author-feed">https://docs.bsky.app/docs/api/app-bsky-feed-get-author-feed</a></li>
<li>Bluesky API, com.atproto.repo.createRecord (client-chosen rkey): <a href="https://docs.bsky.app/docs/api/com-atproto-repo-create-record">https://docs.bsky.app/docs/api/com-atproto-repo-create-record</a></li>
<li>Mastodon API, accounts (lookup, statuses): <a href="https://docs.joinmastodon.org/methods/accounts/">https://docs.joinmastodon.org/methods/accounts/</a></li>
<li>Mastodon API, statuses (Idempotency-Key header): <a href="https://docs.joinmastodon.org/methods/statuses/">https://docs.joinmastodon.org/methods/statuses/</a></li>
<li>A1 Lane docs, "How to prove a social post actually published": <a href="https://a1lane.ai/docs/prove-it-published">https://a1lane.ai/docs/prove-it-published</a></li>
<li>A1 Lane docs, Unconfirmed posts: <a href="https://a1lane.ai/docs/unconfirmed">https://a1lane.ai/docs/unconfirmed</a></li>
</ul>
]]></content:encoded></item></channel></rss>