AgentSkillsCN

sreniatnoc-org-knowledge

为sreniatnoc GitHub组织构建知识库。在以下场景下使用此功能: - 在sreniatnoc任意仓库中工作 - 规划功能、PR或提交 - 了解仓库的用途与彼此之间的关系 强制要求:在对任何sreniatnoc仓库进行操作前务必咨询。

SKILL.md
--- frontmatter
name: sreniatnoc-org-knowledge
description: |
  Knowledge base for sreniatnoc GitHub organization. Use this skill when:
  - Working on any sreniatnoc repo
  - Planning features, PRs, or commits
  - Understanding repo purposes and relationships
  MANDATORY: Consult before any sreniatnoc repo operation.
last_updated: 2026-02-10

sreniatnoc Organization Knowledge

Organization Overview

Mission: Open-source developer tools in Rust and Go. GitHub: https://github.com/sreniatnoc


Repos

rusd (PUBLIC)

Purpose: High-performance embedded database written in Rust with MVCC support. Etcd replacement. Tech: Rust 2021, gRPC (tonic 0.11/prost 0.12), sled, Docker Repo: https://github.com/sreniatnoc/rusd

Key Features:

  • MVCC (Multi-Version Concurrency Control) storage engine (sled-backed)
  • etcd-compatible gRPC API (KV, Auth, Cluster, Watch, Lease, Maintenance)
  • Watch event delivery with prev_kv support
  • Txn CAS (Compare-and-Swap) operations
  • Raft consensus module (single-node works, multi-node event loop disabled)
  • Docker and Kubernetes support (Docker image 167MB)
  • HTTP/2 keepalive and graceful shutdown (serve_with_shutdown)
  • Validated as K8s etcd backend - Kind cluster with K8s v1.35 fully works

Key Directories:

  • src/api/ - 6 gRPC service implementations (kv, watch, lease, cluster, maintenance, auth)
  • src/storage/ - MVCC storage engine (backend.rs, mvcc.rs, index.rs, compaction.rs)
  • src/raft/ - Raft consensus (node.rs 677 lines, state.rs, log.rs, transport.rs)
  • src/watch/ - WatchHub with DashMap + crossbeam channels (wired to KvService and WatchService)
  • src/server/ - Server orchestration, startup, graceful shutdown
  • proto/etcdserverpb/ - rpc.proto, kv.proto, auth.proto
  • benches/ - Criterion benchmarks
  • scripts/ - k8s-test.sh (492 lines), setup.sh (284 lines)
  • tests/ - 12 integration tests (BROKEN: test HTTP endpoints but rusd is gRPC-only)
  • .skills/kind-validation.md - Kind cluster config and validation details

Docs: README.md, STORAGE_DESIGN.md, MVCC_IMPLEMENTATION.md, FILE_STRUCTURE.md

Validated Status (2026-02-10):

  • Native build: OK (cargo build --release, ~8,300 lines Rust)
  • Docker build: OK (167MB, requires fixed Dockerfile)
  • Unit tests: 40/40 PASS (storage, mvcc, watch, lease, auth, compaction, raft)
  • Integration tests: 12/12 FAIL (tests use HTTP/JSON but rusd is gRPC-only, needs rewrite)
  • Kind cluster (K8s v1.35): WORKS - all CRUD operations validated

etcdctl Compatibility Matrix:

APIStatusNotes
KV PutOKWorks with etcdctl
KV GetOKSingle key and prefix queries
KV DeleteOKReturns delete count
WatchOKPrefix watch, PUT/DELETE events, prev_kv delivered
Txn CASOKCompare operations (version, create_rev, mod_rev, value) work
Lease GrantOKTTL and ID returned
Lease ListOKLists active leases
Lease TimeToLiveOKReturns remaining TTL
Lease RevokePARTIALRevokes lease but keys NOT deleted (BUG)
Endpoint HealthOKReports healthy
Endpoint StatusFAILPanics in etcdctl (divide by zero)
Member ListOKReturns single-node member
User AddOKCreates user
Role AddOKCreates role
User/Role ListEMPTYReturns empty lists

K8s Operations Validated (Kind, K8s v1.35):

  • Namespace create/delete, ConfigMap, Secret, ServiceAccount CRUD
  • Role, RoleBinding CRUD
  • Deployment create, scale (replicas), rolling update
  • Service creation, Pod exec
  • RBAC bootstraps correctly, all control plane components functional

Known Limitations:

  • "Too large resource version" errors: non-fatal, K8s retries automatically
  • Revision-based range reads: MVCC stores latest only (not full history), sufficient for K8s
  • Integration tests: need rewrite from HTTP/JSON to gRPC (tonic client)
  • Lease revoke doesn't delete attached keys
  • Endpoint status response missing fields (causes etcdctl panic)

Dockerfile Fixes Applied:

  • Added COPY build.rs ./ (protobuf code generation)
  • Added COPY proto proto/ (proto definitions)
  • Added COPY benches benches/ and COPY tests tests/ (Cargo.toml references them)
  • Updated rust:1.75-slim -> rust:1.85-slim (Cargo.lock v4 format)
  • Fixed as -> AS casing

k8sify (PUBLIC)

Purpose: Intelligent Docker Compose to Kubernetes migration tool. Tech: Go Repo: https://github.com/sreniatnoc/k8sify

Key Features:

  • Cost analysis for K8s migration
  • Security scanning
  • Production patterns generation
  • Docker Compose → K8s manifest conversion

publications (PRIVATE)

Purpose: LinkedIn articles and publication artifacts for all sreniatnoc projects. Repo: https://github.com/sreniatnoc/publications

Structure:

code
publications/
├── rusd/
│   └── YYYY-MM-DD-<slug>/
│       ├── html/       # LinkedIn-safe HTML
│       ├── images/     # PNGs + SVG sources
│       └── post.txt    # Short-form post text

Rule: Article artifacts (HTML, images, cover) go here, NOT in project repos. Code/docs/benchmarks stay in project repos.


homebrew-tap (PUBLIC)

Purpose: Homebrew tap for sreniatnoc tools. Repo: https://github.com/sreniatnoc/homebrew-tap

Usage:

bash
brew tap sreniatnoc/tap
brew install k8sify