migrate: 108 memories moved to major-domo

This commit is contained in:
Cal Corum 2026-03-01 16:02:49 -06:00
parent 42a53d2723
commit eefb769eaf
130 changed files with 210 additions and 2623 deletions

193
_migration_overlaps.json Normal file
View File

@ -0,0 +1,193 @@
{
"overlaps": [
{
"id": "48e397e9-b2f6-4f8c-844d-b408cccbc372",
"title": "Athletics team name alias fix",
"tags": [
"paper-dynasty",
"python",
"fix",
"discord-bot"
],
"copied_to": "major-domo"
},
{
"id": "5d8e1ff5-3354-4cfa-ab63-bf96b5ce1e01",
"title": "Fix for play lock never released on exception",
"tags": [
"paper-dynasty",
"python",
"discord-bot",
"sqlalchemy",
"fix",
"play-lock",
"concurrency",
"critical"
],
"copied_to": "major-domo"
},
{
"id": "1c795804-d2bd-4ace-8de8-aea4819424f0",
"title": "Circular import fix: move shared utilities to standalone module",
"tags": [
"python",
"circular-import",
"architecture",
"fix",
"paper-dynasty",
"discord-bot"
],
"copied_to": "major-domo"
},
{
"id": "40da57ca-02da-48b1-9672-73a0e53c6b6e",
"title": "Position validation missing in lineup sheet loading",
"tags": [
"paper-dynasty",
"python",
"fix",
"discord-bot",
"position-validation"
],
"copied_to": "major-domo"
},
{
"id": "b9f0edd4-8752-42a4-a4d9-5a984ae741d0",
"title": "Fix pack type grouping in packs display",
"tags": [
"paper-dynasty",
"python",
"discord-bot",
"fix"
],
"copied_to": "major-domo"
},
{
"id": "638ac861-2c7b-462c-9d82-672e4536688e",
"title": "Production deployment checklist for Paper Dynasty bot",
"tags": [
"paper-dynasty",
"discord-bot",
"deployment",
"production",
"checklist",
"devops"
],
"copied_to": "major-domo"
},
{
"id": "18d507ca-6e14-46b5-99aa-28b24ef569eb",
"title": "CalVer versioning for all Major Domo and Paper Dynasty services",
"tags": [
"major-domo",
"paper-dynasty",
"ci-cd",
"gitea",
"docker",
"calver"
],
"copied_to": "major-domo"
},
{
"id": "711ea568-414d-4a00-90cc-45abc6673a14",
"title": "Paper Dynasty bot freeze from duplicate X-Check interaction submissions",
"tags": [
"paper-dynasty",
"discord-bot",
"sqlalchemy",
"race-condition",
"x-check",
"concurrency",
"database",
"deadlock"
],
"copied_to": "major-domo"
},
{
"id": "9b70e3d5-d0b6-48c5-88d0-2fbc36f4fd4d",
"title": "Play lock never released on exception - causes permanent user lockout",
"tags": [
"paper-dynasty",
"python",
"discord-bot",
"sqlalchemy",
"concurrency",
"critical-bug",
"play-lock",
"database"
],
"copied_to": "major-domo"
},
{
"id": "c253c9de-bb42-44a7-856b-e9981131169f",
"title": "CRITICAL: Git commit requires explicit user approval",
"tags": [
"paper-dynasty",
"major-domo",
"git",
"commit",
"workflow",
"approval-required",
"critical"
],
"copied_to": "major-domo"
},
{
"id": "88bbf5f1-2d76-4e68-9c62-ca72e464f5c0",
"title": "Optional locking parameter pattern for read vs write commands",
"tags": [
"paper-dynasty",
"python",
"discord-bot",
"architecture",
"locking",
"concurrency",
"pattern"
],
"copied_to": "major-domo"
},
{
"id": "d3f80a8b-24e9-407e-8b83-7b8886e16b08",
"title": "Bulk codebase audit and Gitea issue creation across multiple repos with parallel agents",
"tags": [
"gitea",
"tea-cli",
"code-review",
"automation",
"major-domo",
"paper-dynasty",
"claude-code",
"agents"
],
"copied_to": "major-domo"
},
{
"id": "803b3f29-f38f-4739-aa09-1d1db5e42eb3",
"title": "Cross-cutting code quality anti-patterns in Major Domo and Paper Dynasty repos",
"tags": [
"major-domo",
"paper-dynasty",
"code-quality",
"security",
"patterns",
"homelab"
],
"copied_to": "major-domo"
},
{
"id": "dfa75d94-cfcc-459c-999b-41123d4f700a",
"title": "Scope guards added to major-domo, paper-dynasty, proxmox skills",
"tags": [
"claude-code",
"skills",
"scope-guards",
"configuration",
"claude-code-config",
"major-domo",
"paper-dynasty",
"proxmox"
],
"copied_to": "major-domo"
}
]
}

View File

@ -1,12 +0,0 @@
---
id: 81d3eb1f-489a-4f1b-b5d2-a7d2590780f8
type: code_pattern
title: "Comprehensive unit test coverage pattern"
tags: [major-domo, python, testing, patterns]
importance: 0.6
confidence: 0.8
created: "2025-12-09T23:19:36.586738+00:00"
updated: "2025-12-09T23:19:36.586738+00:00"
---
When writing unit tests for helper functions, ensure coverage includes: 1) Happy path with various input types (dict, Pydantic model), 2) Edge cases (None, empty, zero, negative values), 3) Boundary conditions (exact tolerance limits), 4) Large/small value handling, 5) Integration tests with real production models. Expanded salary cap tests from 21 to 30 by adding TestEdgeCases and TestRealTeamModel classes.

View File

@ -1,49 +0,0 @@
---
id: 5adcad70-654d-4733-b03c-b509123dc6bb
type: configuration
title: "Deploy script for discord-app-v2: .scripts/deploy.sh usage and pre-flight steps"
tags: [major-domo, deployment, discord-bot, akamai, docker, configuration]
importance: 0.6
confidence: 0.8
created: "2026-02-22T22:41:53.939923+00:00"
updated: "2026-02-22T22:41:53.939923+00:00"
---
# Deploy Script for discord-app-v2
## Project
major-domo / discord-app-v2
## Location
`.scripts/deploy.sh` in the `discord-app-v2` repo root.
## Usage
```bash
.scripts/deploy.sh # Interactive (prompts for confirmation)
.scripts/deploy.sh -y # Skip confirmation prompt
```
## What It Does
1. SSHes to `akamai` (uses SSH alias from `~/.ssh/config`)
2. Pulls latest Docker image: `manticorum67/major-domo-discordapp:latest`
3. Restarts the container via `docker compose`
4. Waits 5 seconds
5. Shows container status and last 10 log lines
6. Prints a rollback command with the previous image digest
## Pre-flight Checklist
1. Ensure local branch is on `main`: `git checkout main`
2. Ensure local `main` is up to date with `origin/main`: `git pull origin main`
3. If local `main` has diverged (e.g., from rebased commits after a forced push to remote), sync with: `git reset --hard origin/main`
4. Confirm CI has built and pushed the new image before deploying
## Container Details
- **Host**: `akamai` (SSH alias)
- **Container name**: `major-domo-discord-app-1`
- **Image**: `manticorum67/major-domo-discordapp` (no dash between "discord" and "app")
- **Compose dir**: `~/container-data/major-domo`
## Post-deploy Verification
```bash
ssh akamai "docker logs --since 5m major-domo-discord-app-1"
```

View File

@ -1,35 +0,0 @@
---
id: d0e2e9ab-9a46-44b3-b749-8c2a562d0a1b
type: configuration
title: "Discord bot systemd service with environment variables"
tags: [discord-bot, systemd, deployment, claude-cli, configuration, claude-coordinator]
importance: 0.7
confidence: 0.8
created: "2026-02-13T20:35:20.868552+00:00"
updated: "2026-02-13T20:35:29.511829+00:00"
relations:
- target: 7b6d183b-e221-471a-8078-e8639ebdd55a
type: RELATED_TO
direction: incoming
strength: 0.8
---
Systemd service setup for Claude Discord Coordinator bot running as non-root user.
Service: /etc/systemd/system/claude-coordinator.service
Key config:
- User=discord-bot (required for Claude CLI bypassPermissions)
- EnvironmentFile=/opt/projects/claude-coordinator/.env
- WorkingDirectory=/opt/projects/claude-coordinator
- Restart=always with RestartSec=10
Environment variables (.env):
- DISCORD_TOKEN=<bot-token-from-discord-developer-portal>
- CLAUDE_CODE_OAUTH_TOKEN=<anthropic-token>
Git credentials (~/.git-credentials):
- Format: https://cal:{GITEA_TOKEN}@git.manticorum.com
- git config --global credential.helper store
Critical: Claude CLI requires non-root user for --permission-mode bypassPermissions
Discord tokens start with MTI..., Anthropic tokens start with sk-ant-oat01-

View File

@ -6,18 +6,13 @@ tags: [fish, starship, shell, nobara, configuration, homelab, shell-config]
importance: 0.65
confidence: 0.8
created: "2026-02-27T05:32:57.893367+00:00"
updated: "2026-02-28T04:53:37.809100+00:00"
updated: "2026-03-01T22:02:48.108105+00:00"
relations:
- target: 66bac9cf-1b1e-42f5-903d-d28a9d5e1e1a
type: REQUIRES
direction: outgoing
strength: 0.9
edge_id: a9f8ae4a-0ec1-429b-9161-73d3978b2a37
- target: a4efacad-fda5-49ca-97a9-dd433f8a6a77
type: RELATED_TO
direction: outgoing
strength: 0.7
edge_id: 853896ba-9204-49ce-b6da-0048ab1d78f7
- target: 6b1ef7c1-547f-4a79-aad7-23a720378c03
type: RELATED_TO
direction: incoming
@ -65,3 +60,4 @@ Key detail: `set -x SHELL /bin/bash` is set inside `config.fish` so Claude Code'
- Scripts with `#!/bin/bash` shebangs are completely unaffected
- Claude Code shell execution unaffected due to the SHELL override
- Starship works identically across fish, zsh, and bash — config is shell-agnostic

View File

@ -1,12 +0,0 @@
---
id: 0c487d17-0b6e-4a8a-8c1a-e3e3a68240c7
type: configuration
title: "Major Domo Production Bot Location"
tags: [major-domo, production, akamai, docker, discord-bot]
importance: 0.9
confidence: 0.8
created: "2025-12-12T02:37:59.511181+00:00"
updated: "2025-12-12T02:37:59.511181+00:00"
---
The Major Domo Discord bot runs in PRODUCTION on the Akamai server (ssh akamai). Container name: major-domo-discord-app-1. Use 'ssh akamai docker logs major-domo-discord-app-1' to check logs. Local logs in discord-app-v2/logs/ are for DEV ONLY and often stale.

View File

@ -1,12 +0,0 @@
---
id: 8c26aa9a-7ffa-4ebf-933d-6c5de7de1b47
type: configuration
title: "Major Domo production deployment info"
tags: [major-domo, docker, deployment, akamai]
importance: 0.7
confidence: 0.8
created: "2026-01-20T19:41:02.526136+00:00"
updated: "2026-01-20T19:41:02.526136+00:00"
---
Production server: ssh akamai. Container path: /root/container-data/major-domo. Service name: discord-app. Deploy command: ssh akamai 'cd /root/container-data/major-domo && docker compose pull discord-app && docker compose up -d discord-app'

View File

@ -1,12 +0,0 @@
---
id: bfee3e27-7687-4bfd-b8a7-6ef1d574012d
type: configuration
title: "major-domo-v2 main branch is protected on Gitea"
tags: [major-domo, gitea, config, git]
importance: 0.6
confidence: 0.8
created: "2026-02-13T20:35:35.859640+00:00"
updated: "2026-02-13T20:35:35.859640+00:00"
---
The main branch on cal/major-domo-v2 (Gitea) is protected. Cannot push directly - must create a feature branch and PR via /home/cal/.claude/scripts/gitea-create-pr.sh. Builds and deploys are handled by Gitea Actions on merge.

View File

@ -1,12 +0,0 @@
---
id: 9e9497ba-7578-4f6e-b5ed-d7679183d6d2
type: configuration
title: "SBA Database API - Server & Deployment Details"
tags: [major-domo, deployment, infrastructure]
importance: 0.9
confidence: 0.8
created: "2026-02-17T20:16:55.900329+00:00"
updated: "2026-02-17T20:16:55.900329+00:00"
---
Dev server: 10.10.0.42:814 (ssh sba-db → cd container-data/dev-sba-database). Production: ssh akamai → cd container-data/sba-database. Deploy procedure (both): docker-compose pull && docker-compose down && docker-compose up -d (on remote server). CRITICAL: Local docker compose on dev machine (port 801) is NOT the dev server. Dev server runs REMOTELY — must SSH in and deploy. Images must be pushed to registry first (pull-based deployment).

View File

@ -6,18 +6,7 @@ tags: [claude-code, skills, scope-guards, configuration, claude-code-config, maj
importance: 0.6
confidence: 0.8
created: "2026-03-01T05:48:14.559362+00:00"
updated: "2026-03-01T05:48:54.473042+00:00"
relations:
- target: 6cc417e2-8b8a-4629-a611-b2b379ad39b4
type: CAUSES
direction: incoming
strength: 0.9
edge_id: c11ece93-4701-4075-9b0f-c7d62e8ecaa9
- target: 767bc5c4-1951-41b2-ac14-279cce3d1765
type: RELATED_TO
direction: outgoing
strength: 0.7
edge_id: 74c201a2-18d2-43c2-83cd-8a6ea784bdab
updated: "2026-03-01T22:02:48.108978+00:00"
---
# Scope Guards Added to Project-Specific Skills
@ -38,3 +27,5 @@ All skills remain in `~/.claude/skills/` as user-level skills (not project-level
## Purpose
Prevents Claude from offering irrelevant skills when working in unrelated repos.

View File

@ -1,12 +0,0 @@
---
id: a49eac33-7056-4c23-b47a-c3091e6ee92c
type: configuration
title: "Subdirectory CLAUDE.md files for major-domo-database"
tags: [major-domo, claude-config, documentation, optimization]
importance: 0.5
confidence: 0.8
created: "2026-02-17T22:12:25.977916+00:00"
updated: "2026-02-17T22:12:25.977916+00:00"
---
Created targeted CLAUDE.md files for each app subdirectory in major-domo-database: app/routers_v3/CLAUDE.md (router patterns, two coexisting styles, decorator conventions, how to add new routers), app/routers_v3/stratplay/CLAUDE.md (sub-package structure, build_season_games filter builder, mutually exclusive params, CRUD side-effects), app/services/CLAUDE.md (DI architecture, Protocol interfaces, lazy repo loading, only players/teams refactored so far). Each file under 30 lines focused on gotchas and non-obvious patterns. Also simplified root database/CLAUDE.md dev/prod sections.

View File

@ -1,12 +0,0 @@
---
id: 9ba78799-6682-4c7f-83cd-8c95c7ac9eff
type: decision
title: "CLAUDE.md documentation maintenance"
tags: [major-domo, documentation, claude-md, maintenance]
importance: 0.4
confidence: 0.8
created: "2025-12-11T05:18:33.927402+00:00"
updated: "2025-12-11T05:18:33.927402+00:00"
---
Updated CLAUDE.md files after series of draft system commits. Key updates: marked draft commands as implemented (not pending), documented smart polling intervals for draft monitor (30s/15s/5s based on time remaining), added auto-start behavior documentation, documented on-clock announcement features. Importance: Keep CLAUDE.md files synchronized with actual implementation state.

View File

@ -6,18 +6,13 @@ tags: [fish, bash, shell, claude-code, architecture, decision, homelab, shell-co
importance: 0.6
confidence: 0.8
created: "2026-02-27T05:33:08.745935+00:00"
updated: "2026-02-28T04:53:43.158076+00:00"
updated: "2026-03-01T22:02:48.107795+00:00"
relations:
- target: 055aea5f-7084-48ae-a096-69ee1c35e114
type: REQUIRES
direction: incoming
strength: 0.9
edge_id: a9f8ae4a-0ec1-429b-9161-73d3978b2a37
- target: a4efacad-fda5-49ca-97a9-dd433f8a6a77
type: RELATED_TO
direction: outgoing
strength: 0.75
edge_id: 3537b1ab-3443-444e-8e93-fe866b42f202
- target: c292afbb-9b99-4628-8836-7a8d00c797e5
type: RELATED_TO
direction: incoming
@ -63,3 +58,4 @@ Set `set -x SHELL /bin/bash` inside fish's `config.fish`. This makes `$SHELL` re
- Fish config syntax (`set -x VAR val`, `if status is-interactive`) must be learned — it is not bash-compatible
- Two shell configs to potentially maintain (`~/.config/fish/config.fish` for interactive, and any bash rc for login/script contexts)
- Benefit: interactive experience is dramatically better than plain zsh without plugins

View File

@ -1,40 +0,0 @@
---
id: 4a8de106-5272-4a7f-9b06-cf1ef3d323b4
type: decision
title: "Gitea auto-close only triggers on direct merge to default branch, not via staging branch"
tags: [gitea, ci-cd, release-workflow, issues, next-release, major-domo, decision]
importance: 0.65
confidence: 0.8
created: "2026-02-20T20:30:31.724623+00:00"
updated: "2026-02-20T20:30:31.724623+00:00"
---
# Gitea Auto-Close Issue Limitation
## Context
Project: major-domo and any repo using a staging branch pattern (feature → next-release → main).
## Problem
Gitea's `closes #XX` keyword in commit messages **only auto-closes issues** when the commit lands directly in the default branch (main). With a staging pattern:
1. `feature → next-release` merge: does NOT close issues (not the default branch)
2. `next-release → main` PR merge: uses a merge commit that does NOT contain the original commit messages with `closes #XX` keywords
Result: issues are never auto-closed, even when the code resolves them.
## Workaround
Manually close resolved issues after merging next-release to main:
```bash
tea issues close --repo cal/major-domo-v2 --id <number>
```
Closed 11 issues manually after one release cycle.
## Alternatives to Consider
- Close issues via the PR description on the final main merge PR (may work if the PR body supports closes syntax)
- Write a post-merge script/workflow to parse commit messages and close referenced issues
- Switch to direct branch → main workflow if staging complexity isn't needed
## Key Takeaway
Don't rely on `closes #XX` auto-close when using staging branches. Budget time for manual issue hygiene after each release.

View File

@ -1,39 +0,0 @@
---
id: 455da58f-7acf-4158-b5a4-7873fd32581e
type: decision
title: "Major Domo v2: next-release branch accumulates changes before main merge"
tags: [major-domo, git, workflow, decision, ci-cd, release]
importance: 0.65
confidence: 0.8
created: "2026-02-20T16:50:39.664619+00:00"
updated: "2026-02-20T16:50:39.664619+00:00"
---
# next-release Branch Pattern for Major Domo v2
## Decision
Major Domo v2 (`discord-app-v2`) uses a `next-release` branch to accumulate multiple changes before merging to `main` and triggering a CalVer release.
## Branch flow
```
feature/name → next-release → main (triggers CI/CD + Docker image build)
fix/name → next-release
```
## Current state (as of 2026-02-20)
`next-release` contains:
- Local deploy script
- Obsolete test stub removal
- 7 security fixes (commit `f4be20a`)
## Rationale
- Avoids triggering a production release for every small fix or feature
- Groups related work into a meaningful release unit
- Gives time to add production environment changes (e.g. new env vars) before deploying
## Remote tracking
`next-release` tracks `origin/next-release` on Gitea (git.manticorum.com).
## Related
- CalVer versioning: `YYYY.MM.BUILD` generated automatically on merge to `main` via Gitea Actions
- Docker image: `manticorum67/major-domo-discordapp` (no dash between discord and app)

View File

@ -1,18 +0,0 @@
---
id: ed9e1e96-f7ef-4594-b88f-65cb2decee87
type: decision
title: "Salary cap refactor plan created"
tags: [major-domo, python, refactor, salary-cap]
importance: 0.5
confidence: 0.8
created: "2025-12-09T23:03:07.253973+00:00"
updated: "2026-02-20T04:32:54.918830+00:00"
relations:
- target: e5bc69ae-6d11-4ed7-ab72-5cefac4b7962
type: BUILDS_ON
direction: outgoing
strength: 0.9
edge_id: 816ef292-f193-4e26-a58e-042d993efc92
---
Created feature branch feature/dynamic-salary-cap and JSON task plan to replace hardcoded 32.0/32.001 salary cap values with dynamic Team.salary_cap field. Plan includes 8 tasks across helpers.py, draft.py, and transactions.py

View File

@ -6,13 +6,8 @@ tags: [claude-code, skills, organization, best-practices, scope-guards, claude-c
importance: 0.8
confidence: 0.8
created: "2026-03-01T05:48:08.265336+00:00"
updated: "2026-03-01T05:48:47.715024+00:00"
updated: "2026-03-01T22:02:48.108618+00:00"
relations:
- target: dfa75d94-cfcc-459c-999b-41123d4f700a
type: CAUSES
direction: outgoing
strength: 0.9
edge_id: c11ece93-4701-4075-9b0f-c7d62e8ecaa9
- target: e0a851a7-1dc5-4191-b220-aa90112a1171
type: CAUSES
direction: outgoing
@ -53,3 +48,4 @@ Token overhead is minimal (~50-100 tokens per skill description).
- No symlink management
- Claude respects scope guards in skill descriptions
- Easy to update scope by editing one file

View File

@ -1,13 +0,0 @@
---
id: 8e168371-657b-48ff-aae5-af1930825f87
type: RELATED_TO
from_id: 6299c5dd-6db5-4840-afdc-30760f2a7de2
from_title: "Bug fix verification test"
to_id: 7ab7f240-897f-4b9d-8e00-51499f6b51bf
to_title: "[major-domo] Session: fix, tooling"
strength: 0.62
created: "2026-03-01T04:22:14.719002+00:00"
updated: "2026-03-01T04:22:14.719002+00:00"
---
Auto-edge: Bug fix verification test → [major-domo] Session: fix, tooling

View File

@ -1,13 +0,0 @@
---
id: ff9d7164-7090-44ae-a3d5-7cbdd7bc33ef
type: BUILDS_ON
from_id: f7824582-0d80-401e-bd5b-c23ced0b737a
from_title: "Draft monitor missing guild variable"
to_id: e4f0bee9-9dc0-4bff-8d07-ba8aa22ef83d
to_title: "Draft monitor auto-start and on-clock embed"
strength: 0.85
created: "2026-02-20T04:32:58.534513+00:00"
updated: "2026-02-20T04:32:58.534513+00:00"
---
Draft monitor missing guild variable fix addressed a bug in the draft monitor auto-start feature

View File

@ -1,13 +0,0 @@
---
id: cd4dce12-c777-4c55-8660-f1992ff0f243
type: BUILDS_ON
from_id: 83dbebd0-b523-4e4d-9351-b1e4fd81999e
from_title: "DraftList nested Player.team_id extraction bug"
to_id: 7c146559-79b7-4254-84cf-89aa1bc6750a
to_title: "Fix auto-draft nested API parsing"
strength: 0.85
created: "2026-02-20T04:32:13.382771+00:00"
updated: "2026-02-20T04:32:13.382771+00:00"
---
DraftList nested Player.team_id extraction bug was a deeper instance of the auto-draft nested API parsing issue

View File

@ -1,13 +0,0 @@
---
id: 3537b1ab-3443-444e-8e93-fe866b42f202
type: RELATED_TO
from_id: 66bac9cf-1b1e-42f5-903d-d28a9d5e1e1a
from_title: "Fish + bash hybrid shell strategy: fish interactive, bash for scripts/tools"
to_id: a4efacad-fda5-49ca-97a9-dd433f8a6a77
to_title: "Shell aliases not available in Claude Code Bash tool"
strength: 0.75
created: "2026-02-27T05:33:26.612607+00:00"
updated: "2026-02-27T05:33:26.612607+00:00"
---
Both concern how Claude Code's Bash tool interacts with the user's shell environment — aliases vs SHELL variable

View File

@ -1,13 +0,0 @@
---
id: 853896ba-9204-49ce-b6da-0048ab1d78f7
type: RELATED_TO
from_id: 055aea5f-7084-48ae-a096-69ee1c35e114
from_title: "Fish shell + Starship prompt setup on Nobara workstation"
to_id: a4efacad-fda5-49ca-97a9-dd433f8a6a77
to_title: "Shell aliases not available in Claude Code Bash tool"
strength: 0.7
created: "2026-02-27T05:33:28.417546+00:00"
updated: "2026-02-27T05:33:28.417546+00:00"
---
Fish shell config sets SHELL=/bin/bash to avoid the same class of Claude Code shell compatibility issues

View File

@ -1,13 +0,0 @@
---
id: 00724a32-f9ca-43af-93a9-3d7f7b356ec1
type: BUILDS_ON
from_id: 250d2fe0-5866-42f1-b83d-187b3a64fb84
from_title: "Fix: claude -p nested session failure due to CLAUDECODE env var"
to_id: a4efacad-fda5-49ca-97a9-dd433f8a6a77
to_title: "Shell aliases not available in Claude Code Bash tool"
strength: 0.72
created: "2026-03-01T06:21:07.746655+00:00"
updated: "2026-03-01T06:21:07.746655+00:00"
---
Auto-edge: Fix: claude -p nested session failure due to CLAUDECODE env var → Shell aliases not available in Claude Code Bash tool

View File

@ -1,13 +0,0 @@
---
id: 5dc33849-ea41-468e-99a8-4610f2da2c2e
type: BUILDS_ON
from_id: 7888f693-4914-437b-97f0-81906fbfe69e
from_title: "Fix Player model validation in draft pick test"
to_id: c29d2fb4-d2f6-46e9-a95a-8d6ae4110db8
to_title: "Fix SOAK and DraftList test failures"
strength: 0.85
created: "2026-02-20T04:33:02.463395+00:00"
updated: "2026-02-20T04:33:02.463395+00:00"
---
Player model validation fix in draft pick test extended the earlier SOAK and DraftList test failure fix

View File

@ -1,13 +0,0 @@
---
id: 57492bcf-6e83-4191-a96d-b5b7d562680c
type: RELATED_TO
from_id: ce2a22a6-7c40-449a-9073-289473b00b99
from_title: "[major-domo] fix: use Gitea API for tag creation to avoid branch protection failures"
to_id: 633e06ab-7503-4368-964f-d2ba8071de4b
to_title: "[paper-dynasty] ci: use Gitea API for tag creation instead of git push"
strength: 0.85
created: "2026-02-20T04:32:47.755777+00:00"
updated: "2026-02-20T04:32:47.755777+00:00"
---
Major Domo and Paper Dynasty both iterated on the same Gitea API tag creation fix

View File

@ -1,13 +0,0 @@
---
id: 415bba1f-54c1-420e-966b-4f1b14f0a727
type: RELATED_TO
from_id: 40e194b2-3d50-4698-89be-d0db08349882
from_title: "[paper-dynasty] ci: Use Gitea API for tag creation to avoid branch protection issues"
to_id: ce2a22a6-7c40-449a-9073-289473b00b99
to_title: "[major-domo] fix: use Gitea API for tag creation to avoid branch protection failures"
strength: 0.9
created: "2026-02-20T04:32:42.044459+00:00"
updated: "2026-02-20T04:32:42.044459+00:00"
---
Same fix applied across repos: Gitea API for tag creation instead of git push to avoid branch protection failures

View File

@ -1,13 +0,0 @@
---
id: 816ef292-f193-4e26-a58e-042d993efc92
type: BUILDS_ON
from_id: ed9e1e96-f7ef-4594-b88f-65cb2decee87
from_title: "Salary cap refactor plan created"
to_id: e5bc69ae-6d11-4ed7-ab72-5cefac4b7962
to_title: "Salary cap helper functions added"
strength: 0.9
created: "2026-02-20T04:32:54.918830+00:00"
updated: "2026-02-20T04:32:54.918830+00:00"
---
Salary cap refactor plan decision led to the implementation of salary cap helper functions

View File

@ -1,13 +0,0 @@
---
id: 74c201a2-18d2-43c2-83cd-8a6ea784bdab
type: RELATED_TO
from_id: dfa75d94-cfcc-459c-999b-41123d4f700a
from_title: "Scope guards added to major-domo, paper-dynasty, proxmox skills"
to_id: 767bc5c4-1951-41b2-ac14-279cce3d1765
to_title: "CLAUDE.md optimization across all projects"
strength: 0.7
created: "2026-03-01T05:48:54.473042+00:00"
updated: "2026-03-01T05:48:54.473042+00:00"
---
Both are about optimizing Claude configuration — scope guards configure skills, the workflow configures CLAUDE.md

View File

@ -1,13 +0,0 @@
---
id: c11ece93-4701-4075-9b0f-c7d62e8ecaa9
type: CAUSES
from_id: 6cc417e2-8b8a-4629-a611-b2b379ad39b4
from_title: "Skill organization: scoped user skills over symlinks"
to_id: dfa75d94-cfcc-459c-999b-41123d4f700a
to_title: "Scope guards added to major-domo, paper-dynasty, proxmox skills"
strength: 0.9
created: "2026-03-01T05:48:40.223515+00:00"
updated: "2026-03-01T05:48:40.223515+00:00"
---
Scope guard decision directly caused the scope guard configuration applied to major-domo, paper-dynasty, proxmox skills

View File

@ -1,13 +0,0 @@
---
id: a80e7ad5-5979-4c6c-9c6d-66ac633fd725
type: BUILDS_ON
from_id: 8023fae6-eec1-4c93-bac8-1bd85dd61bae
from_title: "Test auto-edge followup"
to_id: 51d21e5e-92e8-44ec-9ad4-9cdfd893c355
to_title: "Loaded dice dev command for testing"
strength: 0.63
created: "2026-03-01T04:10:46.573110+00:00"
updated: "2026-03-01T04:10:46.573110+00:00"
---
Auto-edge: Test → Loaded dice dev command for testing

View File

@ -1,49 +0,0 @@
---
id: 0d5b864a-7787-4ee5-841d-b8b1556d6425
type: error
title: "Critical: Wrong API parameter name - used 'dem_week' instead of 'demotion_week'"
tags: [major-domo, python, api, parameter-naming, production, critical]
importance: 0.9
confidence: 0.8
created: "2026-02-02T03:29:04.489436+00:00"
updated: "2026-02-02T03:29:04.489436+00:00"
relations:
- target: 69415fc4-08c7-497a-b1ef-2f135c6400f2
type: CAUSES
direction: incoming
strength: 0.5
---
**Error**: Player team updates sent wrong parameter name to API, causing dem_week values to be ignored.
**Problem**: Code was sending 'dem_week' as query parameter, but API expects 'demotion_week'.
**Root Cause**: Developer misunderstood API parameter naming during initial implementation. Tests verified internal logic but not the actual API parameter name being sent.
**Impact**:
- v2.29.0 and v2.29.1 sent dem_week parameter which API silently ignored
- All player updates (transaction freeze, IL moves, draft picks) failed to set demotion_week field
- No errors raised - parameter was simply not recognized by API
**Fix**: Changed parameter name in services/player_service.py line 426:
- WRONG: updates['dem_week'] = dem_week
- CORRECT: updates['demotion_week'] = dem_week
**Internal Naming**: Kept Python parameter name as 'dem_week' for code brevity, but map to 'demotion_week' when sending to API.
**Test Updates**: Updated 4 tests to verify correct parameter name is sent to API.
**Prevention Strategies**:
1. Always verify API parameter names against API documentation/OpenAPI spec
2. Test against actual API or accurate mocks with exact parameter names
3. Use API client type hints that match exact API contract
4. Add integration tests that verify HTTP request parameters
5. Check API response for success indicators, not just lack of errors
**Quick Fix Pattern**:
1. Change parameter name in dictionary: 'dem_week' → 'demotion_week'
2. Update all test assertions to check for correct parameter name
3. Run tests to verify: pytest tests/test_services_player_service.py
4. Deploy hotfix immediately
**Deployment Impact**: Required hotfix v2.29.2 to correct v2.29.0/v2.29.1.

View File

@ -1,42 +0,0 @@
---
id: ffdfef93-1292-4f98-9f81-a347fd22fc91
type: error
title: "Production crash: Missing Optional import in type hint caused NameError"
tags: [major-domo, python, production, error, deployment, type-hints, imports]
importance: 0.8
confidence: 0.8
created: "2026-02-02T03:19:04.031805+00:00"
updated: "2026-02-02T03:19:04.031805+00:00"
relations:
- target: 69415fc4-08c7-497a-b1ef-2f135c6400f2
type: CAUSES
direction: incoming
strength: 0.5
---
**Error**: Bot crashed on production startup with 'NameError: name Optional is not defined' in transaction_freeze.py line 688.
**Root Cause**: Added type hint 'dem_week: Optional[int] = None' to method parameter but forgot to import Optional from typing module.
**Why It Happened**:
- Local development and tests passed because the file wasn't fully reloaded
- Python only raises NameError when the code path is actually executed (at class definition time)
- Type hints are evaluated at runtime in some contexts
**Fix**: Added Optional to imports: 'from typing import Dict, List, Tuple, Set, Optional'
**Prevention Strategies**:
1. Always run full test suite before deploying (pytest --tb=short -q)
2. Check imports when adding new type hints
3. Use IDE with static type checking (Pylance) to catch missing imports
4. Consider using 'from __future__ import annotations' for deferred type hint evaluation
5. Test imports explicitly: 'python -c "import tasks.transaction_freeze"'
**Quick Fix Pattern**:
1. Identify missing import from traceback
2. Add import to file
3. Commit: 'Fix missing X import in Y'
4. Deploy hotfix with patch version bump
5. Verify with docker logs
**Deployment Impact**: v2.29.0 crashed immediately, required hotfix v2.29.1 within minutes. Total downtime: ~3 minutes.

View File

@ -1,12 +0,0 @@
---
id: 3ec7209e-59ed-4111-9d6e-3fafbd2e64c6
type: fix
title: "API delete endpoint used wrong dict key"
tags: [major-domo, database, api, fix]
importance: 0.5
confidence: 0.8
created: "2026-01-28T22:07:13.021452+00:00"
updated: "2026-01-28T22:07:13.021452+00:00"
---
The delete_custom_command_endpoint was accessing existing['creator_id'] but get_custom_command_by_id() returns 'creator_db_id'. Fixed to use correct key.

View File

@ -1,12 +0,0 @@
---
id: ef15149d-9386-4503-b6e0-c2d23bfae51e
type: fix
title: "Custom command delete UI showed success but didn't delete"
tags: [major-domo, discord.py, fix, bug]
importance: 0.6
confidence: 0.8
created: "2026-01-28T22:01:40.394465+00:00"
updated: "2026-01-28T22:01:40.394465+00:00"
---
The delete confirmation view in views/custom_commands.py showed a success message when user clicked confirm, but never actually called custom_commands_service.delete_command(). Added the missing service call.

View File

@ -1,12 +0,0 @@
---
id: d32832d7-cfce-4618-bb19-1497b11698a6
type: fix
title: "Discord autocomplete sends display text not value"
tags: [major-domo, python, discord, autocomplete, fix]
importance: 0.6
confidence: 0.8
created: "2025-12-13T00:59:43.879353+00:00"
updated: "2025-12-13T00:59:43.879353+00:00"
---
When users select from Discord autocomplete dropdown, it sometimes sends the display text (e.g., 'Mason Miller (RP) - 2.50 sWAR') instead of the value ('Mason Miller'). Added _parse_player_name() function with regex to strip position and sWAR info from input. Pattern: r'^(.+?)\s*\([A-Z0-9]+\)\s*-\s*[\d.]+\s*sWAR$'

View File

@ -1,18 +0,0 @@
---
id: f7824582-0d80-401e-bd5b-c23ced0b737a
type: fix
title: "Draft monitor missing guild variable"
tags: [major-domo, python, fix, discord, draft]
importance: 0.6
confidence: 0.8
created: "2025-12-13T00:46:25.432142+00:00"
updated: "2026-02-20T04:32:58.534513+00:00"
relations:
- target: e4f0bee9-9dc0-4bff-8d07-ba8aa22ef83d
type: BUILDS_ON
direction: outgoing
strength: 0.85
edge_id: ff9d7164-7090-44ae-a3d5-7cbdd7bc33ef
---
Bug: The _post_on_clock_announcement method in tasks/draft_monitor.py referenced 'guild' variable without defining it, causing role pings to silently fail after auto-draft picks. Fix: Added guild lookup from bot.get_guild(config.guild_id) at the start of the method. This was causing the draft results ping to not post the team role mention.

View File

@ -1,12 +0,0 @@
---
id: 9fa127bc-3950-495c-896f-32d8a312dae4
type: fix
title: "Draft monitor now pings team role instead of GM"
tags: [major-domo, discord-app-v2, draft, ping, role, fix]
importance: 0.5
confidence: 0.8
created: "2025-12-13T00:41:00.170391+00:00"
updated: "2025-12-13T00:41:00.170391+00:00"
---
Changed draft on-clock announcement in tasks/draft_monitor.py to ping the team's Discord role (using team.lname) instead of pinging the GM directly (gmid). Uses discord.utils.get(guild.roles, name=team.lname) pattern from trade_channels.py. Falls back gracefully with warning if role not found.

View File

@ -1,12 +0,0 @@
---
id: b51ca30a-aae2-4865-9a62-4c797cbacc26
type: fix
title: "Draft pick service API parameter fix"
tags: [major-domo, python, fix, api, draft]
importance: 0.5
confidence: 0.8
created: "2025-12-09T20:56:04.871403+00:00"
updated: "2025-12-09T20:56:04.871403+00:00"
---
Fixed incorrect API parameter names in draft_pick_service.py get_picks_by_team() method. Changed 'round_start' to 'pick_round_start' and 'round_end' to 'pick_round_end' to match the OpenAPI spec at https://sba.manticorum.com/api/openapi.json. This was new/untested code. Also documented that the public OpenAPI spec only contains GET endpoints - PATCH/POST/DELETE are authenticated internal operations not exposed publicly.

View File

@ -1,12 +0,0 @@
---
id: dccfe52e-1b02-4171-b188-26afd445f37a
type: fix
title: "Draft recent picks off-by-one error"
tags: [major-domo, discord-bot, draft, fix, off-by-one]
importance: 0.6
confidence: 0.8
created: "2025-12-13T01:15:00.758311+00:00"
updated: "2025-12-13T01:15:00.758311+00:00"
---
Fixed off-by-one error in get_recent_picks service method. The method was subtracting 1 from overall_end, but callers already passed currentpick - 1. This caused the Last 5 picks list on OnTheClock embed to skip the most recent pick (showing 124-128 instead of 125-129 when pick 130 was on clock). Removed extra subtraction in draft_pick_service.py. Version 2.24.6.

View File

@ -1,12 +0,0 @@
---
id: bf9b2bc3-bed6-47bd-b4e0-1bbe6147ce2d
type: fix
title: "Draft results post to result_channel fix"
tags: [major-domo, discord-bot, draft, fix]
importance: 0.6
confidence: 0.8
created: "2025-12-13T01:08:30.975064+00:00"
updated: "2025-12-13T01:08:30.975064+00:00"
---
Fixed /draft command to post player cards to result_channel. The manual /draft command was only posting draft cards to ping_channel but not result_channel, while auto-draft correctly posted to both. Added code block in commands/draft/picks.py (lines 361-377) to post draft cards to result_channel. Version 2.24.5.

View File

@ -1,18 +0,0 @@
---
id: 83dbebd0-b523-4e4d-9351-b1e4fd81999e
type: fix
title: "DraftList nested Player.team_id extraction bug"
tags: [major-domo, python, fix, draft, pydantic, nested-objects]
importance: 0.7
confidence: 0.8
created: "2025-12-11T18:25:14.873571+00:00"
updated: "2026-02-20T04:32:13.382771+00:00"
relations:
- target: 7c146559-79b7-4254-84cf-89aa1bc6750a
type: BUILDS_ON
direction: outgoing
strength: 0.85
edge_id: cd4dce12-c777-4c55-8660-f1992ff0f243
---
Fixed auto-draft failure where player.team_id was None for all DraftList entries. Root cause: Pydantic's default nested object creation calls Player(**data) directly, NOT Player.from_api_data(data). Since Player.from_api_data() extracts team_id from nested team object (line 90), but wasn't being called, player.team_id remained None. Fix: Added DraftList.from_api_data() override that explicitly calls Player.from_api_data() and Team.from_api_data() for nested objects. The check 'player.team_id \!= config.free_agent_team_id' was evaluating 'None \!= 547' = True, skipping ALL players. Files: models/draft_list.py (added from_api_data), tests/test_models.py (added regression test).

View File

@ -1,53 +0,0 @@
---
id: 04acc924-feff-41fe-a4f5-b7accc1d04ee
type: fix
title: "Fix: 7 security issues in major-domo-v2 - hardcoded key, URL encoding, error leaks, bare excepts, guild guard, md5"
tags: [major-domo, security, discord-bot, fix, python, gitea]
importance: 0.8
confidence: 0.8
created: "2026-02-20T16:50:22.694706+00:00"
updated: "2026-02-20T16:50:22.694706+00:00"
---
# Security Fixes Batch: major-domo discord-app-v2
**Commit:** `f4be20a` on `fix/security-issues` branch, merged into `next-release`
**Date:** 2026-02-20
## Issues Fixed
### #19 - Hardcoded Giphy API key removed
- Was: `H86xibttEuUcslgmMM6uu74IgLEZ7UOD` hardcoded in `config.py`
- Fix: Now loaded from `GIPHY_API_KEY` env var with empty string default
- Key moved to `.env` (gitignored), `.env.example` updated
- **Production action required:** Add `GIPHY_API_KEY` to Akamai server env vars before deploying
### #20 - URL parameter injection in APIClient
- File: `APIClient._add_params()`
- Fix: URL-encoded query parameter keys and values using `urllib.parse.quote()`
### #21 - Giphy search phrase injection
- Files: `get_disappointment_gif()` and `get_gif()` methods
- Fix: URL-encoded search phrases before passing to Giphy API
### #22 - Internal exception messages leaking to Discord users
- Files: `transaction_embed.py`, `submit_scorecard.py`
- Was: `str(e)` sent directly to Discord embed
- Fix: Replaced with generic error messages
### #23 - Bare `except:` clauses replaced
- Files: `transaction_freeze.py`, `transaction_embed.py`, `submit_scorecard.py`
- Replaced 7 bare `except:` with `except Exception:`
### #24 - Missing guild guard in role check
- File: `injuries/management.py``has_player_role()`
- Fix: Added `if interaction.guild is None: return False` guard before guild access
### #32 - MD5 replaced with SHA-256 for command hash
- File: `bot.py``_should_sync_commands()` and `_save_command_hash()`
- Was: `hashlib.md5()` (cryptographically weak)
- Fix: `hashlib.sha256()`
## Production Checklist
- Add `GIPHY_API_KEY` env var to Akamai server (`ssh akamai` → edit `container-data/major-domo/.env`)
- Deploy after `next-release` merges to `main`

View File

@ -6,7 +6,7 @@ tags: [claude-code, headless, nested-sessions, fix, claude-scheduled, subprocess
importance: 0.7
confidence: 0.8
created: "2026-03-01T06:21:07.380774+00:00"
updated: "2026-03-01T06:21:28.736116+00:00"
updated: "2026-03-01T22:02:48.109296+00:00"
relations:
- target: eed91de9-f5fd-4804-be7c-480d01255ffd
type: RELATED_TO
@ -18,11 +18,6 @@ relations:
direction: outgoing
strength: 0.73
edge_id: e8e3d8cf-6ccf-4b39-a625-466151c1b392
- target: a4efacad-fda5-49ca-97a9-dd433f8a6a77
type: BUILDS_ON
direction: outgoing
strength: 0.72
edge_id: 00724a32-f9ca-43af-93a9-3d7f7b356ec1
- target: cb5e8814-f689-4de0-8854-823358706dec
type: RELATED_TO
direction: outgoing
@ -53,3 +48,4 @@ env.pop('CLAUDECODE', None)
## Context
Discovered while building claude-scheduled task runner. Also applies to any project launching Claude Code as a subprocess.

View File

@ -1,18 +0,0 @@
---
id: 7888f693-4914-437b-97f0-81906fbfe69e
type: fix
title: "Fix Player model validation in draft pick test"
tags: [major-domo, python, test-fix, pydantic]
importance: 0.4
confidence: 0.8
created: "2025-12-10T04:30:50.680312+00:00"
updated: "2026-02-20T04:33:02.463395+00:00"
relations:
- target: c29d2fb4-d2f6-46e9-a95a-8d6ae4110db8
type: BUILDS_ON
direction: outgoing
strength: 0.85
edge_id: 5dc33849-ea41-468e-99a8-4610f2da2c2e
---
Added required fields (wara, image, season, pos_1) to Player instantiation in test_patch_draftpick_success test. The Player Pydantic model requires these fields but the test was only providing id, name, and team.

View File

@ -1,28 +0,0 @@
---
id: 543706bd-8352-4a4d-8afb-957e0f5e6ef6
type: fix
title: "Fix: publish-scorecard error embed shows user-provided URL and removes double emoji"
tags: [major-domo, scorebug, ux, fix, embed-template, discord-bot]
importance: 0.55
confidence: 0.8
created: "2026-02-20T20:06:31.417368+00:00"
updated: "2026-02-20T20:06:31.417368+00:00"
---
# Fix: publish-scorecard Error Embed UX
## Problem
When a user pasted a Discord message link instead of a Google Sheets URL, the error embed gave no indication of what URL was actually received. This made debugging confusing for the user.
Also, the error embed had a redundant ❌ emoji in the description — `EmbedTemplate.error()` already adds one to the title automatically, resulting in double emoji.
## Changes (`commands/gameplay/scorebug.py`)
1. Added `"**You provided:** \`{url}\`"` to the `SheetsException` error embed description so the user can immediately see what they submitted.
2. Removed the manually added ❌ from the description (double emoji — `EmbedTemplate.error()` auto-adds one to the title).
## Pattern Reminder
`EmbedTemplate.success()`, `EmbedTemplate.error()`, `EmbedTemplate.warning()`, `EmbedTemplate.info()`, `EmbedTemplate.loading()` all auto-add emoji prefixes to the title. Never put emoji in the `title` parameter, and never manually add a matching emoji to the description.
## Closes
Issue #39 (UX sub-item). Branch: `fix/scorebug-bugs`.

View File

@ -1,35 +0,0 @@
---
id: 0960205f-85d1-447c-9921-57fec764e1d5
type: fix
title: "Fix: Scorebug tracker read-failure tolerance prevents false channel hiding"
tags: [major-domo, scorebug, live-scorebug-tracker, resilience, google-sheets, discord, fix]
importance: 0.7
confidence: 0.8
created: "2026-02-20T20:30:07.053777+00:00"
updated: "2026-02-20T20:30:07.053777+00:00"
---
# Scorebug Tracker: Read-Failure Tolerance
## Project
major-domo / discord-app-v2
## File
`tasks/live_scorebug_tracker.py``_update_scorebugs()` method
## Problem
The method hid `#live-sba-scores` whenever `active_scorebugs` was empty after the read loop. It did not distinguish between:
- All games confirmed FINAL (safe to hide)
- All sheet reads failed due to transient errors (incorrect to hide)
A single Google Sheets timeout would cause the live scores channel to disappear mid-game.
## Fix
Added `read_failures` and `confirmed_final` counters with three-branch logic:
1. **Active scorebugs present** → show channel (normal case)
2. **Read failures with not all games confirmed final** → preserve last known state, log warning (resilience case)
3. **All confirmed final** → safe to hide channel (expected end-of-game case)
## Key Takeaway
Channel visibility decisions that depend on external I/O (Google Sheets) must account for transient read failures before taking destructive action (hiding channels). Always distinguish "no data" from "failed to fetch data."

View File

@ -1,43 +0,0 @@
---
id: 8ce81bc9-3bce-44a9-89e8-c01e54e6df7a
type: fix
title: "Fix: Scorebug win probability orientation — C8=winning team, D8=percentage"
tags: [major-domo, scorebug, win-probability, google-sheets, fix, data-orientation]
importance: 0.7
confidence: 0.8
created: "2026-02-20T20:30:15.225730+00:00"
updated: "2026-02-20T20:30:15.225730+00:00"
---
# Scorebug Win Probability Orientation Bug
## Project
major-domo / discord-app-v2
## File
`services/scorebug_service.py`
## Google Sheets Layout
The scorecard outputs:
- **C8** (`all_data[6][1]`): winning team's abbreviation
- **D8**: that team's win probability percentage
## Problem
Code was treating D8 as always the **home team's** win%, regardless of which team C8 named. This produced an inverted win probability whenever the away team was winning.
## Fix
Read C8 and compare to the home team abbreviation (from `game_state[4][1]`).
```python
winning_team_abbr = all_data[6][1] # C8
home_team_abbr = game_state[4][1]
win_percentage = float(d8_value)
if winning_team_abbr != home_team_abbr:
win_percentage = 100 - win_percentage # flip to home team's perspective
```
`ScorebugData.win_percentage` is always stored from the **home team's perspective**.
## Key Takeaway
When consuming a spreadsheet that outputs "winning team + that team's probability," always check orientation and normalize to a consistent perspective before storing.

View File

@ -1,30 +0,0 @@
---
id: fbc3a7f4-f50a-4556-bcca-fd49a268a82f
type: fix
title: "Fix: ScorecardTracker stale data - load_data() on every read"
tags: [major-domo, scorebug, scorecard-tracker, fix, stale-data, discord-bot]
importance: 0.7
confidence: 0.8
created: "2026-02-20T20:06:02.824409+00:00"
updated: "2026-02-20T20:06:02.824409+00:00"
---
# Fix: ScorecardTracker Stale Data
## Problem
The background task (`LiveScorebugTracker`) and the `/publish-scorecard` command each create their own `ScorecardTracker` instance. Publishing writes to `data/scorecards.json` through the command's instance, but the background task's instance had stale in-memory data and never saw the updates.
## Root Cause
`ScorecardTracker` loaded data once at construction time and kept it in memory. Multiple instances do not share state, so one instance's writes were invisible to others.
## Fix
Added `self.load_data()` at the start of `get_scorecard()` and `get_all_scorecards()` in `commands/gameplay/scorecard_tracker.py` so they always read fresh data from disk on every call.
## Why It's Safe
The JSON file (`data/scorecards.json`) is small, so the disk read overhead is negligible. This is a simple, correct fix without needing to introduce shared state or a singleton.
## File
`commands/gameplay/scorecard_tracker.py`
## Related
Closes issue #40. Branch: `fix/scorebug-bugs`.

View File

@ -1,26 +0,0 @@
---
id: 1eb7759d-2fe3-4bf8-824b-13f8c8f1b723
type: fix
title: "Fix: tea CLI requires explicit --repo flag in discord-app-v2 directory"
tags: [major-domo, gitea, tea-cli, fix]
importance: 0.4
confidence: 0.8
created: "2026-02-20T03:53:17.677318+00:00"
updated: "2026-02-20T03:53:17.677318+00:00"
---
# tea CLI requires explicit --repo flag for major-domo-v2
## Problem
`tea pulls create` fails with "path segment [0] is empty" when run from the `discord-app-v2` directory. The tea CLI cannot auto-detect the repo from the git remote URL in this subdirectory.
## Fix
Always pass `--repo cal/major-domo-v2` explicitly when running tea commands from discord-app-v2.
## Example
```bash
tea pulls create --repo cal/major-domo-v2 --head feat/branch --base main --title "Title" --description "Desc"
```
## Applies to
Any `tea` subcommand run from the `discord-app-v2` directory, including `tea pulls list`, `tea issues list`, etc.

View File

@ -1,63 +0,0 @@
---
id: 4579c929-165e-4e96-a0f2-3604febf1734
type: fix
title: "Fix: UTC/CST timezone ambiguity in transaction freeze/thaw scheduling — utils/timezone.py"
tags: [major-domo, timezone, transaction-freeze, production-fix, discord-bot, python, fix]
importance: 0.75
confidence: 0.8
created: "2026-02-22T22:41:31.654639+00:00"
updated: "2026-02-22T22:41:31.654639+00:00"
---
# Fix: UTC/CST Timezone Ambiguity in Transaction Freeze/Thaw Scheduling
## Project
major-domo / discord-app-v2
## Problem
Production container (`major-domo-discord-app-1` on Akamai) had ambiguous timezone config — `/etc/localtime` pointed to `Etc/UTC` but `date` reported CST. The transaction freeze/thaw task used `datetime.now()` (naive, relying on OS timezone), causing scheduling to fire at unpredictable wall-clock times.
Additionally, `utils/logging.py` used `datetime.now().isoformat() + "Z"` — appending "Z" to a naive datetime is misleading (Z means UTC but the datetime had no tzinfo).
## Root Cause
- `datetime.now()` with no timezone argument produces a naive datetime, inheriting the OS/container timezone implicitly
- Container timezone config was inconsistent between `/etc/localtime` and the OS `date` command output
- Never rely on OS timezone in containerized environments
## Fix
1. Created `utils/timezone.py` with centralized timezone helpers:
```python
from zoneinfo import ZoneInfo
from datetime import datetime, UTC
CHICAGO_TZ = ZoneInfo("America/Chicago")
def now_utc() -> datetime:
return datetime.now(UTC)
def now_chicago() -> datetime:
return datetime.now(CHICAGO_TZ)
def to_chicago(dt: datetime) -> datetime:
return dt.astimezone(CHICAGO_TZ)
def to_discord_timestamp(dt: datetime) -> str:
# Returns Discord <t:unix:R> format
...
```
2. Changed `tasks/transaction_freeze.py` line 300:
- Before: `datetime.now()`
- After: `now_chicago()`
3. Fixed `utils/logging.py` JSON timestamp:
- Before: `datetime.now().isoformat() + "Z"` (misleading Z on naive datetime)
- After: `datetime.now(UTC).isoformat()` (proper `+00:00` UTC suffix)
## Verification
JSON logs show datetime with `-06:00` CST offset and timestamp with `+00:00` UTC. Confirmed working in production after deploy.
## References
- PR #45 into `next-release`, merged to `main`
- Closes Gitea issue #43
- Key file: `utils/timezone.py` (new), `tasks/transaction_freeze.py`, `utils/logging.py`

View File

@ -1,37 +0,0 @@
---
id: 4c2c50d7-febe-43f6-a264-d586b24f49d6
type: fix
title: "Fix: Win percentage orientation bug - sheet gives leading team's win%, not home team's"
tags: [major-domo, scorebug, win-probability, fix, orientation, google-sheets, discord-bot]
importance: 0.75
confidence: 0.8
created: "2026-02-20T20:06:21.331952+00:00"
updated: "2026-02-20T20:06:21.331952+00:00"
---
# Fix: Win Percentage Orientation Bug
## Problem
The Google Sheet Scorebug tab outputs:
- `C8` = winning team abbreviation
- `D8` = that team's win probability percentage
The code was treating `D8` as the home team's win% unconditionally. When the away team was winning (e.g., DEN at 95%), the progress bar incorrectly showed the home team (MKE) as favored at 95%.
## Root Cause
`create_team_progress_bar()` always expects the value from the home team's perspective. The sheet does not guarantee that perspective — it gives the leading team's perspective.
## Fix (`services/scorebug_service.py`)
1. Read `C8` (`all_data[6][1]`) to get the leading team abbreviation.
2. Compare it to the home team abbreviation from `game_state[4][1]`.
3. If the leading team is the **away** team, flip the value: `win_percentage = 100 - win_percentage`.
This ensures `create_team_progress_bar` always receives the correct home-team-perspective value.
## Key Detail
Sheet row/column indices (0-based):
- `all_data[6][1]` = C8 (leading team abbreviation)
- `game_state[4][1]` = home team abbreviation
## Closes
Issue #38 (implied by scorebug bug batch). Branch: `fix/scorebug-bugs`.

View File

@ -1,34 +0,0 @@
---
id: afbc470d-05a6-4f5a-8835-b3cdf6ecba8c
type: fix
title: "Fix: Win percentage parsing robustness and None default in ScorebugData"
tags: [major-domo, scorebug, win-probability, fix, parsing, discord-bot]
importance: 0.65
confidence: 0.8
created: "2026-02-20T20:06:11.768716+00:00"
updated: "2026-02-20T20:06:11.768716+00:00"
---
# Fix: Win Percentage Parsing Robustness
## Problem
`ScorebugData.__init__` defaulted `win_percentage` to `50.0` when the field was absent or empty, causing the embed to show a misleading 50/50 probability bar instead of indicating unavailability.
## Changes
### `models/scorebug_data.py` (ScorebugData)
- Changed default: `data.get("win_percentage")` instead of `data.get("win_percentage", 50.0)`
- `win_percentage` is now `Optional[float]`, defaulting to `None`
### `services/scorebug_service.py`
Parsing now handles edge cases:
- Empty string → `None`
- Decimal range `0.01.0` → multiply by 100 (sheet may give raw probability)
- Unparseable value → `None` with INFO log
### `utils/scorebug_helpers.py`
- When `win_percentage is None`, embed shows "-# Win probability unavailable" instead of a bar
- Embed color logic guards against `None` comparison (no `TypeError` on `win_percentage > 50`)
## Closes
Issue #39. Branch: `fix/scorebug-bugs`.

View File

@ -1,12 +0,0 @@
---
id: 4af66093-a98e-4197-a7d5-05139de301e8
type: fix
title: "Fixed thaw report channel lookup"
tags: [major-domo, discord-bot, transaction-freeze, bugfix, config]
importance: 0.6
confidence: 0.8
created: "2026-02-14T14:57:45.331331+00:00"
updated: "2026-02-14T14:57:45.331331+00:00"
---
The _post_thaw_report() method in tasks/transaction_freeze.py was searching for channels by name ('bot-admin', 'admin', 'bot-logs') which don't exist. Replaced with bot.get_channel() using a configurable channel ID (config.thaw_report_channel_id = 1354134347598266430). Also fixed stale deploy script reference in CLAUDE.md - replaced /home/cal/.claude/scripts/gitea-create-pr.sh with tea pulls create. That script no longer exists. Version bumped to 2.29.8. PR #8.

View File

@ -1,12 +0,0 @@
---
id: 1aa4308c-aae6-4226-a6c6-a79c767d0540
type: fix
title: "IL moves bypass transaction freeze for log posting"
tags: [major-domo, python, fix, transactions, freeze]
importance: 0.6
confidence: 0.8
created: "2025-12-17T04:17:36.427610+00:00"
updated: "2025-12-17T04:17:36.427610+00:00"
---
Refined transaction freeze bypass to allow /ilmove (IL moves) to always post to #transaction-log, even during freeze period. IL moves are intra-team transactions (ML ↔ MiL ↔ IL) that should be immediately visible since they don't reveal competitive information. Changed views/transaction_embed.py lines 294-297 to remove freeze check for immediate submissions. Also removed misleading 'hidden during freeze period' message from success response.

View File

@ -1,28 +0,0 @@
---
id: c1e9d0ea-9d4f-4288-b717-e2113b892a44
type: fix
title: "[major-domo] $(cat <<"
tags: [major-domo, commit, creation, debugging, deployment, fix, testing, tooling, session-log]
importance: 0.7
confidence: 0.8
created: "2026-02-16T05:01:55.313560+00:00"
updated: "2026-02-16T05:01:55.313560+00:00"
---
Commits made: 2
- $(cat <<
- $(cat <<
Files edited (6):
- /home/cal/.claude/projects/-mnt-NV2-Development-major-domo-discord-app-v2/memory/MEMORY.md
- /mnt/NV2/Development/major-domo/discord-app-v2/VERSION
- /mnt/NV2/Development/major-domo/discord-app-v2/services/roster_service.py
- /mnt/NV2/Development/major-domo/discord-app-v2/tests/test_dropadd_integration.py
- /mnt/NV2/Development/major-domo/discord-app-v2/tests/test_views_transaction_embed.py
- /mnt/NV2/Development/major-domo/discord-app-v2/views/transaction_embed.py
Errors encountered (4):
- <tool_use_error>String to replace not found in file.
String: patch('services.transaction_service.transaction_service')</tool_use_error>
- <tool_use_error>Found 2 matches of the string to replace, but replace_all is false. To replace all occurrences, set replace_all to true. To replace on
- <tool_use_error>Found 2 matches of the string to replace, but replace_all is false. To replace all occurrences, set replace_all to true. To replace on
Work types: commit, creation, debugging, deployment, fix, testing, tooling
Session size: 272 messages, 89 tool calls

View File

@ -1,25 +0,0 @@
---
id: ca0a8939-e7a2-4280-a8de-fe424c1d8659
type: fix
title: "[major-domo] $(cat <<"
tags: [major-domo, commit, configuration, debugging, deployment, fix, tooling, session-log]
importance: 0.7
confidence: 0.8
created: "2026-02-16T00:02:44.500968+00:00"
updated: "2026-02-16T00:02:44.500968+00:00"
---
Commits made: 1
- $(cat <<
Files edited (3):
- /home/cal/.claude/projects/-mnt-NV2-Development-major-domo-discord-app-v2/memory/MEMORY.md
- /mnt/NV2/Development/major-domo/discord-app-v2/CLAUDE.md
- /mnt/NV2/Development/major-domo/discord-app-v2/VERSION
Errors encountered (5):
- Exit code 255
ssh: connect to host 10.10.0.100 port 22: No route to host
- Exit code 255
ssh: connect to host 10.10.0.101 port 22: No route to host
- File does not exist.
Work types: commit, configuration, debugging, deployment, fix, tooling
Session size: 94 messages, 26 tool calls

View File

@ -1,30 +0,0 @@
---
id: 12d0b655-0dd4-44c2-b877-0fffd11708a6
type: fix
title: "[major-domo] feat: add local deploy script for production deploys"
tags: [major-domo, automation, commit, creation, debugging, deployment, fix, testing, tooling, session-log]
importance: 0.7
confidence: 0.8
created: "2026-02-20T15:07:46.309931+00:00"
updated: "2026-02-20T15:07:46.309931+00:00"
---
Commits made: 2
- feat: add local deploy script for production deploys
- chore: remove obsolete MoveAction test stubs
Files edited (3):
- /home/cal/.claude/CLAUDE.md
- /mnt/NV2/Development/major-domo/discord-app-v2/.scripts/deploy.sh
- /mnt/NV2/Development/major-domo/discord-app-v2/tests/test_commands_dropadd.py
Errors encountered (2):
- Exit code 1
Branch: feat/deploy-script
Latest: 9e43ffa feat: add local deploy script for production deploys
Target: akamai (manticorum67/major-domo-di
- Exit code 1
NOTE: no gitea login detected, falling back to login 'homelab'
Error: path segment [0] is empty
NOTE: no gitea login detected, falling ba
Work types: automation, commit, creation, debugging, deployment, fix, testing, tooling
Session size: 147 messages, 39 tool calls

View File

@ -1,31 +0,0 @@
---
id: 1a1784e4-fc23-4730-9ca6-377e1d064f97
type: fix
title: "[major-domo] fix: address 7 security issues across the codebase"
tags: [major-domo, automation, commit, configuration, creation, debugging, deployment, feature, fix, tooling, session-log]
importance: 0.7
confidence: 0.8
created: "2026-02-20T16:52:41.171495+00:00"
updated: "2026-02-20T16:52:41.171495+00:00"
---
Commits made: 2
- fix: address 7 security issues across the codebase
- fix: address 7 security issues across the codebase
Files edited (10):
- /mnt/NV2/Development/major-domo/discord-app-v2/.env
- /mnt/NV2/Development/major-domo/discord-app-v2/.env.example
- /mnt/NV2/Development/major-domo/discord-app-v2/api/client.py
- /mnt/NV2/Development/major-domo/discord-app-v2/bot.py
- /mnt/NV2/Development/major-domo/discord-app-v2/commands/injuries/management.py
- /mnt/NV2/Development/major-domo/discord-app-v2/commands/league/submit_scorecard.py
- /mnt/NV2/Development/major-domo/discord-app-v2/config.py
- /mnt/NV2/Development/major-domo/discord-app-v2/services/giphy_service.py
- /mnt/NV2/Development/major-domo/discord-app-v2/tasks/transaction_freeze.py
- /mnt/NV2/Development/major-domo/discord-app-v2/views/transaction_embed.py
Errors encountered (5):
- File does not exist. Note: your current working directory is /mnt/NV2/Development/major-domo/discord-app-v2.
- <tool_use_error>Sibling tool call errored</tool_use_error>
- <tool_use_error>Sibling tool call errored</tool_use_error>
Work types: automation, commit, configuration, creation, debugging, deployment, feature, fix, tooling
Session size: 202 messages, 73 tool calls

View File

@ -1,44 +0,0 @@
---
id: ed8f5008-9c2a-4305-8378-722bc4f8556d
type: fix
title: "[major-domo] fix: batch quick-wins — 4 issues resolved (closes #37, #27, #25, #38)"
tags: [major-domo, commit, configuration, creation, debugging, deployment, feature, fix, refactoring, testing, tooling, session-log]
importance: 0.7
confidence: 0.8
created: "2026-02-20T19:31:37.720409+00:00"
updated: "2026-02-20T19:31:37.720409+00:00"
---
Commits made: 1
- fix: batch quick-wins — 4 issues resolved (closes #37, #27, #25, #38)
Files edited (23):
- /home/cal/.claude/plans/sequential-brewing-lemon.md
- /mnt/NV2/Development/major-domo/discord-app-v2/commands/admin/__init__.py
- /mnt/NV2/Development/major-domo/discord-app-v2/commands/draft/picks.py
- /mnt/NV2/Development/major-domo/discord-app-v2/commands/league/__init__.py
- /mnt/NV2/Development/major-domo/discord-app-v2/commands/teams/__init__.py
- /mnt/NV2/Development/major-domo/discord-app-v2/commands/transactions/__init__.py
- /mnt/NV2/Development/major-domo/discord-app-v2/config.py
- /mnt/NV2/Development/major-domo/discord-app-v2/models/custom_command.py
- /mnt/NV2/Development/major-domo/discord-app-v2/models/draft_data.py
- /mnt/NV2/Development/major-domo/discord-app-v2/models/help_command.py
Errors encountered (5):
- Exit code 1
2597
---
F401 [*] `views.embeds.EmbedColors` imported but unused
--> bot.py:21:41
|
19 | from api.client import get_global_client, cl
- Exit code 1
F401 `discord` imported but unused
--> commands/admin/__init__.py:9:8
|
7 | from typing import List, Tuple, Type
8 |
9 | import di
- Exit code 1
F401 `config._config` imported but unused; consider using `importlib.util.find_spec` to test for availability
--> tests/conftest.py:43:2
Work types: commit, configuration, creation, debugging, deployment, feature, fix, refactoring, testing, tooling
Session size: 430 messages, 156 tool calls

View File

@ -1,29 +0,0 @@
---
id: ec25c1ae-c0b5-4f2a-942b-00dc9a6b073c
type: fix
title: "[major-domo] fix: ContextualLogger crashes when callers pass exc_info=True"
tags: [major-domo, automation, commit, creation, debugging, deployment, fix, testing, tooling, session-log]
importance: 0.7
confidence: 0.8
created: "2026-02-20T03:32:07.676671+00:00"
updated: "2026-02-20T03:32:07.676671+00:00"
---
Commits made: 2
- fix: ContextualLogger crashes when callers pass exc_info=True
- test: fix weather test expecting 4 embed fields instead of 5
Files edited (5):
- /home/cal/.claude/plans/misty-kindling-pixel.md
- /mnt/NV2/Development/major-domo/discord-app-v2/commands/league/submit_scorecard.py
- /mnt/NV2/Development/major-domo/discord-app-v2/tests/test_commands_weather.py
- /mnt/NV2/Development/major-domo/discord-app-v2/utils/logging.py
- /mnt/NV2/Development/major-domo/discord-app-v2/views/players.py
Errors encountered (2):
- Exit code 1
NOTE: no gitea login detected, falling back to login 'homelab'
Error: path segment [0] is empty
NOTE: no gitea login detected, falling ba
- The user doesn't want to proceed with this tool use. The tool use was rejected (eg. if it was a file edit, the new_string was NOT written to the file)
Work types: automation, commit, creation, debugging, deployment, fix, testing, tooling
Session size: 110 messages, 36 tool calls

View File

@ -1,19 +0,0 @@
---
id: 7eea6748-ffb0-478a-9e1e-f3fb8766ad11
type: fix
title: "[major-domo] fix: roster validation now includes org affiliate transactions (closes #49)"
tags: [major-domo, automation, commit, creation, deployment, feature, fix, testing, session-log]
importance: 0.7
confidence: 0.8
created: "2026-03-01T21:21:49.605096+00:00"
updated: "2026-03-01T21:21:49.605096+00:00"
---
Commits made: 1
- fix: roster validation now includes org affiliate transactions (closes #49)
Files edited (3):
- /mnt/NV2/Development/major-domo/discord-app-v2/services/transaction_builder.py
- /mnt/NV2/Development/major-domo/discord-app-v2/services/transaction_service.py
- /mnt/NV2/Development/major-domo/discord-app-v2/tests/test_roster_validation_org_affiliates.py
Work types: automation, commit, creation, deployment, feature, fix, testing
Session size: 142 messages, 44 tool calls

View File

@ -1,30 +0,0 @@
---
id: c9577d44-73d0-4c06-b313-bc90cb625489
type: fix
title: "[major-domo] fix: scorebug stale data, win probability parsing, and read-failure tolerance (closes #39, #40)"
tags: [major-domo, automation, commit, configuration, creation, debugging, deployment, feature, fix, testing, tooling, session-log]
importance: 0.7
confidence: 0.8
created: "2026-02-21T03:26:59.641676+00:00"
updated: "2026-02-21T03:26:59.641676+00:00"
---
Commits made: 2
- fix: scorebug stale data, win probability parsing, and read-failure tolerance (closes #39, #40)
- docs: add release workflow section to CLAUDE.md
Files edited (7):
- /mnt/NV2/Development/major-domo/discord-app-v2/CLAUDE.md
- /mnt/NV2/Development/major-domo/discord-app-v2/commands/gameplay/scorebug.py
- /mnt/NV2/Development/major-domo/discord-app-v2/commands/gameplay/scorecard_tracker.py
- /mnt/NV2/Development/major-domo/discord-app-v2/services/scorebug_service.py
- /mnt/NV2/Development/major-domo/discord-app-v2/tasks/live_scorebug_tracker.py
- /mnt/NV2/Development/major-domo/discord-app-v2/tests/test_scorebug_bugs.py
- /mnt/NV2/Development/major-domo/discord-app-v2/utils/scorebug_helpers.py
Errors encountered (1):
- <tool_use_error>String to replace not found in file.
String: # Add win probability bar
embed.add_field(
name='Win Probability',
Work types: automation, commit, configuration, creation, debugging, deployment, feature, fix, testing, tooling
Session size: 263 messages, 75 tool calls

View File

@ -1,33 +0,0 @@
---
id: 47156f29-73ae-4a5c-9ca0-15d5cf9cdc6d
type: fix
title: "[major-domo] Fix skill description budget overflow — shorten major-domo, paper-dynasty, proxmox descriptions"
tags: [major-domo, automation, commit, configuration, debugging, deployment, fix, tooling, session-log]
importance: 0.7
confidence: 0.8
created: "2026-03-01T16:34:29.400538+00:00"
updated: "2026-03-01T16:34:29.400538+00:00"
---
Commits made: 1
- Fix skill description budget overflow — shorten major-domo, paper-dynasty, proxmox descriptions
Files edited (4):
- /home/cal/.claude/skills/create-skill/SKILL.md
- /home/cal/.claude/skills/major-domo/SKILL.md
- /home/cal/.claude/skills/paper-dynasty/SKILL.md
- /home/cal/.claude/skills/proxmox/SKILL.md
Errors encountered (5):
- Exit code 1
==> /home/cal/.claude/skills/backlog/SKILL.md <==
---
name: backlog
description: Check Gitea repo for open issues and surface the next tas
- <tool_use_error>Sibling tool call errored</tool_use_error>
- Exit code 1
/home/cal/.claude/settings.json
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"env": {
"MCP_API_KEY": "${
Work types: automation, commit, configuration, debugging, deployment, fix, tooling
Session size: 106 messages, 40 tool calls

View File

@ -1,31 +0,0 @@
---
id: 6d00a9cb-d933-443b-9bfa-e55cd1479421
type: fix
title: "[major-domo] fix: use explicit America/Chicago timezone for freeze/thaw scheduling"
tags: [major-domo, automation, commit, creation, debugging, deployment, feature, fix, testing, tooling, session-log]
importance: 0.7
confidence: 0.8
created: "2026-02-23T14:49:44.545929+00:00"
updated: "2026-02-23T14:49:44.545929+00:00"
---
Commits made: 2
- fix: use explicit America/Chicago timezone for freeze/thaw scheduling
- feat: include current week number in weekly-info channel post
Files edited (5):
- /mnt/NV2/Development/major-domo/discord-app-v2/tasks/transaction_freeze.py
- /mnt/NV2/Development/major-domo/discord-app-v2/tests/test_tasks_transaction_freeze.py
- /mnt/NV2/Development/major-domo/discord-app-v2/tests/test_utils_timezone.py
- /mnt/NV2/Development/major-domo/discord-app-v2/utils/logging.py
- /mnt/NV2/Development/major-domo/discord-app-v2/utils/timezone.py
Errors encountered (5):
- <tool_use_error>String to replace not found in file.
String: @pytest.mark.asyncio
async def test_thaw_triggers_saturday_midnight(self, mock_bo
- Exit code 1
Rebasing (1/2) Rebasing (2/2) Auto-merging tasks/transaction_freeze.py
CONFLICT (content): Merge conflict in tasks/transaction_freeze.py
A
- <tool_use_error>File has been modified since read, either by the user or by a linter. Read it again before attempting to write it.</tool_use_error>
Work types: automation, commit, creation, debugging, deployment, feature, fix, testing, tooling
Session size: 181 messages, 64 tool calls

View File

@ -1,24 +0,0 @@
---
id: 425a60f6-57fc-46de-acb2-b4e346d21103
type: fix
title: "[major-domo] fix: Use Gitea API for tag creation instead of git push"
tags: [major-domo, commit, creation, debugging, fix, session-log]
importance: 0.6
confidence: 0.8
created: "2026-02-17T23:57:35.221232+00:00"
updated: "2026-02-17T23:57:35.221232+00:00"
---
Commits made: 1
- fix: Use Gitea API for tag creation instead of git push
Files edited (1):
- /mnt/NV2/Development/major-domo/database/.gitea/workflows/docker-build.yml
Errors encountered (2):
- <tool_use_error>File has been modified since read, either by the user or by a linter. Read it again before attempting to write it.</tool_use_error>
- Exit code 1
NOTE: no gitea login detected, falling back to login 'homelab'
Error: path segment [0] is empty
NOTE: no gitea login detected, falling ba
Work types: commit, creation, debugging, fix
Session size: 43 messages, 13 tool calls

View File

@ -1,34 +0,0 @@
---
id: ce2a22a6-7c40-449a-9073-289473b00b99
type: fix
title: "[major-domo] fix: use Gitea API for tag creation to avoid branch protection failures"
tags: [major-domo, commit, configuration, creation, debugging, deployment, fix, session-log]
importance: 0.7
confidence: 0.8
created: "2026-02-17T23:29:40.554110+00:00"
updated: "2026-02-20T04:32:47.755777+00:00"
relations:
- target: 40e194b2-3d50-4698-89be-d0db08349882
type: RELATED_TO
direction: incoming
strength: 0.9
edge_id: 415bba1f-54c1-420e-966b-4f1b14f0a727
- target: 633e06ab-7503-4368-964f-d2ba8071de4b
type: RELATED_TO
direction: outgoing
strength: 0.85
edge_id: 57492bcf-6e83-4191-a96d-b5b7d562680c
---
Commits made: 1
- fix: use Gitea API for tag creation to avoid branch protection failures
Files edited (1):
- /mnt/NV2/Development/major-domo/discord-app-v2/.gitea/workflows/docker-build.yml
Errors encountered (1):
- Exit code 1
NOTE: no gitea login detected, falling back to login 'homelab'
Error: path segment [0] is empty
NOTE: no gitea login detected, falling ba
Work types: commit, configuration, creation, debugging, deployment, fix
Session size: 37 messages, 12 tool calls

View File

@ -1,29 +0,0 @@
---
id: eb9818c3-4a76-4e49-af5b-e2e93e8f46e3
type: fix
title: "[major-domo] Major Domo CLI: modular refactor + 6 new command modules"
tags: [major-domo, automation, commit, creation, debugging, feature, fix, refactoring, tooling, session-log]
importance: 0.6
confidence: 0.8
created: "2026-02-16T17:25:05.321165+00:00"
updated: "2026-02-16T17:25:05.321165+00:00"
---
Commits made: 1
- Major Domo CLI: modular refactor + 6 new command modules
Files edited (4):
- /home/cal/.claude/skills/major-domo/SKILL.md
- /home/cal/.claude/skills/major-domo/cli.py
- /home/cal/.claude/skills/major-domo/cli_common.py
- /home/cal/.claude/skills/major-domo/cli_transactions.py
Errors encountered (5):
- Exit code 1
Traceback (most recent call last):
File "<string>", line 5, in <module>
if t.get('abbreviation') == 'CLS':
^^^^^
AttributeErr
- <tool_use_error>Sibling tool call errored</tool_use_error>
- <tool_use_error>Sibling tool call errored</tool_use_error>
Work types: automation, commit, creation, debugging, feature, fix, refactoring, tooling
Session size: 258 messages, 78 tool calls

View File

@ -1,21 +0,0 @@
---
id: b1eeb082-ef2a-4e91-8ce6-b0d7fe8639e1
type: fix
title: "[major-domo] Session: automation, configuration, debugging, deployment, feature, fix, tooling"
tags: [major-domo, automation, configuration, debugging, deployment, feature, fix, tooling, session-log]
importance: 0.7
confidence: 0.8
created: "2026-02-19T13:04:12.661764+00:00"
updated: "2026-02-19T13:04:12.661764+00:00"
---
Errors encountered (4):
- Exit code 2
total 68
drwxr-xr-x 1 cal cal 496 Feb 6 07:31 .
drwxr-xr-x 1 cal cal 736 Feb 17 16:29 ..
drwxr-xr-x 1 cal cal 928 Dec 2 16:09 arch
- <tool_use_error>Sibling tool call errored</tool_use_error>
- <tool_use_error>Sibling tool call errored</tool_use_error>
Work types: automation, configuration, debugging, deployment, feature, fix, tooling
Session size: 32 messages, 13 tool calls

View File

@ -1,17 +0,0 @@
---
id: 22c77d0d-cc87-4e9c-96a8-2360b1991a58
type: fix
title: "[major-domo] Session: configuration, creation, debugging, deployment, feature, fix, tooling"
tags: [major-domo, configuration, creation, debugging, deployment, feature, fix, tooling, session-log]
importance: 0.7
confidence: 0.8
created: "2026-02-23T18:03:33.671961+00:00"
updated: "2026-02-23T18:03:33.671961+00:00"
---
Files edited (1):
- /home/cal/.claude/plans/smooth-stirring-steele.md
Errors encountered (1):
- The user doesn't want to proceed with this tool use. The tool use was rejected (eg. if it was a file edit, the new_string was NOT written to the file)
Work types: configuration, creation, debugging, deployment, feature, fix, tooling
Session size: 50 messages, 16 tool calls

View File

@ -1,15 +0,0 @@
---
id: 125cef15-9010-475b-859d-6052635a7604
type: fix
title: "[major-domo] Session: configuration, creation, deployment, feature, fix, tooling"
tags: [major-domo, configuration, creation, deployment, feature, fix, tooling, session-log]
importance: 0.7
confidence: 0.8
created: "2026-02-22T21:43:48.861768+00:00"
updated: "2026-02-22T21:43:48.861768+00:00"
---
Files edited (1):
- /home/cal/.claude/plans/smooth-stirring-steele.md
Work types: configuration, creation, deployment, feature, fix, tooling
Session size: 48 messages, 16 tool calls

View File

@ -1,26 +0,0 @@
---
id: af8b63f8-92bb-4ab2-914f-1815ba9be955
type: fix
title: "[major-domo] Session: creation, debugging, deployment, feature, fix"
tags: [major-domo, creation, debugging, deployment, feature, fix, session-log]
importance: 0.7
confidence: 0.8
created: "2026-02-17T23:09:28.548193+00:00"
updated: "2026-02-17T23:09:28.548193+00:00"
---
Files edited (1):
- /mnt/NV2/Development/major-domo/discord-app-v2/.gitea/workflows/docker-build.yml
Errors encountered (2):
- Exit code 1
63c63,65
< - name: Build Docker image
---
> # Dev build: push with dev + dev-SHA tags (PR/feature branches)
> - name: Bu
- Exit code 1
Rebasing (1/1) Auto-merging .gitea/workflows/docker-build.yml
CONFLICT (content): Merge conflict in .gitea/workflows/docker-build.yml
erro
Work types: creation, debugging, deployment, feature, fix
Session size: 37 messages, 12 tool calls

View File

@ -1,19 +0,0 @@
---
id: 7ab7f240-897f-4b9d-8e00-51499f6b51bf
type: fix
title: "[major-domo] Session: fix, tooling"
tags: [major-domo, fix, tooling, session-log]
importance: 0.4
confidence: 0.8
created: "2026-02-21T15:02:29.385510+00:00"
updated: "2026-03-01T04:22:14.719002+00:00"
relations:
- target: 6299c5dd-6db5-4840-afdc-30760f2a7de2
type: RELATED_TO
direction: incoming
strength: 0.62
edge_id: 8e168371-657b-48ff-aae5-af1930825f87
---
Work types: fix, tooling
Session size: 9 messages, 3 tool calls

View File

@ -6,13 +6,7 @@ tags: [paper-dynasty, automation, commit, configuration, creation, deployment, f
importance: 0.7
confidence: 0.8
created: "2026-02-17T23:20:22.832133+00:00"
updated: "2026-02-20T04:32:47.755777+00:00"
relations:
- target: ce2a22a6-7c40-449a-9073-289473b00b99
type: RELATED_TO
direction: incoming
strength: 0.85
edge_id: 57492bcf-6e83-4191-a96d-b5b7d562680c
updated: "2026-03-01T22:02:48.107631+00:00"
---
Commits made: 1
@ -21,3 +15,4 @@ Files edited (1):
- /mnt/NV2/Development/paper-dynasty/discord-app/.gitea/workflows/docker-build.yml
Work types: automation, commit, configuration, creation, deployment, fix
Session size: 71 messages, 21 tool calls

View File

@ -6,13 +6,7 @@ tags: [paper-dynasty, automation, commit, configuration, creation, debugging, de
importance: 0.7
confidence: 0.8
created: "2026-02-17T23:25:52.871466+00:00"
updated: "2026-02-20T04:32:42.044459+00:00"
relations:
- target: ce2a22a6-7c40-449a-9073-289473b00b99
type: RELATED_TO
direction: outgoing
strength: 0.9
edge_id: 415bba1f-54c1-420e-966b-4f1b14f0a727
updated: "2026-03-01T22:02:48.107202+00:00"
---
Commits made: 1
@ -28,3 +22,4 @@ Errors encountered (3):
remo
Work types: automation, commit, configuration, creation, debugging, deployment, fix
Session size: 39 messages, 13 tool calls

View File

@ -1,12 +0,0 @@
---
id: adaf8114-cc4b-4fbd-a0c2-a64943ff534e
type: fix
title: "Restrict injury logging to team GMs"
tags: [major-domo, discord, python, security, fix]
importance: 0.6
confidence: 0.8
created: "2025-12-19T06:13:50.391769+00:00"
updated: "2025-12-19T06:13:50.391769+00:00"
---
Security fix for /injury roll command: removed user_id from ConfirmationView so only the player's team GM(s) can click Log Injury button. Previously anyone who ran the command could log injuries for any player. Now anyone can see the roll result but only authorized GMs can record injuries.

View File

@ -1,12 +0,0 @@
---
id: 4e7066fc-b0db-4479-97f3-376bb9c8cba5
type: fix
title: "Standardized sWAR display to 2 decimals"
tags: [major-domo, python, formatting, swar, fix]
importance: 0.5
confidence: 0.8
created: "2025-12-10T02:16:52.867543+00:00"
updated: "2025-12-10T02:16:52.867543+00:00"
---
Fixed 10 locations across transactions.py, draft.py, and players.py where sWAR/WAR values were displayed without consistent formatting. All user-facing WAR displays now use :.2f format. Roster displays use >5.2f for right-aligned formatting with 2 decimals.

View File

@ -1,12 +0,0 @@
---
id: ed668fcc-2403-4c9c-9606-db173a2a699b
type: fix
title: "sWAR formatting changed from 1 to 2 decimal places"
tags: [major-domo, discord-app-v2, swar, formatting, fix]
importance: 0.5
confidence: 0.8
created: "2025-12-13T00:26:16.360629+00:00"
updated: "2025-12-13T00:26:16.360629+00:00"
---
Player sWAR values were displaying with 1 decimal place (e.g., 2.0) but needed 2 decimal places (e.g., 1.97) for proper precision. Changed all .1f formatting to .2f across 9 files: views/players.py, views/embeds.py, views/common.py, commands/examples/enhanced_player.py, commands/teams/info.py, services/roster_service.py, commands/transactions/management.py, utils/transaction_logging.py, tasks/transaction_freeze.py

View File

@ -1,12 +0,0 @@
---
id: bde32b12-5f60-4d69-95b0-d26d72fe4eaa
type: fix
title: "Transaction API week_start parameter"
tags: [major-domo, python, api, fix, transaction]
importance: 0.6
confidence: 0.8
created: "2025-12-22T04:03:28.945283+00:00"
updated: "2025-12-22T04:03:28.945283+00:00"
---
The transactions API returns keepers (week=0) when using 'week' parameter. Use 'week_start' instead to filter out earlier weeks and only get transactions from the target week onwards.

View File

@ -1,12 +0,0 @@
---
id: baefb777-676d-4c7f-9a43-61cef4ec000b
type: fix
title: "Transaction freeze bypass bug fix"
tags: [major-domo, python, discord, fix, transactions]
importance: 0.6
confidence: 0.8
created: "2025-12-15T23:47:42.683540+00:00"
updated: "2025-12-15T23:47:42.683540+00:00"
---
Fixed bug where transactions were posted to #transaction-log even when Current.freeze=True. Added freeze state checks in views/transaction_embed.py before calling post_transaction_to_log() in both scheduled (/dropadd) and immediate (/ilmove) submission handlers. When frozen, transactions are saved to DB but NOT posted to the public channel until Saturday processing.

View File

@ -1,32 +0,0 @@
---
id: fb33558f-0419-433d-afcf-8e6edef12957
type: insight
title: "Insight: Voice channel cleanup auto-unpublishes scorecards — intended behavior"
tags: [major-domo, scorebug, voice-cleanup, scorecard-tracker, discord, insight]
importance: 0.55
confidence: 0.8
created: "2026-02-20T20:30:21.058893+00:00"
updated: "2026-02-20T20:30:21.058893+00:00"
---
# Voice Channel Cleanup Auto-Unpublishes Scorecards
## Project
major-domo / discord-app-v2
## File
`commands/voice/cleanup_service.py``VoiceChannelCleanupService`
## Behavior
`VoiceChannelCleanupService` automatically calls `scorecard_tracker.unpublish_scorecard()` when a voice channel is:
- Empty for 5+ minutes
- Manually deleted
- Found stale on startup
This removes the scorecard from `data/scorecards.json`.
## Downstream Effect
When the live scorebug tracker runs, it sees no published scorecards and hides `#live-sba-scores`. This is **intentional** — game tracking in SBA is tied to voice channel lifecycle.
## Why This Matters
During testing or debugging, if no voice channel exists, the scorebug tracker will appear to silently do nothing (or hide channels) even if games are active. The channel/scorecard must be published first. This caused confusion when testing the scorebug system in isolation.

View File

@ -1,36 +0,0 @@
---
id: 29c1f2c9-d5f5-41f2-91cd-4a76fcb42d17
type: procedure
title: "Gitea issue management: comment before closing, close on merge to main"
tags: [major-domo, gitea, workflow, git, issues]
importance: 0.6
confidence: 0.8
created: "2026-02-20T16:50:31.798849+00:00"
updated: "2026-02-20T16:50:31.798849+00:00"
---
# Gitea Issue Management Workflow
## When to use
When fixing issues on a feature or release branch that has NOT yet merged to `main`.
## Steps
1. **Add a comment to each issue** referencing the commit hash and branch:
> "Addressed in commit `f4be20a` on `next-release` branch. Will be closed when merged to main."
2. **Keep issues OPEN** until the branch merges to main.
- Closing early creates confusion if the release is delayed or reverted.
3. **Auto-close on merge** by using `closes #N` syntax in the PR description, or batch-close manually after merge.
## API for commenting
```bash
curl -X POST https://git.manticorum.com/api/v1/repos/cal/major-domo-bot/issues/{number}/comments \
-H "Authorization: token $(cat /home/cal/.claude/secrets/gitea_token)" \
-H "Content-Type: application/json" \
-d '{"body": "Addressed in commit `abc1234` on `next-release`. Will close on merge to main."}'
```
## Gitea CLI alternative (tea)
`tea` does not have a direct "add comment" command; use the API directly or the Gitea web UI.

View File

@ -1,44 +0,0 @@
---
id: c0239088-398b-4f72-9894-3caa2e385833
type: procedure
title: "Rebase feature branch onto next-release before PR to avoid merge conflicts"
tags: [major-domo, git-workflow, next-release, rebase, discord-bot, procedure]
importance: 0.6
confidence: 0.8
created: "2026-02-22T22:41:43.343387+00:00"
updated: "2026-02-22T22:41:43.343387+00:00"
---
# Rebase Feature Branch onto next-release Before PR
## Project
major-domo / discord-app-v2 (applies to all major-domo services)
## Context
The `next-release` staging branch accumulates changes from multiple PRs (security fixes, unused import cleanup, scorebug fixes, etc.) before being merged to `main`. Feature branches based off `main` can conflict with `next-release`.
## Procedure
```bash
# 1. Fetch latest remote state
git fetch origin
# 2. Rebase feature branch onto next-release
git rebase origin/next-release
# 3. Resolve any conflicts, then continue
git rebase --continue
# 4. Force-push to update the PR branch
git push --force-with-lease origin <feature-branch>
```
## Common Conflicts in This Repo
- Unused import cleanup PRs may remove imports that your branch re-introduces — add the import back after resolving
- Security fix PRs may have changed `except:` to `except Exception:` — accept theirs or merge carefully
- `tasks/transaction_freeze.py` is a frequent conflict hotspot
## Notes
- Use `--force-with-lease` (not `--force`) — safer, refuses to push if remote has unexpected commits
- After merging `next-release``main`, sync local main: `git reset --hard origin/main` if it has diverged from rebased commits
- If an import was removed as "unused" by a previous PR but your changes re-introduce usage, add it back explicitly — don't assume the cleanup branch was authoritative

View File

@ -1,12 +0,0 @@
---
id: a72e4aa7-4ef0-49a4-9787-e21044e71b72
type: solution
title: "Added salary_cap column to Major Domo Team model"
tags: [major-domo, postgresql, docker, release]
importance: 0.5
confidence: 0.8
created: "2025-12-10T13:28:39.875462+00:00"
updated: "2025-12-10T13:28:39.875462+00:00"
---
Version 2.2.0 release: Added optional salary_cap (float) column to the team table for tracking team salary cap values. Includes PostgreSQL migration and Peewee model update. Docker image pushed to manticorum67/major-domo-database:2.2.0

View File

@ -1,12 +0,0 @@
---
id: 9e67e15c-6925-471a-8ba6-c796b78bfb5a
type: solution
title: "Added salary_cap field to Team model"
tags: [major-domo, python, model, schema-sync]
importance: 0.4
confidence: 0.8
created: "2025-12-09T22:53:32.649821+00:00"
updated: "2025-12-09T22:53:32.649821+00:00"
---
Added salary_cap: Optional[float] = None to Team Pydantic model in discord-app/api_calls/team.py to sync with database schema change. Field is nullable, not currently used but available for future salary cap tracking features.

View File

@ -1,12 +0,0 @@
---
id: d8f456f0-e2ac-493a-9853-da9605ba9739
type: solution
title: "Auto-draft posts to result channel"
tags: [major-domo, python, draft, discord]
importance: 0.5
confidence: 0.8
created: "2025-12-11T19:04:35.543462+00:00"
updated: "2025-12-11T19:04:35.543462+00:00"
---
Auto-draft picks now post the same draft card embed to the result channel that regular /draft picks do. Uses create_player_draft_card() from views/draft_views.py with a footer indicating the pick was auto-drafted from the draft list.

View File

@ -1,12 +0,0 @@
---
id: f8d1d735-a267-40e3-81bd-05dbe7caf5be
type: solution
title: "CACHE_ENABLED env var for Major Domo API"
tags: [major-domo, redis, caching, docker, config]
importance: 0.6
confidence: 0.8
created: "2025-12-10T14:00:13.860882+00:00"
updated: "2025-12-10T14:00:13.860882+00:00"
---
Added CACHE_ENABLED environment variable to toggle Redis caching on/off without stopping the Redis container. Set CACHE_ENABLED=false to disable caching for real-time data during drafts. Defaults to true. Version 2.2.1.

View File

@ -1,12 +0,0 @@
---
id: 4ede959f-7323-43f1-b137-34c95d19e102
type: solution
title: "Clear confirmation content on edit_original_response"
tags: [major-domo, discord-bot, fix, ui]
importance: 0.5
confidence: 0.8
created: "2026-01-28T22:17:44.075500+00:00"
updated: "2026-01-28T22:17:44.075500+00:00"
---
When using ConfirmationView and then editing the response with a result embed, must set content=None to clear the '✅ Confirmed\!' message, otherwise you get double emoji display.

View File

@ -1,12 +0,0 @@
---
id: 8c7c7977-7031-4028-b37c-647917fdc9ab
type: solution
title: "Custom command delete permission check fix"
tags: [major-domo, discord-bot, fix, custom-commands]
importance: 0.6
confidence: 0.8
created: "2026-01-28T22:10:59.739388+00:00"
updated: "2026-01-28T22:10:59.739388+00:00"
---
Fixed permission check in custom_commands_service.py comparing database ID (command.creator_id) against Discord user ID. Changed to command.creator.discord_id to properly match against deleter_discord_id parameter.

View File

@ -1,40 +0,0 @@
---
id: 5786f964-2fe4-4bab-bc79-d4fc16e4fad1
type: solution
title: "Deploy script for Discord Bot v2 production deploys (.scripts/deploy.sh)"
tags: [major-domo, deployment, bash, automation, discord-bot, akamai]
importance: 0.7
confidence: 0.8
created: "2026-02-20T03:53:14.314183+00:00"
updated: "2026-02-20T03:53:14.314183+00:00"
---
# Deploy Script for Discord Bot v2 Production Deploys
## Location
`discord-app-v2/.scripts/deploy.sh`
## What it does
Automates production deploys to the akamai server:
1. SSHes to `root@akamai` using `~/.ssh/cloud_servers_rsa`
2. Pulls latest `manticorum67/major-domo-discordapp:latest` image
3. Restarts the `discord-app` service via `docker compose up -d`
4. Waits 5 seconds
5. Shows container status, last 10 log lines, and running image digest
## Pre-deploy checks
- Dirty git working tree warning
- Branch/commit context display
- y/N confirmation prompt (skip with `-y` flag)
- Captures previous image digest before pulling
- Prints rollback command if image changed
## Key Details
- Production path: `/root/container-data/major-domo/`
- Container name: `major-domo-discord-app-1`
- Docker image: `manticorum67/major-domo-discordapp` (no dash between discord and app)
- SSH key: `~/.ssh/cloud_servers_rsa`
## Branch Note
Branch `feat/deploy-script` exists on remote but PR was closed — intended to be merged alongside a future production change.

View File

@ -1,30 +0,0 @@
---
id: 8bd768ce-365c-4e25-b93a-ff4d67554141
type: solution
title: "Discord bot dynamic configuration with live reload"
tags: [discord-bot, python, discord.py, live-reload, configuration, pattern, claude-coordinator]
importance: 0.7
confidence: 0.8
created: "2026-02-13T20:35:08.512896+00:00"
updated: "2026-02-13T20:35:08.512896+00:00"
---
Implemented /add-project command for Claude Discord Coordinator that adds projects without restarting bot.
Key pattern:
- Config.add_project() adds to in-memory config
- Config.save() writes atomically (temp file + os.replace)
- No bot restart needed - config reloaded live
Files:
- config.py: add_project() and save() methods
- commands.py: /add-project slash command with git clone + validation
- Rollback on failure: delete cloned dir, don't save config
Git auth: credential.helper=store with ~/.git-credentials for automated cloning
Benefits:
- Self-service project setup via Discord
- No manual config editing
- No service restarts
- Atomic config updates prevent corruption

View File

@ -1,64 +0,0 @@
---
id: 74d19d12-c7e7-41a9-8524-1cac15b9b3ce
type: solution
title: "Discord Bot Test Fix Patterns - Guild Mock and Decorator Patches"
tags: [major-domo, discord-bot, testing, python, fix, mock, decorator]
importance: 0.9
confidence: 0.8
created: "2025-12-09T21:21:57.532709+00:00"
updated: "2025-12-09T21:21:57.532709+00:00"
---
When Discord bot command tests fail with 'defer not called' or similar interaction errors, check these common issues:
## 1. @league_only Decorator Requires Guild Mock
Commands with @league_only decorator need interaction.guild mock with correct ID:
```python
interaction.guild = MagicMock()
interaction.guild.id = 669356687294988350 # Must match config guild_id
```
## 2. @requires_team Decorator Needs get_user_team Patch
Commands with @requires_team must patch the decorator's lookup:
```python
with patch('utils.permissions.get_user_team') as mock_get_user_team:
mock_get_user_team.return_value = mock_team # Return team for decorator
```
## 3. validate_user_has_team - Patch Where Imported
For commands using validate_user_has_team, patch at import location:
```python
# Wrong: patch('utils.team_utils.team_service')
# Right: patch('commands.transactions.dropadd.validate_user_has_team')
with patch('commands.transactions.dropadd.validate_user_has_team') as mock_validate:
mock_validate.return_value = mock_team # or None for no-team test
```
## 4. Season Number Updates
When sba_season changes in config.py, update test assertions:
- config.py: sba_season = 13, pd_season = 10
- Tests expecting season=12 need updating to season=13
## 5. HTTP Method Mocks (put vs patch)
TeamService.update_team uses PATCH not PUT:
```python
# Wrong: mock_client.put.return_value = response_data
# Right: mock_client.patch.return_value = response_data
mock_client.patch.assert_called_once_with('teams', update_data, 1, use_query_params=True)
```
## 6. create_transaction_embed Signature Change
Function now takes command_name parameter:
```python
mock_create_embed.assert_called_once_with(mock_builder, command_name='/dropadd')
# For side_effect mocks:
async def mock_create_embed_func(builder, command_name=None):
return MagicMock()
```
## Test File Quick Reference
- test_commands_dropadd.py - Uses validate_user_has_team
- test_commands_transactions.py - Uses @requires_team + get_user_major_league_team
- test_commands_voice.py - Uses @league_only
- test_commands_weather.py - Uses @league_only
- All integration tests need guild mock on inline mock_interaction creation

View File

@ -1,12 +0,0 @@
---
id: 2850ff71-01a0-4b69-aa1d-c5d549c2f770
type: solution
title: "Discord bot v2.24.0 release"
tags: [major-domo, discord-bot, release, docker]
importance: 0.7
confidence: 0.8
created: "2025-12-12T02:28:09.423303+00:00"
updated: "2025-12-12T02:28:09.423303+00:00"
---
Released major-domo-discord-app-v2 v2.24.0 with draft system enhancements: skipped pick support (teams can make up missed picks), Google Sheets integration (auto-sync picks to shared sheet), draft pause/resume (admins can pause/resume with timer control), auto-draft improvements (auto-start monitor, post to result channel), and sheet links in all draft embeds. Docker images pushed to manticorum67/major-domo-discord-app-v2:2.24.0 and :latest.

View File

@ -1,12 +0,0 @@
---
id: 4728ce74-b308-4ddd-972b-40f28e6ca5e5
type: solution
title: "Discord followup.send() doesn't trigger mention notifications"
tags: [major-domo, discord.py, fix, mentions]
importance: 0.7
confidence: 0.8
created: "2026-01-28T21:45:46.905752+00:00"
updated: "2026-01-28T21:45:46.905752+00:00"
---
Webhook-based interaction.followup.send() messages don't trigger Discord mention notifications even with proper allowed_mentions settings. Fix: use channel.send() for content with mentions, and send ephemeral followup to satisfy interaction response requirement. Also need defer(ephemeral=True) for followup to be ephemeral.

View File

@ -1,12 +0,0 @@
---
id: 6401b7ce-88b1-4800-a264-b9f810386e1a
type: solution
title: "Double emoji fix in Discord embeds"
tags: [major-domo, python, fix, discord, ui]
importance: 0.5
confidence: 0.8
created: "2025-12-10T21:42:22.633468+00:00"
updated: "2025-12-10T21:42:22.633468+00:00"
---
EmbedTemplate.info/success/error/warning/loading() methods auto-add emoji prefixes (/✅/❌/⚠️/⏳). When using custom emojis in titles, use EmbedTemplate.create_base_embed() with color=EmbedColors.INFO instead to avoid double emojis like ' ⚙️ Title'.

View File

@ -1,12 +0,0 @@
---
id: 147abb39-bfa8-41e1-a8ac-d84630455037
type: solution
title: "Draft embed sheet links"
tags: [major-domo, discord-bot, draft-system, ui]
importance: 0.5
confidence: 0.8
created: "2025-12-12T02:10:24.299012+00:00"
updated: "2025-12-12T02:10:24.299012+00:00"
---
Added Google Sheet link to all draft-related embeds in discord-app-v2. Added optional sheet_url parameter to create_draft_board_embed, create_admin_draft_info_embed, create_on_the_clock_embed, and create_on_clock_announcement_embed functions. Updated callers in board.py, admin.py, status.py, and draft_monitor.py to pass config.get_draft_sheet_url(config.sba_season).

View File

@ -1,12 +0,0 @@
---
id: 8b130d45-eeea-403f-85f7-375938125d1e
type: solution
title: "Draft list command UX improvements"
tags: [major-domo, discord, ux, fix]
importance: 0.5
confidence: 0.8
created: "2025-12-10T21:59:03.441301+00:00"
updated: "2025-12-10T21:59:03.441301+00:00"
---
Improved draft list command feedback: 1) Changed misleading footer from 'Use /draft-list to manage' to list actual management commands (/draft-list-add, /draft-list-remove, /draft-list-clear). 2) Made /draft-list-remove display the updated queue after removal (matching /draft-list-add behavior). 3) Added contextual footer to /draft-list-clear suggesting /draft-list-add.

View File

@ -1,18 +0,0 @@
---
id: e4f0bee9-9dc0-4bff-8d07-ba8aa22ef83d
type: solution
title: "Draft monitor auto-start and on-clock embed"
tags: [major-domo, discord, draft, python, fix]
importance: 0.7
confidence: 0.8
created: "2025-12-11T05:04:46.922103+00:00"
updated: "2026-02-20T04:32:58.534513+00:00"
relations:
- target: f7824582-0d80-401e-bd5b-c23ced0b737a
type: BUILDS_ON
direction: incoming
strength: 0.85
edge_id: ff9d7164-7090-44ae-a3d5-7cbdd7bc33ef
---
Added draft monitor task that auto-starts when timer is enabled via /draft-admin timer or /draft-admin set-pick. Created on-clock announcement embed showing team name, deadline, sWAR, cap space, last 5 picks, and top 5 roster players. Implemented smart polling intervals (30s/15s/5s based on time remaining). Fixed DraftAdminGroup to accept bot parameter for task management. Key files: commands/draft/admin.py, tasks/draft_monitor.py, views/draft_views.py

View File

@ -1,12 +0,0 @@
---
id: becb5ba4-e8a7-4ece-83d7-8fbb0099ad1b
type: solution
title: "Draft on-clock announcement after picks"
tags: [major-domo, python, discord, draft, feature]
importance: 0.5
confidence: 0.8
created: "2025-12-13T00:54:05.223450+00:00"
updated: "2025-12-13T00:54:05.223450+00:00"
---
Added on-clock announcement with team role ping after /draft command picks. Previously only the draft monitor task posted these announcements during auto-draft. Now DraftPicksCog has _post_on_clock_announcement method that posts embed with team info, sWAR, recent picks, and pings the next team's role after each pick advances.

View File

@ -1,12 +0,0 @@
---
id: 27a581bc-9e3c-47b8-8836-dbca359d1b79
type: solution
title: "Draft pause API support"
tags: [major-domo, database, fastapi, draft-system, feature]
importance: 0.6
confidence: 0.8
created: "2025-12-12T01:48:00.158262+00:00"
updated: "2025-12-12T01:48:00.158262+00:00"
---
Added 'paused' parameter to DraftData PATCH endpoint in major-domo database API. When paused=True, the draft blocks all picks (manual and auto) and stops the timer. Resume restarts the timer with a fresh deadline. Required database migration to add paused column (BOOLEAN DEFAULT FALSE) to draftdata table.

View File

@ -1,12 +0,0 @@
---
id: 73c88b54-bb32-4f0b-b1cd-c71f0437f2bd
type: solution
title: "Draft pause/resume feature"
tags: [major-domo, discord-bot, draft-system, feature]
importance: 0.6
confidence: 0.8
created: "2025-12-12T01:58:48.843175+00:00"
updated: "2025-12-12T01:58:48.843175+00:00"
---
Added draft pause/resume functionality to discord-app-v2. When paused: timer stops, deadline set far in future, all /draft picks blocked, auto-draft monitor skips processing. When resumed: timer restarts with fresh deadline, picks allowed again. Key files: models/draft_data.py (paused field), services/draft_service.py (pause_draft/resume_draft methods), commands/draft/admin.py (pause/resume commands), commands/draft/picks.py (pause check), tasks/draft_monitor.py (pause check), views/draft_views.py (status embeds).

Some files were not shown because too many files have changed in this diff Show More