Summary
Run one coordinated deprecation cycle that removes the lingering pre-rename artifacts:
the _DEFAULT_RATE_LIMITS/_SERVICE_RATE_MULTIPLIER aliases in policy.py, and the
base exception name AgentKernelError (introduce WeaverKernelError with the old
name as a deprecated alias).
Why this matters
The package was renamed to weaver_kernel (PyPI: weaver-kernel), but the exception
hierarchy still roots at AgentKernelError — the first symbol every integrator
writes in an except clause teaches the old name. Meanwhile policy.py keeps
private aliases that internal code still uses inconsistently (lines 147 and 423 use
the aliases; the canonical names exist alongside), a small but real drift hazard.
One deliberate cleanup release beats indefinite naming debt.
What to remove, why, replacement, migration, communication
- Remove:
_DEFAULT_RATE_LIMITS / _SERVICE_RATE_MULTIPLIER aliases (policy.py:35-36); internal uses switch to the canonical constants. Replacement: DEFAULT_RATE_LIMITS / SERVICE_RATE_MULTIPLIER.
- Deprecate then remove:
AgentKernelError as the primary name. Replacement: WeaverKernelError = class; AgentKernelError = WeaverKernelError alias kept for ≥2 minor releases with a deprecation note (subclass except clauses keep working through the alias).
- Why it adds complexity: two names for every concept; onboarding confusion; grep noise; inconsistent internal usage.
- Migration path: alias period, CHANGELOG
Deprecated entries, a one-line sed recipe in release notes.
- Compatibility risks: downstream
except AgentKernelError continues working during the alias period; only direct identity checks (is AgentKernelError) would notice — rare.
- Communication: CHANGELOG, release notes, docstrings on both names during the alias period.
Current evidence
errors.py:4: class AgentKernelError(Exception): roots the hierarchy in the renamed package.
policy.py:35-36 define the aliases; lines 147 and 423 still consume them while canonical names exist.
- Repo discipline (Keep-a-Changelog, stable reason codes) supports a clean deprecation cycle.
External context
Not required for this issue.
Proposed implementation
- PR 1: introduce
WeaverKernelError, re-root subclasses, alias the old name,
update all internal references, docs, and examples; CHANGELOG Deprecated.
- PR 1 (same): delete the private policy aliases (private surface — no deprecation
needed), switching the two internal call sites.
- Release N+2: drop the alias; CHANGELOG
Removed.
AI-agent execution notes
- Inspect first:
errors.py (full hierarchy), policy.py:35-36,147,423, __init__.py exports, tests/test_public_api.py, all docs mentioning AgentKernelError.
- The alias must preserve
isinstance/except semantics — use simple name binding, not a subclass.
- Grep docs and sibling-repo integration docs (
docs/integrations/*.md) for the old name.
Acceptance criteria
except WeaverKernelError catches all kernel errors; AgentKernelError still works during the alias period with a documented deprecation.
- No internal reference to the old name or the private aliases remains.
- Public API tests cover both names during the alias period.
Test plan
Identity/equality tests for the alias; full suite for the rename; docs grep check.
Run make ci.
Documentation plan
CHANGELOG Deprecated/Changed; update docs/* and examples; migration snippet in
release notes.
Migration and compatibility notes
Alias period ≥2 minor releases; sed one-liner migration; flag cross-repo impact
(integration docs in contextweaver/ChainWeaver mention kernel errors).
Risks and tradeoffs
Any rename creates churn for early adopters — batching it with the alias period and
doing it pre-1.0 minimizes lifetime cost. Alternative (keep old name forever)
perpetuates brand confusion with the repo/package name.
Suggested labels
deprecation, breaking-change, architecture
Summary
Run one coordinated deprecation cycle that removes the lingering pre-rename artifacts:
the
_DEFAULT_RATE_LIMITS/_SERVICE_RATE_MULTIPLIERaliases inpolicy.py, and thebase exception name
AgentKernelError(introduceWeaverKernelErrorwith the oldname as a deprecated alias).
Why this matters
The package was renamed to
weaver_kernel(PyPI: weaver-kernel), but the exceptionhierarchy still roots at
AgentKernelError— the first symbol every integratorwrites in an
exceptclause teaches the old name. Meanwhilepolicy.pykeepsprivate aliases that internal code still uses inconsistently (lines 147 and 423 use
the aliases; the canonical names exist alongside), a small but real drift hazard.
One deliberate cleanup release beats indefinite naming debt.
What to remove, why, replacement, migration, communication
_DEFAULT_RATE_LIMITS/_SERVICE_RATE_MULTIPLIERaliases (policy.py:35-36); internal uses switch to the canonical constants. Replacement:DEFAULT_RATE_LIMITS/SERVICE_RATE_MULTIPLIER.AgentKernelErroras the primary name. Replacement:WeaverKernelError = class; AgentKernelError = WeaverKernelErroralias kept for ≥2 minor releases with a deprecation note (subclassexceptclauses keep working through the alias).Deprecatedentries, a one-line sed recipe in release notes.except AgentKernelErrorcontinues working during the alias period; only direct identity checks (is AgentKernelError) would notice — rare.Current evidence
errors.py:4:class AgentKernelError(Exception):roots the hierarchy in the renamed package.policy.py:35-36define the aliases; lines 147 and 423 still consume them while canonical names exist.External context
Not required for this issue.
Proposed implementation
WeaverKernelError, re-root subclasses, alias the old name,update all internal references, docs, and examples; CHANGELOG
Deprecated.needed), switching the two internal call sites.
Removed.AI-agent execution notes
errors.py(full hierarchy),policy.py:35-36,147,423,__init__.pyexports,tests/test_public_api.py, all docs mentioningAgentKernelError.isinstance/exceptsemantics — use simple name binding, not a subclass.docs/integrations/*.md) for the old name.Acceptance criteria
except WeaverKernelErrorcatches all kernel errors;AgentKernelErrorstill works during the alias period with a documented deprecation.Test plan
Identity/equality tests for the alias; full suite for the rename; docs grep check.
Run
make ci.Documentation plan
CHANGELOG
Deprecated/Changed; updatedocs/*and examples; migration snippet inrelease notes.
Migration and compatibility notes
Alias period ≥2 minor releases; sed one-liner migration; flag cross-repo impact
(integration docs in contextweaver/ChainWeaver mention kernel errors).
Risks and tradeoffs
Any rename creates churn for early adopters — batching it with the alias period and
doing it pre-1.0 minimizes lifetime cost. Alternative (keep old name forever)
perpetuates brand confusion with the repo/package name.
Suggested labels
deprecation, breaking-change, architecture