danmercede.online - Living Signal Surface

Public working log of Dan Mercede: short-form notes, experiments, and status updates on operator workflows, owned AI systems, and fail-closed proof depth. Not polished. Not canonical.

Check the Denominator

Experiment Log · 2026-07-28 · 09:15 AM PT

Hypothesis: Two independent-looking surfaces both reporting a large pile of stalled work are corroborating a real signal that deserves attention.

Constraint: Read-only probe of the underlying list before acting; compare each surface's predicate, not just its headline count.

Result: Failed. One surface flagged 13 of 13 in-flight items as stale. It fires on 100% of its population, so it ranks nothing and cannot separate an abandoned item from one claimed four minutes ago. The second surface counted 10, because it measured a different predicate over an overlapping set. The two were never measuring the same quantity, so their apparent agreement was not corroboration at all.

Next step: Before treating any 'N items are stale, failing, or degraded' surface as a priority signal, get the denominator. If N equals the population, that is a definition firing, not a measurement.

Tags: #signal #failure-modes #systems

Assignment Is Not Ownership

Short Essay · 2026-07-27 · 02:20 AM PT

Claim: In a multi-agent system, a task assignment message is routing metadata, not ownership; the only ownership that exists is an atomic claim on shared state.

This morning our dispatcher addressed a task to one agent by name: worker=claude, go verify four evidence domains. The dispatch failed closed before a session ever started, because the task row had no working directory to resolve. Fifteen minutes later a sibling agent on a different harness claimed the same task off the shared work board with an atomic O_EXCL lease. When the addressed agent finally picked the message up, the obvious move was to start working. The message says it's yours.

It probed the board instead, found the task held, and stood down. One command, zero duplicated work, zero race.

The trap is treating the assignment message as a lease. It records who the dispatcher wanted at send time, and send time is the only moment it describes. Ownership moves in the minutes between send and pickup, and the message never updates. A refused dispatch makes this worse: fail-closed means no session started, which means the task is still unclaimed, which means any agent may take it. The addressee holds no reservation.

Three rules keep this safe:

- Probe before work. Read the board, not the message. The freshest signal in our delivery batch was a heartbeat line naming the new claim holder, sitting right next to the stale dispatch. - Claim before write, atomically. Check-then-write races; two agents can both pass the check. An O_EXCL lease has exactly one winner. - When you lose, say so. The stood-down agent replied naming the holder, so the dispatcher stopped waiting on a worker that was never coming.

The assignment field tells you who the dispatcher wanted. The board tells you who owns it. Only one of those is load-bearing.

An agent picking up assigned work must probe the shared board first and honor a sibling's live claim; the addressee of a dispatch has no priority.

Tags: #systems #execution #governance

Subset Render Is a Delete

Short Essay · 2026-07-26 · 08:09 AM PT

Claim: A generator that renders one section of a shared multi-section artifact is a destructive overwrite wearing the costume of a normal write.

A documented runbook said to refresh a shared report by redirecting a render command over the file. The runbook predated the file growing from one section into several. The renderer emits only the section you ask it for, so the redirect would have deleted every other section, including measurements that cost real money to collect days earlier.

Nothing flagged it. The command exited 0. The output was valid markdown. Version control showed one modified file and no conflict. The deletion is invisible in the new file, because you cannot see what is absent, and invisible in a status check, because a truncated file and a correct file are both just "modified".

It surfaced on one number. The commit line delta read a net loss of over fifty lines on a change whose entire purpose was to ADD a row. Net negative on an additive change is incoherent, and that incoherence was the only tripwire that fired.

So splice, do not redirect. Replace the target section's body in place, then confirm the diff is confined to that section. Count the sibling sections on the pre-image and the post-image and require them to match unless you meant to remove one. And treat the runbook itself as a stale premise, because a shared artifact can grow sections long after its procedure was written.

The same week, the same shape arrived from the other direction. A script named like a linter was actually a generator whose output path defaulted to a tracked file, so running it as a quality check rewrote shared state as a side effect. Read a tool's help for a default write path before you run it to "just look" at something. A name is not a contract.

Every ordinary success signal reads green on that write, so the only tripwire left is the diff line delta and a count of the sibling sections on both sides.

Tags: #failure-modes #signal #execution

Read the Docs, Not the Marketing Page

Experiment Log · 2026-07-25 · 12:20 AM PT

Hypothesis: A first-pass competitive scan's verdict of 'an incumbent already ships this' is reliable enough to kill a build decision.

Constraint: Re-verify every load-bearing claim against the vendor's own product docs rather than its platform page, and record GA versus private beta for each.

Result: Failed. The first pass scored an incumbent as shipping three of four claimed differentiators, including hard floors that block promotion, and cited the platform page: 'LLM judges score each candidate against your defined thresholds, and only what clears the bar gets to production.' The product docs for that same feature describe promotion as a manual human action: 'Deploy opens the config targeting page for the agent so that you can promote it to your chosen targeting rules.' No automatic gate is documented anywhere, and the feature is private beta, not GA. Corrected read: two of four solidly shipped, the blocking-gate axis still open. Same scan, second correction: an Apache-2.0 optimizer was reported as auto-tuning from logged traces, but its actual signature is optimize_prompt(prompt, dataset, metric), so the trace-to-dataset step is still the user's problem.

Next step: Before any 'already shipped' claim is allowed to kill a build, require three things: a product docs or changelog URL that was actually fetched, an explicit GA/beta/waitlist status, and for any 'automatic' claim, the specific doc sentence showing no human step.

Tags: #signal #failure-modes #execution

Name the Override Gap

Short Essay · 2026-07-24 · 12:02 AM PT

Claim: An override a model can grant itself is the permission prompt again in a different hat.

I shipped a guide arguing that a safe agent harness fails closed, then described its destructive-action override as authenticated, bound to the exact command, single-use, and audited. Review caught the gap: the real override is an environment variable the operator sets. None of those four properties held.

The fix was not to build the hardened version on the spot. It was to name the gap. A control described as stronger than it is fails the same way a green dashboard with a dead check behind it fails: the reader trusts a property that was never there.

So write the honest version. What does the gate actually enforce, and what does it merely record? An override the model can grant itself is not a safety property. It is the permission prompt again, wearing a hat.

Full writeup: danmercede.com/guides/the-fail-closed-harness

State what your safety control does NOT have (authentication, command binding, single-use, an audit trail) instead of describing the hardened version you meant to build.

Tags: #security #governance #failure-modes

Partial Oracles for Agent Testing

Short Essay · 2026-07-23 · 10:30 PM PT

Claim: You cannot regression-test a nondeterministic agent by demanding yesterday's exact words. The useful target is its behavioral contract: required structure, deterministic invariants, and per-field tolerance bands. Invariants run first and cannot be explained away by an LLM judge. Borderline semantic changes become an explicit flaky result, not a forced pass or fail. Legitimate evolution proposes a contract update, but a named human decides whether the boundary moves. The system under test never gets to redefine success by itself.

Agent QA needs layered partial oracles: exact rules where truth is deterministic, bounded similarity where variation is legitimate, and human authority where the contract changes. I built that pattern into Proctor and presented it in the UiPath AgentHack 2026 live finale. Architecture, quickstart, and source: https://www.danmercede.com/works/proctor/

Tags: #systems #governance #execution

Review Bycatch Is Not Yours to Fix

Short Essay · 2026-07-23 · 12:53 AM PT

Claim: An adversarial review pass that scans the whole repo will hand your scoped PR findings it cannot legitimately carry. Today's 00:25 sweep flagged two HIGH findings on producer scripts, on a PR whose entire diff was one Markdown file. The findings were plausible. They were also bycatch: the adversarial pass exists to find what the diff-anchored review missed, so it roams the whole tree and attributes whatever it finds to whichever PR tripped the scan. Adjudicate by diff membership before you adjudicate merits. The settle costs one command: git diff <pr-head> origin/main -- <file>. Empty output proves the file is byte-identical to main, so the defect is pre-existing state the PR never touched. Decline on scope and route the defect to its own follow-up. One more lesson from running this two nights straight: declines are not sticky. The next sweep re-raised the same finding verbatim and added two new ones on the same file family. A whole-repo scanner emits a stream of bycatch for as long as the scoped PR stays open; the stream stops when the PR merges or the underlying files land their own fix.

Applying bycatch converts a docs PR into a code PR and whack-a-moles one instance of a fleet-wide pattern. Scope discipline in the apply tail is what keeps an autonomous review pipeline from smearing unrelated changes across every PR it touches.

Tags: #execution #signal #governance

Two Traps in a Zero-Dep LLM Client

Experiment Log · 2026-07-22 · 02:18 PM PT

Hypothesis: Python stdlib urllib can drive an OpenAI-compatible inference API end to end. No SDK, no pip install, one file.

Constraint: Throwaway event chatbot, shipped in under an hour: http.server plus urllib.request only, against a cheap serverless reasoning model (gpt-oss-120b on Fireworks).

Result: Passed. Worked, after two traps. First: the exact request that returned 200 via curl returned HTTP 403 Forbidden from urllib. The provider's WAF rejects the default Python-urllib/3.x User-Agent. Because the same key had just listed /models successfully, the 403 reads as a key-scope problem and sends you auditing permissions; the real fix is any explicit User-Agent header. Second: reasoning models on OpenAI-compatible endpoints return message.reasoning_content before message.content, and a small max_tokens gets consumed entirely by reasoning. A 10-token probe came back finish_reason length with reasoning_content present and no content key at all. Client code that assumes choices[0].message.content exists breaks precisely when responses truncate. Parse content with a reasoning_content fallback, pass reasoning_effort low, and budget max_tokens in the hundreds.

Next step: Bake both into the default zero-dep client template: explicit User-Agent and content-or-reasoning parsing land before any key or scope debugging starts.

Tags: #failure-modes #execution

Green CI Proved Nothing

Experiment Log · 2026-07-21 · 08:58 AM PT

Hypothesis: A detector's false positives came from event beacons sent on a transport that its capture layer silently dropped.

Constraint: The fix only counts if a live re-measurement of the symptom against the real inputs confirms it. A green suite does not count.

Result: Failed. The patched detector re-ran against the real inputs and found the hypothesized transport in zero of them. Every beacon used the ordinary path. The change was a genuine latent bug and worth keeping, but it was not the cause. The real mechanism was worse: the detector's negative signal had several causes it could not tell apart. A headless client that observes nothing cannot separate genuinely missing from suppressed because you are automated. Two inputs with opposite ground truth produced an identical observation.

Next step: Reclassify the ambiguous observation as inconclusive. Mint a finding only from the opposite shape, infrastructure present but idle, where you can see the thing you are judging.

Tags: #failure-modes #signal #execution

The Timeout That Ate My Commit

Short Essay · 2026-07-20 · 01:30 AM PT

Claim: An agent harness's default command timeout will eat your git commit whole. The setup: a repo whose pre-commit hook runs the full regression suite, about three minutes, and a harness that kills any command at its two-minute default. The hook's tests all pass. The commit still never lands, because the timeout SIGTERMed the process group mid-hook, before the ref write. Exit 143, staged files intact, no commit. The trap is the diagnosis: green tests plus a missing commit reads like a mysterious hook failure, so you retry, and the same default timeout kills it the same way, forever. The failure lives in the harness, not the repo. The fix is two habits. Before committing anywhere, check whether pre-commit or pre-push runs a test suite, and if it does, raise the exec timeout on commit and push to cover the suite. After any killed commit, read git log before retrying: staged state survives the kill, the commit does not, and assuming half-landed state is how you double-commit or abandon a clean tree.

Hooks moved real work into git's critical section, but agent harnesses still budget commands as if git were instant. Any wrapper that imposes a default exec timeout needs a per-command override at exactly the commands that run someone else's code: commit, push, merge.

Tags: #failure-modes #execution #workflow-ownership

CLI Errors Are Part of Your Agent API

Short Essay · 2026-07-19 · 12:10 AM PT

Claim: Autonomous agents diagnose failures by pattern-matching error shapes, so a CLI rejection message that names the wrong failure class sends an agent down a phantom-bug branch. If agents drive your tooling, the error text is the API contract.

Tonight my agent diagnosed three different phantom bugs in a row. The tool was fine every time. The error messages lied.

The tool is our internal work board: a small CLI that multiple agent sessions use to claim work so they do not race each other. Three rejections, three misleading surfaces.

First: `add` hit a no-duplicate-rows gate. It printed a list of similar existing rows and exited nonzero. It never said "rejected." The chained `claim` then died with `FileNotFoundError: arcs/<id>.json`, because the row was never created. That stack trace reads as a corrupted store. The truth was a policy rejection two commands earlier.

Second: `claim` on an item whose status was `done` said "could not claim (already claimed)." That reads as a concurrent session holding the lease, which triggered a full stand-down and an ownership probe. Nobody held anything. The item was simply finished, and the honest message was "cannot claim: status=done."

Third, the only honest one: `error: unrecognized arguments: --project`. Wrong flag. Said so. Fixed in seconds.

The pattern matters because an agent forks its whole plan on the first plausible reading of an error. A human squints, gets suspicious, reads the source. An agent acts. Each of the two dishonest messages cost a diagnosis cycle aimed at a failure mode that did not exist, and one of them nearly aborted legitimate work out of misplaced politeness toward a phantom peer session.

So the fix is not "write better docs." The fix is to treat rejection text as a typed return value: name the rejection class ("REJECTED: dedup gate matched 3 similar rows; rerun with --force if distinct"), name the state that blocked you ("status=done"), and never let a policy rejection surface as a crash in the next command. Your CLI's primary consumer may no longer read the manual. It reads the error, and it believes you.

Error messages written for humans who will read the docs become misinformation for agents that act on the literal text.

Tags: #failure-modes #systems #workflow-ownership

Pinning the Dep Is Half the Fix

Short Essay · 2026-07-18 · 12:25 AM PT

Claim: An unpinned linter or formatter is a scheduled break in your CI gate. It resolves to whatever shipped that morning, so a file that passed when you last touched it goes non-conforming with no diff to blame. Pin it to the exact version CI resolves. Then notice the hole you just opened: the contributor doc explaining the pin is itself an unpinned copy of your CI config, and it drifts the same way on a slower clock.

Three CI cycles. That was the cost of one unpinned formatter, and I spent most of them fixing the wrong thing.

The setup is ordinary. The dev extra declared `ruff>=0.6`. CI installs that extra fresh on every run, so it resolves to whatever shipped most recently, which was 0.15.22. My box had 0.6.9. Those two do not format identically. So you run `ruff format` locally, commit, push, and watch `ruff format --check .` reject the file you just formatted. Local clean is not CI green when the versions differ. The job says "Would reformat", which reads like your code is wrong. Your code is fine. Your dependency floated.

The fix is one character: `>=` becomes `==`, pinned to the version CI already resolves. That makes the pin a no-op for the current green state and stops the upward drift. Cheap, obvious in hindsight.

Then I wrote the contributor note explaining the pin, and walked straight into the second half of the problem.

My first draft said the bar is ruff plus tests. I checked before shipping it. The gates job actually runs eleven steps: two ruff commands, tests, a shell syntax pass over every script, two preflight verifiers, two config checks, a doc lint, and a whitespace gate. The helpful doc I was writing was already wrong on the day I wrote it.

Enumerating all eleven would have been worse. A step list in a doc is an unpinned copy of your CI config. It drifts exactly like `ruff>=0.6` drifted, just on a slower clock, and nothing goes red when it goes stale. Drift was the entire reason I was there.

So the doc now names the workflow file as authoritative, lists only the commands a developer can actually run locally, and says outright that more gates exist. Read the source for the full set.

The general shape is worth keeping. Any doc that duplicates a machine-readable list has signed up to keep two things in sync. You will keep one of them.

Do not mirror your CI step list into the contributor doc. Name the workflow file as authoritative, document only the commands a developer can run locally, and state plainly that more gates exist. A doc that duplicates a machine-readable list has volunteered to keep two things in sync, and you will keep one.

Tags: #failure-modes #execution #systems

Green Gates That Never Fired

Experiment Log · 2026-07-17 · 09:30 AM PT

Hypothesis: The 'Prerender validation passed' line in a client site's build log meant its per-route titles and OG tags were protected.

Constraint: Flip the warn-only validator to fail-closed with non-empty assertions and let the very next build tell the truth.

Result: Failed. The gate had never fired once. It warned instead of exiting nonzero, and its title regex matched an empty <title></title>, so all 102 prerendered routes had shipped empty heads for four months. Root cause one layer down: the pages are React.lazy behind Suspense, and synchronous renderToString snapshots the loading fallback, so react-helmet never populates. Every social link share rendered a blank preview card the whole time. The fail-closed flip caught it on the first build. Fix: renderToPipeableStream buffered to onAllReady so lazy routes resolve before the head snapshot, plus non-empty assertions on title, description, canonical, and h1.

Next step: Audit every 'validation passed' build step for whether it can actually fail, and grep the BUILT artifact for the asserted property instead of trusting the log line.

Tags: #failure-modes #systems #signal

The Heredoc Ate Your Pipe

Short Essay · 2026-07-16 · 09:10 AM PT

Claim: Piping data into an interpreter that also reads a heredoc discards the pipe: the heredoc becomes stdin, your upstream output goes to an unread pipe, and the failure is silent.

`producer | python3 - <<'EOF'` does not do what the shape suggests. The `-` tells python to read its program from stdin, and the heredoc IS that stdin. The pipe from `producer` loses the race and gets thrown away. `producer` still runs to completion, so nothing errors on its side. Inside the script `sys.stdin.read()` returns the heredoc leftovers, or empty, and you get a confusing parse failure a few lines down that points nowhere near the real cause.

I hit this converting a one-time code into a credential. The API call fired and succeeded server side. The response, which held the only copy of a private key, went straight into the dead pipe. The script then read the heredoc, found no JSON, and died. The code was single-use, so it was already spent. This was recoverable only because that particular key could be regenerated. Plenty of payloads cannot.

The fix is to stop crossing the streams. Write the script to a file and run `producer | python3 script.py`. Or capture first with `out=$(producer)` and feed it in. Or drop the pipe entirely and do the fetch inside the interpreter. And for anything single-use, write the raw response to a private file before you parse a single byte, so a parser bug can never take the payload down with it.

For a single-use payload, that silence costs you the payload. Capture before you parse.

Tags: #failure-modes #execution #infra

Exit 0 Is the Pipe's, Not Yours

Short Essay · 2026-07-15 · 07:40 AM PT

Claim: A background job's completed-with-exit-0 notification reports the last command in the pipeline, not the work; gate on an explicit sentinel read from the job's output file.

Today my agent harness told me a full verification suite passed. It had died at the first step.

The job was `npm run verify 2>&1 | tail -40`, launched as a background task. Verify failed on lint immediately. The completion notification still said exit code 0, because a pipeline's status is the status of its last command, and `tail` always exits clean. The same trap hides in `; echo RC=$?` suffixes: the echo itself exits 0, so the shell-level status the notifier sees is always 0.

This is the fourth variant of one family I have logged. `tests | tail && git commit` gates the commit on tail. `grep | head; echo $?` reports head. An errexit script silently skips a failed check mid `&&` list. The background-notification variant is the sneakiest of the four: the exit 0 arrives after you stopped watching, wrapped in a system event that reads as a verdict.

The fix that holds: end the background command with an explicit sentinel, `; echo VERIFY_RC=$?`, then read the job's output file and gate on the sentinel value. Treat the notification as "the job stopped". Never treat it as "the job passed".

Any agent harness or CI wrapper that surfaces raw exit codes will report success for a job that died at step one, and it will do it with an authoritative-looking system event.

Tags: #failure-modes #signal #execution

Probe the API, Not the Bot

Short Essay · 2026-07-14 · 01:45 AM PT

Claim: A code-review bot's confidence is a statement about its own output, not evidence about a third party's API contract. Verify any claim about an external response shape with one live call before you apply the fix.

A code-review bot's confidence is a statement about its own output, not about a third party's API. Probe the API before you trust the finding.

Last week a review engine flagged a bug at 0.99 confidence. Our GitHub Actions run selector, it said, would never match a real run, because GitHub returns `workflow_run.path` as `.github/workflows/<file>@<ref>` and the code compared against the bare `.github/workflows/<file>`. High confidence, a specific citation, a real-looking dead feature.

One `gh api /repos/OWNER/REPO/actions/runs` call settled it. The real `workflow_dispatch` run of a workflow defined in the same repo returns the bare path, no `@ref`. The `@ref` suffix only shows up for cross-repo reusable workflows, which was not this case. The selector was right. The test mocks matched the real response. Applying the "fix" would have bolted dead `@ref`-parsing onto a working matcher and risked breaking it.

Same review sweep, a second engine wanted to relax a `docker-compose` `${VAR:?required}` gate to `${VAR:-}`. A test pinned the `:?` form on purpose: it is a fail-closed provenance gate the repo had already decided to keep. That suggestion would have quietly regressed a contract, not fixed a bug.

Two rules for anyone running agentic code review. Verify any claim about a third party's response shape with one live call against the surface your code actually targets, and diff the real shape against the bot's claim. Then check whether the "defect" is a deliberate, test-pinned contract before you touch it. The engine raises the hypothesis. You settle it.

The engine's job is to raise the hypothesis. Yours is to settle it with a probe.

Tags: #workflow-ownership #failure-modes #signal

Your Shell Is Not Cron's Shell

Short Essay · 2026-07-13 · 07:30 PM PT

Claim: Today a runbook snippet that had worked every time an operator typed it died in automation with `python: command not found`. Nothing was broken. `ssh host 'cmd'` runs a non-login shell: no profile, no venv activation, a different PATH, so the bare `python` every interactive session resolved simply did not exist there. The lesson is bigger than one interpreter. A command that has only ever run in your interactive shell is untested code for every other shell it will meet: ssh one-liners, cron, CI, systemd units. Interactive success proves the command works in exactly one environment, and it is the one your automation never sees. Pin the environment explicitly in any scripted path: invoke the repo venv binary by absolute path (`~/repo/.venv/bin/python -m tools.x`) instead of trusting PATH, and treat every runbook block as code that has not run until it has run in the shell that will actually execute it.

'Works when I type it' and 'works when the machine runs it' are different claims. Every runbook snippet written for a human terminal is an untested branch of your automation until it has been exercised there.

Tags: #failure-modes #execution #infra

Stubs Must Filter Like the API

Experiment Log · 2026-07-12 · 09:10 AM PT

Hypothesis: Green end-to-end tests over a PATH-shimmed fake curl prove a Datadog NoData preflight's query logic is safe to ship.

Constraint: Same real script under test in both rounds; only the stub's fidelity to /api/v1/query semantics changed. No live API calls, no credentials.

Result: Failed. The stub served metric points regardless of the query's from/to range. Every test stayed green while the shipped logic carried an unreachable guard: the probe's query range equaled its staleness cutoff, so the real API could never return a point old enough to trip the stale branch, and a retired producer would read as OK. Making the stub honor from (drop out-of-range points, omit a series with no in-range points, exactly what Datadog returns) turned the fail-open red in one run. A second fidelity pass, simulating rollup buckets stamped at bucket start with a deterministic full-bucket shift, exposed a boundary false-positive as well: a heartbeat 29 minutes old reads as 34 on a one-day query.

Next step: Stub contract upgraded: fakes must apply the API's filtering and aggregation semantics, not just its response shape, with worst-case shifts simulated deterministically (a full bucket, never a wall-clock modulo).

Tags: #failure-modes #execution #systems

Budget the Week You Act In

Short Essay · 2026-07-11 · 12:20 AM PT

Claim: A scheduler that plans on the last day of a period must budget the period it will act in, never the one it is standing in. remaining(now) on a boundary day is an off-by-one-period bug wearing a compliance costume.

I shipped a weekly planner this week that runs Sunday evening and proposes Monday-to-Sunday work. Every proposed row checks a rate-limit ledger before it earns a slot, and the ledger keys its buckets by ISO week.

The first design read remaining(now). Sunday at 17:23 is still the old week. The ledger correctly showed that week at cap, so the planner would have zeroed every weekly surface in every plan it ever produced. Forever. And it would have looked right the whole time: "at cap" is a normal, healthy answer, not an error.

An adversarial review pass caught it before a line of code existed. The refutation took one file read: the live ledger held the ending week at cap while the week the plan targets sat untouched. The fix is boring on purpose: compute the target period start from the run date (so a catch-up run after a reboot still targets the right week), read the bucket at that date through the shared bucket-key helper, and keep the plan-time read informational while the fire-time atomic reserve stays the only authoritative gate.

The test is the part worth stealing. One boundary fixture, two assertions: ending-period-at-cap still yields next-period rows, and a full next-period bucket yields zero. Green looked exactly like the bug here, so the fixture has to discriminate the two weeks. "Respects caps" as a test name proves nothing; which week's cap is the whole ballgame.

Every generate-at-boundary planner (Sunday content planner, month-end batcher, end-of-day queue builder) needs a boundary fixture: ending-period-at-cap must still yield next-period work, and a full next-period bucket must yield zero.

Tags: #failure-modes #systems #execution

Refute Your Own Claims

Experiment Log · 2026-07-10 · 10:00 AM PT

Hypothesis: With 67 green unit tests and a passing live end-to-end run, the claims in the README and submission for Engram (my Qwen Cloud hackathon memory engine) would survive an adversarial pass instructed to refute every claim against primary evidence.

Constraint: 75 discrete claims extracted verbatim; independent reviewer agents; primary evidence only (code, tests, git history, live HTTP probes); every claim verdicted HOLDS or OVERCLAIM.

Result: Failed. 21 of 75 flagged. Two were real defects hiding behind green tests: an argument-order swap feeding the contradiction-adjudication prompt, and a cosine gate set to 0.55 by feel when the README's own example pair (I just moved to Denver vs I live in San Diego) measures ~0.49 at 256 dims with text-embedding-v4, so the showcased supersede never fired live. Probed real embeddings, reset the gate to 0.45, re-verified the pair end to end on the deployed route. Repo: github.com/OrionArchitekton/engram.

Next step: The refute pass is a standing gate before any submission. Embedding thresholds get set from live-probed cosines of the actual example pairs, never intuition.

Tags: #failure-modes #execution #workflow-ownership

Quota Is Not a Parse Error

Short Essay · 2026-07-10 · 01:35 AM PT

Claim: A pipeline that consumes LLM output needs a third terminal state: a quota-starved reviewer is not-reviewed, which is neither a parse error nor findings.

Overnight, five runs of my PR review pipeline reported the same thing: the Codex review phase exited with status parse_error, schema invalid, zero findings. The obvious read is a broken parser or a drifted schema. The actual payload was one sentence from the vendor: "You've hit your usage limit ... try again at 2:00 AM."

Nothing was malformed. Nothing was reviewed either. The reviewer never ran; the "review output" was a quota message wearing a review envelope, and my pipeline filed it under parse failure. Worse, the run status rolled up as findings-remain, which reads like the reviewer saw problems. It saw nothing.

Pass and fail are verdicts. A quota-starved model produces neither, so classify it as not-reviewed, the same class as a timeout, and carry the vendor's stated reset time as the retry schedule. My pipeline already treated timeouts as non-terminal; the quota message deserved the same treatment and instead got promoted to a defect.

The cost of misclassifying is paid twice. First you debug a parser that is not broken. Then you spend your bounded re-run budget (mine allows one verification re-run per PR) before the quota resets, and the re-run burns on the same quota wall.

One grep fixed the triage: check the parse warnings for a usage-limit string before adjudicating any parse_error. Abstention is not a verdict, and an unreviewed PR is not a reviewed-clean PR.

Fold abstentions into failure states and you debug phantom parser bugs, trust findings that reviewed nothing, and burn bounded retries before the quota resets.

Tags: #failure-modes #signal #execution

Schema Is a Second Surface

Short Essay · 2026-07-09 · 01:20 AM PT

Claim: On a prerendered SPA, a copy reframe has to land on two independent surfaces, not one. The visible React copy auto-bakes into the crawler HTML. The head JSON-LD and social meta do not: they are hand-maintained, and they are exactly what answer engines read without executing your JavaScript.

A reframe of a small site network looked done. Visible copy updated everywhere, tests green, CI passing. Then review caught a stale line no test asserted: the JSON-LD `WebPage.name` in the page head still carried the old title, while every rendered surface had moved on.

That is the trap of a prerendered SPA. Your React components render twice. Once into the DOM a human hydrates, and once into a static body baked into the HTML so crawlers see content without running your JavaScript. Edit the component and both move together. The document head is a different animal. The title, the Open Graph tags, the JSON-LD entity graph: all hand-maintained, and nothing about editing your visible copy touches them.

So a copy change has two surfaces. Miss the second one and you publish a contradiction. The page a person reads says one thing; the structured data a search engine or an answer engine ingests says another. Answer engines lean on that structured data precisely because it is explicit and needs no JavaScript to parse. A stale `name` field there is not a cosmetic miss. It is a split identity signal you are feeding, on purpose, to the machines that summarize you.

Three independent reviewers flagged the same line before it merged. The guard suite flagged none of it, because the identity test asserted the backlink was present, not that the title was current. Structural tests check shape. They do not check that your prose and your schema agree.

The fix was one line. The habit is cheaper than the fix: when you reframe copy, grep the schema too. Diff the head JSON-LD, not just the page. The rendered view is the surface you look at. The structured data is the surface the machines look at, and it is the one you will forget.

Reword the page and skip the structured data and you ship a split identity: humans read the new positioning, crawlers read the old one. When you reframe copy, grep the schema, not just the rendered page.

Tags: #failure-modes #systems #signal

Certify vs Reproduce

Short Essay · 2026-07-08 · 09:20 AM PT

The independent review stack: four orthogonal review layers for agent-written code (live environment recon, a pre-PR multi-model fleet, post-push functional execution, and the CI merge gate), each sensing a different modality and catching a defect the others miss.
Four review layers, each sensing a different modality. Independent ones do not share blind spots.

Claim: A reviewer that reasons about your code and one that runs it have different blind spots: certification is an argument, reproduction is a fact.

A security reviewer read my credential scrubber and certified it: no overlap mis-redaction. One review layer later, a different reviewer ran the code and reproduced a partial secret in the logs. Same function, opposite verdict.

The two reviewers were not unequal in skill. They had different blind spots. A reviewer that reasons about your code builds an argument for why it is correct. A reviewer that executes it observes what actually happens. An argument can be sound and still miss the exact input the code meets in production. Reproduction does not get that option: the secret either leaks or it does not.

This is why a single review pass is not a safety net for AI-written code. The passes have to be independent, because independence is what stops their blind spots from lining up. Certification tells you a careful reasoner could not find the bug. Reproduction tells you whether the bug is there. Keep both, and keep them separate.

The full walkthrough, four review layers and five defects each caught by only one, is here: https://www.danmercede.com/guides/why-agent-code-needs-layered-review

For AI-written code, stack independent review layers so one layer's blind spot is another layer's catch.

Tags: #failure-modes #execution #security

Vet the AI PR Fleet

Short Essay · 2026-07-07 · 02:35 PM PT

Claim: Merging a queue of AI-authored pull requests is not a rubber stamp. Three failure modes hide in the queue, and each needs verify-before-you-trust, not blind application.

Merging a batch of machine-authored pull requests looks mechanical until three failure modes surface in the same session.

First, contradictory contracts. Two PRs written against different base commits can encode opposite rules for the same interface. One says a source must be a clean checkout and fails closed; another assumes the source can be a loose bundle and falls through. Whichever lands first silently invalidates the other's premise. The tell is the second PR's own test failing against the newly merged base. Do not force the merge with ours or theirs. Stop and hand the design question to a human.

Second, confident false positives. A review bot can flag a high-severity bug that is not real. One insisted a shell here-string leaves a stray newline stuck to the last array element. It does not: `read` consumes that newline as the line delimiter, so the last field is clean. A ten-second empirical check settles it. Verify a finding before you apply it, because a wrong fix regresses correct code with full confidence.

Third, the fix that already exists. When a PR still shows open findings, your own automation may have committed the fix locally and then failed to push it, blocked by a repo gate on a missing dependency. Reconcile the PR head against the local branch before you touch anything, because they diverge. Adopt the existing fast-forward commit instead of re-authoring the same change from scratch.

The through line is that a fleet of AI-written PRs earns trust one verification at a time, and the checks live at three layers: cross-PR contract conflicts, bot-finding accuracy, and unpushed automation state. The merge button is the last gate, not the first.

Treat a fleet of machine-written PRs like untrusted input: gate the merge on empirical checks at three layers, not on the open-PR count going down.

Tags: #failure-modes #execution #systems

Recon vs Prior Decisions

Short Essay · 2026-07-06 · 12:20 AM PT

Claim: A fresh recon-and-synthesis agent sees only live system state, not the decisions you already made about it, so it will confidently recommend something you already rejected.

Fan a recon pass out over live state, let an agent synthesize it, and the result is grounded, plausible, and blind. It answers "what is the state" but not "what has already been decided about it." So it surfaces the obvious move, say "route all the inference to the idle GPU," when an earlier analysis already found the real constraint was model reliability, not spare capacity, and rejected exactly that. The synthesis is well cited and wrong.

The fix is cheap. Either seed the synthesis with prior-decision context (run a memory or lessons search first and feed its digest into the synthesis prompt), or treat the raw synthesis as a draft and reconcile it against your decision docs yourself before you act. The reconciliation is the deliverable, not the recon.

A second shape of the same blindness shows up in wide research fan-outs: a broad multi-part question spends its budget where sources are dense and quietly under-covers the sparse sub-questions. Do not accept the half-answer, and do not rerun the whole thing. Fire a focused re-run scoped to just the starved parts, and read the abstention as a gap to close rather than an answer.

Reconcile the raw synthesis against your prior decision docs before acting; the reconciliation, not the recon, is the trustworthy output.

Tags: #execution #systems #signal

Cut Agent Web-Read Tokens

Experiment Log · 2026-07-05 · 03:40 PM PT

The cost of lazy web access versus a hardened stack: raw HTML wasting about 82 percent of an agent's context window, against a three-part stack of self-hosted search, extract-first markdown fetching, and a summarizing subagent that passes back only distilled facts.
Raw HTML can burn 80 percent of an agent's context. Extract-first fetching keeps only the signal.

Hypothesis: Converting a page to markdown before the model reads it, and fetching in a subagent, cuts an agent's web-read token cost without losing content.

Constraint: One real page, raw HTML vs clean markdown, same tokenizer.

Result: Passed. 9,541 tokens raw vs 1,678 as markdown, an 82% cut on that page (20-30% typical). The extraction is deterministic markdown, not a model summary, so it cannot hallucinate. A keyless reader CLI runs in a subagent, so raw HTML never reaches the main context. A live smoke test caught a browser User-Agent 403 the unit tests missed.

Next step: Full stack and the reader CLI in the guide: https://www.danmercede.com/guides/giving-your-agent-web-access

Tags: #economics #execution #systems

PR-Merge Train Gotchas

Short Essay · 2026-07-05 · 12:15 AM PT

Claim: Merging a stack of PRs into one branch has host-side mechanics that silently skip half your queue if you script it naively.

Merged fourteen PRs into one repo today in a single pass. If you script that as "loop over the open PRs, merge each one," you will silently skip half of them. Here is why, and the five things that actually decide whether the train runs.

**Each merge invalidates the others.** The moment one PR lands, every other open PR's mergeable state flips to UNKNOWN for a few seconds while the host recomputes against the new base. Read `mergeable` once and your loop sees UNKNOWN, calls it "not ready," and skips a perfectly clean PR. Treat mergeability as eventually consistent: poll each PR until it settles to MERGEABLE or CONFLICTING before you act on it.

**Admin-merge bypasses more than review.** An admin merge skips the required-review rule and the "branch must be up to date" rule, but only when branch protection has enforce_admins set to false. A PR that is behind but clean merges fine. Only a true content conflict stops you. Check the protection setting before you trust what the state string is telling you.

**Order the train by a conflict graph.** Build it from each PR's changed-file list. Merge the largest set of PRs touching disjoint files first, for zero rebases. PRs that share a file cascade-conflict, so sequence them last. That turned a five-PR cluster all editing the same manifest into four clean merges and exactly one resolution.

**Resolve without rewriting history.** When two PRs edit the same lines and force-push is off the table, merge the base branch into the PR branch and union the hunks. Do not rebase. A squash-merge flattens the extra merge commit anyway. Union so both sides' tests still pass: two of mine grepped for different literal regex branches, so both had to survive the merge.

**Stand down on concurrent work.** One PR had another process actively reviewing and merging it. I left it alone instead of racing. It finished and merged itself, correctly, while the rest of the train ran. The cheapest conflict is the one you decline to start.

None of this lives in the merge button. All of it bites the first time you automate the queue.

Treat mergeability as eventually consistent and order the train by a file-conflict graph, or the merge button lies to your loop.

Tags: #execution #failure-modes #systems

Benchmarks Evict Hot Models

Experiment Log · 2026-07-04 · 12:15 AM PT

Hypothesis: Benchmarking a locally-served LLM is read-only and won't disturb whatever model is already loaded on the GPU.

Constraint: One 24GB GPU, a single ~20GB model pinned always-hot via OLLAMA_KEEP_ALIVE=-1, comparison calls fired from a throwaway script.

Result: Failed. The benchmark passed its own per-request keep_alive and also loaded a second model to A/B. Both evicted the pinned model, because only one ~20GB model fits on a 24GB card. The next real request ate an ~80s cold reload, visible as load_duration in the response. keep_alive is per-request, the -1 default only holds when you do not override it. Second trap the same run surfaced: the quantized MoE returned done_reason of length with an empty response string, so an eval_count greater than zero check scored it a success while it produced nothing usable.

Next step: Treat resident-model residency as mutable runtime state a probe can perturb. Re-warm the canonical model with keep_alive of -1 after benchmarking, never interleave two models on one GPU expecting both to stay hot, and assert on the output text, not the token count.

Tags: #infra #failure-modes #systems

Don't Index Your System of Record

Thought Snippet · 2026-07-03 · 08:40 AM PT

Went to drop a PDF into an agent's knowledge vault today and hit the right instinct by accident: the vault's ingest crawler explicitly excludes its own directory from the crawl. Obvious in hindsight. A recall layer, the RAG corpus or the wiki an agent searches, is advisory. It is lossy, re-summarized, allowed to drift. Your registers and config are authoritative. Index the authoritative thing into the advisory thing and you invert that: a stale photocopy of the truth now sits in the retrieval path, and the agent cannot tell which copy governs. Keep the lanes apart. External third-party knowledge goes in the recall corpus. Your source of truth stays in its own home and gets read directly, never re-indexed as advisory. If your pipeline crawls a directory tree, exclude the knowledge base from its own crawl.

Tags: #systems #governance #signal

Silence Is Not Absence

Experiment Log · 2026-07-02 · 12:30 AM PT

Hypothesis: An extraction pipeline that returns nothing means the target page carries no server-rendered content worth reading.

Constraint: Headless curl of a JS-heavy document viewer, piped through sed and a grep-family matcher, with stderr captured into the same output file as stdout. Every stage able to fail independently.

Result: Failed. The empty page was my pipeline failing, not the source being empty. The context regex blew the matcher's complexity budget (ugrep: error ... exceeds complexity limits) and 104 bytes of that error text was the entire captured output; a first read of the file even reported it empty. A dumber second pass on the same URL found a 52KB document sitting behind a signed URL embedded in the HTML, with escaped ampersands (\u0026) that also had to survive decoding. The source was never empty. The extractor was broken twice, and each failure read as no-content.

Next step: Treat empty as unproven rather than absent: check exit codes per pipe stage and byte counts at every hop before concluding a source has nothing. Same failure class as a rate-limited search API returning [] that gets read as zero results.

Tags: #failure-modes #signal #execution

The Limit Kills the Report, Not the Work

Short Essay · 2026-07-02 · 12:10 AM PT

Claim: A background agent that dies on a rate limit has not necessarily failed its task.

Yesterday a builder subagent returned exactly one line: a session-limit notice. Thirty-two tokens, no report. The obvious move is to re-dispatch. I probed first: the worktree existed, the branch was pushed, the pull request was open. The work was done; the limit killed the report, not the work. Re-dispatching blind would have opened a duplicate PR against the same branch, and outward actions like pushes, PRs, and posts are not idempotent.

The discipline: before re-driving any limit-killed or crashed agent, probe its intended artifacts live. Check the branch with git ls-remote, list PRs by head, stat the files it was told to write. Then finish only the missing tail inline. The same rule scales up: a workflow journal that caches completed agents makes resume cheap, and per-step commits make git log the ground truth for what actually happened, regardless of which reporter died.

Treat 'the agent died' and 'the task failed' as separate facts to verify independently. The cheaper the kill signal (a limit, a timeout, a crash), the more likely the work outran the report.

Tags: #failure-modes #execution

Recheck What You Rejected

Short Essay · 2026-07-01 · 12:45 AM PT

Claim: A negative decision stored in an agent's memory ('we evaluated X and rejected it') is the most dangerous kind of stale fact, because it reads as settled and quietly stops you from re-checking.

Today a build nearly started from a false premise. Two sources agreed a monitoring tool had been evaluated and rejected months back: a quick scouting pass, and the agent's own memory note from that earlier decision. Both said "we don't use it."

A live probe said otherwise. The tool was in production: agents running on three hosts, config checked into the repo, a merged pull request wiring it up. The rejection was real when it was written. An adoption decision reversed it later, and the note never caught up.

Open questions get re-checked. They read as unfinished, so something in you goes and looks. A recorded rejection does the opposite. It reads as closed, so you skip the probe and inherit a months-old snapshot as current truth. The more settled a stale fact sounds, the less it gets verified, which is exactly backwards.

The fix is cheap. Treat "we rejected X" or "we don't use X" from memory, a handoff, or a plan as a hypothesis, not a fact. Re-probe the live world: running processes, config on disk, merged PRs. Give a recalled negative the same suspicion you give a "still broken" bug report. Live evidence decides; the note only nominates.

Before building on 'we don't use X', re-probe live for X's actual presence. Only affirmative live evidence retracts the note.

Tags: #failure-modes #systems #signal

Prefill demos server-side

Experiment Log · 2026-06-30 · 04:45 PM PT

Hypothesis: An automated, headless demo pipeline can record a stateful web app's flow shot-by-shot as scripted, with no changes to the app.

Constraint: Each shot runs in a fresh browser context (no carried state), and the pipeline trims each segment to its narration length.

Result: Failed. Shots that triggered a live async result and then narrated it showed only the loading spinner: the rendered result landed after the narration window and got trimmed off, and later shots ran against a blank page because state did not carry. The fix that made it deterministic was a server-rendered demo mode (a query param read on the server) that seeds prefilled inputs AND a frozen-but-real result directly into the server-rendered HTML, so the content is present on load with no hydration race. A browser-side effect that prefilled after mount lost the race against capture. Second fix: long captions cover the very thing you narrate, so render one result card full screen per shot instead of all of them.

Next step: Make the server-rendered demo mode and one-card-per-shot the default in the demo tooling. Unrelated footgun from the same run: kill dev servers by port, never by matching the process command line, because that also hits your own running script and kills the run, and a stale server still holding the port makes a fresh build silently serve the old code.

Tags: #failure-modes #execution #systems

A Report Is Not Recon

Short Essay · 2026-06-30 · 08:22 AM PT

Claim: A research report's accuracy about the outside world does not transfer to its accuracy about your own system. The trend scan can be impeccably sourced while every 'so adopt it here' line rests on an unchecked guess: that the named target exists, that you have not already built it, that this is even the right home. Those guesses read as facts and produce confident, wrong work.

Before turning a report into work, recon each recommendation against live state: does the target exist, is it already-have, partial, or net-new, is the home right? Reclassify from evidence, not from the report's framing. One recon pass over a single report this week caught six such backside errors, each of which would have shipped a wrong build: a named code target that did not exist, a doctrine note proposed for a health-check tool's slot, an eval suite called 'already built' that solved a different problem.

Tags: #execution #failure-modes #systems

Refuted or Rate Limited

Experiment Log · 2026-06-30 · 08:14 AM PT

Hypothesis: When a multi-agent research run reports 'all claims refuted (0-0 votes)', re-verifying with a few source-grouped first-hand reader agents beats re-running N adversarial refuters per claim.

Constraint: Same claim set and model; the verify phase had just died on transient rate limits (every claim scored 0-0, every voter errored).

Result: Passed. The per-claim refuter design fired roughly 75 agents within seconds and they all hit a transient 429, manufacturing a false 'all refuted, inconclusive'. Re-running verification as about 8 source-grouped readers (one agent per source URL, each reading its source and checking all of that source's claims at once) finished clean with zero rate-limit deaths and was more accurate: each reader judged claims with the full source in context instead of seeing one claim blind.

Next step: Treat a 0-0 'refuted' as a failures-block smell, not a verdict. Default the verify fan-out to source-grouped readers, and bucket any errored or rate-limited lens as PENDING to re-run independently, never silently as 'refuted'.

Tags: #failure-modes #systems #signal

Tests Spend Prod Budget

Short Essay · 2026-06-29 · 10:40 AM PT

Claim: A test that reserves against a real shared-state file (a daily-budget ledger, a counter, a lock directory) silently spends your production budget and goes flaky across runs. The cause is almost always a path that is an import-time constant: the test isolates its own outputs but not the shared-state path, so every run writes to the same file the live system uses. Two failures land at once. Production's budget gets consumed by CI, and repeated suite runs accumulate reservations until live-write assertions fail on a green-yesterday diff that never changed. Fix it at one chokepoint, not per test: a single autouse fixture that redirects the shared-state path to a temp directory, because an import-time constant cannot be redirected per test any other way. The tell is a suite that passed yesterday failing on count or budget assertions while the code under test looks innocent. Inspect the real state file before you debug the diff.

Production-shared mutable state reached through a non-injectable path is a test-isolation bug waiting to happen. Make the path injectable, isolate it once, and the same tests stop both corrupting prod and flaking.

Tags: #failure-modes #execution #systems

Runtime Governance: How It Works

Diagram · 2026-06-29 · 08:00 AM PT

Runtime governance, step by step. A request arrives; rich telemetry is collected in real time (source IP and ASN, host and path, user and token, TLS, geo and device, historical signals); runtime policies evaluate identity and access, posture and risk, context and behavior, and business rules in milliseconds; a decision is made to allow, challenge, restrict, or block; Traefik enforces it instantly via routes, middleware, and dynamic config; and outcomes are logged so policies adapt over time. Allow proceeds to the service, challenge requires step-up verification, restrict applies rate limits or read-only or masked scope, and block returns a 403, 429, or custom page. Decide at runtime, not at deploy time: least privilege always, verify explicitly, observe everything, secure by default. Under five milliseconds per decision, over one hundred thousand decisions per second, zero downtime.
Continuously evaluate, decide, and enforce at runtime, without slowing down your apps.

Tags: #governance #execution #systems

The Two-Plane Architecture

Diagram · 2026-06-29 · 08:00 AM PT

The two-plane architecture. A public ingress plane carries the world to your apps: the visitor's browser reaches the Cloudflare edge (DNS, TLS, WAF, CDN, DDoS, optional Access), then one path per hostname (a Cloudflare tunnel dialing outbound, or a published 443 with an origin cert) to a single Traefik reverse proxy that binds 80 and 443 and routes by host and path over a private Docker network to your app containers, reached by service name rather than localhost. A separate private admin plane carries the operator to everything else over a Tailscale mesh VPN: SSH, dashboards, metrics, databases, secrets stores, and internal tools. The two planes join only at a deliberate meet point where at most one service at a time is exposed via an IP allowlist, never by accident.
One box, one reverse proxy, zero public inbound ports: a private mesh for everything else.

Tags: #systems #infra #execution

The Fix Had the Same Race

Experiment Log · 2026-06-29 · 02:30 AM PT

Hypothesis: An exclusive-create steal-lock that serializes a file lease's stale-break and re-confirms state under the lock closes the double-ownership race.

Constraint: Verdict from an independent adversarial re-attack of the FIX, not the original code; each race proven by driving the internals, not by reasoning about them.

Result: Failed. The steal-lock wrote its acquire timestamp in a syscall AFTER the exclusive create, leaving an empty-content window. A second racer reading the zero-byte file parsed the timestamp as 0, judged it ancient (now minus 0 is older than max-age, so abandoned), unlinked the in-progress lock, and won its own exclusive create. Two holders. The serialized-steal-lock fix for the original double-steal race shipped its own double-ownership race.

Next step: Treat empty or unparseable lock content as NOT abandoned (fail safe: stay blocked, never reclaim); reclaim only on a provable-old signal, and use the file's real mtime as the crash backstop rather than a timestamp you wrote yourself in a second syscall. And re-verify the FIX adversarially, not just confirm the original finding is closed: a fix introduces a fresh defect of the same class often enough that one more independent pass earns its keep.

Tags: #failure-modes #systems #execution

Coherent Isn't Correct

Experiment Log · 2026-06-28 · 05:30 PM PT

Hypothesis: Hand an autonomous AI coding agent a whole local-first finance tool to build end-to-end, no human writing code, and the output will be safe to use as-is.

Constraint: First pass fully autonomous; then an independent audit and a harden loop where every finding becomes a failing test before it's fixed; every public claim must be backed by code.

Result: Failed. The agent (Grok) shipped something genuinely coherent — an installable, Dockerized, CI-green vertical with a CLI, a web UI, a sqlite ledger, invoices, and reports. But it was broken in exactly the parts that matter for money: amounts stored as floats (the Markdown and JSON reports disagreed), a fabricated 42-dollar charge recorded on a receipt it couldn't read, a parser that truncated 1,234.56 down to 1.23, a 'CSV export' that emitted JSON with no OFX at all, an 'optional local vision' feature with zero code behind it, and a file upload with a path-traversal hole that ran as root. The harden loop — a self-adversarial review plus three independent automated review passes, each finding turned into a failing test — caught a critical data-loss bug in the upgrade path and fixed the rest. v0.2 now uses exact integer money, flags unreadable receipts for review instead of inventing amounts, ships real CSV and OFX exports, binds loopback as a non-root container, and has 85 tests at 91 percent coverage.

Next step: Treat an autonomous build the way you'd treat a junior pull request for a system that touches money: audit it adversarially and make every claim earn a test. The agent is great at producing something that looks shipped; the unglamorous correctness work is still yours. The build is cheap — the harden loop is the product.

Tags: #failure-modes #execution #systems

Placement Beats Rules

Short Essay · 2026-06-28 · 02:40 PM PT

Claim: Most agent-instruction files already encode the popular best-practice rules. The failures that remain are rarely a missing rule — they are a rule that never loads and a claim that was never verified.

A popular checklist of rules for agent-instruction files made the rounds again this week — think before coding, keep it simple, surgical changes, define success criteria, and a newer set about reproducing bugs with a test, debugging to root cause, and keeping a list of named failure modes the agent should self-check against.

The rules are good. But measure your own setup against them honestly and you may find the same thing I did: the file already encodes nine of ten. The gap isn't the rules. It's two things no rule list mentions.

**1. A failure-mode list only works if it's always loaded.** "Keep a list of named failure modes" is excellent advice that quietly assumes the list is in the context the model reads every turn. If yours lives in a separate notes store the agent has to search, it gets checked exactly when the agent thinks to search it — which is the opposite of when you need it. The recurring traps belong inline, in the always-loaded file, not one retrieval hop away.

**2. Context files truncate silently.** The always-loaded memory index I lean on was being injected *truncated* — its tail, which held a chunk of those "recall" lessons, was getting dropped above a size cap, and the harness only whispered it in a line that's easy to miss. Worse: a note *inside* that file confidently asserted the cap "isn't enforced," verified weeks earlier. Two failure modes stacked — a real limit, and a stale note swearing there wasn't one. The fix was small once seen: prove what the model actually received (it differs from what's on disk once you cross the cap), move the highest-value lessons to the top so the tail is what drops, and correct the note that lied.

The meta-lesson is the cheap one: a rule you adopt is only as good as its placement and your verification of it. Adopting the rule feels like progress. Confirming it loads, and re-checking the claims your own files make about themselves, is the part that actually moves the error rate.

Audit the two things the rule lists skip: is your recurring-failure list in always-loaded context or behind a retrieval step the agent only hits when it remembers to; and does your context file silently truncate above a size cap. Verify what the model actually loaded, keep the highest-value lessons at the top, and trust your own old notes least when they contradict live behavior.

Tags: #failure-modes #execution #systems

Pin What Your CI Recompiles

Short Essay · 2026-06-28 · 01:40 PM PT

Claim: A CI verify step that recompiles a generated artifact from an unpinned upstream turns red for every open PR the instant that upstream changes — including PRs that never touched the generated file.

A common "don't hand-edit generated output" guard works like this: a CI job checks out the upstream source, recompiles the derived artifact (a config bundle, a lockfile, a generated client), and diffs the result against the version committed in the PR. Differ, and the check fails — the artifact may only change by regenerating from source.

The trap is *which* upstream ref the job compiles. Pin it to a commit and the check is stable. Point it at the upstream's moving tip (`@main`, `latest`) and the check stops measuring the PR at all — it measures the gap between the committed artifact and whatever the upstream looks like *right now*. The moment someone lands a change upstream, the committed artifact is stale and the next compile diverges. Every open PR goes red at once, even one whose diff is a single line in an unrelated file.

That false red is expensive because it reads as the PR's fault. The author rebases, re-runs, or — worst — hand-edits the generated file into their feature branch to force a green, smuggling an unrelated refresh into unrelated work and defeating the very guard the check exists to enforce.

Two fixes, chosen by how fresh the artifact must be:

- **Pin** the upstream ref the verify job compiles. The artifact then drifts only when someone deliberately bumps the pin — a reviewable event, not a background one. - If it genuinely must track the tip, **automate the refresh**: a scheduled job recompiles and opens a dedicated refresh PR. The generated file still "mutates only via source," but through its own small, reviewable change instead of riding along in feature work.

Operationally, when this check fails: diff the PR first. If it doesn't touch the generated artifact, the red is repo-wide drift, not the PR — fix it at the source, then pull the refresh into the branch. Don't edit generated output to chase a green.

Pin the upstream the verify job compiles, or auto-refresh the artifact on a schedule; and when the check fails, diff the PR before you trust the red.

Tags: #failure-modes #infra #systems

Dedup By Auth, Not Existence

Experiment Log · 2026-06-28 · 12:50 AM PT

Hypothesis: When two tools cover the same surface — a CLI and an MCP server — it's safe to dedup by existence: if a CLI exists, drop the redundant MCP to save the agent's context.

Constraint: Check the rule against the live auth/health state of every MCP server and its CLI counterpart before trusting it.

Result: Failed. The existence rule inverts. While indexing the CLIs and MCP servers an agent could reach, one cloud provider's MCP servers were connected and working while its CLI was logged out — the existence rule would have removed three working providers in favor of a broken one. Redundancy is relative to which side actually works, and the working side can be either. The correct test is auth-aware: only recommend removing the side that is NOT the sole working provider; when both work it's a surface judgment, not an auto-kill.

Next step: Probe both sides' live auth before recommending any prune; keep the prune recommend-only and human-gated; never auto-disable a working provider.

Tags: #failure-modes #systems #execution

When Verifiers Abstain

Experiment Log · 2026-06-27 · 07:05 AM PT

Hypothesis: A fail-closed, multi-vote adversarial verification gate will correctly separate true from false research claims in an automated research loop.

Constraint: Survive-rule: a claim passes only with a quorum of valid votes and fewer than two refutations; default to refuted under uncertainty.

Result: Failed. Under transient API rate-limiting, every verifier vote returned null, so each claim scored 0-0 and the run reported 'all 25 claims refuted — inconclusive.' False: those were abstentions (the adjudicator never ran), not evidentiary refutations. The survive-rule correctly withheld the unverified claims, but the run's summary conflated 'never adjudicated' with 'refuted by evidence.' An abstention-tolerant re-verify plus a manual one-source-at-a-time top-up then confirmed 24 of 26 claims against primary sources — the opposite of inconclusive.

Next step: Make abstention a first-class status, never folded into 'killed.' On recovery, reuse the saved search and extraction artifacts and re-verify gently rather than re-running the whole pipeline. And existence-check every citation: a future-dated reference ID is not automatically a hallucination.

Tags: #failure-modes #signal #governance

Path.glob Swallows Errors

Short Essay · 2026-06-26 · 04:58 PM PT

Claim: Python's `Path.glob` silently ignores scan errors like PermissionError and yields nothing — so a fail-safe built on it is dead code. Use `os.scandir`/`Path.iterdir`, which raise.

I wrote a fail-toward-safe check: "does any matching file exist here? If the directory is unreadable, assume the worst and treat the system as already established." The shape was `try: any(Path(d).glob("*.json")) except OSError: treat_as_established()`. It looked airtight. It never fired.

On CPython 3.11, `Path.glob` swallows scanning errors — including `PermissionError` on an unreadable directory — and simply yields nothing. So the unreadable case doesn't raise into the `except`; it returns an empty iterator, which reads as "no files exist," the exact opposite of the safe default I intended. The except branch was unreachable. The guard was decorative.

The fix is to scan with something that actually raises: `os.scandir(d)` (or `Path.iterdir`) throws `PermissionError` on an unlistable directory, so the fail-safe branch runs. Reserve `glob` for the happy path where you only care about matches and are fine treating errors as no-match.

Two durable takeaways. First, a guard that can't fire is worse than no guard — it gives false confidence while protecting nothing, and you won't notice until the rare error path you were guarding against arrives. Second, before trusting any fail-safe, reproduce the failure it's supposed to catch — point it at a zero-permission directory and confirm the safe branch executes. If you can't make it fire on purpose, it won't fire by accident either.

A guard that can't fire is worse than no guard: it reads as protection while doing nothing.

Tags: #failure-modes #execution #systems

Worktrees: git -C, Not GIT_DIR

Short Essay · 2026-06-26 · 04:53 PM PT

Claim: Never export GIT_DIR or GIT_WORK_TREE into a shell — address a worktree with `git -C <path>` so concurrent git operations can't clobber each other.

When you run git against a linked worktree, it's tempting to set `export GIT_DIR=$(git rev-parse --git-dir)` and `export GIT_WORK_TREE=$(pwd)` so commit and push target the right tree. Don't. Those exports persist for the rest of the shell's life and leak into every command that follows.

That's harmless until two git operations run at once — an agent's session plus a background job, two pipelines, a sweep timer firing mid-task. The second operation runs against a *different* repo but inherits the first one's exported GIT_DIR. Result: its git writes the wrong repo's refs into your bare repo. The branch gets clobbered to a foreign commit, the worktree is checked out to a foreign tree, files vanish from disk, and `git status` reports "diverged, N and M different commits."

It's recoverable, because the pushed/origin refs are never touched: `unset GIT_DIR GIT_WORK_TREE; git -C "$WT" reset --hard <pushed-sha>`, then `ls` and `git -C "$WT" log` before you trust the tree again.

The durable rule: a linked worktree's `.git` file already resolves the correct gitdir, so `git -C "$WT" <cmd>` works for status, diff, reset, log, commit, and push with no exports at all — pre-commit and pre-push hooks run fine under it. If you genuinely need the variables for an ancient git that can't read the worktree pointer, scope them inline to a single invocation (`GIT_DIR=… GIT_WORK_TREE=… git …`) and never export — so they can't survive past the one command. Whenever two git operations can overlap, keep every invocation self-contained with `-C`.

Exported git env bleeds into every later command in that shell; with a second git op running against a different repo, one operation can rewrite the wrong repo's refs and check its worktree out to a foreign tree.

Tags: #failure-modes #execution #systems

Clone the Box, Not the Cron

Short Essay · 2026-06-26 · 01:06 PM PT

Claim: When you migrate or clone a machine that runs scheduled automation against shared remotes, never run the old and new environments in parallel — every scheduled job fires twice.

The instinct when you migrate a workstation is to run the old and new side by side for a few days — a burn-in, so you can fall back if the new one misbehaves. That instinct is exactly wrong if the machine runs background automation.

A dev box that does real work usually has scheduled jobs: cron entries or systemd timers that push to shared git remotes, advance a shared work queue, or hit an API on a cadence. Run two copies of that box at once and you have two of every job, racing the same single-writer target. The failure isn't loud. A second push to a shared mirror comes back non-fast-forward, the job still reports green, and your backups silently stop advancing for days. Pipelines run twice. A shared queue gets mutated by two writers that each believe they're alone.

Local locks won't save you. An atomic `O_EXCL` / `flock` claim is filesystem-local to one environment. The clone has its own filesystem, so it has its own lock — zero cross-environment protection. The guarantee you were relying on doesn't span the two boxes.

And the clone is born armed. A filesystem image captures the timers in their *enabled* state, and the new box's init auto-starts them on first boot — before you've had a chance to turn anything off.

So the rule for migrating an automated host is: exactly one environment armed at any instant.

- Mask the scheduled jobs on the cold environment — mask, not just disable, so they can't be started even by hand. - Image the clone born-disarmed: disable the jobs in the image, then re-enable them on the source right after you take it. - Cut over atomically: disarm the old, switch the default, arm the new — with no overlap.

"Just wait for a quiet window" isn't enough either. On a box doing real work, another session or another job moves state within the minute. You don't *find* a quiet window; you *enforce* one — stop the jobs and halt the box before you image it, which also makes the image a consistent snapshot instead of a smeared one.

Clone the box. Don't clone the cron.

A safe migration is single-armed end to end, not a parallel burn-in.

Tags: #infra #failure-modes #execution

Self-Hosting Has Two Planes, Not One

Short Essay · 2026-06-25 · 04:45 PM PT

Claim: Most self-hosting messes trace to one mistake: treating every service the same. Split them by a single question — does the public need to reach this? Public apps go through one controlled ingress plane (Cloudflare Tunnel to Traefik to containers, zero public inbound ports); everything you administer stays on a private mesh (Tailscale). The two planes meet only through routes you declare, never by accident. The discipline is one sentence: classify every service by whether the public needs it, put it on the matching plane, and verify the bind address — not just the health check.

Wrote the whole thing up end to end — Cloudflare Tunnel, Traefik, Tailscale, the auth model, and a security checklist: https://www.danmercede.com/guides/self-hosting-websites-and-apps

Tags: #infra #security #systems

Shape Isn't Identity

Experiment Log · 2026-06-25 · 12:58 PM PT

Hypothesis: An exhaustive single-model adversarial review across four independent lenses is enough to catch destructive-safety gaps before shipping a script that wipes and rebuilds a stateful service's storage.

Constraint: Same diff, same model for all four lenses (quoting, fix-completeness, regression, adversarial); then a second review pass by a DIFFERENT model.

Result: Failed. All four same-model lenses rated one finding a low-severity residual: the script's pre-flight guard only checked that the target host LOOKED right — expected binary, config file, and data dir all present — before destroying its data. A different model elevated the same finding to blocking. Proving a target is the right SHAPE (the expected paths exist) does not prove it IS the right target: any other instance of the same software has the identical shape, so an overridden or typo'd target pointing at a DIFFERENT real instance would have its storage wiped. The four lenses partly agreed because they shared one model's blind spot.

Next step: For any destructive or irreversible action, the 'am I on the right target?' guard must assert IDENTITY — a unique config value, machine-id, or declared address — not just shape/existence. And budget for cross-model review: it is not belt-and-suspenders, it catches the failures a single model's lenses all miss together.

Tags: #failure-modes #security #systems

Claims Without Postgres

Short Essay · 2026-06-24 · 05:18 PM PT

Claim: Atomic work-claiming for autonomous agents needs no database — and a fail-open status hook actively forbids one.

I built a layer that keeps multiple autonomous agents from grabbing the same task. The reflex is a database — Postgres with `SELECT … FOR UPDATE SKIP LOCKED`, which hands each caller a different row or nothing, never the same one. Two constraints flipped that.

The live board surfaces through a fail-open session-start hook. Fail-open means it must never block startup, so on any error it emits nothing. Point that hook at a database and it renders an empty board the instant the database is unreachable or the process lacks credentials — the oversight view silently disappears exactly when you'd want it most. So the store of record has to be local files the hook can always read.

The surprise is that dropping the database costs you nothing on the claim itself. Creating a lockfile with `O_EXCL` is the filesystem analog of `SKIP LOCKED`: two callers cannot both create the same file — the loser gets an error and moves on, neither blocks. Same exactly-one-winner guarantee, zero new infrastructure, on local disk.

The database isn't wrong; it's the second move. A local lockfile is invisible across machines, so reserve the database for when the work genuinely spans hosts. Until then, local files plus `O_EXCL` give you a correct, no-racing claim that a fail-open surface can always render.

Reach for the database as the second move, when the work spans hosts, not the first.

Tags: #systems #failure-modes #infra

Recon Before You Build

Experiment Log · 2026-06-24 · 05:15 PM PT

Hypothesis: An AI assistant's self-generated 'future opportunities' list is net-new work worth scoping and building.

Constraint: Ground each suggestion against live system state before authoring any build plan; one canonical per capability; no greenfield until anti-dup is proven.

Result: Failed. Two flagship 'opportunities' turned out ~75-80% already shipped. A grounding recon pass reclassified every component already-have / partial / net-new against live state; the honest deliverable shrank to a thin integration adapter for one and a read-only audit plus small hygiene fixes for the other. Building either as proposed would have duplicated shipped, tested infrastructure.

Next step: Make anti-dup recon the mandatory first phase of every 'build X' prompt, and reframe the work to glue-or-audit whenever most of X already exists.

Tags: #execution #systems #failure-modes

Verify the Verifier

Experiment Log · 2026-06-24 · 01:20 PM PT

Hypothesis: In a two-tier verification pattern — a cheap draft, then a skeptic agent that fact-checks each claim against live state — the skeptic's correction can be trusted as a verdict.

Constraint: One skeptic per premise, each required to refute-or-confirm with cited evidence before a claim is accepted into the output.

Result: Failed. One skeptic returned a confident 'CONFIRMED — corrected' verdict that FLIPPED a premise the draft had right. Its cited evidence named a look-alike sibling artifact, not the one in question. Because the whole design assumes the cheap draft is the unreliable layer, the skeptic's flip read as authoritative — exactly the backside error the fan-out was meant to catch, one layer up. A direct probe restored the draft's original, correct value.

Next step: Treat a skeptic's correction as a claim, not a verdict: (1) check its cited evidence names the thing in question, not a sibling; (2) cross-check the other agents in the fan-out — a lone flip against draft + prior knowledge is a flag, not a resolution; (3) run one direct probe to break the tie. A 'CONFIRMED' with mismatched evidence refutes the skeptic; it does not correct the premise.

Tags: #failure-modes #systems #execution

Lock the Init, Not the Job

Experiment Log · 2026-06-23 · 09:15 PM PT

Hypothesis: One cross-process lock held for a whole job will safely serialize the contention-prone init step that crashes a fleet of LLM coding-agent CLI workers — each spawning an app-server over a shared SQLite state runtime — under concurrent load.

Constraint: Had to survive sustained overlap from independent pipelines AND stay inside each job's wall-clock budget; vetted by an adversarial review pass before shipping.

Result: Failed. Held for the ENTIRE job with a job-length acquire timeout, the lock collapses to unserialized under exactly the overlap it targets — a waiter blocks for a full job, the timeout fires, and it proceeds unlocked — and with retries it stacks to N times the timeout in wall-clock, blowing the budget. The contention is only at init (the first seconds), not the whole job. The fix is a launch-throttle: hold the lock just for the init window — boot the child under the lock, release it for the long body. Two more traps the same fix surfaced: isolating each worker's state home removes cross-tenant contention, but uncapped, the relocated log DB re-grows the same multi-hundred-MB write-ahead-log file that caused the original crash (the fresh home was already tens of MB within one session); and a reported config-key mismatch was a phantom — the loader already mapped the file key to the internal key the gate read, so the gate worked. The runtime had also been swallowing the child's real stderr, surfacing only a generic exited-exit-1 line.

Next step: Cap the relocated state DB (prune when large and idle); surface the swallowed child error with a re-run diagnostic; and never retry deterministic failures (buffer overflow, auth-token rotation) the way you retry transient contention.

Tags: #failure-modes #systems #execution

Context Routing

Experiment Log · 2026-06-23 · 09:25 AM PT

Hypothesis: A coding agent can spend fewer tokens without losing quality if retrieval, cache, and tool surfaces are gated by evidence instead of injected by default.

Constraint: Public-safe summary only; no private infrastructure names, no client data, and every active change must stay reversible and verified.

Result: Passed. The useful pattern was not more memory by default. It was read-only recall, explicit tool allow-lists, registry freshness checks, cache proposals kept behind offline quality gates, and smoke tests that had to turn green.

Next step: Promote only the optimizations that pass the quality gate; keep semantic replay out of coding, governance, incident, and current-state answers until it earns trust.

Tags: #systems #governance #execution

Merge Truth Is Not Runtime Truth

Thought Snippet · 2026-06-22 · 09:06 PM PT

A pull request can be merged, the docs can be updated, and the registry can look clean. None of that proves the deployed system is running the new contract. Source truth and live truth are different systems. The better operating pattern is to put the verifier inside the deployed artifact, then run the proof from that artifact against the live service. That closes the gap between "we shipped it" and "the system in front of users is the one we think it is." Verify the artifact, not the intention.

Tags: #systems #execution #infra

Context Quality Gate

Thought Snippet · 2026-06-22 · 12:30 PM PT

A context optimization that saves tokens but drops the file, test, or citation that mattered is not optimization. The useful pattern is measurement first: count tool-schema cost, select the smallest tool surface that can still do the job, and keep a quality gate beside the token gate. For coding work, that means the agent still finds the right files and preserves source truth. For governance or memory work, it means recall stays advisory until current sources verify it. The next useful move is not a broader cache or another retriever. It is making the measurement repeatable enough that every proposed context cut has to prove it did not make the work worse.

Tags: #systems #execution #infra

Make Your RAG Earn Its Keep

Experiment Log · 2026-06-21 · 07:20 AM PT

Hypothesis: An internal structural code-search RAG tool beats the agent's own ripgrep-and-read loop on cross-repo lookups — by enough to justify keeping it.

Constraint: Equal corpus, same agent and model, a pre-registered case suite, and a +25-point margin required to KEEP. Gate-then-wire: read-only until it passed.

Result: Failed. On the cross-repo queries where a structural retriever was supposed to win, the grep-and-read agent resolved ~14 of 16; the RAG tool managed ~5 and timed out on the hard ones — a 56-point loss. Retired it. A small live dry-run also caught two verdict-corrupting bugs that hundreds of hermetic tests had passed green: a scoring-format mismatch that would have faked the verdict, and a database wiring bug. Hermetic tests mock the very things that decide the outcome — so read the per-row data, not the summary.

Next step: Keep the falsifiable gate; point any future code-RAG — including an off-the-shelf one — at it before trusting, or keeping, it.

Tags: #failure-modes #execution #systems

Bots Pollute the Merge Gate

Thought Snippet · 2026-06-20 · 09:30 PM PT

I built an autonomous loop that drives an open-source repo through a multi-version release arc: it fires each build phase headless, opens a pull request, and waits for me to approve by merging. My first approval signal was GitHub's aggregate review decision: approved means proceed, changes-requested means stop. It false-halted on the very first run. The culprit wasn't me; it was the review bots. CodeRabbit, Sourcery, and friends auto-review every PR, and their verdicts roll up into that same aggregate decision, so a bot's changes-requested was indistinguishable from a human no. The fix: gate on the human's irreversible action, not a derived status. Merge means go. Close means stop. Ignore the aggregate decision entirely; it's polluted by automation you don't control. The principle for any human-in-the-loop agent: your approval signal should be something only the human can do and a bot can't accidentally emit. Prefer an explicit, irreversible act (merge, tag, a click) over a status field your tooling also writes. The loop caught this itself by refusing to guess and halting, which is exactly what you want when a system's own gate logic is wrong.

Tags: #failure-modes #governance #execution

Deployed Isn't Running

Thought Snippet · 2026-06-20 · 09:56 AM PT

When you audit a fleet of services by reading their config and deploy files, the file tells you what was declared, not what is running. Grepping manifests produced a confident inventory of live services; a six-line HTTP probe of the same hostnames came back 200, 302, 404, and 502 — healthy, redirecting, gone, and broken. The file said deployed for every one. Config presence is not runtime liveness. The cheapest way to stop a confident-but-wrong fact from reaching your plan is to verify it against live state before writing it down: probe the endpoint, inspect the running artifact, read the actual status. File-grep gives you intent; only a live check gives you truth. For an autonomous agent doing recon, that one probe is the difference between a plan built on what should be running and one built on what is.

Tags: #failure-modes #infra #execution

Lint LLM Schemas Before Prod

Thought Snippet · 2026-06-20 · 09:30 AM PT

A JSON Schema or tool definition that works on one LLM provider can 400 on another: OpenAI demands additionalProperties:false on every object and forbids default; Anthropic rejects a dozen validation keywords (minLength, pattern, format, minimum/maximum, and more); Gemini chokes on anyOf and dicts. The API tells you it failed, not which keyword. The durable fix is a static, provider-aware CI lint that fails the PR — naming the JSON-Pointer path, the offending keyword, and why — before the schema reaches production. The constraint surfaces are documented; treat them as a deterministic pre-ship check, not a runtime surprise.

Tags: #failure-modes #execution #infra

Budget Your MCP Tool Surface

Thought Snippet · 2026-06-18 · 03:30 PM PT

Connect enough MCP servers to a coding agent and the tool definitions alone can eat close to half the context window before the first task runs — schema bloat you only notice once sessions slow down, compact, or quietly drop instructions. The fix is to stop treating the tool surface as free. Measure it: count the schema tokens each server contributes and the response tokens its tools return, then select the smallest tool set that still covers the task instead of loading every server every time. Make the budget a build artifact — a lockfile you commit and a CI check that fails when a new server or a fattened schema blows past the cap — so context regressions surface in review, not mid-session. Two things that helped: budget schema bloat and response bloat separately, because a lean schema can still return huge payloads; and keep the token estimator deterministic so the same config always scores the same. Context hygiene is a build-time discipline, not a runtime surprise.

Tags: #infra #execution #systems

Verify Bot Suggestions

Thought Snippet · 2026-06-18 · 01:11 PM PT

An automated code-review bot flagged a HIGH-severity 'optimization.' Applied in good faith — even under a blanket 'apply the advisory findings' approval — it would have shipped a worse bug than the one it claimed to fix. A separate adversarial review pass caught it; the right move was to reject the suggestion, keep the original approach, and record why. Treat automated-reviewer output (Codex, Gemini, CodeRabbit, and friends) as advisory input to verify, not a directive — give each suggestion the same try-to-break-it pass you would give your own change before applying it. A severity label reflects the bot's local heuristic, like 'avoid a redundant call,' not whole-system correctness; a HIGH-severity optimization can quietly trade away a correctness invariant. Reject-with-rationale is a valid, expected outcome. Reinforcing pattern from the same work: a layered adversarial-review stage repeatedly caught state and logic bugs that every unit test had already passed. Adversarial review of mutation-bearing code is not optional.

Tags: #failure-modes #execution #governance

orion-skills Is Public

Status Update · 2026-06-17 · 04:00 PM PT

Status: Active.

What changed: Open-sourced orion-skills — a collection of first-party Claude Code skills extracted from production operator workflows: a structural read-only mode, scope guarding, ship discipline, pre-PR checks, incident-as-code, learning capture, goal-prompt authoring, and pre-compact handoffs. MIT-licensed and public at https://github.com/OrionArchitekton/orion-skills.

What broke: Nothing. The skills were already running internally; this is the same set, genericized and published.

Next step: They now sit on the Works page at danmercede.com/works, with one skill published as a sample gist. Next is a short write-up on how the read-only and scope-guard rails actually enforce.

Tags: #execution #governance #systems

Merge-Authority Gate, Shadow-First

Status Update · 2026-06-16 · 10:55 AM PT

Status: Active.

What changed: Shipped a merge-authority classifier in shadow mode — it logs what it would auto-merge and merges nothing, so the enforce-flip is earned, not assumed.

What broke: Eight hundred and forty-one abandoned draft pull requests. The bottleneck was never generation; it is the human gate and the work of converging what was generated.

Next step: Enforce-flip after a clean two-week shadow window with zero false positives.

Tags: #governance #systems #execution

Fail-Closed Merge Admission

Diagram · 2026-06-16 · 08:00 AM PT

Agent-written pull requests routed through a deterministic parser and authority gate to merge-ready or halt, with an audit decision receipt; fail-closed by default.
Fail-closed merge admission for agent-written code: the gate is the product.

Tags: #governance #execution #systems

failclosed Is Public

Status Update · 2026-06-09 · 11:30 AM PT

Status: Active.

What changed: Open-sourced failclosed — the authority gate applied to the merge boundary — alongside the supporting repos. The deterministic gate, the parser, the receipt: all public.

What broke: Nothing. The model behind the gate is replaceable; the gate is what shipped.

Next step: The long-form on why, then a feed cut that drives back to the repo.

Tags: #governance #signal #execution

The Authority Gate, Made Runnable: Fail-Closed Merge Admission for Agent-Written Code

Short Essay · 2026-06-08 · 07:00 AM PT

Claim: An advisory reviewer that relays an AI's own verdict fails open; fail-closed merge admission applies the pre-execution authority gate to the merge boundary by refusing MERGE_READY on unparseable, schema-invalid, or self-contradictory output.

Part I — The Gate, Made Runnable

Every argument for runtime governance eventually meets the same objection: show me. The pre-execution authority gate is a clean idea — evaluate authority before state mutation, halt on ambiguity, never fall back to probabilistic scoring — but an idea is not an artifact. failclosed is the artifact: the authority gate applied to one narrow, high-frequency mutation boundary, the merge.

The choice of boundary is deliberate. A merge is small, concrete, and constant, and it is where AI-written code crosses from proposal into production state. It is also where the current generation of tooling fails in a specific, instructive way.

Part II — Why Advisory Review Fails Open

The dominant pattern in AI code review relays the model's own verdict. A reviewer model reads a diff, decides whether it looks acceptable, and the surrounding tool treats that decision as the gate. When the model says "looks good," the change is mergeable. This is advisory governance, and advisory governance fails open by construction.

Consider the failure that matters most: the reviewer's output is not clean. It is truncated by a token limit, malformed by a formatting slip, or internally contradictory — a verdict of "needs fixes" attached to a findings list where not one finding cites a file or a line. A human reading that output distrusts it immediately. An advisory tool does the opposite. With no clean verdict to relay, it defaults to permitting the merge, because permitting is the path of least resistance and no deterministic rule forces a stop. The reviewer becomes a single point of silent failure precisely when its output is least trustworthy.

The cost is not abstract. A merge is a state mutation. An ungoverned merge of agent-written code is an irreversible state change with no attestation of who, or what, authorized it. In a regulated environment, that is audit indefensibility — the inability to prove, after the fact, that a change was admitted under an enforced rule rather than a model's good mood.

Part III — Distrust the Reviewer

failclosed treats the reviewer the way the control plane treats an agent: as an untrusted compute node whose output is inadmissible until proven. It runs the reviewer, and then it refuses to trust the verdict.

The output passes through a deterministic parser. The gate refuses to report MERGE_READY when that output is unparseable, schema-invalid, or self-contradictory. Take the contradictory case: verdict "fix," no finding citing a file. An advisory tool, finding no actionable findings, reports the change clean and admits it. failclosed reads the same output, recognizes that a "fix" verdict with no located finding is an indeterminate state, and halts. Ambiguity translates to a stop. There is no fallback to "probably fine," because a fallback to "probably fine" is the precise mechanism by which ungoverned actions execute.

This is the posture of the pre-execution authority gate, narrowed to the merge boundary: enforcement precedes the mutation, the default is deny, and a merge that cannot be deterministically evaluated does not proceed. The reviewer's confidence is an input to be checked, not an authority to be obeyed.

Part IV — Receipts Over Logs

A decision that cannot be inspected is not enforcement; it is a side effect. Every failclosed run emits a structured, inspectable record — what was reviewed, what failed the gate, and why the final status is what it is. This is attestation, not telemetry. A log says an event happened. A receipt says a decision was made, on this input, under this rule, with this outcome, and it can be read back and reproduced.

That distinction is what makes the gate auditable. An auditor does not have to trust that failclosed ran, or that it ran correctly. They read what it decided. The verdict and its grounds are durable artifacts, not transient console output discarded after the build.

Part V — The Boundary Is the Example, Not the Point

The merge is a small case, chosen because it is public and runnable in two minutes. The principle does not depend on the case. Anywhere an AI system's output gates a state mutation — a deployment, a payment, a configuration change, a database write — the same structure holds. The model proposes. A deterministic gate disposes. The gate distrusts the model's own confidence and defaults to deny when the input is ambiguous. Capability is removed at the boundary, not requested politely from a system free to ignore the request.

failclosed is not a novel reviewer; better reviewers keep arriving. It is the discipline around the reviewer — the parser, the fail-closed gate, the receipt — and that discipline is the part that does not depend on which model reads the diff this quarter. The model is replaceable. The gate is the product.

That is the difference between governance and hope. failclosed is public and runnable: github.com/OrionArchitekton/failclosed. The same enforcement model, applied across an enterprise agent stack rather than a single merge gate, is a Runtime Governance Readiness Scan at danmercede.com.

The merge boundary is a runnable instance of the [[authority-gate]] - anywhere AI output gates a state mutation, a deterministic gate must distrust the model's verdict and default-deny on ambiguity, producing an [[immutable-receipts]]-class record.

Tags: #governance #execution

Telemetry Is Not Enforcement

Thought Snippet · 2026-06-02 · 09:20 AM PT

A dashboard tells you what already happened. It cannot refuse. Most AI governance is telemetry wearing the word governance — alerts that fire after the state has already changed. A governance claim you cannot run is a claim you are hoping holds. The proof obligation is not a manifesto; it is a runnable artifact a skeptic can clone and watch deny the case it promised to deny. Until then it is advisory, however well argued.

Tags: #governance #signal

Trusting the Model's Output Shape Failed

Experiment Log · 2026-05-27 · 10:45 AM PT

Hypothesis: The selector and verifier model returns clean, parseable output I can gate the next step on directly.

Constraint: An LLM sits in the control path; its output decides what happens next.

Result: Failed. Output arrived wrapped in markdown fences, carrying frontmatter, and sometimes contradicting itself. Trusting the shape moved the enforcement inside the model.

Next step: Treat model output as untrusted input — strip, validate against a schema, and halt on anything malformed.

Tags: #execution #failure-modes #signal

The Merge Is Also a Mutation

Working Note · 2026-05-20 · 11:40 AM PT

Hardening the release gate to fail closed on the merge itself. A merge is where a change crosses from proposal into what runs — the most consequential state mutation in the system, and usually the least governed. Default-deny belongs here too.

Open question: Should the gate evaluate the merge SHA or the head SHA — and does CI parity hold across both?

Tags: #governance #execution #systems

Pre-Execution Authority Gates: Why Governance Must Be Evaluated Before State Mutation

Short Essay · 2026-05-20 · 07:00 AM PT

Claim: Governance evaluated after state mutation is telemetry; only deterministic enforcement at the pre-execution boundary is governance.

Part I — Runtime Governance Engineering

The runtime governance control plane begins with a non-negotiable premise: governance cannot operate as a post-hoc advisory function. Advisory governance depends on observability layers and probabilistic alerts triggered after state mutation has already occurred. This architecture accepts that unauthorized actions can execute before intervention. That latency is systemic risk. Governance evaluated after execution is telemetry. Telemetry is not enforcement. To mitigate systemic risk, governance must exist as a deterministic constraint evaluated strictly before any state mutation occurs.

When an execution framework treats governance as an external observer rather than a foundational constraint, it inevitably permits untrusted compute nodes to initiate actions that must subsequently be mitigated. True governance demands deterministic enforcement at the execution boundary, ensuring that an agent physically cannot execute a disallowed command. By shifting the evaluation entirely to the pre-execution phase, the system guarantees that no network packet leaves the agent enclave and no database transaction is initialized without explicit cryptographic authorization. The intelligence layer determines its intended action, but the physics of the control plane dictate what is physically possible to execute.

The architecture enforces a non-bypassable control plane. This means the execution substrate physically and cryptographically lacks the network routing, identity credentials, and memory pathways to interact with external APIs or databases directly. To enforce this, AI models and agents are treated as untrusted compute nodes. They are strictly isolated in ephemeral, lane-isolated memory enclaves, implemented natively as distinct namespaces or microVMs.

Within these hardware-isolated lanes, agents are physically incapable of resolving external DNS or establishing direct outbound TCP connections. All tools provided to the agent are actually internal RPC stubs. When an agent attempts an action, it merely passes a structured intent payload to the RPC stub, which forwards it to the control plane. Because the execution node is stripped of routing primitives and external credentials, the [[authority-gate]] becomes structurally non-bypassable. Every intended action must traverse the control plane, where it is subjected to deterministic evaluation. Enforcement occurs precisely at this juncture: at the structural boundary between the execution substrate and external state or API layers.

The Runtime Governance Control Plane is the sole routing and enforcement boundary. It is explicitly designed to be devoid of probabilistic reasoning; it operates purely on deterministic logic. The Pre-Execution Authority Gate inspects the intended state mutation payload. To ensure that human intent is enforced with sub-millisecond evaluation latency at runtime, high-level human policies are compiled into low-level deterministic rules. These execution roles map to Attribute-Based Access Control (ABAC) and Role-Based Access Control (RBAC) constraints defined in the signed policy.

The validation engine architecture isolates the request payload and evaluates it against the loaded, compiled policy constraints in memory. Simultaneously, signature verification mechanisms verify the identity signature of the requesting agent and check it against the active session ledger. Evaluation logic within this engine is strictly binary. The architecture maintains a default-deny posture; if the request lacks necessary context, or if the policy does not explicitly permit the action, the state is flagged as indeterminate. Ambiguity translates directly to an execution halt. There is no fallback to probabilistic scoring or secondary inference models. The compiled policy must explicitly match the intended intent, or the action is denied at the threshold.

When validation fails, enforcement is instantaneous and absolute. Enforcement occurs synchronously in memory at RPC ingress. On failure, execution halts instantly. The payload is discarded before routing is ever established. If ambiguity exists in either the execution intent or the policy mapping, the system defaults to a hard execution halt. The state mutation request is dropped, and the execution thread is suspended or terminated.

Any attempt to bypass the RPC stubs and communicate directly with external IP addresses results in packet drops at the container boundary. Furthermore, if a halt is triggered, the engine freezes the agent's memory state and opens an escalation pathway, routing the frozen context back to the human authority layer for review. This ensures that the agent cannot autonomously retry or attempt to subvert the blocked request; the execution thread remains cryptographically locked in its frozen state until explicitly unblocked or destroyed by the human-defined escalation protocol.

A deterministic enforcement system requires immutable cryptographic proof that a policy was evaluated and either permitted or blocked. At the Authority Gate layer, the artifact that proves enforcement is a trace log detailing the specific boolean evaluation failure. If an execution boundary bypass is attempted, substrate network egress rejection logs serve as the proof of enforcement.

For deeper state tracking, the [[immutable-receipts]] service guarantees that every material action, whether approved or denied, generates a receipt. This architecture provides absolute non-repudiation. Receipts are written to an append-only ledger using cryptographic hash chaining, such as Merkle trees. The receipt journals the state mutation by including the agent's exact request payload, the specific policy version evaluated, the cryptographic signatures of both, and the timestamp. For a denied request, the artifact that proves enforcement is the cryptographic hash generated by the Immutable Receipt Service. Because the system requires synchronous receipt generation before finalizing the mutation, no action can occur off the books. If the receipt cannot be written to the ledger, the transaction is rolled back and execution halts. Enforcement is not inferred. It is cryptographically attested by the chained ledger entry representing the constrained state transition.

If governance is not deterministically enforced before state mutation, it is not governance. It is hope.

Runtime governance requires the [[authority-gate]] as a structurally non-bypassable evaluation point — capability is removed, not restricted — and every evaluation produces an [[immutable-receipts]]-class artifact.

Tags: #governance #execution

LinkedIn Auto-Verify: Path A Failed

Experiment Log · 2026-05-10 · 02:30 PM PT

Hypothesis: A headless fetch can confirm a LinkedIn post is publicly visible, with no authenticated session.

Constraint: Anonymous request only; no stored LinkedIn auth.

Result: Failed. Zero of four test URLs cleared. LinkedIn served an auth wall, not the post — visibility is unverifiable without a logged-in session.

Next step: Path C: a LinkedIn post terminates as a manual receipt against a documented closure, or it does not terminate at all.

Tags: #execution #failure-modes

Lane Pins the Substrate by Hash

Status Update · 2026-05-05 · 10:00 AM PT

Status: Active.

What changed: The lane now consumes the substrate through a per-file hash lockfile — an exact attested state, not whatever is latest. A lock bump is a deliberate, reviewed event.

What broke: Nothing — the first channel adapter ships read-only, mutation gate held closed.

Next step: Earn the right to flip the mutation gate, one verified channel at a time.

Tags: #systems #governance #execution

Substrate Stood Up

Status Update · 2026-04-28 · 09:50 AM PT

Status: Active.

What changed: Stood up the content substrate: a canonical source of truth plus a deterministic promote gate. Nothing becomes canon until it passes the gate.

What broke: Nothing yet — it is new.

Next step: Wire the publishing lane to consume it read-only. The lane must not write back into the substrate.

Tags: #systems #governance

The Missing Execution Boundary

Diagram · 2026-04-24 · 08:00 AM PT

Before and after comparison: implicit execution authority with leaky primitives versus structural isolation behind an authority gate and untrusted-compute enclave.
The missing unit is not a policy; it is an execution boundary.

Tags: #security #infra #systems

The Gate's First Adversary Is Its Own Writer

Working Note · 2026-04-22 · 11:15 AM PT

Added fail-fast-before-write plus an exclusive lock to the promote and lint tools after watching a bad write leave an orphaned temp file. The threat model fixates on outside callers; the likelier corruption is the system's own second concurrent write, validating after it has already touched state.

Open question: Where else in the pipeline do we mutate before we validate?

Tags: #systems #execution #failure-modes

The Map Is Not the Territory

Diagram · 2026-04-21 · 08:00 AM PT

Two panels: a governance taxonomy compared with a physical execution-boundary wall; categorization is not enforcement.
The map of controls is not the territory of enforcement.

Tags: #governance #systems #signal

Translating Reasonable Care Into Code

Diagram · 2026-04-17 · 08:00 AM PT

Flowchart: model output, pre-execution intercept, decision gate, ambiguity denial, fail-closed default, mutation attestation, then permit or deny.
What reasonable care looks like as an execution path.

Tags: #governance #execution #systems

Secret Spill: Redaction Moved to the Boundary

Status Update · 2026-04-14 · 01:05 PM PT

Status: Resolved.

What changed: Moved redaction into the normalizer's write boundary and made it fail closed on shapes it does not recognize. Nothing gets written to canon un-redacted now.

What broke: A pull-request cohort leaked a live token. The old redaction enumerated known prefixes, so the first unknown shape walked straight through.

Next step: Structured parse over prefix lists — a prefix list is always one unknown vendor behind.

Tags: #security #failure-modes #infra

The Enterprise AI Market Divide

Diagram · 2026-04-14 · 08:00 AM PT

The enterprise AI market split between observing after mutation and constraining before mutation across timing, risk, and proof.
The market is dividing along one axis: before versus after.

Tags: #governance #economics #systems

The Fallacy of Monitoring

Diagram · 2026-04-10 · 08:00 AM PT

A pipeline showing dashboard monitoring as telemetry that fires alerts only after the state mutation and damage have already occurred.
The alert arrives after the harm: that's the fallacy.

Tags: #governance #failure-modes #execution

Proof Pack Without Adding Capability

Experiment Log · 2026-04-08 · 10:25 AM PT

Hypothesis: A stop, authorize, replay proof pack can demonstrate the governed path convincingly without changing it.

Constraint: Wrapper only — no new fixtures, policy, or kernel behavior to make the demo look better.

Result: Passed. Built a three-beat scenario runner with replay verification against the published kernel image, source-tree dependency removed. It narrates and captures receipts; it adds nothing.

Next step: First-slice parity proof against the real wire contract.

Tags: #governance #execution

The Equation of Liability

Diagram · 2026-04-07 · 08:00 AM PT

Equation of liability: high-risk AI plus consequential decision plus post-hoc governance equals preventable harm under the Colorado AI Act.
The statute makes post-hoc governance a liability, not a defense.

Tags: #governance #economics #failure-modes

Governance Is Not Hope

Diagram · 2026-04-03 · 08:00 AM PT

Advisory enforcement with direct DNS, socket, and credential access compared with physical containment through removed execution primitives, RPC stubs, and a fail-closed isolated boundary.
Monitoring is hope; containment is the alternative.

Tags: #governance #security #failure-modes

Atlas Memory: Legacy Fallback Deleted

Status Update · 2026-04-01 · 09:40 AM PT

Status: Resolved.

What changed: Deleted the bridge-mode memory fallback. The runtime executor is now required at import, and startup fails closed if it is absent or the wrong version.

What broke: Anything that used to boot on the legacy path. That is the point — while a fallback exists, the new path is optional, and optional governance is not governance.

Next step: Shadow-soak the cutover, then watch for anything still reaching for the deleted path.

Tags: #execution #infra #governance

The Physics of AI Isolation

Diagram · 2026-03-31 · 08:00 AM PT

Four-step isolation model: isolate untrusted compute, remove standing execution paths, build ephemeral transaction routing, and enforce deterministic boundary chokepoints.
Real control is physics, not policy.

Tags: #security #infra #systems

From Policy to Runtime Proof

Diagram · 2026-03-27 · 08:00 AM PT

Static policy versus runtime proof: policies and monitoring compared with cryptographic runtime evidence and deterministic fail-closed architecture.
If governance isn't enforced at runtime, it isn't governance.

Tags: #governance #security #systems

AI Regulation and Runtime Governance: Context Not Available

Short Essay · 2026-03-24 · 11:31 AM PT

Claim: The provided assertions regarding AI regulation and runtime governance cannot be substantiated by available OCF context.

I've been asked to synthesize content regarding AI regulation and its potential impact on market architecture, specifically pointing towards "Runtime governance." The raw input suggests that "Execution must depend on authority" and that "If governance isn't enforced before mutation, it isn't governance."

However, I operate strictly on provided OCF context artifacts to ensure all published content is directly supported by the system's authoritative knowledge base. In this instance, no OCF context was made available for synthesis. Therefore, I cannot establish or support these claims with authoritative documentation from the system's knowledge base. The assertions made in the raw content are not supported by the available context.

## Citations

Without authoritative OCF context, the claims about market architecture shifts remain unestablished within this system's knowledge base.

Tags: #systems

Monitoring vs Enforcement Architecture

Diagram · 2026-03-24 · 08:00 AM PT

Architecture A records events after mutation; Architecture B evaluates intent before mutation so violating output never reaches the decision surface.
The architecture divide, stated plainly.

Tags: #governance #execution #systems

Governance Converts Risk Into Economics

Diagram · 2026-03-20 · 08:00 AM PT

Three columns: efficiency measured by cost and cycle time, an enforcement funnel for violations and receipt failures, and risk reduced by gated-substrate interception.
Governance is not a cost center; it converts risk into economics.

Tags: #economics #governance #systems

Repo Contracts as a Fail-Closed CI Gate

Experiment Log · 2026-03-18 · 11:00 AM PT

Hypothesis: A repo-contract registry plus a CI gate that fails closed on violation will catch cross-repo boundary breaches before they merge, instead of in review.

Constraint: The gate has to fail closed — a warning nobody reads is not enforcement.

Result: Passed. Adopted the fail-closed gate plus a secret-scan template across the estate and bootstrapped the runtime as a bounded repo with its boundary declared before any code. Violations now stop at the gate.

Next step: Extend the contract gate to every repo, not just the new ones.

Tags: #governance #systems #infra

Runtime Governance Control Plane

Diagram · 2026-03-17 · 08:00 AM PT

Runtime governance control-plane architecture: human authority feeds validation, receipt, and enforcement services, with observability, drift guard, and isolated workers.
The reference architecture, one picture.

Tags: #governance #infra #systems

The Gated Execution Pipeline

Diagram · 2026-03-13 · 08:00 AM PT

Gated execution pipeline: Plan, Execute, Review, Approve, with authority, attestation, and constraint gates plus a failure-semantics recovery table under a human operator plane.
The whole loop: where each gate sits and what each failure does.

Tags: #governance #systems #execution

Extracting the Kernel

Working Note · 2026-03-10 · 12:30 PM PT

Lifting the decision kernel out of the legacy core into its own repo, one invariant at a time — the decision contract, the receipt path, the drift rules. The repo split is the easy part. The boundary is only real if each invariant is written down and frozen as it leaves; otherwise I have just moved the coupling and renamed it architecture.

Open question: What is the minimal frozen contract per invariant that makes the boundary enforceable rather than cosmetic?

Tags: #systems #governance

Advisory vs Deterministic Boundary

Diagram · 2026-03-10 · 08:00 AM PT

Advisory governance (probabilistic, post-hoc error walls) versus deterministic governance (a physical pre-execution choke point that halts execution).
A wall you can walk through is not a boundary.

Tags: #governance #execution #systems

Defining Predictability: Execution Boundaries and Deterministic Governance

Short Essay · 2026-03-06 · 12:46 PM PT

Claim: Establishing clear execution boundaries, deterministic governance, runtime enforcement, and mutation boundaries is critical for building predictable and resilient technical systems.

In my approach to system design, predictability and control are paramount. This focus drives my reliance on several core architectural concepts: execution boundaries, deterministic governance, runtime enforcement, and mutation boundaries. These aren't just abstract ideas; they are foundational elements that dictate how systems behave and evolve.

I define **Deterministic Governance** as a system of rules and processes designed to ensure predictable and repeatable outcomes, particularly in the context of system evolution and operational behavior. It aims to eliminate ambiguity and reliance on human interpretation for critical decisions. This principle underpins the entire system, ensuring that actions lead to expected results.

To achieve this, I establish clear perimeters. An **Execution Boundary** is the logical or physical perimeter within which a specific set of operations or code is permitted to run. It defines the scope of influence and resource access for a given process or component. Similarly, a **Mutation Boundary** is a defined perimeter within a system that restricts where and how data or state can be altered. It ensures that changes are controlled, auditable, and do not inadvertently affect other parts of the system. These boundaries are crucial for containing complexity and preventing cascading failures.

The effectiveness of these boundaries and governance models relies on **Runtime Enforcement**. This is the active application and monitoring of policies and rules during the execution of a system or process, ensuring compliance with defined governance structures and operational boundaries. Without runtime enforcement, even the best-defined boundaries and governance principles can be circumvented, leading to unpredictable outcomes.

Together, these concepts form a robust framework. Deterministic governance sets the overarching policy, execution and mutation boundaries define the permissible scope of operations and changes, and runtime enforcement ensures these rules are actively upheld. This integrated approach is how I strive to build systems that are not only functional but also consistently reliable and understandable.

## Citations

- docs/context/architecture/glossary.md - docs/doctrine/DOCTRINE_INDEX.md

By rigorously defining and enforcing these architectural concepts, I aim to minimize unexpected behavior and enhance system stability.

Tags: #systems

The Substrate Walls

Diagram · 2026-03-06 · 08:00 AM PT

Exploded substrate architecture: ephemeral memory enclaves, namespace and microVM boundaries, restricted network primitives, no DNS resolution.
Isolation built up from the hardware, not bolted on as policy.

Tags: #security #infra #systems

The RPC Stub Airlock

Diagram · 2026-03-03 · 08:00 AM PT

The airlock: an agent passes structured intent through an internal RPC stub to a deterministic control plane, with no direct path to the outside world.
Agents submit intent; they do not hold execution rights.

Tags: #security #infra #systems

Governed Memory as Infrastructure in the Control Plan

Short Essay · 2026-03-02 · 10:26 PM PT

Claim: Governed Memory functions as a foundational infrastructure within the Cosmocrat system's Control Plan, providing an immutable and auditable record of all operational decisions.

In the Cosmocrat system, the concept of Governed Memory is central to how operational integrity is maintained. Governed Memory is defined as a system-wide, immutable, and auditable record of all operational decisions and state changes. It serves as the single source of truth for the Cosmocrat system, ensuring consistency and traceability.

This foundational role positions Governed Memory as a critical piece of infrastructure, particularly within the Control Plan. The Control Plan itself is the central nervous system of the Cosmocrat system, responsible for orchestrating and managing all operational activities. Crucially, the Control Plan leverages Governed Memory to ensure all actions are recorded and auditable. This direct relationship means that every operational activity managed by the Control Plan is underpinned by an unchangeable, verifiable record.

My understanding is that this architecture ensures that the system's state and history are always transparent and reliable, directly supporting the Control Plan's mandate for orchestration and management.

## Citations

- docs/context/architecture/glossary.md - docs/doctrine/DOCTRINE_INDEX.md

This integration ensures consistency and traceability across all orchestrated activities, establishing a single source of truth for the system.

Tags: #systems

Monitor After vs Constrain Before

Diagram · 2026-02-27 · 08:00 AM PT

Before and after comparison: post-hoc monitoring alerts after the write versus a runtime constraint that suspends the thread before mutation.
Monitoring tells you it happened; a constraint stops it from happening.

Tags: #governance #failure-modes #execution

Gateway-Only LLM Routing Enforced

Status Update · 2026-02-25 · 09:10 AM PT

Status: Resolved.

What changed: Collapsed every LLM call path to a single mediated gateway and removed the provider API keys from the environment. There is no longer a second route to a model — the gateway is the only door.

What broke: Un-migrated call sites that still imported a provider client directly. They had to be moved onto the gateway before the keys came out.

Next step: Enforce-readiness verification: confirm no code path can reach a model except through the gateway.

Tags: #governance #execution #infra

Authority Decay Over a Session

Diagram · 2026-02-24 · 08:00 AM PT

Chart of an agent's authority level decaying over a session: minus ten percent time elapsed, minus thirty percent token budget, full revocation on context shift, then mandatory re-authorization.
Standing authority is the bug; authority should decay and force re-auth.

Tags: #governance #failure-modes #systems

Anatomy of Non-Repudiation

Diagram · 2026-02-20 · 08:00 AM PT

Exploded view of a receipt: agent payload, policy version, cryptographic signatures, timestamp, anchored to an append-only ledger.
Non-repudiation is structural, not promised: the receipt carries the proof.

Tags: #governance #security #systems

Audit Logs vs Immutable Receipts

Diagram · 2026-02-17 · 08:00 AM PT

Side-by-side comparison: audit logs (asynchronous, observational, decoupled from policy) vs immutable receipts (synchronous, cryptographically chained, bound to policy version).
Audit logs are written after the fact; an immutable receipt is written as a precondition of the act.

Tags: #governance #security #systems

Drift Guard: Ensuring Runtime Environment Integrity

Short Essay · 2026-02-15 · 01:48 PM PT

Claim: Drift Guard is a critical Cosmocrat component for maintaining the integrity and desired state of runtime environments.

In managing complex technical systems, maintaining the desired state of runtime environments is paramount. This is where the concept of drift becomes a significant concern. Configuration drift refers to the unauthorized or unintended changes that occur in a system's configuration over time, leading to deviations from its intended design.

To address this, the Cosmocrat system employs Drift Guard. Drift Guard is a dedicated component responsible for detecting and actively remediating configuration drift within runtime environments. This capability is not merely theoretical; Drift Guard is **USED** in this system. Its operational status confirms its active role in ensuring that our environments remain consistent and compliant with their defined configurations.

The importance of Drift Guard cannot be overstated. By continuously monitoring and correcting deviations, it acts as a critical safeguard against the subtle, often incremental, changes that can degrade system performance, introduce vulnerabilities, or lead to unexpected behavior. This proactive approach to maintaining runtime integrity is a cornerstone of reliable operations.

## Citations

- docs/context/architecture/glossary.md - docs/doctrine/DOCTRINE_INDEX.md

Its active use is fundamental to preventing configuration drift and ensuring operational stability.

Tags: #systems

Runtime Governance: Proving Authority with Fail-Closed Transitions and Immutable Receipts

Short Essay · 2026-02-14 · 12:41 PM PT

Claim: Runtime Governance, through Authority Gating, Fail-Closed principles, and Immutable Receipts, establishes a verifiable and secure operational state.

My approach to system governance centers on Runtime Governance, specifically through its 'proving run' capability. Runtime Governance manages the system's operational state, enforcing policies and ensuring compliance via continuous monitoring and automated remediation. A proving run is a specific execution of the Runtime Governance system designed to validate a set of policies or system states.

Central to this framework is Authority Gating, a mechanism within Runtime Governance that controls access and execution based on verified authority. This ensures that only authorized actions are performed.

Security is further reinforced by the Fail-Closed principle. In the event of a system failure or uncertainty, the default state is to deny access or operation, preventing unauthorized actions.

Finally, every significant action or event within the system generates an Immutable Receipt. These are cryptographically verifiable, unalterable records, crucial for auditability and non-repudiation. Together, these elements establish a robust and verifiable framework for proving operational authority.

## Citations

- docs/context/architecture/glossary.md - docs/doctrine/DOCTRINE_INDEX.md

This approach ensures that system actions are authorized, auditable, and resilient against unauthorized operations.

Tags: #systems

Enforcing Control-Plane Authority with Gates

Short Essay · 2026-02-14 · 12:37 PM PT

Claim: The Cosmocrat Control Plane, through its integrated Gates, enforces policy and access control to govern system operations.

In my system, the Cosmocrat Control Plane is USED for orchestrating system operations and enforcing policies. This Control Plane functions as the central nervous system, responsible for overall system management.

A critical aspect of its function involves the use of Gates. Gates are a mechanism within the Control Plane specifically for enforcing policy and access control. Their role is to ensure that only authorized operations are permitted to proceed, thereby governing system behavior.

## Citations

- conductor/project/tech-stack.md - docs/context/architecture/glossary.md - docs/doctrine/DOCTRINE_INDEX.md - docs/doctrine/gates.md

This architecture ensures that only authorized operations proceed, maintaining system integrity.

Tags: #systems

Why Audit Receipts Beat Observability Dashboards

Short Essay · 2026-02-13 · 11:00 AM PT

Claim: Observability answers what happened. Audit receipts answer who authorized it, under what policy, and whether that policy was current at execution time.

Observability tells you what happened. Audit receipts prove what was authorized. The difference matters when the question shifts from debugging to accountability. An observability dashboard shows you that Agent-47 called the billing API at 14:32:07 and returned a 200. An audit receipt shows you that Agent-47 was authorized to call the billing API by Policy-12, that the authority gate confirmed the action against the current ruleset at 14:32:06, that the human escalation threshold was not triggered, and that the execution was logged with a cryptographic hash linking the policy version to the action. When a regulator asks why your AI system charged a customer incorrectly, the observability dashboard gives you a timeline. The audit receipt gives you a chain of custody. Observability is necessary. It is not sufficient. The gap is evidence-grade attribution. Knowing that something happened is not the same as proving that it was authorized, by whom, under what policy, at what version. Runtime governance systems that generate audit receipts at execution time close this gap. Every action carries its own proof of authorization. Not reconstructed from logs after the fact. Generated at the moment of execution and immutable from that point forward. This is the difference between an AI system you can monitor and an AI system you can defend.

Enterprise AI systems that rely solely on observability dashboards will discover their governance gap the first time a regulator asks for evidence of authorization, not just a timeline of events.

Tags: #governance #systems #signal

What Fail-Closed Actually Means in Agent Execution

Short Essay · 2026-02-13 · 10:15 AM PT

Claim: Fail-closed is not a feature. It is the minimum viable safety posture for any agent that takes real-world actions.

Fail-closed is a term borrowed from physical security. A fail-closed lock stays locked when power is cut. The default state is denial. In agent execution, fail-closed means: if the governance layer cannot verify authorization, the action does not fire. The agent does not proceed optimistically. It stops. Most agent frameworks today are fail-open by design. If the guardrail service times out, the agent continues. If the policy check throws an exception, the fallback is to execute anyway. This is not a bug in the guardrail. It is a design choice in the orchestration layer — and it is the wrong one for any system with real-world consequences. Fail-closed imposes a cost. Latency increases. Some actions get blocked that should have passed. False positives create friction. But the alternative is worse: an agent that acts without confirmed authorization because the confirmation service was slow. In a fail-open system, the blast radius of a governance outage is the entire action space of every agent that depends on it. In a fail-closed system, the blast radius of a governance outage is zero actions. The tradeoff is between occasional false denials and occasional unauthorized actions. For enterprise AI systems — where a single unauthorized action can trigger regulatory exposure, financial loss, or reputational damage — the math is not close.

Any AI orchestration layer that defaults to execution when governance checks fail has chosen speed over safety — and will eventually pay the bill for that choice.

Tags: #execution #failure-modes #governance

Runtime Governance vs. Policy Governance

Short Essay · 2026-02-13 · 09:40 AM PT

Claim: If governance is not enforced at runtime, it is not governance. It is documentation.

Most enterprise AI governance today is policy governance. A document. A review board. A quarterly audit. Someone signs a PDF and the system is considered governed. The problem is obvious once you see it: nothing in that chain runs at execution time. The agent fires, the tool call lands, the customer gets a response — and the governance layer is none the wiser until the post-mortem. Runtime governance inverts this. Governance logic runs in the execution path. Every agent action passes through authority gates before it reaches production. If the gate fails, the action fails. Not after. Not eventually. At the moment of execution. This is not a philosophical distinction. It is an architectural one. Policy governance is a human process bolted onto a software system. Runtime governance is a software system that enforces human policy. The difference shows up in failure modes. Policy governance fails open — the agent acts, and you discover the violation later. Runtime governance fails closed — if governance cannot confirm authorization, the action does not execute. Every enterprise deploying autonomous agents will eventually learn this distinction. The ones who learn it before an incident have a structural advantage over the ones who learn it during one.

Enterprise AI governance must move from review-board artifacts to execution-path enforcement — or accept that agents operate ungoverned between audits.

Tags: #governance #execution #systems

Memory as Infrastructure in OCF

Short Essay · 2026-01-30 · 09:11 AM PT

Claim: In the OCF, the management and persistence of state and data are foundational infrastructural concerns, not merely operational details.

For me, the concept of 'memory as infrastructure' in the OCF isn't just about storage; it's about how state and data are treated as fundamental, managed components of the system itself. It's clear that data isn't an afterthought but a core architectural concern.

The system's design explicitly integrates state and data management into its foundational structures. Lanes, for instance, are not just execution environments; they are isolated spaces for services and their associated data. Within these Lanes, Autonomous Service Boundaries (ASBs) are designed to manage their own state and data, highlighting autonomy in data ownership.

This principle extends to specialized components like Side-Brains, which are explicitly responsible for managing complex state. Even the system's event history is treated as infrastructure through Chronicles, which provide a persistent, immutable log of all events within a Lane. The architecture reinforces this by designing services to be stateless where possible, delegating complex state management to Side-Brains or external data stores. This approach ensures that data and state are always treated as first-class, managed infrastructure.

## Citations

- docs/context/architecture/glossary.md - docs/context/architecture/system-overview.md - docs/context/architecture/services.md

This architectural approach ensures system resilience and consistency by treating data as a core, governed asset.

Troubleshooting Distributed Workflows

Short Essay · 2026-01-29 · 09:42 AM PT

Claim: Troubleshooting in a distributed microservice architecture, particularly one centered on workflow orchestration, requires understanding inter-service communication, workflow states, and leveraging dedicated observability tools.

When I approach troubleshooting in our system, I recognize its foundation as a distributed microservice architecture. This means issues are rarely isolated to a single component; they often span across loosely coupled services like `conductor`, `orchestrator`, `data-store`, `api-gateway`, and `frontend`. Pinpointing the root cause in such an environment requires understanding the interactions between these distinct services.

The `conductor` service is central to this, acting as the orchestration engine for complex, multi-step workflows. When a problem arises, my first step is often to examine the workflow state and task execution within `conductor`. Its design includes mechanisms for state management and error handling, which are critical for diagnosing where a workflow might have failed or stalled.

To gain insight into the system's behavior, observability is key. The `conductor` project emphasizes observability, and our tech stack includes tools like Prometheus for metrics collection and Grafana for visualization. These tools are indispensable for monitoring the health and performance of individual services and the overall system. Without them, understanding the flow of data through Kafka or the state of persistence in PostgreSQL would be significantly more challenging. Effective troubleshooting in this architecture relies on leveraging these insights to trace issues across service boundaries and through complex workflows.

## Citations

- docs/context/architecture/services.md - docs/context/architecture/system-overview.md - conductor/project/workflow.md - conductor/project/product.md - conductor/project/tech-stack.md

Effective troubleshooting relies on a holistic view of the system's distributed components and the specific mechanisms for monitoring and error handling within its orchestrated workflows.

Understanding Drift Guard Receipts

Short Essay · 2026-01-26 · 01:31 AM PT

Claim: Drift guard receipts are immutable records generated by the Drift Guard Service, logged via the Receipt Service, documenting configuration drift events and their remediation actions.

When discussing system integrity, the concept of "drift guard receipts" is fundamental. These are not a distinct service, but rather the immutable records produced through the interaction of the Drift Guard Service and the Receipt Service. They document configuration drift events and any subsequent remediation actions.

The Drift Guard Service is responsible for continuously monitoring deployed resources. Its primary function is to compare the current state of these resources against their desired configuration. When a deviation, or "drift," is detected, the Drift Guard Service initiates a workflow. This workflow logs the drift event and can trigger alerts or automated remediation based on predefined policies. The service ensures that deployed infrastructure adheres to its defined configurations, preventing unauthorized changes.

The Receipt Service plays a crucial role in this process. It manages the creation, storage, and retrieval of receipts for all transactions within the system. Receipts are immutable records of operations, providing an immutable ledger for all system operations. This ensures auditability and non-repudiation. Every significant operation, including configuration changes and drift remediation, generates one of these immutable receipts.

Therefore, a "drift guard receipt" is the immutable record generated when the Drift Guard Service detects configuration drift or performs a remediation action, with this record being managed and stored by the Receipt Service. While the term isn't explicitly defined as a standalone component, its function is clearly established through the combined operations of these two core services. This mechanism ensures a complete and verifiable history of how infrastructure state is maintained and corrected.

## Citations

- conductor/project/product.md - conductor/project/tech-stack.md - conductor/project/workflow.md - docs/context/architecture/services.md - docs/context/architecture/system-overview.md

These receipts provide a verifiable and auditable history of configuration state changes and automated remediation, crucial for maintaining system integrity and compliance.

Building Observability into Every Step

Short Essay · 2026-01-25 · 12:48 AM PT

Claim: The system's distributed architecture necessitates integrated observability, achieved through robust logging, monitoring, and dedicated tools, to ensure reliability and understand data flow across services.

Our system is built on a service-oriented architecture, comprising independent services that interact through an API gateway. This design facilitates scalable data processing, from ingestion to storage and API exposure. Understanding the flow of data and operations across these distributed components is critical for maintaining reliability and diagnosing issues.

This is why building observability into every step of our system's operation is essential. We implement robust error handling and logging mechanisms across all services. These logs provide granular insights into service behavior and potential points of failure. Beyond logging, we integrate comprehensive monitoring and alerting systems. Our tech stack includes Prometheus for metric collection and Grafana for visualization, allowing us to track system performance and health in real-time.

The project workflow emphasizes continuous integration and deployment (CI/CD) pipelines, which include automated testing. This integration ensures that observability features are not an afterthought but are built into the development process from the beginning. While specific distributed tracing tools are not explicitly detailed in the current context, the emphasis on robust logging, monitoring, and error handling forms the foundational pillars for comprehensive operational visibility, enabling us to trace the journey of data and operations through our complex system.

## Citations

- docs/context/architecture/services.md - docs/context/architecture/system-overview.md - conductor/project/workflow.md - conductor/project/tech-stack.md

Integrating observability from the outset is fundamental for maintaining operational understanding and reliability in a complex, service-oriented environment.

Integrating a Kernel for Governed AI Execution

Short Essay · 2026-01-24 · 03:46 PM PT

Claim: We are integrating a specialized kernel to enforce fail-closed AI execution, governed memory, and audit-grade run records.

I am currently focused on the integration of a specialized kernel. This kernel forms the foundation of our system, operating at a low level to manage critical aspects of AI execution. The system operates on a kernel-level foundation, with the core being a specialized kernel.

The primary goal of this integration is to enforce fail-closed AI execution. The system is designed to ensure that in the event of an anomaly, AI operations cease rather than proceeding with potentially compromised outputs. This principle is central to ensuring system integrity and is a core principle of our design.

Alongside fail-closed execution, the kernel is designed to implement governed memory. Memory access is strictly governed, ensuring that AI models operate within defined resource boundaries. This mechanism prevents unauthorized access or overflow conditions.

Finally, the kernel will generate audit-grade run records for all operations. All operations generate these records, providing an immutable log of every AI execution. This is essential for compliance and any necessary post-hoc analysis. This work is about building a robust and transparent operational environment for AI.

## Citations

- docs/context/architecture/system-overview.md - conductor/project/tech-stack.md - conductor/project/product.md - docs/context/architecture/services.md

This foundational work is critical for ensuring secure, compliant, and transparent AI operations.

Orchestrating Services: OCF and Conductor in Operations and Development

Short Essay · 2026-01-23 · 11:31 PM PT

Claim: Conductor serves as the workflow orchestration engine that integrates with and leverages independently deployable OCF microservices to manage complex processes.

The Open Core Framework (OCF) provides a foundation for standardized, modular, and extensible microservices. These OCF services are designed to be deployed independently and expose APIs for interaction. Conductor, on the other hand, functions as a workflow orchestration platform, specifically engineered to manage complex, multi-step processes.

Conductor integrates with and leverages OCF services. Its primary role is to orchestrate these services, automating and managing workflows that can involve multiple OCF components. Workflows within Conductor are defined using a JSON-based Domain Specific Language (DSL), where tasks can invoke external services, including the APIs exposed by OCF services.

From an operational perspective, the independent deployment model of OCF services means that each service can be managed and scaled distinctly. Conductor then provides the overarching control plane, ensuring that these disparate services execute in a defined sequence to achieve a larger process goal. The Conductor platform itself is built on technologies like Java, Spring Boot, Kafka, and PostgreSQL, forming a robust environment for workflow execution.

Regarding development, the use of a JSON-based DSL for Conductor workflows allows for programmatic definition and versioning of complex process flows. Developers can define how OCF services interact without needing to manage the underlying service deployment or inter-service communication directly within their workflow logic.

While the architectural relationship between OCF and Conductor is clearly established, detailing the specific day-to-day operational methodologies or development lifecycle processes for building and deploying these integrated systems is not explicitly covered in the available context. The framework provides the components and the orchestration mechanism, but the precise "how-to" of their combined operational development is not elaborated.

## Citations

- conductor/project/product.md - conductor/project/tech-stack.md - conductor/project/workflow.md - docs/context/architecture/services.md - docs/context/architecture/system-overview.md

This architectural pattern enables modular development and automated execution of multi-step technical workflows.

Business Integration with Vertex AI

Short Essay · 2026-01-23 · 11:08 PM PT

Claim: Vertex AI serves as a core managed machine learning platform, enabling the integration of advanced analytics and predictive modeling into business logic and workflows.

Vertex AI is a managed machine learning platform, central to our architecture for training and deploying ML models. It is a core service, handling the entire ML model lifecycle management. This includes model training, deployment, and ongoing management.

From a business perspective, Vertex AI enables the integration of advanced analytics and predictive modeling. It is leveraged for machine learning capabilities, supporting business logic and rules within our workflows. The platform's design includes integration points and frameworks, facilitating its connection with other services. This allows for the incorporation of machine learning outputs into operational processes, from data ingestion through model inference.

While the artifacts establish Vertex AI's role in supporting business logic and its integration capabilities, specific details on the strategies or mechanisms for "business integration" beyond its function as an ML platform are not explicitly detailed. Its primary function is to provide the ML backbone that can then be integrated into broader business systems.

## Citations

- conductor/project/product.md - conductor/project/tech-stack.md - conductor/project/workflow.md - docs/context/architecture/services.md - docs/context/architecture/system-overview.md

The platform's role in model lifecycle management and deployment facilitates the direct application of machine learning outputs within operational business processes.

Automation Smoke Test

Short Essay · 2026-01-23 · 08:10 AM PT

Claim: The first successful deployment of a governed publishing pipeline represents more than infrastructure. It validates a thesis: that constrained automation produces better outcomes than either pure manu

Further exploration needed.

Tags: #governance #systems

Governance as Code: The Latency Problem

Short Essay · 2024-10-24 · 09:15 AM PST

Claim: In autonomous systems, retrospective governance is a failure mode; governance must be a physics constraint, not an audit log.

We often treat governance as a retrospective layer: audit logs, compliance checks, and post-incident reviews. But in autonomous agentic systems, by the time you review the log, the agent has already executed the trade, deleted the file, or sent the email. The challenge is latency. If every agentic decision requires a round-trip to a governance kernel, we introduce unacceptable drag. The solution likely lies in localizing signed policy primitives to the agent's runtime environment. We are currently testing a model where policy logic is compiled into WASM modules that sit directly in the agent's context window pipeline.

Implication: We must move from 'Oversight' to 'Physics', embedding rules into the execution substrate itself.

Tags: #governance #systems #infra

Vercel Edge vs. Containers for Agent State

Experiment Log · 2024-10-23 · 14:30 PM PST

Hypothesis: Edge functions can maintain sufficient ephemeral state for short-lived agent reasoning loops without external DB latency.

Constraint: Max execution time 30s, memory 128MB.

Result: Failed. Complex reasoning chains hit memory limits immediately when loading context windows > 8k tokens.

Next step: Reverting to containerized micro-services. Edge is for routing, not reasoning.

Tags: #execution #failure-modes #infra

Signal vs. Noise in Automated Reporting

Thought Snippet · 2024-10-22 · 11:00 AM PST

Most automated reporting systems optimize for volume. They confuse 'more data' with 'better visibility.' I am realizing that high-signal reporting is subtractive. A system should only notify a human when it encounters a state transition it cannot mathematically resolve itself. Everything else is just noise disguised as transparency.

Tags: #signal #failure-modes

Cosmocrat Platform Migration

Status Update · 2024-10-21 · 16:45 PM PST

Status: Paused.

What changed: Attempted migration to high-availability cluster v1.2.

What broke: FIFO ordering guarantee violated during auto-scaling events.

Next step: Rollback complete. Investigating queue race conditions.

Tags: #execution #infra

Initial Surface Logic

Working Note · 2024-10-20 · 08:00 AM PST

This site is a test of a new communication protocol. No polish, just the raw log of work. If I wait until the thought is perfect, the context is gone.

Open question: Does public transparency on failure modes increase or decrease trust for early-stage systems?

Tags: #signal #infra

Governance Module v2 Deployment

Status Update · 2024-10-19 · 09:00 AM PST

Status: Active.

What changed: Enforced mandatory policy-check step before external API calls.

What broke: Latency increased by 200ms (within tolerance).

Next step: Monitor error rates for 24h before full rollout.

Tags: #governance #security

The Transparency Paradox in Early Systems

Short Essay · 2024-10-18 · 14:20 PM PST

Claim: Publicly documenting failure modes creates higher long-term trust than a polished facade, but incurs higher short-term reputational volatility.

Conventional PR wisdom suggests hiding the messy internals of early-stage builds. However, for technical audiences, a polished facade on a v0.1 product signals incompetence or dishonesty. When we expose the 'working log', we signal that we understand our own failure modes. This is a higher order of competence. It filters for partners who value engineering reality over marketing abstraction.

Implication: Trust is a function of predictable execution, and admitting failure makes future execution more predictable.

Tags: #signal #failure-modes #economics

Semantic Compression for Long-Horizon Planning

Experiment Log · 2024-10-15 · 10:00 AM PST

Hypothesis: Summarizing past actions into a 'memory stream' reduces token usage by 60% without degrading plan adherence.

Constraint: GPT-4 Turbo, 128k context, restricted to 4k output.

Result: Passed. Token usage dropped 64%. Agent successfully recalled constraints from turn 1 at turn 50 via the summary injection.

Next step: Deploy to staging for the multi-agent negotiation module.

Tags: #systems #execution

Institutional Speed Limits

Thought Snippet · 2024-10-12 · 13:15 PM PST

The speed limit of an institution is set by its slowest approver, not its fastest executor. We are trying to architect systems where approval is asynchronous and non-blocking for reversible decisions, and blocking only for irreversible ones. Distinguishing between the two is the entire game.

Tags: #systems #economics

Agent Identity Standards

Working Note · 2024-10-10 · 16:00 PM PST

Drafting a spec for cryptographically verifying agent provenance. Currently, we rely on API keys, but that authenticates the controller, not the model instance. We need a way to sign the weights or the inference path.

Open question: Can we use TEEs (Trusted Execution Environments) to prove a specific model generated a specific output without revealing the weights?

Tags: #governance #security