Phase 2: Validate feedback-derived T-I-F decision provenance#163
Merged
ferhimedamine merged 4 commits intoJun 12, 2026
Merged
Conversation
ferhimedamine
approved these changes
Jun 12, 2026
ferhimedamine
left a comment
Contributor
There was a problem hiding this comment.
Phase 2 Deep Review — Approved
Validation Results (Dakera v0.11.90, in-memory, auth disabled)
Self-test (offline): 3/3 pass
Runtime validation: 3/3 pass with full proofs
| Scenario | Baseline → T-I-F Decision | Recall | Session | Associated |
|---|---|---|---|---|
| coding-assistant | reuse_top_memory → surface_contradiction |
✓ | ✓ | ✓ |
| research-agent | reuse_top_memory → ask_clarification |
✓ | ✓ | ✓ |
| customer-support | reuse_top_memory → surface_contradiction |
✓ | ✓ | ✓ |
Phase 1 backward compat: 4/4 pass ✓
Code Review
Strengths:
- stdlib-only (zero external dependencies)
- Deep-copies metadata before mutation — data safety
- Unique
agent_idper run — no test data pollution - Session cleanup in
finallyblock - Defensive response normalization handles multiple API response shapes
- Healthcheck properly validates
ready: true - Security: localhost-only binding, auth disabled only for local validation
Minor notes (non-blocking):
TimeoutErrorcatch at lines ~736/746 may not trigger —urllibwraps timeouts inURLError. The defensive retry is still fine as a pattern; just noting it.assert direct is not None—assertis removed by-Ooptimization. A conditionalraisewould be slightly more robust for production-grade scripts.
T-I-F Math Verification
All 6 derivations manually verified:
coding-obsolete: (0.38,0.20,0.34) + 2×downvote → (0.18,0.30,0.64) → f≥0.50 ✓coding-current: (0.66,0.14,0.10) + upvote → (0.76,0.11,0.05) → t≥0.70 ✓research-uncertain: (0.44,0.18,0.18) + 2×flag → (0.34,0.58,0.38) → i≥0.50 ✓research-backed: (0.68,0.16,0.08) + upvote → (0.78,0.13,0.03) → t≥0.70 ✓support-outdated: (0.42,0.18,0.30) + downvote+flag → (0.27,0.43,0.55) → f≥0.50 ✓support-current: (0.67,0.12,0.07) + upvote → (0.77,0.09,0.02) → t≥0.70 ✓
Verdict
Clean Phase 2 delivery. Feedback-derived T-I-F, session provenance, and associated recall all working against current production API. No engine changes. Examples-only scope maintained.
The docker-compose version bump from 0.11.81 to 0.11.90 and the Phase 1 healthcheck improvement are good additions.
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
Phase 2 validation package for RFC #161: feedback-derived T-I-F reliability and session-scoped decision provenance.
This extends the merged Phase 1 path without changing Dakera engine behavior.
Scope
metadata.reliabilitymetadata.decision_provenancetrace memories/v1/memory/recallinclude_associated=trueScenarios
Validation
Validated locally against Dakera
0.11.90on localhost port3200.Result: all three scenarios passed.
The final runtime proof includes:
scenario_recall_proof: trueassociated_recall_missing_ids: []associated_recall_proof: truesession_trace_proof: truepassed: trueReview loop
Fork review PR: SeCuReDmE-main-dev#2
Review status before upstream PR:
Bugs (0)after correction loop705681200c: no major issues foundRFC context