Repository navigation
Consolidate legacy aliases and finish the weaver_kernel naming migration #196
Description
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_MULTIPLIERaliases (policy.py:35-36); internal uses switch to the canonical constants. Replacement:DEFAULT_RATE_LIMITS/SERVICE_RATE_MULTIPLIER. - Deprecate then remove:
AgentKernelErroras the primary name. Replacement:WeaverKernelError = class; AgentKernelError = WeaverKernelErroralias kept for ≥2 minor releases with a deprecation note (subclassexceptclauses 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
Deprecatedentries, a one-line sed recipe in release notes. - Compatibility risks: downstream
except AgentKernelErrorcontinues 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-36define 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; CHANGELOGDeprecated. - 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__.pyexports,tests/test_public_api.py, all docs mentioningAgentKernelError. - The alias must preserve
isinstance/exceptsemantics — use simple name binding, not a subclass. - Grep docs and sibling-repo integration docs (
docs/integrations/*.md) for the old name.
Acceptance criteria
except WeaverKernelErrorcatches all kernel errors;AgentKernelErrorstill 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
Activity
dgenio commentedon Aug 11, 2026
Closing as not planned under the current naming decision. Merged PR #276 deliberately keeps the historical GitHub slug and standardizes the public product identity as Weaver Kernel without making naming churn part of the critical path. The new stability policy also argues against spending a pre-validation release on exception-name migration unless real users show the legacy symbol causes material friction.
feat: harden the capability-token lifecycle — rotation, TTL, invoke-t…
feat: harden capability-token lifecycle (#259)