Releases: Totoro-jam/battle-tested-patterns
Releases · Totoro-jam/battle-tested-patterns
v1.12.0
Features
- Add ErrorBoundary and VizErrorBoundary components (Vue
defineComponent) with ErrorFallback.vue for graceful error display - Add mermaid FOUC prevention: CSS
visibility: hidden+data-mermaid-statuslifecycle + Apple HIG shimmer placeholder (dark/light mode) - Add stale chunk auto-reload handler for deploy version skew (SPA navigation resilience)
- Add
verify-skipinfo-string flag for code blocks that should not be compiled
Performance
- Rewrite
verify-code-blocks.tsexecution engine (~30x faster: 115s → 3.6s)- TypeScript: single
ts.createProgramwith per-block module isolation - Rust:
rustc --emit=metadata(skip codegen+linking) + bounded concurrency - Go: shared module + single
go vet ./... - Python: bounded-concurrency
py_compile
- TypeScript: single
Fixes
- Fix
<p>nesting hydration warning in docs/index.md - Fix Rust answer for batch-processing pattern exercise
- Unify approximate year notation in zh timeline table (
约→~,~1960s→~1960) - Downgrade mermaid render failure log from
console.errortoconsole.warn
CI/CD
- Split
verify-codeinto dedicated CI job with all 4 toolchains — fixes historical gap where 138 non-TS code blocks were silently skipped in CI - Fix Go cache warnings (use
go.modinstead of non-existentgo.sum) - Script now fails hard in CI (
CI=true) when a toolchain is missing
Documentation
- Expand SOP 08 AI Agent Review from 2 to 7 specialized roles (Contributor, Content, Source Proof, Multi-Language, Bilingual, Security, Frontend & A11y)
- Add prerequisites table to CONTRIBUTING.md and CONTRIBUTING.zh-CN.md
v1.11.0
Features
- Add
scripts/lib/patterns.tsshared library for pattern discovery, frontmatter parsing, and CI diagnostics - Add
scripts/check-structure.ts— validate frontmatter, required sections, tab order, property table, and production proof links (rules S1–S8) - Add
scripts/check-zh-parity.ts— validate EN/ZH code block, section, and source link parity (rules P1–P7) - Add
scripts/check-exercises.ts— validate exercise/answer files, solution markers, and runner scripts (rules E1–E6) - Add
scripts/check-relations.ts— validate Related Patterns bidirectionality and sidebar consistency (rules R1–R3) - Add
scripts/verify-line-ranges.ts— validate production proof line ranges against actual file content with caching (rules L1–L2) - Add
pnpm check:content,pnpm check:structure,pnpm check:zh-parity,pnpm check:exercises,pnpm check:relations,pnpm verify-linescommands - Merge 5 CI heredoc jobs into single typed
check-contentjob
Security
- Replace
execSyncwithexecFileSyncinverify-code-blocks.ts— eliminates shell command injection (3 call sites) - Add
sanitizeAnnotation()inpatterns.ts— prevents GitHub Actions annotation injection - Add
AbortSignal.timeout(15s)to allfetchcalls inverify-line-ranges.ts,verify-source-links.ts, andconvert-to-sha-links.ts - Cap retry depth (2) and wait time (60s) in
convert-to-sha-links.tsresolveSHA— prevents unbounded recursion
Fixes
- Fix interning pattern
unicodeobject.cline range (L15575→L14416) - Fix backpressure
Subscription.javaline range (L25-L45→L14-L37) - Fix stale line range references in README.md and README.zh-CN.md
Documentation
- Update CLAUDE.md with new check/verify commands
- Update CONTRIBUTING guides, PR template, and SOPs 01/02/07/08/13
- Update
.claude/skills/verify-source/SKILL.mdfor new toolchain
v1.10.0
Features
- Convert all 166 production proof links to SHA-pinned permalinks (never drift)
- Add
scripts/resolve-sha-links.tstooling for automated link conversion - Replace vitepress-plugin-mermaid with conditional loading (
app.*.js608KB → 1.3KB, -99.8%) - Add
scripts/verify-mermaid.tsfor Mermaid syntax validation (26 blocks, 0 errors) - Add
ci-passgate job — Branch Protection now requires singleCI / CI Passcheck - Upgrade ErrorBoundary to Apple HIG design (backdrop-filter blur, SF Mono, smooth transitions)
- Add global async component error handler in VitePress theme
CI
- Merge
content-quality.yml(5 jobs) intoci.yml— eliminates duplicate runs on push - Add Vue component test job (
test-components) to CI pipeline - Split test scripts:
pnpm test(all),pnpm test:exercises,pnpm test:docs - Gate job aggregates all 12 CI jobs; Branch Protection only needs one check
- Fix Go cache warning by specifying
cache-dependency-path
Fixes
- Fix flawed component tests: ReferenceCountingViz wrong selector, VisitorViz count mismatch, SkipListViz conditional guards, MiddlewareChainViz reset logic
- Correct TS test count back to 491; total 1,073
- Resolve SSR hydration mismatch causing skeleton/component coexistence bug
- Eliminate shell injection risk in
verify-code-blocks.ts(internally controlled paths) - Rewrite actor-model Rust implementation with
enum+VecDeque - Correct Bitmask "Four operations" label to "Core operations"
- Sync Observer ZH translation with EN version
- Add 8 missing patterns to README pattern lists
- Fix stale exercise paths in ZH pattern docs and SOPs
Testing
- Add Viz component test infrastructure: vitest + @vue/test-utils + jsdom + VitePress mock
- Add unit tests for 46 Viz components — 295 docs tests total
- Add edge-case tests for CircuitBreakerViz, RetryBackoffViz, SemaphoreViz, SkipListViz
Refactors
- Restructure Go exercises into package-per-directory layout (46 pattern subdirectories)
- Restructure Python exercises into pattern subdirectories for pytest discovery
- Replace 229 hardcoded CSS values with
--viz-*design tokens across 50 Viz components
Documentation
- Update all docs to reference
pnpm test:exercises(92 pattern files, guides, SOPs, skills) - Align Viz design tokens with Apple HIG principles
- Add LRU Cache screenshots to EN/ZH READMEs
- Add clickable documentation links to all 46 patterns in STUDY_PLAN.md
- Add property tables to 4 remaining patterns — 46/46 coverage
- Add
package.jsonkeywords and homepage field - Add Star History badge to README
Chores
- Add Husky git hooks, a11y contrast fix, README prerequisites
- Add
.nvmrc,.python-versionfor consistent tooling - Organize exercises and answers into per-pattern directories
- Fix pnpm config for reliable dependency resolution
v1.9.1
Fixes
- Correct stale test counts across READMEs and exercise guides (TS 553→491→492, total 1,073→1,074)
- Add retry logic to verify-source-links for transient 5xx errors (avoids false-positive issues)
- Add
// TODO: implementmarkers to all 46 Rust exercise files for consistency with TS/Go/Python - Remove dead warn/strict split in verify-code-blocks script
- Standardize code-group tab order to TypeScript > Rust > Go > Python across all 66 pattern docs (EN+ZH)
- Add explicit frontmatter
titleto all 92 pattern docs + 22 guide pages + 18 by-project pages for SEO (og:title, browser tabs) - Update markdownlint config for frontmatter title compatibility (MD025 front_matter_title)
CI
- Extract release notes from CHANGELOG.md instead of changelogen (fixes empty release notes)
- Add answer file existence check to content-quality workflow
- Add frontmatter completeness and code-group tab order checks to content-quality workflow
- Expand content-quality trigger paths to include guide/ and by-project/ pages
- Increase Rust/Go compile timeouts in verify-code-blocks (fixes sporadic CI ETIMEDOUT)
Chores
- Remove unused
changelogendependency andchangelogscript - Sync package.json version from 1.5.0 to 1.9.0 (root + docs workspace)
- Add package.json version bump step to SOP 08 release process
- Bump dependency specifiers: commitlint 21.0.2, tsx 4.22, vitepress 1.6.4, vue 3.5.35
Documentation
- Update SOPs 01/05/08 to match current 4-language exercise and release workflow
- Add missing commands to CLAUDE.md (verify-code, Rust, Go)
- Update CONTRIBUTING guides with 4-language exercise requirement and full command set
- Update Contributing quality bar in READMEs (EN+ZH) to match current standards
- Update PR template with complete quality checklist (exercises, i18n, related patterns)
- Update issue templates for 4-language standard (Python replaces C, add Rust/Go/Python env fields)
v1.9.0
v1.9.0
113 commits since v1.8.0 — interactive visualizations, comprehensive quality audit, i18n completeness, and CI hardening.
Highlights
- Interactive Components: CompositionFlow + DecisionTree replace all ASCII diagrams; VizLog universal log panel added to all 48 Viz components
- Homepage Revamp: value-focused tagline, live Viz demo, PatternTimelineViz, skeleton loading
- Quality Audit: 37 missing Related Patterns back-links, 8 factual errors corrected, 29 source links added, em dash normalization
- Accessibility: ARIA attributes on all 49 Viz components, keyboard support, focus-visible styles, mobile responsive
- i18n: full ZH parity — translated UI strings, exercise labels, pattern names, 404 page
- SEO: JSON-LD structured data, CJK word segmentation for search, hreflang x-default
- CI: 4-language exercise verification, EN-ZH code parity check, dependabot for all ecosystems
Features
- Add Go implementation for diff-patch pattern
- Add Rust implementation for batch-processing pattern
- Add complexity cheat sheet and pattern comparison pages (EN+ZH)
- Add difficulty labels, learning paths, study plan, and real-world analogies
- Replace ASCII composition diagrams with interactive CompositionFlow Vue component
- Add DecisionTree interactive component for guide pages
- Add VizLog universal log panel with visual design upgrade to all 48 Viz components
- Add 3rd preset scenario + highlight logs to BPlusTree, MinHeap, SkipList
- Revamp homepage with value-focused tagline, live Viz demo, and PatternTimelineViz
- Add JSON-LD structured data for search engine rich results
- Add dedicated skeleton loading for homepage MinHeap and Timeline components
- Add CJK word segmentation for VitePress local search
Fixes
- Fix broken Erlang/BEAM VM source link
- Sync 23 missing When to Use / When NOT to Use entries in ZH patterns
- Add property tables to 14 patterns + fix ZH diagram structural issues
- Add source links to 29 More Production Uses entries across 15 patterns
- Replace 3 imprecise Production Proof links with correct line numbers
- Add 37 missing bidirectional Related Patterns back-links (EN+ZH)
- Correct 8 factual errors in challenge question answers (EN+ZH)
- Add ARIA attributes to all 49 Viz components
- Add keyboard support to interactive non-button elements
- Add mobile responsive styles for viz components
Internationalization
- Translate "Exercise files:" across all 46 ZH pattern pages
- Add Chinese translations for VitePress UI elements
- Add 404 page and footer translations for both locales
- Translate all English pattern names to Chinese in use-cases.md
Documentation
- Add 5 pattern comparison pairs (EN+ZH)
- Add exercise getting-started guide (EN+ZH)
- Add Rust/Go/Python exercise file paths to all 92 pattern docs
- Reorganize guide sidebar into 4 logical groups (EN+ZH)
CI
- Expand exercise file check to all 4 languages (Rust/Go/Python)
- Add EN-ZH code parity check to content-quality workflow
- Upgrade GitHub Actions: setup-node v6, setup-python v6, deploy-pages v5, github-script v9
- Add cargo, gomod, pip ecosystems to dependabot config
v1.8.0
Fixes
- Resolve broken source links flagged by CI (#11)
Documentation
- Add narrative composition walkthroughs to React and Linux by-project pages
- Add goroutine scheduling composition walkthrough to Go page
- Add distributed write composition walkthrough
- Add git commit composition walkthrough
- Address multi-agent audit findings across exercises, CI, and docs
v1.7.0
Features
- Add Go and Rust exercises for final 8 patterns (batch 6) — full 4-language exercise coverage for all 46 patterns
- Add Go and Rust exercises for 8 more patterns (batch 5)
- Add Go and Rust exercises for 8 more patterns (batch 4)
v1.6.0
Features
- Add Go and Rust exercises for 20 patterns (batches 1-3) — first multi-language exercise expansion
- Add
DemoBadgecomponent for interactive demo discovery on all 92 pattern pages - Add skeleton screen loading state for lazy-loaded viz components
Fixes
- Replace eager Go
Filterwith lazyiter.Seqin iterator pattern (Go 1.23) - Upgrade Go to 1.23 for
iter.Seqsupport in CI and verify script - Unify iterator pattern diagram with interactive component
- Align ZH LSM tree ASCII diagram box-top widths
- Correct 11 viz component bugs from comprehensive audit
- Adjust homepage feature icon size to 100×100
Documentation
- Add recommended learning paths to getting-started guide (EN+ZH)
- Add pattern timeline entry to homepage pattern table area
- Add SOP 10 for interactive viz component audit checklist
v1.5.1
Features
- Add composition chains and expand cross-system pattern table in pattern-connections guide (React Reconciler, PostgreSQL, Kafka Broker, Go Runtime)
Fixes
- Add Skip List coverage to use-cases guide and correct interview pattern mappings (cycle detection, read-write lock)
- Crop homepage feature icon whitespace and increase display size to 120×120
v1.5.0
Features
- Add 46 interactive SVG visualizations — 100% pattern coverage (Ring Buffer, LRU Cache, Bloom Filter, Min Heap, Skip List, Trie, State Machine, Circuit Breaker, Consistent Hashing, Event Loop, Rate Limiter, Merkle Tree, B+ Tree, Dependency Graph, Observer, Backpressure, Copy-on-Write, and more)
- Upgrade all 46 viz components with
useVizTimerscomposable, scenario presets, and speed controls - Add i18n composable with full bilingual support for all 46 visualizations
- Replace stacked mermaid charts with interactive components
- Add Pattern Timeline page — 80 years of computing history (EN+ZH)
- Add Cheat Sheet, Use Cases, Interview Guide pages (EN+ZH)
- Add homepage PNG icons for feature cards
- Add sitemap.xml generation and robots.txt for SEO
- Add description frontmatter to all 92 pattern pages and guide pages
Fixes
- Add
onUnmountedcleanup to all viz components with timers - Move viz-status hints to top of visualization area
- Align LSM tree and Interning ASCII diagram box widths
- Add missing abort guards to animation loops
- Fix CJK double-width character alignment in Chinese README
- Add precise line numbers to gRPC-Go middleware-chain source link
- Fix mermaid timeline chart type causing global render errors
Documentation
- Add SOP 09 for Vue component build pitfalls
- Add Related Patterns cross-references to all 92 pattern pages
- Add 4th challenge question to 7 patterns (EN+ZH)
- Complete timeline with 15 missing patterns, enrich by-project pages
- Update README pattern count, exercise counts, and test case counts
- Add missing intro paragraphs and Further Reading to ZH by-project pages
- Sync missing code blocks from EN to 14 ZH pattern pages
Performance
- Lazy-load all 46 visualizer components via
defineAsyncComponent - Increase Node.js heap size for 46-component VitePress build
- Skip SSR for interactive visualizer components