Skip to content

Fix #2046: add missing promote_to_l1 steps in SharedLearningStore tests - #894

Closed
AlexMikhalev wants to merge 3 commits into
mainfrom
task/2046-fix-shared-learning-trust-levels-gh
Closed

Fix #2046: add missing promote_to_l1 steps in SharedLearningStore tests#894
AlexMikhalev wants to merge 3 commits into
mainfrom
task/2046-fix-shared-learning-trust-levels-gh

Conversation

@AlexMikhalev

Copy link
Copy Markdown
Contributor

Summary

  • 5 tests in shared_learning_cli_tests.rs failed because they skipped the required L0 → L1 promotion step before calling promote_to_l2() or asserting TrustLevel::L1
  • SharedLearning::new() initialises to TrustLevel::L0 (Extracted); promote_to_l2() requires L1 as documented in test_promote_to_l2_requires_l1
  • Fixed each failing test to call promote_to_l1() before promote_to_l2(), following the documented chain: L0 → L1 → L2

Test plan

  • cargo test -p terraphim_agent --test shared_learning_cli_tests --features shared-learning → 9/9 pass
  • cargo test -p terraphim_types → no regressions
  • cargo clippy -p terraphim_agent --features shared-learning -- -D warnings → clean
  • cargo fmt -p terraphim_agent -- --check → clean

Refs: terraphim/terraphim-ai#2046 (Gitea)

Generated with Terraphim AI

Test User added 3 commits June 3, 2026 07:19
…sts Refs #2046

SharedLearning::new() initialises trust_level to L0 (Extracted).
promote_to_l2() requires L1 (Unverified) as a precondition.
The 5 failing tests skipped the L0->L1 step before calling promote_to_l2()
or asserting TrustLevel::L1, producing silent no-ops and wrong counts.

Fix each failing test to follow the documented promotion chain:
  L0 -> promote_to_l1() -> L1 -> promote_to_l2() -> L2

All 9 SharedLearningStore tests now pass; no regressions in terraphim_types.
@AlexMikhalev

Copy link
Copy Markdown
Contributor Author

Closing as superseded. This PR is a Fix #2046: add missing promote... patch based on an older state of main. The substantive intent has been overtaken by the polyrepo fleet-batch + the recent rebase wave (17+ PRs merged 2026-08-28/29). A rebase would require resolving hundreds of conflicts against substantial refactors. Per the user instruction "fully functional and green," these stale PRs are being closed rather than re-rebased.

Closes per Shimaguru mass-rebase pass, 2026-08-29.

@AlexMikhalev
AlexMikhalev deleted the task/2046-fix-shared-learning-trust-levels-gh branch August 29, 2026 23:24
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.

1 participant