docs(incidents): record six production incidents and cross-link the rules - #919
Merged
Conversation
…ules Six production failures were recorded only in one engineer's private assistant memory. This moves them into echo/docs/incidents/ as one short page each: rule first, then mechanism, fix, and prevention. - gitops env removal took prod down (2026-07-02): gitops main syncs to prod in minutes, prod code only on a release tag - Argo self-heal reverts kubectl scale/patch - directus-sync is_indexed trap: prod-only DROP INDEX abort - echo-agent missing from the ci.yml build matrix - event-loop corruption in Dramatiq actors (why the AGENTS.md rules exist) - validate a dependency migration by execution, not construction Every claim was checked against the tree: ci.yml carries the dbr-echo-agent matrix entry, the conversation_chunk.timestamp snapshot has is_indexed: true, and settings.py uses extra="ignore" throughout. The rules themselves stay where they already live. AGENTS.md and branching_and_releases.md gain links to the write-ups rather than copies of them. Matching human-zone notes for the three infrastructure incidents are prepared in echo-gitops/AGENTS.md but left uncommitted, since that clone's main branch deploys to production. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Six serious production incidents were recorded only in one engineer's private assistant memory. This moves them into the repository, in the place the next person would actually look.
Where things went, and why
echo/docs/incidents/is the new home.echo/docs/is the engineering-notes tree (ADRs, plans, backlogs), which is the right altitude for these. The repo-rootdocs/is the published customer site at docs.dembrane.com and was deliberately left alone.One short page per incident, each leading with the rule so a skimmer gets it in one line, then the mechanism, the fix, and what prevents a repeat.
README.mdindexes them and states when a new page is warranted.Cross-links, not copies. Where a rule already exists it stays where it is and gains a link to the write-up:
echo/AGENTS.md: three lines under "Branching & Deployment", one under "Dramatiq & Async Rules", one narrow exception under "Directus Rules"echo/server/AGENTS.md: a pointer from "Background task design" to the event-loop write-upecho/docs/branching_and_releases.md: the release-step checklist now distinguishes adding an env key (safe) from removing one (release-gated)The Dramatiq rules in particular were already well covered in
echo/AGENTS.md, so nothing there was duplicated. The incident page exists to explain why those rules are worded as they are, since the short form reads as superstition without the failure behind it.The six
gitops-env-removal-release-gate.mdargo-self-heal-reverts-manual-changes.mdkubectl scale/patchproduction; Argo reverts itdirectus-sync-is-indexed.mdis_indexed: falseover a live index named differently aborts the wholeschema/apply, on production onlyagent-missing-from-build-matrix.mddramatiq-actor-event-loops.mdvalidate-execution-not-construction.mdVerification
Everything was checked against the tree before writing. All three requested checks passed:
.github/workflows/ci.ymlcarries thedbr-echo-agentmatrix entry (added in feat(agentic): foundation slices — agent image on main, v2 authz, design doc #745, with the reason recorded inline)echo/directus/sync/snapshot/fields/conversation_chunk/timestamp.jsonhasis_indexed: true(fix(directus): mark conversation_chunk.timestamp as indexed in schema snapshot #724)echo/AGENTS.mdalready covers the Dramatiq rules;run_async_in_new_loopstill exists and now runs on a shared background loopOne nuance worth flagging:
run_async_in_new_loopno longer creates a new loop despite its name. Since #712 and #718 it submits to a single long-lived loop on a real OS thread. The blanket phrasing "no asyncio in Dramatiq actors" is therefore about loop lifecycle, not about async code being banned from workers. The write-up says so plainly, andecho/AGENTS.mdgained a line calling out the misnomer.Two live facts fell out of the verification and are recorded because they are actionable:
DISABLE_REDACTIONandFEATURE_FLAGS__ENABLE_CHAT_AUTO_SELECTare still set in the gitops values files even though neither field exists insettings.pyonmain. That is correct, not drift, and they should not be tidied away until a release containing refactor(chat): remove auto-select in favor of agentic chat #744 is live.echo-agentdeployment stays broken until a release containing feat(agentic): foundation slices — agent image on main, v2 authz, design doc #745 goes out.GitOps
echo/echo-gitops/is a separate clone whosemainbranch deploys to production, and it is gitignored by this repo, so nothing from it is in this PR. Matching notes for the three infrastructure incidents were written into itsAGENTS.md, inside the human-notes zone below the auto-generated marker, which the file's own self-healing policy preserves verbatim across regeneration. That change is left uncommitted in the gitops clone and needs a separate PR there.🤖 Generated with Claude Code