Menu

#50 [memory] ADR-009: automation file writes must specify explicit text encodings

closed
nobody
None
2026-05-17
2026-05-12
Anonymous
No

Originally created by: TheoV823

Summary

  • ADR-009 (docs/adr/ADR-009-explicit-text-encoding-in-automation.md) — cross-language architectural decision: all automation file writes must specify encoding explicitly (UTF-8 for this repo). Covers PS, Python, Node, Bash. Defines required patterns, forbidden patterns, and enforcement implications.
  • encoding_001 added to .mneme/project_memory.json decisions — constraints and anti-patterns match the ADR; enables pre-execution governance checks.
  • Governance Incident 002 added to docs/validation/governance-incident-log.md — documents the production incident that triggered this decision (49 site files silently corrupted by implicit Windows-1252 encoding, sync_shared.py crash, 30-min remediation).

Why this ADR

Real production incident on 2026-05-12 during a bulk footer update. PowerShell Set-Content without -Encoding utf8 re-encoded em-dash bytes (0xE2 0x80 0x94) as Windows-1252 0x97 (invalid UTF-8). No error at write time; failure surfaced downstream in sync_shared.py. Three additional commits required before deploy could proceed clean.

The ADR is scoped to the cross-language pattern (not PowerShell-specific) because the same silent-corruption risk exists in Python, Node, Bash, and Go under the wrong locale/runtime defaults.

Governance chain

Production incident (2026-05-12)
  → Governance Incident 002 (incident log)
  → ADR-009 (architectural decision)
  → encoding_001 (enforcement rule)
  → pre-execution pattern matching on automation scripts

Test plan

  • [ ] ADR prose is accurate and self-consistent
  • [ ] encoding_001 constraints match the forbidden patterns in ADR-009
  • [ ] Incident 002 log entry matches what actually occurred
  • [ ] project_memory.json is valid JSON

🤖 Generated with Claude Code

Related

Tickets: #45

Discussion

  • Anonymous

    Anonymous - 2026-05-12

    Originally posted by: github-actions[bot]

    mneme self-governance check

    Mode: warn - verdicts are visible but do not block merge. Rollout plan: .mneme/README.md.

    Summary: 0 pass, 0 warn, 0 fail

    verdict file
    ❔ UNKNOWN .mneme/project_memory.json
    ❔ UNKNOWN docs/adr/ADR-009-explicit-text-encoding-in-automation.md
    ❔ UNKNOWN site/404.html
    ❔ UNKNOWN site/_snippets/footer.html
    ❔ UNKNOWN site/about/index.html
    ❔ UNKNOWN site/benchmark/index.html
    ❔ UNKNOWN site/compare/coderabbit/index.html
    ❔ UNKNOWN site/compare/cursor-rules/index.html
    ❔ UNKNOWN site/compare/index.html
    ❔ UNKNOWN site/contact/index.html
    ❔ UNKNOWN site/demo/dependency-policy/index.html
    ❔ UNKNOWN site/demo/index.html
    ❔ UNKNOWN site/demo/repository-pattern/index.html
    ❔ UNKNOWN site/demo/storage-decision/index.html
    ❔ UNKNOWN site/docs/benchmark-methodology/index.html
    ❔ UNKNOWN site/docs/cli/index.html
    ❔ UNKNOWN site/docs/governance-violations/index.html
    ❔ UNKNOWN site/docs/how-enforcement-works/index.html
    ❔ UNKNOWN site/docs/index.html
    ❔ UNKNOWN site/docs/supported-languages/index.html
    ❔ UNKNOWN site/for/cto/index.html
    ❔ UNKNOWN site/for/index.html
    ❔ UNKNOWN site/for/platform/index.html
    ❔ UNKNOWN site/for/principal-engineer/index.html
    ❔ UNKNOWN site/founder/index.html
    ❔ UNKNOWN site/index.html
    ❔ UNKNOWN site/insights/ai-code-review-does-not-scale-linearly/index.html
    ❔ UNKNOWN site/insights/ai-coding-governance-should-be-reviewable/index.html
    ❔ UNKNOWN site/insights/architectural-governance-across-heterogeneous-ai-coding-agents/index.html
    ❔ UNKNOWN site/insights/deployment-quality-will-define-the-ai-era/index.html
    ❔ UNKNOWN site/insights/generative-ai-software-engineering-stack/index.html
    ❔ UNKNOWN site/insights/github-copilot-space-framework/index.html
    ❔ UNKNOWN site/insights/index.html
    ❔ UNKNOWN site/insights/mneme-vs-cursor-rules/index.html
    ❔ UNKNOWN site/insights/openai-compatible-apis-are-commoditizing-models/index.html
    ❔ UNKNOWN site/insights/prompt-engineering-is-not-governance/index.html
    ❔ UNKNOWN site/insights/review-is-not-governance/index.html
    ❔ UNKNOWN site/insights/rise-of-agentic-engineering-education/index.html
    ❔ UNKNOWN site/insights/what-is-the-ai-sdlc/index.html
    ❔ UNKNOWN site/insights/why-code-review-cannot-scale-with-ai-output/index.html
    ❔ UNKNOWN site/insights/why-prompt-memory-fails-at-scale/index.html
    ❔ UNKNOWN site/insights/why-rag-fails-for-architectural-governance/index.html
    ❔ UNKNOWN site/integrations/adr-import/index.html
    ❔ UNKNOWN site/integrations/claude-code/index.html
    ❔ UNKNOWN site/integrations/cursor/index.html
    ❔ UNKNOWN site/integrations/github-actions/index.html
    ❔ UNKNOWN site/integrations/index.html
    ❔ UNKNOWN site/og-integration-adr-import.html
    ❔ UNKNOWN site/pilot/index.html
    ❔ UNKNOWN site/platforms/index.html
    ❔ UNKNOWN site/privacy/index.html
    ❔ UNKNOWN site/roadmap/index.html
    ❔ UNKNOWN site/standards/index.html
    ❔ UNKNOWN site/supported-languages/index.html
    ❔ UNKNOWN site/supported-languages/javascript-governance/index.html
    ❔ UNKNOWN site/supported-languages/python-governance/index.html
    ❔ UNKNOWN site/supported-languages/typescript-governance/index.html
    ❔ UNKNOWN site/use-cases/coding-assistant-governance/index.html
    ❔ UNKNOWN site/use-cases/data-platform-governance/index.html
    ❔ UNKNOWN site/use-cases/design-system-governance/index.html
    ❔ UNKNOWN site/use-cases/index.html
    ❔ UNKNOWN site/use-cases/legacy-codebase-memory/index.html
    ❔ UNKNOWN site/use-cases/multi-agent-workflow-governance/index.html
    ❔ UNKNOWN site/use-cases/security-compliance-guardrails/index.html
    ❔ UNKNOWN site/works-with/index.html

    Generated by .github/workflows/mneme-check.yml · query = PR title + file path · scope = repo-governance paths.

     
  • Anonymous

    Anonymous - 2026-05-14

    Ticket changed by: TheoV823

    • status: open --> closed
     

Log in to post a comment.

Auth0 Logo