Skip to content

Add operational guides: lessons, multi-agent patterns, infrastructure…#8

Merged
Lightheartdevs merged 1 commit intomainfrom
add-operational-guides
Feb 17, 2026
Merged

Add operational guides: lessons, multi-agent patterns, infrastructure…#8
Lightheartdevs merged 1 commit intomainfrom
add-operational-guides

Conversation

@Lightheartdevs
Copy link
Copy Markdown
Collaborator

… protection

Three new docs distilled from production experience running persistent agent swarms on local hardware:

  • OPERATIONAL-LESSONS.md: Silent failures, memory management, tool calling reliability, production safety, versioning, cost allocation
  • MULTI-AGENT-PATTERNS.md: Sync protocol, redundancy math, sub-agent spawning templates, echo chamber prevention, coordination files
  • GUARDIAN.md: Immutable watchdog pattern, autonomy tiers, baseline integrity, self-modification rule, defense in depth

Updates README with new docs in project structure and What's Inside. Adds cross-reference from WRITING-BASELINES.md to GUARDIAN.md for autonomy tier deep dive.

… protection

Three new docs distilled from production experience running persistent
agent swarms on local hardware:

- OPERATIONAL-LESSONS.md: Silent failures, memory management, tool
  calling reliability, production safety, versioning, cost allocation
- MULTI-AGENT-PATTERNS.md: Sync protocol, redundancy math, sub-agent
  spawning templates, echo chamber prevention, coordination files
- GUARDIAN.md: Immutable watchdog pattern, autonomy tiers, baseline
  integrity, self-modification rule, defense in depth

Updates README with new docs in project structure and What's Inside.
Adds cross-reference from WRITING-BASELINES.md to GUARDIAN.md for
autonomy tier deep dive.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Lightheartdevs Lightheartdevs merged commit c63b1d5 into main Feb 17, 2026
1 check failed
SSignall pushed a commit to SSignall/DreamServer that referenced this pull request Mar 8, 2026
igorls added a commit to igorls/DreamServer that referenced this pull request Mar 9, 2026
Shell Scripts:
- dream-restore.sh: Replace hardcoded config list with dynamic glob for
  compose overlays (.base.yml, .nvidia.yml, etc.) (Light-Heart-Labs#4)
- dream-update.sh: Use resolve-compose-stack.sh for container restart
  instead of hardcoded docker-compose.yml (Light-Heart-Labs#7)
- dream-update.sh: Enable dotglob in rollback to restore hidden files
  like .env and .version (Light-Heart-Labs#6)
- dream-backup.sh: Include .tar.gz archives in retention/list queries
  to prevent infinite disk accumulation (Light-Heart-Labs#9)
- dream-backup.sh: Dynamic glob for config backup (compose overlays)

Token Spy:
- compose.yaml: Add persistent volume mount for data/ directory to
  prevent SQLite data loss on container restart (#2)
- main.py: Offload blocking SSH subprocess to thread pool via
  asyncio.to_thread() to prevent event loop deadlock (#3)
- main.py: Add finally blocks in streaming generators to guarantee
  billing metrics are logged on asyncio.CancelledError (Light-Heart-Labs#8)
- db_postgres.py: Add conn.rollback() on failed SQL to prevent
  connection pool poisoning (Light-Heart-Labs#10)

Installer:
- detection.sh: Run systemd auto-resume service as root instead of
  $USER to prevent sudo password hang and permission errors (Light-Heart-Labs#11)
igorls added a commit to igorls/DreamServer that referenced this pull request Mar 10, 2026
… audit

CRITICAL:
- #1: Command injection via SUDO_USER — switched execSync to
  execFileSync in getUserHome() to bypass shell interpolation
- #2: Symlink attack in /tmp — selfUpdate() now uses mkdtempSync
  with 0700 perms instead of hardcoded /tmp paths

HIGH:
- #3: SHA256 verification failure — download binary with artifact
  name so sha256sum --check finds the correct file
- Light-Heart-Labs#4: Broken rollback — verify new binary via exitCode check,
  not dead catch block (throwOnError: false skips catch)
- Light-Heart-Labs#5: Data loss in uninstall — docker compose down -v now
  conditional on !keepData
- Light-Heart-Labs#6: rm -rf path safety — refuse system directories (/, /home,
  /root, /usr, etc.) with structural depth check

MEDIUM:
- Light-Heart-Labs#7: Model download failure halts install (throw instead of
  silent return) — prevents llama-server crash-loop
- Light-Heart-Labs#8: Tier change now applies CTX_SIZE even when model name
  unchanged (Tier 1->2 both use qwen3-8b but differ in context)

Tests: updated model.test.ts to expect throw on download failure
All 138 tests passing
igorls added a commit to igorls/DreamServer that referenced this pull request Mar 13, 2026
… audit

CRITICAL:
- #1: Command injection via SUDO_USER — switched execSync to
  execFileSync in getUserHome() to bypass shell interpolation
- #2: Symlink attack in /tmp — selfUpdate() now uses mkdtempSync
  with 0700 perms instead of hardcoded /tmp paths

HIGH:
- #3: SHA256 verification failure — download binary with artifact
  name so sha256sum --check finds the correct file
- Light-Heart-Labs#4: Broken rollback — verify new binary via exitCode check,
  not dead catch block (throwOnError: false skips catch)
- Light-Heart-Labs#5: Data loss in uninstall — docker compose down -v now
  conditional on !keepData
- Light-Heart-Labs#6: rm -rf path safety — refuse system directories (/, /home,
  /root, /usr, etc.) with structural depth check

MEDIUM:
- Light-Heart-Labs#7: Model download failure halts install (throw instead of
  silent return) — prevents llama-server crash-loop
- Light-Heart-Labs#8: Tier change now applies CTX_SIZE even when model name
  unchanged (Tier 1->2 both use qwen3-8b but differ in context)

Tests: updated model.test.ts to expect throw on download failure
All 138 tests passing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant