test: add TDD bug-capture test for #1152 — budget eviction deletes instead of demotes #1218

Merged
freemo merged 3 commits from tdd/m5-budget-eviction-delete into master 2026-04-02 16:50:50 +00:00

3 Commits

Author SHA1 Message Date
freemo 577dc745bb fix(test): remove forbidden type:ignore from Robot helper
CI / typecheck (pull_request) Failing after 1s
CI / security (pull_request) Failing after 2s
CI / quality (pull_request) Failing after 1s
CI / unit_tests (pull_request) Failing after 2s
CI / build (pull_request) Failing after 2s
CI / helm (pull_request) Successful in 38s
CI / lint (pull_request) Successful in 3m20s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / e2e_tests (pull_request) Successful in 16m29s
CI / integration_tests (pull_request) Successful in 22m6s
CI / status-check (pull_request) Failing after 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Has been skipped
Apply the same fix as the Behave steps: construct TieredFragment with
direct keyword arguments and use post-construction assignment for the
optional last_accessed field, eliminating the need for dict unpacking
and the associated type:ignore suppression.

ISSUES CLOSED: #1183
2026-04-02 08:39:54 +00:00
freemo a6e51e7788 fix(test): remove forbidden type:ignore by constructing TieredFragment directly
CI / lint (pull_request) Failing after 2s
CI / e2e_tests (pull_request) Failing after 2s
CI / build (pull_request) Failing after 1s
CI / helm (pull_request) Failing after 2s
CI / quality (pull_request) Has been cancelled
CI / typecheck (pull_request) Has been cancelled
CI / unit_tests (pull_request) Has been cancelled
CI / security (pull_request) Has been cancelled
CI / integration_tests (pull_request) Has been cancelled
CI / status-check (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled
CI / benchmark-regression (pull_request) Has been cancelled
CI / benchmark-publish (pull_request) Has been cancelled
CI / coverage (pull_request) Has been cancelled
Replace dict[str, object] unpacking with direct keyword construction
and post-construction assignment for the optional last_accessed field.
This eliminates the Pyright arg-type error without type suppression,
complying with CONTRIBUTING.md's strict no-type-ignore policy.

ISSUES CLOSED: #1183
2026-04-02 08:38:53 +00:00
brent.edwards 8cbccd17ca test: add TDD bug-capture test for #1152 — budget eviction deletes instead of demotes
CI / benchmark-publish (pull_request) Waiting to run
CI / lint (pull_request) Successful in 19s
CI / typecheck (pull_request) Successful in 1m5s
CI / quality (pull_request) Successful in 41s
CI / benchmark-regression (pull_request) Waiting to run
CI / build (pull_request) Successful in 22s
CI / helm (pull_request) Successful in 23s
CI / security (pull_request) Successful in 4m7s
CI / unit_tests (pull_request) Successful in 6m30s
CI / docker (pull_request) Successful in 11s
CI / e2e_tests (pull_request) Successful in 16m18s
CI / coverage (pull_request) Successful in 13m7s
CI / integration_tests (pull_request) Successful in 22m1s
CI / status-check (pull_request) Successful in 2s
Add Behave BDD scenarios and Robot Framework integration tests that
capture bug #1152: _enforce_hot_budget() permanently deletes hot-tier
fragments via del self._hot[oldest_id] instead of demoting them to the
warm tier.  Similarly, evict_lru() permanently deletes via del store[fid].

The specification (§Plan Lifecycle ACMS Actions) describes a downward
lifecycle ("Hot context archived to warm") that requires demotion, not
destruction.

Two Behave scenarios tagged @tdd_expected_fail @tdd_issue @tdd_issue_1152:
- Budget-evicted fragment should be demoted to warm, not deleted
- evict_lru-evicted fragment should be demoted to warm, not deleted

Two Robot Framework tests mirror the Behave scenarios with a Python
helper script for subprocess isolation.

All 11 nox sessions pass (lint, format, typecheck, security_scan,
dead_code, unit_tests, integration_tests, docs, build, benchmark,
coverage_report at 97%).

ISSUES CLOSED: #1183
2026-04-02 06:22:08 +00:00