diff --git a/HERALD.md b/HERALD.md deleted file mode 100644 index 5394c96f..00000000 --- a/HERALD.md +++ /dev/null @@ -1,156 +0,0 @@ -[< Back to AIPass README](README.md) - -# AIPass Herald - -> The living record. What happened, what's changing, what matters. - -**Last updated:** 2026-04-10 | **Session:** 86 | **PRs merged:** 230+ - ---- - -## Current State - -- **11 core agents** operational (streamlined from 15 — backup, daemon, commons, skills split to standalone projects; api reinstated) -- **3,500+ tests** system-wide -- **230+ PRs** merged -- **86 sessions** of development -- **Multi-CLI support** — Claude Code, Codex (GPT-5.4), Gemini all integrated with hooks, identity, skills -- **Vera Studio** — standalone AI-driven brand studio for promotion (separate from devpulse construction) -- **aipass init v2** — real templates, next steps, `aipass init agent` command -- **Goldfish panel** — 7-round multi-model README review process (Claude + Codex + Gemini) -- **PyPI** — `pip install aipass` works (v2.0.0) - -## Recent Sessions - -### S86 — Autonomous APLAN Fix Sweep (2026-04-10) -6-hour autonomous session (DPLAN-0111). 11 CRITICALs resolved, 35+ BUGs fixed across flow, api, cli, trigger, drone. Logger catch-all added to all 10 entry points. Seedgo full audit dispatched. Spawn 12 BUGs dispatched. - -### S85 — Trigger Medic v2 Self-Healing Pipeline (2026-04-10) -Full autonomous error cycle proven: detect → dispatch → wake → fix → report. Trigger Medic v2 fixed (log_watcher dedup, count gate, wake_branch). Drone git fix/sync upgraded (merge not reset). OSS Health badge. 13 stale plans closed. PRs #229-230. - -### S84 — API Key Incident Recovery + Branch Purge (2026-04-09) -Watchdog fixed. Night shift: 4 DPLANs (0107-0110), 10 branches dispatched, PRs #214-226. API key incident recovery. 28 stale branches purged. - -### S83 — Adversarial Audit (2026-04-09) -22 Opus adversarial audit agents: 350+ findings across all 11 branches, 11 CRITICALs identified. All 11 APLANs updated by builder agents. Hook-sounds plugin built. PRs #211-212. - -### S82 — Core Split: Dependency Audit + README Update (2026-04-09) -Decided to split 4 agents to standalone projects (backup, daemon, commons, skills); api reinstated as infrastructure. 6 parallel agents verified zero code dependencies. Updated README from 15 → 11 agents. All agent tables, tree diagrams, TOC, metrics updated. CLI dispatched for src/ directory in init + CWD-aware sync-registry for spawn. - -### S81 — aipass init v2 + Vera Studio (2026-04-08) -TDPLAN-0002: Complete init overhaul. CLI, spawn, drone worked in parallel. Init now creates 10 items with real content (CLAUDE.md, AGENTS.md, GEMINI.md, global prompt, README, .gitignore, hooks, settings). `aipass init agent` routes to spawn. Spawn added --template flag + CLAUDE.md to builder template. Drone added spawn to routing_config.json. Prax fixed watchdog with --daemon mode + statusline indicator. Vera Studio project created. The AIPass Developer testing as real first-time user — found .trinity shouldn't be in project root, local prompt is agent-level only. CLI fixed both. DPLAN-0105 (promotion prep), DPLAN-0106 (watchdog v2). PRs #204-205. - -### S80 — README Marathon + 14-Branch Audit (2026-04-07/08) -FPLAN-0165 executed (README 366→279 lines). Goldfish Rounds 5-7: R5 approval (8/8.5/9 ratings), R6 branch deep dive (flow+memory undersold, honest tagging builds credibility), R7 hands-on CLI (routing 100%, nothing broke). 14 branches dispatched simultaneously for state audit — all completed in 15 min, 3,600+ tests, 11/14 at 100% seedgo. README Round 7 update (flow/memory lifecycle, transparency sentence). CLI init bug fixed (double prefix). Watchdog race condition fixed. PyPI 2.0.0 published. ~/.secrets/ blocked across all 3 CLIs. DPLAN-0099 updated through 7 rounds. Gemini free tier dead. PRs #202-203. - -### S79 — README Overhaul + Goldfish Panel (2026-04-07) -README overhaul with 4 Goldfish rounds (Claude+Codex+Gemini reviews). PyPI published (aipass 2.0.0). Security: ~/.secrets/ blocked across all 3 CLIs. Memory central_writer path bug fixed. Breadcrumb architecture + collaboration angle captured. FPLAN-0165 master plan. PR #201 merged. - -### S78 — Navigator Pattern + TDPLAN (2026-04-06) -Project-vs-agent distinction discovered (DPLAN-0104). Navigator agent pattern proven (tmux + brief + let work). TDPLAN template created. Global prompt: gitignore rule. PR #199. - -### S77 — README Value Prop Research (2026-04-06) -Cross-platform research (10 agents), README value prop overhaul (7 agents), competitive landscape, fresh outside perspective. DPLAN-0098+0099. PR #195 merged. - -### S76 — Multi-CLI Integration Into Main (2026-04-05) -Ported Codex and Gemini from Docker prototype into the AIPass repo. Created AGENTS.md, GEMINI.md, .codex/ (hooks + skills), .gemini/ (hooks + skills). Updated setup.sh to detect CLIs and wire hooks automatically. Prax built Codex/Gemini log adapters, model tags ([DEVPULSE/OPUS], [DEVPULSE/GPT-5.4], [DEVPULSE/GEMINI-3-FLASH]), inotify errno-specific messages, and CWD branch detection. Fixed AGENTS.md startup behavior. PRs #189-192. - -### S75 — Multi-CLI Proven in Docker (2026-04-05) -Proved all three CLIs (Claude Code, Codex gpt-5.4, Gemini flash-preview) work in same Docker container. Hooks, identity, drone, ai_mail, seedgo, sub-agents all functional. Commons discussion with genuine cross-model responses. Git fixed (squash-merge to regular merge). PR #188 merged. - -### S74 — README Overhaul + Research Sprint (2026-04-05) -Full README restructure: grouped branch tables with README links, collapsible setup sections, navigation. Compliance & Safety section added. Token optimization research. 25 inbox messages processed from S73 night shift. Herald updated. - -### S73 — Night Shift: Test Coverage Push to 100% (2026-04-03) -13 branches dispatched for 100% module test coverage. 3,745 to 4,865+ tests (+1,120 new). Coverage 69% to 88%. 7 branches at 100% module coverage. Seedgo: 16 tests fixed (assertions, isolation, trivially-true). 4 cross-test failures fixed. PR #181. 71 files (20 modified, 51 new test files). - -### S72 — Marathon: Dispatch Fix + Nexus Vision (2026-04-02) -Time clock hook. Skills root cause corrected (not poisoned JSONL — JSON output mode buffers stdout, dispatch_monitor sees 0 bytes, kills healthy agents). FPLAN-0164 Phase 1 built, reviewed, fixed, verified. Nexus vision: devpulse becomes alias of Nexus (co-founder, aliases, multi-model). 6 decisions (#016-#021). 15-branch health sweep (3,627 tests). 4 plans closed. PRs #175-180. Dispatch fixed and verified (drone replied, daemon wrote 74 tests, backup confirmed). tmux debugging proved sessions healthy. - -### S71 — Autonomy Marathon: Sentinel + System Sweep (2026-04-02) -Sentinel v0.1.0 to v0.3.2 (9 commits, 9 analyzers, 118 tests). System sweep: 161 sessions, 80k events, 16 branches. Dispatch PATH bug + Skills timeout found. decisions.md: 11 entries (#006-#015). Backup = gold standard (98%) vs spawn = worst (74%). morning_briefing.sh tool. SYSTEM_NARRATIVE.md. 3 commons posts. 6 branch emails. Sentinel pip-installed. - -### S70 — Project Night: Sentinel v0.1.0 (2026-04-01) -Merged PRs #166-171 (S69 backlog). Sentinel v0.1.0 built — 8 analyzers, 90 tests, 49 files. Claude Code JSONL parser fixed for real format. Tuned analyzers (19 false positives to 1). HTML export, watch mode, history, compare. Hook fix for external projects. - -### S69 — Massive: Claude Code Indexing + Audit Sweep (2026-03-31) -Claude Code source indexed (25 agents, 1,513 .md companion files). FPLAN-0162 audit sweep (14 branches dispatched, 14 verified). Stale ref wave (13 agents, 1,030 to 612, 418 fixes). Scanner ignores fixed. Direct fixes: memory shebang, purge.py paths, commons function, backup bypasses. PRs #166-170. Project Night research done. - -### S68 — Night Shift: Zero Log Scanner Output (2026-03-31) -Autonomous night shift executed FPLAN-0161. Log scanner went from 981 errors / 1805 warnings / 2000 failures to absolute zero. Clean-slate approach: archived all logs, ran 15 branches fresh (3,425 tests, 0 failures), triaged — 100% of noise was test-generated. Built test log isolation system: AIPASS_TEST_LOG_DIR env var in 14 conftest.py files + prax config/load.py check. PR #162. - -### S67 — Plan Cleanup, APLAN Template, Log Scanner (2026-03-31) -Major housekeeping session. Closed 8 devpulse root plans. Created APLAN template. 15 branch audits reformatted. System baseline: 104 open items, 110 resolved. Built log_scanner_v1.py. PR #158. - -### S66 — Synrix Research, Auto Status Sync (2026-03-30) -External repo research (Synrix/Octopoda). RPLAN template. DPLAN-0088: auto STATUS.md sync on PR events. PRs #154-157. - -### S65 — Night Shift: devpulse_ops Plugin Suite (2026-03-30) -FPLAN-0154 executed. devpulse_ops plugin suite (system-pr, merge, smart-sync, fix). 440 drone tests. PRs #147-153. - -### S64 — Fresh-Eyes CLI Testing (2026-03-30) -15 zero-context agents, 229 commands. Nav 4.1/5, Output 3.9/5. Five critical bugs found. PRs #144-146. - -### S63 — Full System Audit: 13 Branches Dispatched (2026-03-29) -Largest single-session dispatch. ~500 new tests (2,905 to 3,330+). Adapter pattern eliminated. PR #144. - -### S62 — Backup Deep Audit (2026-03-29) -.backup to .recovery rename (79 directories). Backup 4-phase rebuild. Google Drive sync working. PRs #142-143. - -### S61 — Branch Audit Deep-Dive: API + Drone (2026-03-29) -API 18-item cleanup (186 tests). Naming checker false positives fixed. DPLAN-0083. - -### S60 — System Verification Wave (2026-03-29) -Prax queue spam eliminated (144k/4hrs). 9 stale plans closed. 15-agent verification wave. 2,905 tests, 100% seedgo. - -### S59 — Full System Walkthrough (2026-03-28) -11 agents audited all 15 branches. Docker verified. README + HERALD.md created. PR #140. - -### S58 — Night Shift: 100% Compliance (2026-03-28) -Every branch, every standard, 100%. PR #137 (167 files, +12,843 lines). - -## Key Milestones - -| Date | Milestone | -|------|-----------| -| 2026-04-10 | S86: Autonomous APLAN fix sweep — 11 CRITICALs resolved, 35+ BUGs fixed | -| 2026-04-10 | S85: Trigger Medic v2 self-healing pipeline live | -| 2026-04-09 | S84: API key incident recovery + 28 stale branches purged | -| 2026-04-09 | S83: Adversarial audit (22 agents, 350+ findings, 11 CRITICALs) | -| 2026-04-05 | Multi-CLI integration — Codex + Gemini fully integrated with hooks, skills, prax model tags | -| 2026-04-05 | README overhaul — grouped branch tables, compliance section, navigation | -| 2026-04-03 | S73 night shift — 1,120 new tests, 7 branches at 100% module coverage | -| 2026-04-02 | Dispatch safety net — startup timeout, JSONL monitoring, auto-retry | -| 2026-04-02 | Nexus vision — personal AI companion architecture defined | -| 2026-04-01 | Sentinel v0.1.0 — AIPass's first external project (JSONL analyzer) | -| 2026-03-31 | Claude Code source indexed — 1,513 companion files from 25 agents | -| 2026-03-31 | Zero log scanner output — test log isolation system built | -| 2026-03-31 | APLAN template — standardized branch audits across 15 branches | -| 2026-03-30 | devpulse_ops plugin suite — system-pr, merge, smart-sync, fix | -| 2026-03-30 | Auto STATUS.md sync — PR events trigger status updates | -| 2026-03-30 | Fresh-eyes CLI audit — 15 agents, 229 commands | -| 2026-03-29 | S63: 13 branches dispatched, ~500 new tests | -| 2026-03-28 | 100% seedgo compliance — all 15 branches, all 32 standards | -| 2026-03-25 | Spawn template overhaul — registry regen, 41-file template | -| 2026-03-24 | First autonomous night shift — 6 branches dispatched | -| 2026-03-22 | Phase 1 diagnostic tools complete — 20 tools reviewed + accepted | - -## System Numbers - -``` -Branches: 11 -Standards: 33 -Tests: ~3,500 -PRs merged: 230+ -Sessions: 86 -Diagnostic tools: 26 -CLIs supported: 3 (Claude Code, Codex, Gemini) -``` - ---- - -*Updated by devpulse at session boundaries. Read this for the big picture, check STATUS.local.md in any branch for the details.* - ---- - -[< Back to AIPass README](README.md) diff --git a/src/aipass/spawn/tests/test_citizen_classes.py b/src/aipass/spawn/tests/test_citizen_classes.py index 022bee7a..dde5795d 100644 --- a/src/aipass/spawn/tests/test_citizen_classes.py +++ b/src/aipass/spawn/tests/test_citizen_classes.py @@ -537,31 +537,31 @@ class TestRetroactiveOwner: """Tests for retroactive owner assignment on legacy projects.""" def test_retroactive_owner_on_legacy_agents(self, tmp_path): - """Creating a new agent in a project where no agent has owner sets the first one.""" + """Creating a new agent in a project where no agent has owner sets the alphabetically first.""" from aipass.spawn.apps.modules.core import _spawn_agent reg = tmp_path / "TEST_REGISTRY.json" reg.write_text('{"metadata":{"version":"1.0.0","total_branches":0},"branches":[]}') - # Create two agents, then remove their owner field to simulate legacy - _spawn_agent(str(tmp_path / "old_a"), registry_path=str(reg)) - _spawn_agent(str(tmp_path / "old_b"), registry_path=str(reg)) + # Names chosen so legacy agents sort first alphabetically (alpha < beta < zeta) + _spawn_agent(str(tmp_path / "alpha"), registry_path=str(reg)) + _spawn_agent(str(tmp_path / "beta"), registry_path=str(reg)) - for name in ["old_a", "old_b"]: + for name in ["alpha", "beta"]: pp = tmp_path / name / ".trinity" / "passport.json" data = json.loads(pp.read_text()) del data["citizenship"]["owner"] pp.write_text(json.dumps(data, indent=2)) - # Create a third agent — should trigger retroactive fix - _spawn_agent(str(tmp_path / "new_c"), registry_path=str(reg)) + # Create a third agent — triggers retroactive fix on alphabetically first + _spawn_agent(str(tmp_path / "zeta"), registry_path=str(reg)) - pa = json.loads((tmp_path / "old_a" / ".trinity" / "passport.json").read_text()) - pb = json.loads((tmp_path / "old_b" / ".trinity" / "passport.json").read_text()) - pc = json.loads((tmp_path / "new_c" / ".trinity" / "passport.json").read_text()) + pa = json.loads((tmp_path / "alpha" / ".trinity" / "passport.json").read_text()) + pb = json.loads((tmp_path / "beta" / ".trinity" / "passport.json").read_text()) + pz = json.loads((tmp_path / "zeta" / ".trinity" / "passport.json").read_text()) assert pa["citizenship"]["owner"] is True assert pb["citizenship"].get("owner") is not True - assert pc["citizenship"]["owner"] is False + assert pz["citizenship"]["owner"] is False def test_no_retroactive_if_owner_exists(self, tmp_path): """If an existing agent already has owner:true, no retroactive change."""