Skip to content

Remove dead ttl_behavior field from ContextPolicy#163

Merged
dgenio merged 4 commits intomainfrom
copilot/remove-contextpolicy-ttl-behavior
Apr 17, 2026
Merged

Remove dead ttl_behavior field from ContextPolicy#163
dgenio merged 4 commits intomainfrom
copilot/remove-contextpolicy-ttl-behavior

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 14, 2026

Summary

Closes #65

ContextPolicy.ttl_behavior was configurable but never read — ContextItem has 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 — Remove ttl_behavior: str = "drop" field and its docstring entry from ContextPolicy
  • __main__.py — Drop ttl_behavior from the _cmd_init scaffold config JSON
  • tests/test_config.py — Remove assertion on the now-absent field

Checklist

  • Tests added or updated for every new/changed public function
  • make ci passes locally (fmt + lint + type + test + example + demo)
  • CHANGELOG.md updated under ## [Unreleased]
  • Docstrings added for all new public APIs (Google-style)
  • Every modified module stays ≤ 300 lines (or a decomposition issue is linked above)
  • Related issue linked in the summary above
  • Agent-facing docs updated if pipeline, API, or conventions changed

Notes for reviewers

sensitivity_floor, sensitivity_action, and redaction_hooks are not touched — those are already wired into context/sensitivity.py as of v0.1.2. Only ttl_behavior is removed here.

Copilot AI linked an issue Apr 14, 2026 that may be closed by this pull request
7 tasks
Copilot AI changed the title [WIP] Remove dead ContextPolicy.ttl_behavior field Remove dead ttl_behavior field from ContextPolicy Apr 14, 2026
Copilot AI requested a review from dgenio April 14, 2026 08:57
@dgenio dgenio marked this pull request as ready for review April 14, 2026 09:20
@dgenio dgenio requested review from Copilot April 14, 2026 09:20
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_behavior from ContextPolicy (and its docstring entry).
  • Updated the CLI init scaffolded contextweaver.json to no longer emit ttl_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.

Comment thread src/contextweaver/config.py
@dgenio dgenio merged commit d23403b into main Apr 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[config] Enforce or remove dead ContextPolicy.ttl_behavior field

3 participants