Skip to content

update venv_create.bat so it works a little smoother - #1

Merged
joeblowma merged 110 commits into
mainfrom
moar_stuffs
Oct 8, 2026
Merged

joeblowma merged 110 commits into
mainfrom
moar_stuffs

Conversation

@joeblowma

Copy link
Copy Markdown
Owner
  • codex reworked py version detection so it's hopefully less likely to break again
  • added a bunch of (likely ineffective) errorlevel checks, probably breaks somewhere for someone...
  • added venv_delete to clean up an installed venv (making it easier to debug prior point)
  • made venv_activate static rather than generated
  • set it up so venv is set consistently with installation options
  • asked myself multiple times... cmd shell script?- codex reworked py version detection so it's hopefully less likely to break again
  • added a bunch of (likely ineffective) errorlevel checks, probably breaks somewhere for someone...
  • added venv_delete to clean up an installed venv (making it easier to debug prior point)
  • made venv_activate static rather than generated
  • set it up so venv is set consistently with installation options
  • asked myself multiple times... cmd shell script?

joeblowma added 30 commits May 4, 2026 02:49
- codex reworked py version detection so it's hopefully less likely to break again
- added a bunch of (likely ineffective) errorlevel checks, probably breaks somewhere for someone...
- added venv_delete to clean up an installed venv (making it easier to debug prior point)
- made venv_activate static rather than generated
- set it up so venv is set consistently with installation options
- asked myself multiple times... cmd shell script?
revert some UI up/down arrows changed from a prior commit
- [x] Add a CLI option such as `--write-modelinfo-json`.
- [x] Reuse the existing `.modelinfo` naming schema and append `.json`, for example `model.safetensors.modelinfo.json`.
- [x] Serialize existing inspection output with the standard `json` module unless a stronger need appears.
- [x] Add matching GUI setting/action for JSON dump generation.
- [x] Verify output is stable, pretty-printed, and contains parsed metadata, tensor summaries, architecture details, and warnings.
- [x] Add a reader abstraction that can dispatch by extension: `.safetensors` first, then `.gguf`.
- [x] Use the installed `gguf` package from `.venv\Lib\site-packages\gguf`.
- [x] Review `.venv\Lib\site-packages\gguf\scripts\gguf_editor_gui.py` for PySide/PyQt patterns, metadata parsing, and tensor listing behavior.
- [x] Implement GGUF metadata extraction, tensor summaries, dtype counts, architecture hints, and model size reporting.
- [x] Keep GGUF support read-only for now; do not expose editing behavior.
todo 3
- [x] Investigate how Windows symlinks behave with `Path.resolve()` and file IDs.
- [x] Decide whether `.modelinfo` should be written beside the user-provided path or the resolved target path.
- [x] Preserve the user-provided path for default `.modelinfo` output and expose `resolved_filepath` separately.

todo 7
- [x] Add CLI and GUI smoke checks with at least one representative `.gguf` file.
- [x] Add a cache for parsed model summaries to speed up repeated launches.
- [x] Store enough identity data to detect moved, deleted, or changed files, such as canonical path, size, modified time, and format.
- [x] Default settings/cache to a portable app-local data directory with relocation overrides.
- [x] Use a cache index with per-entry files instead of one monolithic cache blob.
add keyboard iteration of raw item list via up/down page up/down
irgnore test/
- [x] Add an option if both behaviors are useful, for example `--resolve-output-path`.
- [x] Handle failures conservatively and show the chosen output path in CLI/GUI results.
- [x] Add format filters for `.safetensors`, `.gguf`, `.ckpt`, `.pt`, and `.pth` in a separated section of the filters popup.
- [x] Keep architecture/type filters separate from file-format filters so users can combine both.
2
- [x] Replace vague progress percentages with visible metrics, such as files discovered, files parsed, bytes scanned, and current directory.
- [x] Keep the progress bar visible during long directory scans and model-info loading.
- [x] Surface cancellation and partial-results behavior for long scans.

9
- [x] Evaluate the official `safetensors` Python package as a replacement or supplement for the current custom header reader.
- [x] Confirm whether `safe_open` can provide metadata, keys, tensor shapes, and dtypes without loading full tensor payloads or requiring Torch.
- [x] Test `framework="numpy"` and metadata-only/key-only flows to avoid a full Torch dependency.
- [x] If unsuitable, document why the custom header parser remains preferable.
5
- [x] Audit current `AnalysisWorker` behavior and CLI folder scanning for safe concurrency points.
- [x] Add a setting/CLI option such as `--threads N` for batch inspection.
- [x] Use bounded worker pools only for independent file reads; avoid parallel UI mutation.

9
- [x] Add a cache for scanned directories to speed up repeated launches.
- [x] Add a `load default libraries on startup` setting backed by the cached directory list.
- [x] Add optional startup pruning for missing files, with a warning before removing stale entries.
- [x] Add a settings action to clear the cache entirely.
- [x] Decide whether cache writes happen immediately after each scan or only after successful batch completion.
- [x] Research safe metadata-only handling for PyTorch checkpoint formats.
- [x] Treat pickle-based formats as unsafe by default; require explicit opt-in before loading.
- [x] Add clear warnings in CLI and GUI when a format may execute pickle deserialization.
- [x] Benchmark on large folders before enabling a default above one thread.
- [x] Keep cached startup entries for missing or temporarily unavailable files instead of pruning stale paths.
- [x] Sort filter menus with `ERROR` first, then `Unknown`, then alphabetical values.
- [x] Keep card and Raw dropdown ordering aligned with the current Data table sort order.
- [x] Organize settings into General, Cards, and Data Columns tabs.
- fixed in app icon on titlebar
- updated splash screen to a bitmap
- updated splash resizer to retain 0xFF00FF for transparencies
- separated requirements into runtime/build(dev)
- rewrite splash converter bmp->resize->png
- lint with ruff
- start setting up to build wheels as well

clean up unused imports
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Expand ModelInspector formats, GUI workflows, packaging, and releases

✨ Enhancement 🐞 Bug fix 🧪 Tests 📝 Documentation ⚙️ Configuration changes 🕐 40+ Minutes

Grey Divider

AI Description

• Reorganizes the inspector into reusable backend and GUI modules, adding GGUF, ONNX, and safe
 checkpoint metadata inspection.
• Adds model discovery, caching, diagnostics, Explorer workflows, themes, and safer file operations.
• Introduces wheel and Windows release builds, broader tests, and Windows virtual-environment
 helpers.
Diagram

graph TD
  CLI["CLI"] --> Pipeline["Inspection pipeline"] --> Readers["Reader registry"]
  GUI["Desktop GUI"] --> Explorer["Model Explorer"]
  GUI --> Pipeline
  Pipeline --> Cache[("Inspection cache")]
  Pipeline --> Reports["Model reports"]
  Explorer --> Cache
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Stage the migration by subsystem
  • ➕ Separates reader safety, GUI behavior, and release risks for review.
  • ➕ Makes regressions easier to attribute and revert.
  • ➖ Requires temporary compatibility boundaries and more integration work.
2. Keep the original entry points as compatibility wrappers
  • ➕ Preserves existing source-checkout commands and downstream imports during migration.
  • ➖ Maintains an additional entry-point surface and may delay removal of obsolete interfaces.

Recommendation: The shared reader registry and inspection pipeline are a sound direction for multiple formats and frontends. Prefer landing the format and safety foundation, GUI extraction, and packaging in reviewable stages; if this PR remains atomic, verify the removed root entry points and release artifacts explicitly.

Files changed (183) +35217 / -129

Enhancement (63) +13848 / -0
icon.pngAdd application icon artwork +0/-0

Add application icon artwork

• Adds the source icon used by the application and packaging workflow.

assets/icon.png

logo.pngAdd project logo +0/-0

Add project logo

• Adds logo artwork for project presentation.

assets/logo.png

splashpy.pngAdd splash artwork +0/-0

Add splash artwork

• Adds splash imagery for application presentation.

assets/splashpy.png

catppuccin.jsoncAdd Catppuccin theme +27/-0

Add Catppuccin theme

• Defines a selectable Catppuccin UI color palette.

assets/themes/catppuccin.jsonc

cursor.jsoncAdd Cursor theme +26/-0

Add Cursor theme

• Defines a selectable Cursor-inspired UI color palette.

assets/themes/cursor.jsonc

default.jsoncAdd default theme +27/-0

Add default theme

• Defines the bundled baseline UI colors.

assets/themes/default.jsonc

github.jsoncAdd GitHub theme +26/-0

Add GitHub theme

• Defines a selectable GitHub-inspired UI color palette.

assets/themes/github.jsonc

gruvbox.jsoncAdd Gruvbox theme +27/-0

Add Gruvbox theme

• Defines a selectable Gruvbox UI color palette.

assets/themes/gruvbox.jsonc

light.jsoncAdd light theme +26/-0

Add light theme

• Defines a bundled light UI color palette.

assets/themes/light.jsonc

purple.jsoncAdd purple theme +26/-0

Add purple theme

• Defines a selectable purple UI color palette.

assets/themes/purple.jsonc

icon.icoBundle a Windows application icon +0/-0

Bundle a Windows application icon

• Adds icon data alongside the source application.

src/assets/icon.ico

icon.pngBundle a source application icon +0/-0

Bundle a source application icon

• Adds PNG icon data alongside the source application.

src/assets/icon.png

architecture_keys.pyCatalog architecture tensor signatures +432/-0

Catalog architecture tensor signatures

• Defines tensor-key evidence for recognizing model architecture families.

src/back/architecture_keys.py

architecture_metadata.pyDetect architectures from model metadata +313/-0

Detect architectures from model metadata

• Combines metadata and tensor evidence into architecture identification.

src/back/architecture_metadata.py

architecture_variants.pyDistinguish architecture variants +438/-0

Distinguish architecture variants

• Adds rules for identifying variants within supported model families.

src/back/architecture_variants.py

cache_location.pyResolve configurable cache locations +120/-0

Resolve configurable cache locations

• Applies command-line and saved cache-directory selections.

src/back/cache_location.py

cache_verifier.pyVerify cached model entries +420/-0

Verify cached model entries

• Checks cached entries against current model and related-file identities.

src/back/cache_verifier.py

capability_evidence.pyRepresent capability evidence +60/-0

Represent capability evidence

• Defines evidence used to explain model-capability classifications.

src/back/capability_evidence.py

capability_facts.pyDerive model capability facts +399/-0

Derive model capability facts

• Builds capability and modality facts from inspected model evidence.

src/back/capability_facts.py

checkpoint_reader.pyRead checkpoint metadata under an explicit safety policy +187/-0

Read checkpoint metadata under an explicit safety policy

• Rejects checkpoints by default and supports bounded, metadata-only ZIP inspection without pickle deserialization.

src/back/checkpoint_reader.py

cli.pyMove target discovery and execution into CLI module +292/-0

Move target discovery and execution into CLI module

• Adds format and checkpoint options, concurrent inspection, JSON and modelinfo output, and cache-location arguments.

src/back/cli.py

companion_discovery.pyDiscover related model metadata +499/-0

Discover related model metadata

• Finds companion files and incorporates their identities and architecture evidence.

src/back/companion_discovery.py

estimator.pyEstimate model resource characteristics +467/-0

Estimate model resource characteristics

• Calculates model estimates from inspection and tensor information.

src/back/estimator.py

estimator_metadata.pyExtract inputs for model estimates +233/-0

Extract inputs for model estimates

• Normalizes metadata used by resource-estimation logic.

src/back/estimator_metadata.py

model_classification.pyClassify models and training details +419/-0

Classify models and training details

• Determines model types and related metadata from architecture and tensor evidence.

src/back/model_classification.py

modelinfo_diagnostics.pyExplain header-only inspection results +103/-0

Explain header-only inspection results

• Generates diagnostic content for modelinfo reports without loading tensor payloads.

src/back/modelinfo_diagnostics.py

onnx_reader.pyAdd metadata-only ONNX inspection +454/-0

Add metadata-only ONNX inspection

• Extracts ONNX model metadata and tensor summaries through a bounded reader.

src/back/onnx_reader.py

reader_registry.pyDispatch formats through a reader registry +202/-0

Dispatch formats through a reader registry

• Registers readers by extension, exposes safety capabilities, and coordinates sharded header reads.

src/back/reader_registry.py

reporting.pyCentralize console and modelinfo reports +321/-0

Centralize console and modelinfo reports

• Generates human-readable reports and structured JSON modelinfo dumps from inspections.

src/back/reporting.py

shard_discovery.pyDiscover and aggregate model shards +279/-0

Discover and aggregate model shards

• Recognizes safetensors index files and combines related shard headers into one inspection.

src/back/shard_discovery.py

sidecar_discovery.pyDiscover model sidecars +138/-0

Discover model sidecars

• Finds related metadata files and tracks their identities for inspection and caching.

src/back/sidecar_discovery.py

tensor_summary.pySummarize tensor types and components +267/-0

Summarize tensor types and components

• Calculates component, precision, and dtype summaries from tensor headers.

src/back/tensor_summary.py

theme_loader.pyLoad and apply UI themes +383/-0

Load and apply UI themes

• Reads bundled and custom theme colors for the desktop application.

src/back/theme_loader.py

theme_store.pyManage persistent theme settings +261/-0

Manage persistent theme settings

• Stores theme selections and editable theme data.

src/back/theme_store.py

advanced_viewer.pyAdd detailed model inspection dialog +442/-0

Add detailed model inspection dialog

• Displays expanded model, metadata, and tensor details in the desktop interface.

src/front/advanced_viewer.py

cache_identity.pyExpose cached inspection identities +66/-0

Expose cached inspection identities

• Retrieves identity snapshots used to validate and synchronize GUI cache entries.

src/front/cache_identity.py

cache_load_controller.pyCoordinate cached-result loading +188/-0

Coordinate cached-result loading

• Connects cached model data to the GUI without blocking normal interaction.

src/front/cache_load_controller.py

cache_load_worker.pyLoad cache data in a worker +98/-0

Load cache data in a worker

• Moves potentially expensive cached-result loading off the GUI thread.

src/front/cache_load_worker.py

data_columns.pyDefine model-table columns +68/-0

Define model-table columns

• Centralizes available data columns for Explorer and settings.

src/front/data_columns.py

explorer_data.pyPrepare model Explorer rows +369/-0

Prepare model Explorer rows

• Projects inspection results into data suitable for the Explorer table.

src/front/explorer_data.py

explorer_metadata.pyPresent Explorer metadata +499/-0

Present Explorer metadata

• Formats inspected model metadata for Explorer display.

src/front/explorer_metadata.py

explorer_tab.pyAdd model Explorer tab +542/-0

Add model Explorer tab

• Provides tabular model browsing, selection, and interaction.

src/front/explorer_tab.py

file_operation_controller.pyCoordinate model file operations +283/-0

Coordinate model file operations

• Connects user-initiated file actions to validation and background execution.

src/front/file_operation_controller.py

file_operation_worker.pyPerform guarded file operations +277/-0

Perform guarded file operations

• Runs model file operations outside the UI thread with safety checks.

src/front/file_operation_worker.py

filter_widgets.pyAdd Explorer filtering controls +304/-0

Add Explorer filtering controls

• Provides interactive widgets for narrowing displayed models.

src/front/filter_widgets.py

help_window.pyAdd application help window +16/-0

Add application help window

• Provides a dedicated desktop help display.

src/front/help_window.py

metadata_ui.pyBuild metadata presentation widgets +431/-0

Build metadata presentation widgets

• Formats model metadata for interactive desktop views.

src/front/metadata_ui.py

model_path_label.pyAdd model-path display widget +111/-0

Add model-path display widget

• Presents model paths within desktop inspection views.

src/front/model_path_label.py

scan_projection.pyBuffer scan results for the GUI +111/-0

Buffer scan results for the GUI

• Projects background scan results into the desktop display lifecycle.

src/front/scan_projection.py

settings_data_support.pySupport configurable data columns +162/-0

Support configurable data columns

• Provides shared definitions and helpers for data-display settings.

src/front/settings_data_support.py

settings_data_tab.pyAdd data settings tab +495/-0

Add data settings tab

• Exposes controls for model data and column presentation.

src/front/settings_data_tab.py

settings_dialog.pyBuild expanded settings dialog +501/-0

Build expanded settings dialog

• Integrates application, data, and theme settings in the desktop interface.

src/front/settings_dialog.py

smart_column_controller.pyManage adaptive table columns +286/-0

Manage adaptive table columns

• Controls Explorer column grouping and display behavior.

src/front/smart_column_controller.py

startup_arguments.pyParse desktop startup options +82/-0

Parse desktop startup options

• Handles GUI launch arguments, including settings and cache-path overrides.

src/front/startup_arguments.py

startup_cache_controller.pyManage startup cache restoration +83/-0

Manage startup cache restoration

• Coordinates loading cached models when the desktop application opens.

src/front/startup_cache_controller.py

tensor_root_summary.pySummarize tensor root groups +153/-0

Summarize tensor root groups

• Groups tensor keys into digestible root-level summaries for inspection views.

src/front/tensor_root_summary.py

theme_editor_support.pySupport theme editing controls +93/-0

Support theme editing controls

• Provides helpers for desktop theme previews and edits.

src/front/theme_editor_support.py

theme_tab.pyAdd theme settings tab +510/-0

Add theme settings tab

• Allows users to select, preview, and customize UI themes.

src/front/theme_tab.py

model_readers.pyAdd model-format readers and discovery helpers +491/-0

Add model-format readers and discovery helpers

• Defines supported formats, safetensors and GGUF header handling, and registry-backed read operations.

src/model_readers.py

modelinfo.pyBuild modelinfo inspection output +315/-0

Build modelinfo inspection output

• Formats inspection data for modelinfo reporting and diagnostic consumers.

src/modelinfo.py

venv_activate.batActivate the configured Windows environment +0/-0

Activate the configured Windows environment

• Uses the static activation helper and the environment settings written during creation.

venv_activate.bat

venv_create.batCreate a managed Python virtual environment +0/-0

Create a managed Python virtual environment

• Switches to uv and Python 3.12, writes reusable environment variables, and adds dependency and error checks.

venv_create.bat

venv_delete.batAdd Windows virtual-environment cleanup +0/-0

Add Windows virtual-environment cleanup

• Confirms the user's intent before removing the configured environment and build directory.

venv_delete.bat

Refactor (23) +6360 / -0
app_paths.pyCentralize settings and cache locations +131/-0

Centralize settings and cache locations

• Resolves application paths for source, installed, and configured environments.

src/app_paths.py

adapter_detection.pyExtract adapter detection +260/-0

Extract adapter detection

• Identifies adapter families from model metadata and tensor-key evidence.

src/back/adapter_detection.py

cache_invalidation.pyCentralize cache invalidation +41/-0

Centralize cache invalidation

• Provides shared invalidation behavior when cached model information becomes stale.

src/back/cache_invalidation.py

cache_storage.pySeparate persistent cache stores +347/-0

Separate persistent cache stores

• Persists compact inspection entries, companion records, and directory scans through dedicated stores.

src/back/cache_storage.py

inspection_pipeline.pyShare cache-aware model inspection +381/-0

Share cache-aware model inspection

• Orchestrates header readers, related-file discovery, classification, capability facts, and cached results for CLI and GUI.

src/back/inspection_pipeline.py

inspection_summary.pyBuild structured inspection summaries +168/-0

Build structured inspection summaries

• Extracts concise inspection information for consumers of model results.

src/back/inspection_summary.py

settings_store.pyPersist application settings +159/-0

Persist application settings

• Provides shared settings loading and saving for CLI and desktop features.

src/back/settings_store.py

background_tasks.pyMove scans into background workers +288/-0

Move scans into background workers

• Adds asynchronous discovery and analysis workers to keep desktop scans responsive.

src/background_tasks.py

advanced_viewer_layout.pySeparate advanced-viewer layout +283/-0

Separate advanced-viewer layout

• Builds the widgets and layout for detailed inspection views.

src/front/advanced_viewer_layout.py

analysis_controller.pyCoordinate GUI analysis jobs +417/-0

Coordinate GUI analysis jobs

• Handles starting and collecting desktop inspection work.

src/front/analysis_controller.py

application.pyConfigure the desktop application +397/-0

Configure the desktop application

• Initializes application-level behavior, UI services, and startup flow.

src/front/application.py

discovery_controller.pyCoordinate GUI file discovery +211/-0

Coordinate GUI file discovery

• Manages discovery tasks and their integration with the desktop scan workflow.

src/front/discovery_controller.py

integration_controller.pyBind Explorer and cache features to the main window +0/-0

Bind Explorer and cache features to the main window

• Connects detailed views, table layout, cache loading, and related optional GUI workflows.

src/front/integration_controller.py

model_card.pyExtract model-card widget +322/-0

Extract model-card widget

• Displays compact model summaries and card interactions.

src/front/model_card.py

selection_controller.pyCoordinate model selection +404/-0

Coordinate model selection

• Keeps selection and associated actions consistent across desktop views.

src/front/selection_controller.py

settings_dialog.py.bakAdd backup copy of settings dialog +341/-0

Add backup copy of settings dialog

• Adds an alternate saved version of the settings dialog source.

src/front/settings_dialog.py.bak

view_controller.pyCoordinate desktop result views +493/-0

Coordinate desktop result views

• Manages presentation and switching among inspected-model views.

src/front/view_controller.py

window_core.pyExtract main-window state and actions +470/-0

Extract main-window state and actions

• Provides core window behavior, model-file controls, and connections to the reorganized GUI.

src/front/window_core.py

window_layout.pyExtract main-window layout +376/-0

Extract main-window layout

• Builds the main window's controls and model display areas.

src/front/window_layout.py

window_lifecycle.pyManage main-window lifecycle +212/-0

Manage main-window lifecycle

• Coordinates startup, shutdown, and other window lifecycle behavior.

src/front/window_lifecycle.py

gui.pyProvide the packaged GUI entry point +104/-0

Provide the packaged GUI entry point

• Starts the desktop application using the extracted front-end modules.

src/gui.py

inspect_model.pyProvide the packaged CLI entry point +69/-0

Provide the packaged CLI entry point

• Preserves an inspection entry point while delegating command behavior to backend modules.

src/inspect_model.py

model_cache.pyExpose shared inspection-cache API +486/-0

Expose shared inspection-cache API

• Coordinates cached inspections and supporting stores through reusable cache functions.

src/model_cache.py

Documentation (21) +1121 / -123
AGENTS.mdDocument repository guidance for agents +98/-0

Document repository guidance for agents

• Adds project conventions and guidance for automated contributors.

AGENTS.md

DONE.mdRecord completed project work +614/-0

Record completed project work

• Documents completed implementation and planning tasks.

DONE.md

LICENSEAdjust license text +1/-1

Adjust license text

• Changes a line in the project's license file.

LICENSE

README.mdDocument the expanded ModelInspector +170/-122

Document the expanded ModelInspector

• Replaces the safetensors-only introduction with installation, format-safety, CLI, GUI, and release guidance.

README.md

REJECT.mdRecord rejected project ideas +29/-0

Record rejected project ideas

• Adds planning documentation for approaches not being pursued.

REJECT.md

TODO.mdTrack remaining project work +141/-0

Track remaining project work

• Adds a project task list covering future implementation work.

TODO.md

adv1_overview.pngAdd advanced overview screenshot +0/-0

Add advanced overview screenshot

• Illustrates the advanced viewer's overview.

assets/ss/adv1_overview.png

adv2_card.pngAdd advanced card screenshot +0/-0

Add advanced card screenshot

• Illustrates the advanced viewer's card display.

assets/ss/adv2_card.png

adv3_meta.pngAdd advanced metadata screenshot +0/-0

Add advanced metadata screenshot

• Illustrates the advanced metadata display.

assets/ss/adv3_meta.png

adv4_tensor.pngAdd tensor-view screenshot +0/-0

Add tensor-view screenshot

• Illustrates advanced tensor inspection.

assets/ss/adv4_tensor.png

adv5_embed.pngAdd embedding-view screenshot +0/-0

Add embedding-view screenshot

• Illustrates advanced embedding inspection.

assets/ss/adv5_embed.png

badge.pngAdd interface badge image +0/-0

Add interface badge image

• Supplies badge artwork for project presentation.

assets/ss/badge.png

icontag.pngAdd README icon image +0/-0

Add README icon image

• Supplies the icon displayed in the revised README.

assets/ss/icontag.png

main1_cards.pngAdd model-cards screenshot +0/-0

Add model-cards screenshot

• Illustrates the main card interface.

assets/ss/main1_cards.png

main2_data.pngAdd data-view screenshot +0/-0

Add data-view screenshot

• Illustrates the main data interface.

assets/ss/main2_data.png

main3_raw.pngAdd raw-view screenshot +0/-0

Add raw-view screenshot

• Illustrates the raw inspection interface.

assets/ss/main3_raw.png

set1_gen.pngAdd general-settings screenshot +0/-0

Add general-settings screenshot

• Illustrates general application settings.

assets/ss/set1_gen.png

set2_data.pngAdd data-settings screenshot +0/-0

Add data-settings screenshot

• Illustrates data and column settings.

assets/ss/set2_data.png

set3_themedk.pngAdd dark-theme screenshot +0/-0

Add dark-theme screenshot

• Illustrates the dark theme settings interface.

assets/ss/set3_themedk.png

set3_themelt.pngAdd light-theme screenshot +0/-0

Add light-theme screenshot

• Illustrates the light theme settings interface.

assets/ss/set3_themelt.png

AGENTS.mdDocument test-suite guidance +68/-0

Document test-suite guidance

• Adds contributor instructions specific to tests.

tests/AGENTS.md

Other (76) +13888 / -6
prepare_release.pyValidate and assemble release artifacts +95/-0

Validate and assemble release artifacts

• Checks the release tag against the project version and prepares wheel and Windows assets for publication.

.github/scripts/prepare_release.py

build.ymlBuild and exercise distribution artifacts +219/-0

Build and exercise distribution artifacts

• Adds a cross-platform Python wheel matrix, install smoke tests, artifact uploads, and a Windows executable build.

.github/workflows/build.yml

release.ymlPublish versioned GitHub releases +54/-0

Publish versioned GitHub releases

• Reuses the build workflow for tags, validates downloaded artifacts, and publishes a GitHub release.

.github/workflows/release.yml

.gitignoreIgnore generated project outputs +29/-5

Ignore generated project outputs

• Adjusts exclusions for the reorganized project and generated development or build files.

.gitignore

.graphifyignoreExclude generated files from graphing +19/-0

Exclude generated files from graphing

• Adds graph-tool exclusions for project artifacts and directories.

.graphifyignore

.pylintrcAdd Pylint configuration +661/-0

Add Pylint configuration

• Defines repository-wide Pylint behavior for the expanded Python codebase.

.pylintrc

.ruff.tomlAdd Ruff configuration +33/-0

Add Ruff configuration

• Defines linting settings for the Python project.

.ruff.toml

_setVersionHere.txtDefine the release version +1/-0

Define the release version

• Adds the version value consumed by packaging and release tooling.

_setVersionHere.txt

GetVersion.pyGenerate version information for builds +6/-0

Generate version information for builds

• Adds a helper to prepare version data used during artifact creation.

assets/GetVersion.py

ResizeSplash.pyGenerate resized splash artwork +83/-0

Generate resized splash artwork

• Adds image processing for build-time splash assets.

assets/ResizeSplash.py

lineclean.pyAdd text-cleaning utility +204/-0

Add text-cleaning utility

• Adds an asset-side utility for cleaning lines of text.

assets/lineclean.py

versionTemplate.ymlAdd Windows version-resource template +12/-0

Add Windows version-resource template

• Provides version metadata for packaged Windows builds.

assets/versionTemplate.yml

pyproject.tomlDefine installable ModelInspector package +57/-0

Define installable ModelInspector package

• Adds Python 3.12+ packaging metadata, dependencies, console scripts, and bundled assets.

pyproject.toml

requirements-dev.txtDeclare development and build dependencies +14/-0

Declare development and build dependencies

• Adds dependencies needed for testing, linting, and distribution builds.

requirements-dev.txt

requirements.txtUpdate runtime dependencies +2/-1

Update runtime dependencies

• Aligns source-install requirements with the expanded reader and GUI application.

requirements.txt

build_version.pyExpose the build version +35/-0

Expose the build version

• Provides the version consumed by package metadata and the application.

src/build_version.py

conftest.pyConfigure shared test fixtures +47/-0

Configure shared test fixtures

• Sets up common fixtures and environment behavior for the expanded test suite.

tests/conftest.py

test_advanced_viewer.pyTest detailed inspection views +334/-0

Test detailed inspection views

• Covers advanced viewer rendering and interactions.

tests/test_advanced_viewer.py

test_app_paths.pyTest application path resolution +155/-0

Test application path resolution

• Checks settings and resource paths in supported layouts.

tests/test_app_paths.py

test_backend_phase2.pyTest expanded backend classification +464/-0

Test expanded backend classification

• Exercises backend inspection features introduced with the reorganized pipeline.

tests/test_backend_phase2.py

test_background_tasks.pyTest background scan workers +292/-0

Test background scan workers

• Covers asynchronous discovery and analysis behavior.

tests/test_background_tasks.py

test_cache_load.pyTest cached-result loading +353/-0

Test cached-result loading

• Checks GUI cache loading and result restoration.

tests/test_cache_load.py

test_cache_locations.pyTest configurable cache paths +240/-0

Test configurable cache paths

• Verifies cache-directory overrides and location selection.

tests/test_cache_locations.py

test_cache_menu_integration.pyTest cache menu integration +444/-0

Test cache menu integration

• Checks cache actions exposed by the desktop interface.

tests/test_cache_menu_integration.py

test_cache_sidecar_integration.pyTest cache and sidecar identities +242/-0

Test cache and sidecar identities

• Checks cached results when related sidecar metadata changes.

tests/test_cache_sidecar_integration.py

test_cache_sync_ui.pyTest GUI cache synchronization +260/-0

Test GUI cache synchronization

• Verifies desktop views remain synchronized with cached inspections.

tests/test_cache_sync_ui.py

test_capability_evidence.pyTest capability evidence +209/-0

Test capability evidence

• Checks how model evidence becomes capability classifications.

tests/test_capability_evidence.py

test_card_advanced_flow.pyTest card-to-detail navigation +329/-0

Test card-to-detail navigation

• Exercises opening detailed inspection from model cards.

tests/test_card_advanced_flow.py

test_checkpoint_no_prompt.pyTest noninteractive checkpoint safety +155/-0

Test noninteractive checkpoint safety

• Checks checkpoint handling without unexpected interactive prompts.

tests/test_checkpoint_no_prompt.py

test_checkpoint_routes.pyTest checkpoint reader routing +187/-0

Test checkpoint reader routing

• Verifies opt-in metadata inspection and default checkpoint rejection.

tests/test_checkpoint_routes.py

test_companion_metadata.pyTest companion metadata discovery +472/-0

Test companion metadata discovery

• Covers related-file metadata and its effect on inspection results.

tests/test_companion_metadata.py

test_data_quantization_fallback.pyTest quantization display fallback +57/-0

Test quantization display fallback

• Checks data presentation when explicit quantization values are absent.

tests/test_data_quantization_fallback.py

test_explorer_metadata.pyTest Explorer metadata presentation +332/-0

Test Explorer metadata presentation

• Checks model metadata projected into Explorer rows.

tests/test_explorer_metadata.py

test_explorer_tab.pyTest model Explorer tab +283/-0

Test model Explorer tab

• Exercises browsing and interaction in the tabular model view.

tests/test_explorer_tab.py

test_file_operation_safety.pyTest file-operation safeguards +413/-0

Test file-operation safeguards

• Covers validation and failure handling for potentially destructive model actions.

tests/test_file_operation_safety.py

test_file_operations.pyTest model file actions +480/-0

Test model file actions

• Exercises GUI-driven file operations and worker behavior.

tests/test_file_operations.py

test_filter_widgets.pyTest Explorer filters +139/-0

Test Explorer filters

• Checks the behavior of model-filter controls.

tests/test_filter_widgets.py

test_flux_lora_precedence.pyTest Flux LoRA classification precedence +82/-0

Test Flux LoRA classification precedence

• Checks ambiguous architecture and adapter signals are classified consistently.

tests/test_flux_lora_precedence.py

test_frozen_help.pyTest help in frozen builds +61/-0

Test help in frozen builds

• Verifies help behavior in packaged application contexts.

tests/test_frozen_help.py

test_gui_projection.pyTest GUI result projection +451/-0

Test GUI result projection

• Checks mapping of inspection results into desktop views.

tests/test_gui_projection.py

test_gui_scan_lifecycle.pyTest desktop scan lifecycle +437/-0

Test desktop scan lifecycle

• Covers scan startup, completion, and UI state transitions.

tests/test_gui_scan_lifecycle.py

test_inspection_summary.pyTest structured inspection summaries +286/-0

Test structured inspection su

[Comment truncated to fit github's 65,536-char limit.]

@qodo-code-review

qodo-code-review Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (3) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Failed requirement installs are reported as success ✓ Resolved
Description
In venv_create.bat, the %ERRORLEVEL% checks inside the parenthesized requirements-installation
blocks are expanded before uv pip install runs, so they read the pre-block value rather than the
install result. If either requirements installation fails, the script can continue through package
listing and report “Done” and “Setup complete,” leaving a partially installed environment.
Code

venv_create.bat[R127-129]

        uv pip install -r requirements.txt
+        IF %ERRORLEVEL% NEQ 0 (goto errorexit)
+        echo Done.
Evidence
Both uv pip install commands and their %ERRORLEVEL% checks are inside parenthesized if exist
blocks, where cmd expands %ERRORLEVEL% when it parses the block rather than after the command
runs. Although setlocal enabledelayedexpansion is enabled, the checks do not use !ERRORLEVEL!;
the same pattern appears in the requirements-dev block, and the success messages follow the checks.

venv_create.bat[116-160]
venv_create.bat[115-158]
venv_create.bat[167-177]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Requirements installation failures can be ignored because `%ERRORLEVEL%` is expanded before the install commands run inside parenthesized blocks.

## Fix Focus Areas
- venv_create.bat[127-129]
- venv_create.bat[152-154]

## Recommended Fix
Immediately after each `uv pip install` command, replace `IF %ERRORLEVEL% NEQ 0 (goto errorexit)` with an execution-time check such as `if errorlevel 1 goto errorexit` or `IF !ERRORLEVEL! NEQ 0 (goto errorexit)`. Delayed expansion is already enabled.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Frozen help closes before users can read it ✗ Dismissed
Description
_run_frozen_help() returns immediately after showing the help window, without running the
application event loop. When a windowed build has no stdout and receives --help, gui.main()
exits as soon as that function returns.
Code

src/front/application.py[R303-308]

+def _run_frozen_help() -> int:
+    """Show ``--help`` in a window when there is no console to print to."""
+    _application = QApplication.instance() or QApplication(sys.argv)
+    close_startup_splash()
+    show_help_window(format_help())
+    return 0
Evidence
The help branch returns without entering the normal application event loop, and the entry point
exits with that return value.

src/front/application.py[303-308]
src/front/application.py[370-382]
src/gui.py[98-104]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Frozen `--help` exits before its window remains visible.
## Fix Focus Areas
- src/front/application.py[303-308]
## Recommended Fix
Keep the Qt help window open until the user closes it, then return its exit status.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

3. One shard filename can stop a scan ✓ Resolved
Description
_parse_shard_name() passes unrestricted numeric filename components to int() without handling
conversion failure. A directory entry with thousands of digits in its shard count can raise an
exception while iter_model_paths() is enumerating otherwise valid models.
Code

src/back/shard_discovery.py[R79-80]

+    count = int(groups["count"])
+    index = int(groups["index"])
Evidence
Shard discovery converts directory-entry names without catching conversion errors, and scanning does
not catch errors from discovery.

src/back/shard_discovery.py[74-83]
src/model_readers.py[452-477]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
An oversized numeric shard filename can abort model discovery.
## Fix Focus Areas
- src/back/shard_discovery.py[74-83]
## Recommended Fix
Limit numeric component lengths and treat conversion failures as an unrecognized shard filename.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


4. Compile cleanup wipes the user's settings and cache 🐞 Bug ☼ Reliability
Description
win_clean.bat, described as removing files created by the compile script, also runs rmdir /s /q on
.\src\.model-inspector. In a source checkout, app_paths.app_data_dir() uses that folder as the
app's persistent data directory. Running the build cleanup therefore silently deletes the user's
saved settings, user themes and the whole inspection cache, which are not build output.
Code

win_clean.bat[64]

+    ".\src\.model-inspector"
Evidence
app_base_dir() returns the directory holding app_paths.py (src/) when not frozen. app_data_dir()
returns app_base_dir()/.model-inspector whenever it exists, and settings, cache and user themes
are all derived from it. win_clean.bat lists that same folder for recursive deletion next to
build/dist.

win_clean.bat[59-72]
src/app_paths.py[9-12]
src/app_paths.py[84-97]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
win_clean.bat deletes src/.model-inspector, the source-mode settings and cache directory.

## Fix Focus Areas
- win_clean.bat[59-72]

## Recommended Fix
Remove `".\src\.model-inspector"` from the directory list. If deleting it is wanted, put it behind a separate, clearly labelled prompt.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


5. Venv setup breaks in folders with spaces 🐞 Bug ☼ Reliability
Description
venv_create.bat builds VENV_PATHED from the absolute %CD% but uses it unquoted for the
.gitignore redirect; it also passes !VENV_NAME! unquoted to uv venv. When the checkout path
contains spaces, the redirect cannot reliably target the environment’s .gitignore, and an
errorexit there leaves venvars.bat unwritten.
Code

venv_create.bat[R79-80]

+) > !VENV_PATHED!\.gitignore
+IF %ERRORLEVEL% NEQ 0 (goto errorexit)
Evidence
Line 61 sets VENV_PATHED=%CD%\!VENV_NAME!, and line 79 uses that value as an unquoted redirect
destination. Line 67 also passes !VENV_NAME! unquoted to uv venv, whereas line 100 quotes
VENV_PATHED when activating the environment. The previous relative %VENV_NAME%\.gitignore
destination did not include spaces from the parent path.

venv_create.bat[58-91]
venv_create.bat[58-61]
venv_create.bat[73-80]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Unquoted environment paths and command arguments can break setup when the working directory contains spaces.

## Fix Focus Areas
- venv_create.bat[58-91]

## Recommended Fix
Quote the complete redirect destination as `) > "!VENV_PATHED!\.gitignore"`, and quote the `!VENV_NAME!` values passed as the `uv venv` prompt and environment-name argument. Use `set "VENV_PATH=..."` when generating `venvars.bat`. Remove the unreachable `set VENV_NAME=%CD%\.venv` default on line 60, which would produce a doubled `%CD%\%CD%` path if it ran.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


View medium (12)
6. Splash resize failures always exit with success ✓ Resolved
Description
alter_image returns False after a successful resize (it falls through to return False) and
main() sets ret_val = 1 only when alter_image returns True. main()'s return value is also
thrown away because the script calls main() instead of sys.exit(main()). The process therefore
always exits with code 0, so neither the CI 'Generate bundled assets' step nor win_compile.bat can
notice a failed splash conversion, even though the header comment promises a non-zero exit on
failure.
Code

assets/ResizeSplash.py[R82-83]

+if __name__ == "__main__":
+    main()
Evidence
Lines 50-61: the success path never returns True. Lines 66-72: ret_val = 1 is set only when the
call returns True, which inverts the meaning. Lines 82-83: main() is called without sys.exit.
The workflow runs python assets/ResizeSplash.py ... at build.yml lines 51 and 144 and relies on
the exit code. Line 56 is also missing its f prefix, so the error message prints a literal
{inFilePath}.

assets/ResizeSplash.py[44-83]
.github/workflows/build.yml[47-52]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
ResizeSplash.py always exits 0, and its internal success flag is inverted.

## Fix Focus Areas
- assets/ResizeSplash.py[44-83]

## Recommended Fix
Return True after a successful resize and save. In `main`, set `ret_val = 1` when `alter_image` returns False and also on parse errors or a bad arg count. Call `sys.exit(main())`. Add the missing `f` prefix to the error message on line 56.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


7. Original author's copyright notice removed ✓ Resolved
Description
The LICENSE change replaces Copyright (c) 2026 MNeMoNiCuZ with Copyright (c) 2026 joeblowma
instead of adding the new holder. The MIT terms in the same file require the original copyright
notice to be kept in all copies or substantial portions, so redistributed builds would no longer
meet the license.
Code

LICENSE[3]

+Copyright (c) 2026 joeblowma
Evidence
The diff removes the original holder's line (old line 3) and adds a new one in its place. The MIT
text kept in this LICENSE requires the copyright notice to be included in all copies.

LICENSE[1-10]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The original MIT copyright holder line was replaced instead of kept.

## Fix Focus Areas
- LICENSE[3-3]

## Recommended Fix
Restore `Copyright (c) 2026 MNeMoNiCuZ` and add `Copyright (c) 2026 joeblowma` on a separate line.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


8. Cancelling a rescan removes model cards ✓ Resolved
Description
_start_analysis() removes existing selected results immediately when replace_existing=True,
before any replacement inspection finishes. If the selected rescan is cancelled before a result
arrives, its prior cards are not restored to the current window.
Code

src/front/analysis_controller.py[R60-65]

+        if replace_existing:
+            path_set = set(paths)
+            self._results = [
+                data for data in self._results if data.get("filepath") not in path_set
+            ]
+            self._rebuild_views_from_results()
Evidence
Selected rescan requests replacement; the analysis controller removes old results up front, while
cancellation stops future emissions and does not restore them.

src/front/selection_controller.py[277-298]
src/front/analysis_controller.py[60-65]
src/background_tasks.py[222-235]
src/front/analysis_controller.py[321-342]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Selected rescan removes existing results before successful replacements exist.
## Fix Focus Areas
- src/front/analysis_controller.py[60-65]
- src/front/analysis_controller.py[321-342]
## Recommended Fix
Retain each old result until its replacement arrives, or restore remaining old results on cancellation and failure.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


9. Checkpoint entry limits apply too late ✓ Resolved
Description
The metadata-only checkpoint reader calls archive.infolist() before applying
MAX_ARCHIVE_ENTRIES. A checkpoint with a very large ZIP directory must have all entries parsed
before the intended inspection limit takes effect.
Code

src/back/checkpoint_reader.py[R96-99]

+        infos = archive.infolist()
+        examined = infos[:MAX_ARCHIVE_ENTRIES]
+        names = [info.filename for info in examined]
+        metadata["checkpoint.entries"] = names
Evidence
The reader materializes archive entries first and slices them only afterward; metadata checkpoint
inspection routes into this reader.

src/back/checkpoint_reader.py[88-99]
src/back/checkpoint_reader.py[128-155]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The checkpoint entry cap is applied after the full archive entry list is obtained.
## Fix Focus Areas
- src/back/checkpoint_reader.py[88-99]
## Recommended Fix
Check archive directory size or entry count before materializing and processing the full entry list.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


10. A cache override leaves model data behind ✓ Resolved
Description
apply_cache_location() handles --cachedir by setting SMI_CACHE_DIR but does not clear an
existing SMI_MODEL_CACHE_DIR. When both are present, model cache entries remain in the old
directory while ancillary caches use the requested directory.
Code

src/back/cache_location.py[R94-96]

+    4. persisted most-recently-used existing history directory
+       (sets ``SMI_MODEL_CACHE_DIR``)
+    5. the default ``app_data_dir()/cache`` (left to ``app_paths.cache_dir``)
Evidence
The model-cache path prioritizes its dedicated environment variable, whereas the changed branch
updates only the general cache variable.

src/back/cache_location.py[83-104]
src/app_paths.py[104-114]
src/back/cache_storage.py[75-77]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
An existing model-cache override takes precedence over the explicit cache-directory option.
## Fix Focus Areas
- src/back/cache_location.py[83-104]
- src/app_paths.py[104-114]
## Recommended Fix
Resolve the effective model-cache directory when `--cachedir` is specified, including any existing model-cache override, so caches do not split unexpectedly.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


11. Compile script ignores asset generation failures 🐞 Bug ≡ Correctness
Description
win_compile.bat checks %ERRORLEVEL% inside parenthesized asset-generation blocks, so the checks
use a status expanded before the icon conversion, ResizeSplash.py, or GetVersion.py command
runs. If one of those commands fails, compilation can continue to pyi-makespec or pyinstaller
with missing or outdated assets, causing a less obvious later failure or producing an exe without
them.
Code

win_compile.bat[R52-54]

+    python -c "from PIL import Image; img = Image.open('assets/icon.png'); img.save('assets/icon.ico', format='ICO', sizes=[(256,256),(128,128),(64,64),(48,48),(32,32),(16,16)])"
+    if %ERRORLEVEL% neq 0 (
+        echo [ERROR] Icon conversion failed.
Evidence
The icon, splash, and version-generation commands and their %ERRORLEVEL% checks are each inside a
parenthesized existence check (lines 50–80). Because cmd expands %ERRORLEVEL% when it parses the
block, the subsequent check cannot reliably detect the generation command’s failure; the splash
failure message also incorrectly says “Icon conversion failed” (line 65).

win_compile.bat[50-80]
win_compile.bat[49-79]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Asset-generation failure checks in `win_compile.bat` read a status expanded before the generation commands run, allowing compilation to proceed after an icon, splash, or version-generation failure.

## Fix Focus Areas
- win_compile.bat[49-80]

## Recommended Fix
Replace the `%ERRORLEVEL%` checks inside the parenthesized blocks with `if errorlevel 1 (...)` or `if !ERRORLEVEL! neq 0 (...)` (delayed expansion is already enabled). Correct the splash step’s failure message so it identifies splash generation rather than icon conversion.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


12. Failed key dumps report success ✓ Resolved
Description
The --dump-keys loop catches inspection errors and prints them, but its branch always returns 0.
If every requested file fails to produce a dump, command-line callers still receive a successful
exit status.
Code

src/back/cli.py[R212-214]

+                    )
+                else:
+                    print(generate_modelinfo_dump(filepath))
Evidence
The exception handler prints an error and falls through to an unconditional successful return.

src/back/cli.py[201-215]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Key-dump errors do not affect the command's exit status.
## Fix Focus Areas
- src/back/cli.py[201-215]
## Recommended Fix
Track per-file failures and return a nonzero status when requested dump generation fails.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


13. Some cached models get the wrong status ✓ Resolved
Description
list_cached_inspection_paths() collapses option-specific entries to one filepath, while the loader
verifies one matching identity and separately reads the first matching summary. When the same model
has entries saved with different inspection options, verification status can be assigned to a
different entry's summary.
Code

src/model_cache.py[R295-302]

+            identity.get("resolved_filepath"),
+        ]
+        for candidate in candidates:
+            if not candidate:
+                continue
+            path = str(candidate)
+            key = path.lower()
+            if key in seen:
Evidence
Cache keys vary by inspection options, but both the worker's statuses and the separate summary
iteration match entries by filepath alone.

src/model_cache.py[37-49]
src/model_cache.py[216-239]
src/model_cache.py[286-302]
src/front/cache_load_worker.py[53-75]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Path-only deduplication separates cache verification from the summary it verifies.
## Fix Focus Areas
- src/model_cache.py[216-239]
- src/model_cache.py[286-302]
- src/front/cache_load_worker.py[53-75]
## Recommended Fix
Carry a stable cache entry key and options through path listing, verification, and summary emission, selecting the same entry at every stage.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


14. Key dumps ignore filename detection ✓ Resolved
Description
The ordinary-model branch of --dump-keys calls generate_modelinfo_dump() without the CLI's
inspect_options. With --allow-filename-alias-detection, its diagnostic inspection uses default
options and can report a different architecture from normal inspection.
Code

src/back/cli.py[R209-211]

+                    )
+                    print_report(
+                        filepath, metadata, tensor_info, file_size, inspection=inspection
Evidence
The CLI constructs options but omits them in this branch; the dump function then inspects with its
default options.

src/back/cli.py[194-215]
src/modelinfo.py[73-82]
src/back/inspection_pipeline.py[302-328]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Ordinary key dumps discard selected inspection options.
## Fix Focus Areas
- src/back/cli.py[194-215]
- src/modelinfo.py[73-82]
## Recommended Fix
Pass `inspect_options` into `generate_modelinfo_dump()` so dump inspection honors the same CLI flags.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


15. Visual model memory estimates use a fallback ✓ Resolved
Description
project_resources() recognizes language domains but not the pipeline's VLM domain when deciding
whether to compute transformer KV cache. A vision-language model with available layer and attention
details consequently uses the non-language fallback estimate.
Code

src/back/estimator.py[R373-375]

+    language_present = facts.domain in LANGUAGE_DOMAINS or bool(
+        (LANGUAGE_DOMAINS | {"Multimodal"}) & set(facts.domains)
+    )
Evidence
Capability facts assign VLM, but fact conversion and the KV-cache gate exclude that domain.

src/back/capability_facts.py[328-333]
src/back/estimator.py[257-264]
src/back/estimator.py[373-386]
src/back/estimator_metadata.py[91-124]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Vision-language capability facts bypass the transformer KV-cache calculation.
## Fix Focus Areas
- src/back/estimator.py[257-264]
- src/back/estimator.py[373-386]
## Recommended Fix
Include the pipeline's `VLM` domain when determining language presence, preserving mixed-domain classification.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


16. Malformed model headers can exhaust memory ✓ Resolved
Description
_read_string() uses a GGUF file's declared 64-bit string length directly as the amount to read.
Inspecting a malformed or untrusted GGUF header can therefore request an excessive allocation before
the reader rejects the file.
Code

src/model_readers.py[R283-285]

+def _read_string(f) -> str:
+    length = _read_u64(f)
+    return _read_exact(f, length).decode("utf-8", errors="replace")
Evidence
The declared length reaches an unrestricted read; the same parser also loops over file-declared
metadata and tensor counts.

src/model_readers.py[266-269]
src/model_readers.py[283-285]
src/model_readers.py[306-365]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
GGUF-declared sizes can drive unbounded header reads and parsing work.
## Fix Focus Areas
- src/model_readers.py[283-285]
- src/model_readers.py[306-365]
## Recommended Fix
Enforce practical byte, string, array, and tensor-count limits before allocating or iterating through declared header contents.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


17. Incomplete shard totals lack a warning ✓ Resolved
Description
_set_from_filename() accepts two matching shards without checking whether their indices cover the
declared shard count. For a set containing shards 1 and 3 of 3, aggregation reports the available
tensors and byte total but adds no warning that shard 2 is absent.
Code

src/back/shard_discovery.py[R180-182]

+        members_with_index.append((other[1], candidate))
+    if len(members_with_index) < 2:
+        return None
Evidence
The tests explicitly preserve gapped shard IDs; unlike unreadable manifest-listed members, absent
filename-discovered members never enter the aggregation loop that emits warnings.

src/back/shard_discovery.py[169-193]
src/back/shard_discovery.py[225-261]
tests/test_shard_discovery.py[67-78]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Partial filename-discovered shard sets produce totals without indicating missing members.
## Fix Focus Areas
- src/back/shard_discovery.py[169-193]
- src/back/shard_discovery.py[225-261]
## Recommended Fix
Preserve partial-set discovery, but compare discovered indices with the declared count and include missing indices in inspection warnings.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Informational

18. Truncated safetensors headers are accepted ✓ Resolved
Description
read_safetensors_header reads the declared header_size bytes and passes them straight to
json.loads. It never checks that header_size fits within file_size, which it computes but does
not use, or that the read actually returned header_size bytes. A corrupt or truncated file whose
remaining bytes happen to form valid JSON is reported as a valid model, and any file can make the
reader buffer and parse up to 200 MB of JSON per inspection.
Code

src/model_readers.py[R116-118]

+        if header_size > 200_000_000:
+            raise ValueError(f"Header size ({header_size}) seems unreasonably large")
+        header = json.loads(f.read(header_size))
Evidence
file_size = os.path.getsize(filepath) on line 109 is never compared to header_size. Line 118
runs json.loads(f.read(header_size)) without checking the length of the bytes read.

src/model_readers.py[106-121]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The safetensors header size is not checked against the file size or the number of bytes actually read.

## Fix Focus Areas
- src/model_readers.py[106-121]

## Recommended Fix
Raise ValueError if `header_size > file_size - 8`. Read into a variable and raise if `len(data) != header_size` before calling json.loads.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


19. A stale settings dialog backup is committed ✓ Resolved
Description
src/front/settings_dialog.py.bak, a 341-line older copy of the settings dialog, is added next to
the live settings_dialog.py. Linters, tests and packaging all ignore it, so it will drift out of
date and mislead anyone searching the code for settings dialog behaviour.
Code

src/front/settings_dialog.py.bak[1]

+"""Settings dialog widget used by the Model Inspector GUI."""
Evidence
Both src/front/settings_dialog.py and src/front/settings_dialog.py.bak exist in the PR branch. Only
the .py file is imported, by integration_controller and gui.

src/front/integration_controller.py[55-58]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A backup copy of settings_dialog.py is committed to the source tree.

## Fix Focus Areas
- src/front/settings_dialog.py.bak[1-1]

## Recommended Fix
Remove the file. Optionally add `*.bak` to .gitignore.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


20. Published package links to the wrong repository ✓ Resolved
Description
[project.urls] repository points to https://github.com/ggml-org/llama.cpp, which is not this
project. That URL is written into the wheel METADATA that the release workflow publishes, so users
following the package's repository link land on llama.cpp.
Code

pyproject.toml[R25-26]

+repository = "https://github.com/ggml-org/llama.cpp"
+
Evidence
pyproject.toml line 26 sets the repository URL to llama.cpp. The release workflow builds the wheel
from this metadata and attaches it to the GitHub release.

pyproject.toml[25-26]
.github/workflows/release.yml[30-54]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The project repository URL in pyproject.toml points to llama.cpp.

## Fix Focus Areas
- pyproject.toml[25-26]

## Recommended Fix
Set `repository` to this project's GitHub URL.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Compliance rules (platform): 1 rule
Review mode: 🧠 Deep: This is an exceptionally broad, logic-dense change spanning core application paths, CI/release workflows, packaging, tests, and Windows environment scripts, creating many independent opportunities for subtle defects.

Grey Divider

Tip of the day
💡 Did you know, you can keep summaries lean with Findings visible per group, which tucks the rest behind a View link

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread src/front/application.py Resolved
Comment thread src/back/shard_discovery.py Resolved
Comment thread src/back/shard_discovery.py Resolved
Comment thread src/model_readers.py Resolved
Comment thread src/back/checkpoint_reader.py Resolved
Comment thread win_clean.bat Resolved
Comment thread pyproject.toml Resolved
Comment thread LICENSE Resolved
Comment thread src/front/settings_dialog.py.bak Resolved
Comment thread src/model_readers.py Resolved
@joeblowma
joeblowma merged commit 207d617 into main Oct 8, 2026
20 checks passed
@joeblowma
joeblowma deleted the moar_stuffs branch October 8, 2026 12:04
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