Repository navigation
fix(reporting): isolate handler registrations for each installation - #1847
Conversation
Give each newly installed reporting handler its own UUID-backed class name. Service addresses can be reused, and one service can install sellers with separate advertised tool sets. Preserve same-platform reinstall identity and strict conflicting handler registration checks. Fixes #1846
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — clean, well-scoped fix.
This PR swaps the installed reporting-handler class name from id(self):x to uuid4().hex (service.py:1433), fixing the beta.10 Py3.13 collision (#1846) where two sellers of the same original class with distinct per-instance tool sets produced an identical installed_name, tripping the "called twice with different tool sets" guard in __init_subclass__ → register_handler_tools. uuid4 guarantees a unique install name; the same-platform reinstall early-return (service.py:1324) still bounds registry growth to one entry per distinct install, and method qualnames preserve the stable original.__name__, so nothing that parses the class name regresses.
The new test (tests/test_reporting_install_identity.py) exercises same/different-service installs, distinct tool surfaces, delegation, and confirms the conflict guard still fires. Correctly labeled fix(reporting): — no public-surface, wire-shape, schema, layering, forward-compat, or credential changes; no semver or version-pathway obligation triggered.
No reviewer findings. Not gated (gated_paths: false), not high-risk, no author team gate. review_decision is REVIEW_REQUIRED but that only blocks when gated_paths is true, which it is not here. Falls through to row 9.
…1849) Forward-port the stable reporting installation fix from #1847. Allocate a fresh class name for each reporting installation while preserving same-platform reinstall identity, each seller's tool surface, and strict conflicting-registration refusal. The port changes only the qualified service lines and the same public regression; NEXT wire, schema, account, principal, managed/production and dependency behavior remain unchanged. (cherry picked from commit 86302d0)
A reporting service currently gives every installed handler a class name derived from the service's address. Installing two sellers with different tool sets on the same service fails registration; a later service can also reuse a previous address. Allocate a fresh UUID for each new installation while preserving same-platform reinstall identity and strict conflicting-registration refusal.
The public regression installs sellers with distinct advertised tools, checks their delegation and reinstall behavior, and verifies explicit registry conflicts still fail without changing the original surface. This fixes the latent collision exposed by beta.10 Python 3.13 CI without changing protocol schemas, registry rules, dependencies or released artifacts. A proper
cherry-pick -xforward-port tonextwill follow the stable source merge.Validation:
make lint typecheck-all validate-generatedand all applicable normal commit hooks pass.UV_NO_CACHE=1 make testpassed: 18,865 passed, 2,819 skipped, 10 deselected and one existing xfail; 92.16% coverage. All tests and normal coverage gates ran unchanged.Fixes #1846