Files
craft-ai-integrations/tools/mutation/mutation_egui.py
T
skylar taylor-barrick 0e55340771 Migrate shared AI widgets to egui 0.37 (#105)
* refactor(ai-egui): migrate shared widgets to egui 0.37

* egui037: qualify shared AI widgets and downstream dependency pins

* docs(ai-egui): record the committed migration qualification

* fix(ci): provide Vulkan snapshots and allow pinned fork sources

* test: make cancellation-before-load coverage deterministic
2026-10-25 16:23:02 +00:00

20 lines
1.3 KiB
Python

"""Deliberate-bug cases for group `eg`: the connection panel's lifecycle guards.
Loaded by mutation_check.py. Each case breaks one rule and names an existing ai-egui test that
must fail. The runner restores the original file in its `finally` block and writes the diagnostic
receipt to `tools/mutation/verification/eg-mutations.json` with per-case logs beside it.
Format: (name, file, old, new, package, test target, test filter).
"""
PANEL = 'crates/ai-egui/src/panel.rs'
EG = 'craft-ai-egui'
EG_CASES = [
# A forced second UI pass arrives after `poll` drained the queued Save. Without the frame
# dedup, the same press queues another store write and reports Saved twice.
('save-frame-dedup-removed', PANEL, 'if self.save_frame != Some(frame)\n && !self', 'if !self', EG, 'lib', 'panel::tests::a_save_consumed_by_poll_is_still_deduplicated_within_the_same_frame'),
# The finish guard has two independent checks. Removing the generation half must still be
# caught by the existing stale-answer unit test (same endpoint, older generation).
('answer-generation-ignored', PANEL, 'if capture.generation == self.generation\n && capture.endpoint == self.form.draft.endpoint.trim()', 'if capture.endpoint == self.form.draft.endpoint.trim()', EG, 'lib', 'panel::tests::a_stale_answer_is_dropped_by_the_panel_guard'),
]