From 6f2a5ed54d0cee3afb99cbbc26ddadb0c0673fb3 Mon Sep 17 00:00:00 2001 From: Felipe Arce Date: Sat, 13 Jun 2026 01:59:12 -0400 Subject: [PATCH 1/2] chore: add coderabbit configuration file --- .coderabbit.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .coderabbit.yaml diff --git a/.coderabbit.yaml b/.coderabbit.yaml new file mode 100644 index 0000000..5ff9180 --- /dev/null +++ b/.coderabbit.yaml @@ -0,0 +1,20 @@ +language: "en-US" +reviews: + profile: "chill" + request_changes_workflow: false + high_level_summary: true + poem: false + review_status: true + collapse_walkthrough: false +chat: + auto_reply: true +instructions: > + You are reviewing code for the `modelinfo-cli` project. + + Please strictly enforce the following architectural constraints when reviewing: + + 1. Zero-Dependency Parsing: The project must parse binary headers (.safetensors, .gguf) directly using the Python standard library (os, struct, json, zipfile). + 2. No Heavy Imports: Imports such as `torch`, `transformers`, `numpy`, `safetensors`, and `huggingface_hub` are completely banned from the project. + 3. Fast Startup Time: The CLI must execute in under 100ms. Any module that takes time to load must be lazy-imported inside the specific function where it is used. + 4. Sandboxed Pickling: For PyTorch (.pt) files, `pickle.load()` must not be used without a custom restricted `pickle.Unpickler` that blocks arbitrary code execution. + 5. Flat Memory Profile: Actual tensor weight matrices must never be loaded into memory. Code must only read the metadata headers and stop. From b211b7cc8a2f4b9df18e14645ad4d27ff10591f3 Mon Sep 17 00:00:00 2001 From: Felipe Arce Date: Sat, 13 Jun 2026 02:01:37 -0400 Subject: [PATCH 2/2] fix: move custom instructions to reviews.path_instructions to satisfy schema v2 --- .coderabbit.yaml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 5ff9180..d8bc975 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -6,15 +6,17 @@ reviews: poem: false review_status: true collapse_walkthrough: false + path_instructions: + - path: "**/*" + instructions: > + You are reviewing code for the `modelinfo-cli` project. + + Please strictly enforce the following architectural constraints when reviewing: + + 1. Zero-Dependency Parsing: The project must parse binary headers (.safetensors, .gguf) directly using the Python standard library (os, struct, json, zipfile). + 2. No Heavy Imports: Imports such as `torch`, `transformers`, `numpy`, `safetensors`, and `huggingface_hub` are completely banned from the project. + 3. Fast Startup Time: The CLI must execute in under 100ms. Any module that takes time to load must be lazy-imported inside the specific function where it is used. + 4. Sandboxed Pickling: For PyTorch (.pt) files, `pickle.load()` must not be used without a custom restricted `pickle.Unpickler` that blocks arbitrary code execution. + 5. Flat Memory Profile: Actual tensor weight matrices must never be loaded into memory. Code must only read the metadata headers and stop. chat: auto_reply: true -instructions: > - You are reviewing code for the `modelinfo-cli` project. - - Please strictly enforce the following architectural constraints when reviewing: - - 1. Zero-Dependency Parsing: The project must parse binary headers (.safetensors, .gguf) directly using the Python standard library (os, struct, json, zipfile). - 2. No Heavy Imports: Imports such as `torch`, `transformers`, `numpy`, `safetensors`, and `huggingface_hub` are completely banned from the project. - 3. Fast Startup Time: The CLI must execute in under 100ms. Any module that takes time to load must be lazy-imported inside the specific function where it is used. - 4. Sandboxed Pickling: For PyTorch (.pt) files, `pickle.load()` must not be used without a custom restricted `pickle.Unpickler` that blocks arbitrary code execution. - 5. Flat Memory Profile: Actual tensor weight matrices must never be loaded into memory. Code must only read the metadata headers and stop.