惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

MyScale Blog
MyScale Blog
Apple Machine Learning Research
Apple Machine Learning Research
H
Help Net Security
雷峰网
雷峰网
V
Visual Studio Blog
G
Google Developers Blog
Microsoft Azure Blog
Microsoft Azure Blog
Hugging Face - Blog
Hugging Face - Blog
爱范儿
爱范儿
IT之家
IT之家
Engineering at Meta
Engineering at Meta
Microsoft Security Blog
Microsoft Security Blog
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
M
MIT News - Artificial intelligence
月光博客
月光博客
A
About on SuperTechFans
B
Blog RSS Feed
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The GitHub Blog
The GitHub Blog
N
Netflix TechBlog - Medium
J
Java Code Geeks
云风的 BLOG
云风的 BLOG
Blog — PlanetScale
Blog — PlanetScale

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
claude-code-sre-handbook/watcher-semantic-example at main...
har-ki · 2026-06-16 · via Hacker News: Show HN

Semantic-memory variant of the SRE incident watcher. Adds similarity-based retrieval (via local embeddings) and validation discipline as toggleable layers on top of the file-based memory convention from watcher-memory-example/.

Self-contained. Does not import from or modify the other watcher examples.

Embedding model

  • Model: nomic-embed-text (274 MB, 768-dimensional)
  • Runtime: Ollama (local, air-gapped compatible)
  • Similarity scores are model-specific. Threshold values calibrated for this model are not transferable to other embedding models.

Three config knobs

All set in alert-watcher/config.yaml, no code edits needed:

# Retrieval mode: exact (SHA256-hash lookup) or similarity (cosine search)
retrieval_mode: similarity    # exact | similarity

# Minimum cosine similarity to surface a finding (similarity mode only)
similarity_threshold: 0.75

# When true, Phase 1 must classify the prior finding as
# validated / invalidated / inconclusive before using it
validation_discipline: true   # true | false

Architecture

watcher-semantic-example/
├── alert-watcher/
│   ├── main.py               # Orchestrator with configurable retrieval
│   ├── semantic_memory.py     # Embedding, indexing, retrieval layer
│   └── config.yaml            # Three toggles + standard config
├── claude-runner/
│   ├── invoke.sh              # Two separate claude -p phases
│   └── workspace-claude.md    # Model orientation (includes memory docs)
├── prompts/
│   ├── 01-investigate.md      # Phase 1: retrieval metadata + validation discipline
│   └── 02-propose-fix.md      # Phase 2: fix + required memory write
├── memory-store/
│   ├── incidents/             # Per-incident findings (<sha8>.md)
│   └── embeddings/            # Vector index (index.json)
├── test-incidents/            # Three test cases (see below)
├── seed-memory.sh             # Seeds memory + builds vector index
└── verify-retrieval.sh        # Verifies retrieval against all test cases

Locked invariants (same as watcher-memory-example)

  • Two separate claude -p phases (never collapsed)
  • --max-turns 40, --output-format stream-json --verbose
  • gh pr ready absent from all --allowedTools (human gate)
  • Memory paths validated via regex + realpath() containment

Retrieval modes

Exact (baseline)

Same as watcher-memory-example/. Looks up memory-store/incidents/<sha8>.md by the fingerprint hash. Hits only on identical service|exception_class.

Similarity

Embeds the incident description via nomic-embed-text, searches the vector index by cosine similarity. Returns the nearest finding if the score exceeds similarity_threshold; stays silent otherwise (safe-silence default).

Index format: Flat JSON file at memory-store/embeddings/index.json. Each entry stores the embedding, service, exception class, and fingerprint hash. Sufficient for hundreds of findings (not designed for millions).

Embedding strategy:

  • Stored findings use search_document: prefix with finding content (rich)
  • Queries use search_query: prefix with expanded exception context
  • CamelCase exception names are split for semantic signal (StockMismatchErrorstock mismatch error)

Validation discipline

When validation_discipline: true, Phase 1's prompt requires an explicit classification before using the prior finding:

> **Validation: VALIDATED** — prior finding matches because ...
> **Validation: INVALIDATED** — prior finding does NOT match because ...
> **Validation: INCONCLUSIVE** — cannot confirm, investigating further

If INVALIDATED, the agent must investigate from scratch. This is designed to catch the "recall-anchoring" failure mode where a partial match causes the agent to stop investigating too early.

Test incidents

Three test cases in test-incidents/:

Test Fingerprint Exact hash What it tests
Canonical ecommerce-api|StockMismatchError e2836e74 Baseline — should find and validate
Drift ecommerce-api|InventoryValidationError de61efe2 Renamed exception. Exact misses, similarity finds.
Near-miss ecommerce-api|StockMismatchError e2836e74 Same hash, different cause (cache bug). Both modes find it — tests whether validation discipline catches the mismatch.
No-precedent ecommerce-api|PaymentGatewayTimeout 2c8fc300 No relevant finding. Both modes should stay silent.

Verified retrieval scores (nomic-embed-text)

Test Exact Similarity score Above 0.75?
Canonical hit 0.80 yes
Drift miss 0.81 yes
Near-miss hit 0.80 yes
No-precedent miss 0.74 no (silent)

Quick start

# 1. Ensure Ollama is running with the embedding model
ollama pull nomic-embed-text

# 2. Seed memory with the canonical finding + build vector index
bash seed-memory.sh

# 3. Verify retrieval works for all test incidents
bash verify-retrieval.sh

# 4. Run the watcher (requires otel-demo cluster + Docker)
cp .env.example .env
# Fill in ANTHROPIC_API_KEY and GH_TOKEN
docker compose up -d --build

Switching modes between runs

Edit alert-watcher/config.yaml:

# Run 1: exact-hash baseline
retrieval_mode: exact
validation_discipline: false

# Run 2: similarity with discipline
retrieval_mode: similarity
validation_discipline: true

# Run 3: similarity without discipline (to see if discipline matters)
retrieval_mode: similarity
validation_discipline: false

No code changes, no rebuild. The config is read at watcher startup.