diff --git a/.tangled/workflows/mirror.yml b/.tangled/workflows/mirror.yml deleted file mode 100644 index 5c3cf08..0000000 --- a/.tangled/workflows/mirror.yml +++ /dev/null @@ -1,36 +0,0 @@ -# .tangled/workflows/mirror-to-github.yml - -when: - - event: ["push", "manual"] - branch: ["main"] - -engine: "nixery" - -clone: - depth: 0 - -dependencies: - nixpkgs: - - git - -steps: - - name: "Mirror to GitHub" - command: | - git fetch --unshallow origin || true - git fetch origin refs/heads/main:refs/heads/main - git remote add github https://x-access-token:${GITHUB_PAT}@github.com/${GITHUB_USERNAME}/${GITHUB_REPO_NAME}.git - git push github refs/heads/main:refs/heads/main --force - environment: - GITHUB_USERNAME: "daniel-daum" - GITHUB_REPO_NAME: "holonet" - - - name: "Mirror to Gitea" - command: | - git fetch --unshallow origin || true - git fetch origin refs/heads/main:refs/heads/main - git remote add gitea https://${GITEA_USERNAME}:${GITEA_TOKEN}@${GITEA_HOST}/${GITEA_USERNAME}/${GITEA_REPO_NAME}.git - git push gitea refs/heads/main:refs/heads/main --force - environment: - GITEA_USERNAME: "daniel-daum" - GITEA_REPO_NAME: "holonet" - GITEA_HOST: "git.danieldaum.net" -- 2.54.0 From 042c7265f17fcf507f8c2203fb06faeffe173227 Mon Sep 17 00:00:00 2001 From: daniel daum Date: Sun, 6 Sep 2026 12:08:32 -0700 Subject: [PATCH 2/2] feat: add instructions for bot code review --- AGENTS.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 2 +- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..afc68e4 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,49 @@ +# AGENTS.md + +## Role of AI in this repository + +AI is used for **code review only**. It does not write, generate, or commit +code here. Every line in this repository is hand-written by the author. + +An AI reviewer (PR-Agent, backed by a self-hosted model) comments on pull +requests automatically. Its output is advisory. The author reads it, decides, +and makes any changes by hand. + +Do not: + +- Suggest replacing code with AI-generated implementations. +- Rewrite large sections. Point at the specific lines and explain the problem. +- Propose adding dependencies to solve something the standard library handles. + +## Project + +Holonet is a WebSocket server written in Go. It accepts client connections, +manages rooms/sessions, and broadcasts messages between clients. It is a +learning and portfolio project; correctness and clarity matter more than +cleverness. + +## What to review for + +Priority order: + +1. Concurrency bugs: data races, unguarded shared state, goroutine leaks, + channels that can block forever, missing context cancellation. +2. Connection lifecycle: unclosed connections, missing read/write deadlines, + ping/pong handling, graceful shutdown. +3. Error handling: swallowed errors, errors logged but not returned, panics + reachable from client input. +4. Input validation on anything that arrives over the wire. +5. Tests: whether new behaviour has a test, and whether the test actually + exercises it. + +## What to ignore + +- Formatting. `gofmt` handles it. +- Naming style unless it is misleading. +- Missing comments on unexported identifiers. +- Suggestions to add third-party packages. + +## Tone + +Direct and specific. Say what is wrong, why, and the scenario that triggers +it. No praise, no filler. diff --git a/README.md b/README.md index aac4005..d87c6f8 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# holonet +# Holonet a websocket server