Remove dead ttl_behavior field from ContextPolicy#163
Merged
Conversation
7 tasks
Agent-Logs-Url: https://github.com/dgenio/contextweaver/sessions/9a8cb19f-556e-4446-9a5d-1d0f987b0adb Co-authored-by: dgenio <12731907+dgenio@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove dead ContextPolicy.ttl_behavior field
Remove dead Apr 14, 2026
ttl_behavior field from ContextPolicy
There was a problem hiding this comment.
Pull request overview
Removes the unused ContextPolicy.ttl_behavior configuration surface to avoid silently ignored settings until real TTL/eviction support is implemented (tracked in #67).
Changes:
- Removed
ttl_behaviorfromContextPolicy(and its docstring entry). - Updated the CLI
initscaffoldedcontextweaver.jsonto no longer emitttl_behavior. - Updated config tests to stop asserting the removed default.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/contextweaver/config.py |
Removes the dead ttl_behavior field and related docstring text from ContextPolicy. |
src/contextweaver/__main__.py |
Updates the init command’s scaffold config JSON to omit ttl_behavior. |
tests/test_config.py |
Removes the assertion tied to the deleted ttl_behavior default. |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #65
ContextPolicy.ttl_behaviorwas configurable but never read —ContextItemhas no TTL field and no pipeline stage acts on it. Silently ignored config erodes trust; removed it until TTL support is implemented (tracked separately in #67).Changes
config.py— Removettl_behavior: str = "drop"field and its docstring entry fromContextPolicy__main__.py— Dropttl_behaviorfrom the_cmd_initscaffold config JSONtests/test_config.py— Remove assertion on the now-absent fieldChecklist
make cipasses locally (fmt + lint + type + test + example + demo)CHANGELOG.mdupdated under## [Unreleased]Notes for reviewers
sensitivity_floor,sensitivity_action, andredaction_hooksare not touched — those are already wired intocontext/sensitivity.pyas of v0.1.2. Onlyttl_behavioris removed here.