CI / build (push) Has been cancelled
- Archive 79 completed framework-dev tasks from tasks/ -> tasks/complete/ - status.py: add --cleanup-done and --install-cleanup-schedule commands - Add scripts/automaton-cleanup.sh for periodic task archiving - Dashboard: rename 'Background' tab -> 'Agent', 'Cleanup' agent -> 'Completed Task Archiver', remove redundant group headers and pill badges, dim inactive agent placeholders - .rules.md: add Self-Documenting UI Names rule - New tests: test_cleanup_done.py, expanded test_app.py and test_task.py
22 lines
1014 B
Markdown
22 lines
1014 B
Markdown
# Code Review: fix-vram-model-prefix-match
|
|
|
|
## Reviewed Files
|
|
- `scripts/vram_detect.py` (`_lookup_model_context()`, `_KNOWN_MODEL_SUFFIXES`)
|
|
|
|
## Changes
|
|
Replaced raw `startswith()` with three-tier matching: exact match, `:` separator (Ollama tags), and `-` separator with known instruction-tuning suffix whitelist.
|
|
|
|
## Analysis
|
|
- **Correctness**: The three-tier approach correctly handles all test cases:
|
|
- `deepseek-r1:7b` matches via `:` separator ✓
|
|
- `llama-3.1-8b-instruct` matches via `-` + `instruct` suffix ✓
|
|
- `phi-4-mini-instruct` rejected (`mini` not in suffixes) ✓
|
|
- `gpt-4o-foo-unknown` rejected (`foo` not in suffixes) ✓
|
|
- `phi-40` rejected (no separator) ✓
|
|
- **Edge cases**: `gpt-4-turbo` is in the dict directly, so it matches via exact match (checked before `gpt-4` due to length-descending sort)
|
|
- **Maintainability**: The suffix whitelist is explicit and easy to extend
|
|
|
|
## Verdict: PASS
|
|
|
|
The fix is well-structured, handles all edge cases correctly, and is properly tested.
|