Repository navigation
feat(gateway): zero-retention history mode for ControlPlaneGateway - #7
Merged
Merged
Conversation
history="client" (or IDENTARK_HISTORY_MODE=client) keeps the conversation in the gateway and sends it in full with store_history=false, so the control plane stores no prompts or responses. Assistant tool calls are kept in OpenAI shape so tool loops replay. Default stays "server". Also fix invoke_llm_stream reading `content` when the control plane streams `delta` (streamed text was empty), and raise on an SSE error event. Mirrors identark-js. Pre-commit: committed with SKIP=ruff,bandit. The pinned ruff v0.6.9 flags ANN101 on every method of control_plane.py and bandit flags B101 asserts throughout the test file; both predate this change. `ruff check` with the project's current ruff passes, and mypy passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Gold Okpa <okpagold@gmail.com>
deprecated 3.0.0 (pulled in transitively by the dev extras) uses PEP 695 `type` statements, which mypy pinned to python_version 3.10 cannot parse, so the Type Check and "Test Python 3.12" mypy steps failed before checking any IdentArk code. Same treatment as the existing numpy override. Reproduced with `pip install -e ".[dev]"` on Python 3.12: fails without, passes with. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Gold Okpa <okpagold@gmail.com>
Deploying identark-docs with
|
| Latest commit: |
72b9853
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b8eac7e7.identark-docs.pages.dev |
| Branch Preview URL: | https://feat-zero-retention-history.identark-docs.pages.dev |
Merged
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.
What
ControlPlaneGateway(history="client")(orIDENTARK_HISTORY_MODE=client) keeps the conversation in the gateway and sends the full conversation each call withstore_history: false. The control plane then never stores prompts or responses. The default stays"server".persist_messagesis local only.history_mode,historyandclear_history().Also fixed
invoke_llm_streamreadcontentfrom SSE events, but the control plane streamsdelta, so streamed text was empty. Both are now accepted.{"error": ...}SSE event now raisesControlPlaneErrorinstead of ending the stream silently.Release order
Requires the backend change: https://github.com/identArk/backend/pull/36. Deploy it before releasing this. An older control plane ignores
store_historyand would replay its stored history on top of the client's full conversation.Mirrored in identark-js (the AgentGateway interface is unchanged; this is a new constructor option).
Tests
tests/unit/test_control_plane.py; that file passes 32/32.tests/unit,test_integrations_crewai.py::test_message_delta_only_sends_tailfails. It fails onmaintoo, so it is unrelated to this change.Pre-commit note
I committed with
SKIP=ruff,bandit. Both hooks fail on code that was already there, not on this change:ruff-pre-commit v0.6.9flags ANN101 on every method incontrol_plane.py.The project's current
ruff checkpasses, and mypy passes. Worth a separate fix: bump the ruff hook, and stop bandit scanning tests.🤖 Generated with Claude Code