Files
pocketpaw/tests/ee/__init__.py
Prakash Dalai 8f29b42b85 feat(fleet): emit agent.spawned + fleet.* events to journal on install (#947)
* feat(fleet): emit agent.spawned + fleet.* events to journal on install

The fleet installer now takes an optional `journal` (and optional `actor`)
and writes a correlated event trio per run: `fleet.install.started` at
entry, one canonical `agent.spawned` per soul created, and a
`fleet.installed` summary at the end. All three events share a single
correlation_id and carry the fleet's declared scopes, so downstream
projections and tailers can stitch a run back together.

The journal parameter is opt-in and defaults to None. Existing call sites
(the standalone CLI path, unit tests) keep working untouched. When a
run fails at the soul step, only `fleet.install.started` lands — no
`agent.spawned` and no terminal `fleet.installed` — so a UI tailing the
journal can tell a partial run apart from a clean one without inspecting
the install report.

Emission is wrapped in try/except and logged at warning level. A broken
journal must not translate into a broken install.

Unblocks paw-enterprise's InstallFleetPanel (which tails `fleet.*` and
`agent.spawned` to render live install progress) and closes the
observability gap opened by the installer merge in #940.

* fix(deps): promote soul-protocol from extra to base dep + bump to >=0.3.1

Runtime code (ee.fleet.installer) now imports from soul_protocol.spec.journal
and soul_protocol.engine.journal at module load. These imports cannot be
guarded or lazy — the installer signature exposes Journal as a parameter
type. Previously soul-protocol lived only in the [soul], [all], and [dev]
extras, so CI (which installs --dev) still couldn't resolve the import.

Promote to base dependencies at soul-protocol[engine]>=0.3.1 so:
- pip install pocketpaw just works; the journal APIs are available
- CI matrix on Python 3.11/3.12/3.13 can collect test modules that
  import soul_protocol
- The 0.3.1 floor guarantees Journal + EventEntry + Actor are present
  (all shipped in that release)

Also regenerated uv.lock to pick up soul-protocol 0.3.1 from the upstream
v0.3.1 release.

* test: fix two tests exposed by soul-protocol becoming a base dep

Promoting soul-protocol from an optional extra to a base dependency
unmasked two pre-existing test issues that only surfaced when soul is
actually importable in CI:

1. test_integration_headless.py::TestToolBridgeCompleteness
   _instantiate_all_tools strips remember/recall/forget when a soul
   manager is active (soul_remember/soul_recall supersede them). A
   prior test in the suite left a SoulManager globally installed, so
   the "memory tools present" assertions failed non-deterministically
   based on test order. Add an autouse _reset_manager fixture to the
   class, mirroring the pattern from test_soul_v024_smoke.py.

2. test_soul_manager.py::test_get_tools_returns_six
   Hard-coded exact-match assertion on a set of six tool names.
   soul-protocol v0.3.1 exposes nine (adds soul_forget, soul_core_memory,
   soul_context). Rename to test_get_tools_exposes_core_soul_tools
   and rewrite as a subset check so the core contract (the six names
   pocketpaw depends on) is still guarded while downstream can add
   tools freely.

---------

Co-authored-by: Prakash-1 <prakash-1@Mac.lan>
2026-04-16 09:59:19 +05:30

4 lines
207 B
Python

# tests/ee/__init__.py — Test package for ee/ subsystems.
# Created: 2026-04-16 (feat/fleet-journal-emission) — marks the tests/ee
# directory as a package so pytest can import fixtures across ee tests.